Improve adaptive width for Attributes View (#9280)

* 🎨 Attrs View adaptive width

* 🎨 Add CSS class `av__body`

* 🎨 add margins for attribute view

* 🎨 add max-width for attribute view

* Squashed commit of the following:

commit 642d041513
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 13:36:25 2023 +0800

    🔖 Release v2.10.8

commit 43e53672b0
Merge: 6b0f8e00a 0e3b78020
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 3 13:28:32 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 6b0f8e00a8
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 3 13:28:08 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9334

commit 0e3b780201
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 13:03:48 2023 +0800

    📝 Update changelogs

commit cc3b4e320e
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 13:01:11 2023 +0800

    🎨 Database template column support using values from other columns https://github.com/siyuan-note/siyuan/issues/9327

commit 29f34fe8b8
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 12:56:13 2023 +0800

    🎨 Database template column support using values from other columns https://github.com/siyuan-note/siyuan/issues/9327

commit 7556d1c3a2
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 11:49:12 2023 +0800

    🎨 Database template column support using values from other columns https://github.com/siyuan-note/siyuan/issues/9327

commit 558422c407
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 11:46:25 2023 +0800

    🎨 Database template column support using values from other columns https://github.com/siyuan-note/siyuan/issues/9327

commit 433cb91d75
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 10:33:41 2023 +0800

    ⬆️ Upgrade kernel deps

commit c5a25fe88f
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 08:52:33 2023 +0800

    🐛 Database render deleted block https://ld246.com/article/1695790906050/comment/1696234209062?r=88250#comments

commit f6a8ca20cd
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 3 08:39:36 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/8766

commit 11cc108893
Author: Daniel <845765@qq.com>
Date:   Tue Oct 3 07:57:36 2023 +0800

    🐛 Create doc with ref Fix https://github.com/siyuan-note/siyuan/issues/9329

commit d869aef346
Author: Daniel <845765@qq.com>
Date:   Mon Oct 2 22:46:36 2023 +0800

    🎨 The access authorization code command line parameter must be set when deploying via Docker https://github.com/siyuan-note/siyuan/issues/9328

commit 3d7bf2eb0f
Author: Daniel <845765@qq.com>
Date:   Mon Oct 2 22:39:08 2023 +0800

    🎨 Remove the access authorization code setting item on the browser-end https://github.com/siyuan-note/siyuan/issues/9331

commit 279e17e8b5
Author: Daniel <845765@qq.com>
Date:   Mon Oct 2 22:15:33 2023 +0800

    🎨 The access authorization code command line parameter must be set when deploying via Docker https://github.com/siyuan-note/siyuan/issues/9328

commit d2356754dd
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 18:41:51 2023 +0800

    📝 Update changelogs

commit 4fdd0ddef0
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 18:37:39 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit b4bded40e3
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 18:24:16 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit bfd27a62d1
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 18:22:39 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit 0aa61fe5b7
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 18:14:31 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit 7d1e1bf2e5
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 18:02:31 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit 8c31eb0eac
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 17:59:16 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/8766

commit 37892e786b
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 17:58:48 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/8766

commit f965ef0945
Merge: b709c8458 b2f5ab570
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 17:41:15 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit b709c84585
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 17:41:00 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/8766

commit b2f5ab5700
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 17:36:22 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit b833087cb6
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 17:33:53 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit dbdddd7ff3
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 17:16:08 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit b981fa08a0
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 17:05:06 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/8766

commit 6e475e1857
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 11:05:24 2023 +0800

    📝 Update changelogs

commit df38f89f40
Merge: 465375422 b69e8d335
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 11:02:11 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 4653754221
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 11:01:57 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9291

commit b69e8d3357
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 10:58:46 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit df487a7c6a
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 10:49:52 2023 +0800

    🐛 flash card zoomin status

commit c0424caf67
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 10:42:12 2023 +0800

    🎨 Add template type column to Attribute View https://github.com/siyuan-note/siyuan/issues/8766

commit e8359edebc
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 10:27:07 2023 +0800

    🚨

commit c3212235b7
Merge: 64900706b 702926430
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 10:26:51 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 64900706b2
Author: Vanessa <lly219@gmail.com>
Date:   Sun Oct 1 10:26:31 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9313

commit 7029264300
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 10:03:07 2023 +0800

    📝 Update changelogs

commit 29d155d0cd
Author: Daniel <845765@qq.com>
Date:   Sun Oct 1 09:37:46 2023 +0800

    🎨 Improve missing line breaks when exporting RTF Fix https://github.com/siyuan-note/siyuan/issues/9325

commit 05cfcf7c2b
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 20:46:00 2023 +0800

    🎨 https://ld246.com/article/1695361968294

commit 67e0dad0a7
Merge: 856445a6e fee908d01
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 20:30:21 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 856445a6ef
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 20:30:06 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9323

commit fee908d01e
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 20:19:26 2023 +0800

    🐛 The image does not display after pasting some PDF rectangular annotations Fix https://github.com/siyuan-note/siyuan/issues/9321

commit 11d2f7c580
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 20:18:27 2023 +0800

    🐛 The image does not display after pasting some PDF rectangular annotations Fix https://github.com/siyuan-note/siyuan/issues/9321

commit 83dce4f3e6
Merge: 1f2faecf4 49d92538d
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 19:55:15 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 1f2faecf4d
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 19:55:01 2023 +0800

     breadcrumb

commit 49d92538df
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 19:52:26 2023 +0800

    🐛 The subdoc creation path is unstable when a parent doc with the same name exists Fix https://github.com/siyuan-note/siyuan/issues/9322

commit 17dd264479
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 19:34:28 2023 +0800

    🎨 Improve handling of copy block ref when including images https://github.com/siyuan-note/siyuan/issues/9317

commit e74733b4e1
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 17:57:23 2023 +0800

    ♻️ Refactor create doc by hpath

commit f608da26a5
Merge: 6b2a4ff0a 121d33e74
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 19:25:39 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 6b2a4ff0aa
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 19:25:20 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9317

commit 121d33e74d
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 17:56:47 2023 +0800

    🎨 Improve handling of copy block ref when including images https://github.com/siyuan-note/siyuan/issues/9317

commit 82bed847e6
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 14:40:45 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9320

commit f8b272d596
Merge: 2dae1200b ca855c1fa
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 13:57:55 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 2dae1200b4
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 13:57:40 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9316

commit ca855c1fa5
Author: Daniel <845765@qq.com>
Date:   Sat Sep 30 11:57:37 2023 +0800

    🎨 Attribute Panel - Database sort attributes by view column order https://github.com/siyuan-note/siyuan/issues/9319

commit 1063f50375
Author: Vanessa <lly219@gmail.com>
Date:   Sat Sep 30 11:21:46 2023 +0800

    💄 https://github.com/siyuan-note/siyuan/issues/9318

commit 1f899aaf3c
Author: Vanessa <lly219@gmail.com>
Date:   Fri Sep 29 21:41:14 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9281

commit 2b9bec8e8b
Author: Daniel <845765@qq.com>
Date:   Fri Sep 29 17:33:18 2023 +0800

    🎨 Ctrl+N should follow notebook create save path https://ld246.com/article/1695965429553

commit 41e35ea795
Author: Vanessa <lly219@gmail.com>
Date:   Thu Sep 28 23:45:23 2023 +0800

    🚨

commit 6a37b86613
Author: Vanessa <lly219@gmail.com>
Date:   Thu Sep 28 23:41:44 2023 +0800

    🚨

commit 4c6b695dae
Merge: df3f444e4 dc03a5cf3
Author: Vanessa <lly219@gmail.com>
Date:   Thu Sep 28 23:41:18 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit df3f444e48
Author: Vanessa <lly219@gmail.com>
Date:   Thu Sep 28 23:40:44 2023 +0800

    ♻️ https://github.com/siyuan-note/siyuan/pull/9300

commit dc03a5cf38
Author: Daniel <845765@qq.com>
Date:   Thu Sep 28 22:46:29 2023 +0800

    ⬆️ Upgrade kernel deps

commit 172b7ed018
Author: Daniel <845765@qq.com>
Date:   Thu Sep 28 22:39:12 2023 +0800

    🎨 Apply result optimized by FSRS optimizer https://github.com/siyuan-note/siyuan/issues/9309

commit 6354d04e4b
Author: Daniel <845765@qq.com>
Date:   Thu Sep 28 22:22:17 2023 +0800

    🎨 Apply result optimized by FSRS optimizer https://github.com/siyuan-note/siyuan/issues/9309

commit b2a27bb54c
Author: Yingyi / 颖逸 <49649786+Zuoqiu-Yingyi@users.noreply.github.com>
Date:   Thu Sep 28 22:38:49 2023 +0800

    Refactor code language and ts types (#9300)

    * 🎨 Code block language list adds custom languages

    * Update index.d.ts

    * 🎨 Improve global variable type definition

    * 🎨 Improve global variable type definition

    * 🎨 Add constant `EXTRA_CODE_LANGUAGES`

commit 17d2a16a94
Author: Vanessa <lly219@gmail.com>
Date:   Thu Sep 28 22:31:33 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9264

commit ceb9aef1d6
Author: Vanessa <lly219@gmail.com>
Date:   Thu Sep 28 17:25:18 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9303

* 🎨 Improve the width of image in attribute view cell

* 🎨 Adjust the style of rows' gutter

* Merge tag 'v2.10.9-dev2' into feat/attrs-view-adaptive-width

* 🎨 Improve the style of rows' gutter

* 🐛 Improve the style of icon in attribute view

* 🎨 Improve preview text fields

* Revert Merge tag 'v2.10.9-dev2' into feat/attrs-view-adaptive-width

* 🎨 Improve the style of image in attribute view cell

* 🎨 Improve the style of firstcol

* 🐛 Fix check icon click event handle

* Merge tag 'v2.10.9-dev3' into feat/attrs-view-adaptive-width

* Merge tag 'v2.10.9' into feat/attrs-view-adaptive-width

* Merge tag 'v2.10.10' into feat/attrs-view-adaptive-width

* Squashed commit of the following:

commit c8924e37ae
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 12:14:12 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9409

commit 879fdd827d
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 11:56:16 2023 +0800

    💄 dragover

commit 9978827389
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 11:34:42 2023 +0800

    🎨 数据库块适配外观和宽度调整

commit a20ffeb12b
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 11:20:17 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9412

commit f2075fafac
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 11:04:23 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit 5e2910a4e6
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 11:00:46 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit ac7f8d36df
Merge: 9ae8400b4 d78a0205f
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 10:56:40 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 9ae8400b47
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 10:56:21 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit d78a0205f5
Author: Daniel <845765@qq.com>
Date:   Sat Oct 14 10:51:46 2023 +0800

    🎨 Database table view breadcrumb

commit 6b1a2925c9
Merge: 25109b906 9766020b8
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 10:49:46 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 25109b906f
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 10:49:35 2023 +0800

    🎨 数据库块适配外观和宽度调整

commit 9766020b89
Author: Daniel <845765@qq.com>
Date:   Sat Oct 14 10:08:57 2023 +0800

    🎨 Update text

commit ab67389650
Merge: 7d6f9bb0d 39c5744f2
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 10:01:57 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 7d6f9bb0df
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 10:01:42 2023 +0800

    🎨 数据库不能设置布局

commit 39c5744f2f
Author: Daniel <845765@qq.com>
Date:   Sat Oct 14 09:46:29 2023 +0800

    🐛 Database table view export does not display select content Fix https://github.com/siyuan-note/siyuan/issues/9428

commit 87ecb7f24a
Author: Daniel <845765@qq.com>
Date:   Sat Oct 14 09:37:47 2023 +0800

    🎨 Update text

commit 69d8c93c98
Merge: 623f30b5f f6780c126
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 09:21:54 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 623f30b5fc
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 09:21:44 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit f6780c126a
Author: Daniel <845765@qq.com>
Date:   Sat Oct 14 09:20:51 2023 +0800

    🎨 Supports searching database view content https://github.com/siyuan-note/siyuan/issues/9419

commit fd94e9df0c
Author: Vanessa <lly219@gmail.com>
Date:   Sat Oct 14 00:04:16 2023 +0800

    🎨

commit 51f66879cc
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 23:50:31 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit 49305b8911
Merge: 2f0f563e1 8399aba10
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 23:26:15 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 2f0f563e12
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 23:25:58 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit 8399aba10b
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 23:22:17 2023 +0800

    🎨 Supports searching database view content https://github.com/siyuan-note/siyuan/issues/9419

commit 22efb3d523
Merge: f95084e96 c3d1c04af
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 23:07:13 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit f95084e96a
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 23:06:53 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9419

commit c3d1c04af4
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 22:50:11 2023 +0800

    🎨 Supports searching database view content https://github.com/siyuan-note/siyuan/issues/9419

commit a11ea9c347
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 22:37:15 2023 +0800

    💄

commit 99ec5c10a4
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 22:32:17 2023 +0800

    🎨 showHiddenFiles

commit 49426ac916
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 22:15:20 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9425

commit d445c5401f
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 21:54:35 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9421

commit 0c4aee7388
Merge: c34d84ce2 daa9ddfd5
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 21:50:28 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit c34d84ce29
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 21:50:14 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9421

commit daa9ddfd50
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 14:43:43 2023 +0800

    🎨 Don't load plugin when the user hasn't agreed to trust bazaar content yet Fix https://github.com/siyuan-note/siyuan/issues/9426

commit 01b19ea2c8
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 14:03:41 2023 +0800

    🎨 Fix database table view loading https://ld246.com/article/1697168944677

commit 7a9a85ea32
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 13:55:27 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9417

commit 1815ec1b39
Merge: 73edee57a 00ed190ad
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 13:37:45 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 73edee57a4
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 13:37:32 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9417

commit 00ed190ad7
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 13:21:53 2023 +0800

    🎨 Fix database table view loading https://ld246.com/article/1697168944677

commit 48e871c75e
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 12:33:29 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9417

commit 3554333da9
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 11:55:51 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9417

commit af810b279d
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 11:34:19 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9423

commit 673c952f07
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 11:30:44 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9423

commit 3b87a0d9ed
Merge: ed31305d1 3de7781b1
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 11:09:07 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit ed31305d1d
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 11:08:56 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9421

commit 3de7781b1c
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 10:44:29 2023 +0800

    🎨 Supports searching database view content https://github.com/siyuan-note/siyuan/issues/9419

commit 2304921fee
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 10:42:51 2023 +0800

    🎨 Update flashcard user guide

commit 55fb8b19ab
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 10:14:11 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9420

commit 8998de9d81
Merge: 5b38e79be df9b55c71
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 09:37:35 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 5b38e79be7
Author: Vanessa <lly219@gmail.com>
Date:   Fri Oct 13 09:37:24 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9420

commit df9b55c71b
Author: Daniel <845765@qq.com>
Date:   Fri Oct 13 08:46:29 2023 +0800

    🎨 Database template columns support sort

commit 3da9f0f1e1
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 20:40:09 2023 +0800

    🐛 新增行后弹出的输入框

commit 79a88dfbec
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 20:23:18 2023 +0800

    🚨

commit 40a1e6d5cc
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 20:21:53 2023 +0800

    💄 database loading

commit 2872dab9eb
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 20:11:59 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9418

commit 025a8ea5a7
Merge: 02ec0f6e5 0ea9b8f5a
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 20:04:13 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 02ec0f6e5a
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 20:04:01 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9418

commit 0ea9b8f5a7
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 19:58:32 2023 +0800

    🎨 Database block loading animation https://github.com/siyuan-note/siyuan/issues/9416

commit 1590913db7
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 19:55:57 2023 +0800

    🎨 Update attr panel for av

commit d257caff8d
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 19:38:37 2023 +0800

    🎨 Database block loading animation https://github.com/siyuan-note/siyuan/issues/9416

commit fdaf8d7e59
Merge: 70e82cd98 238609f25
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 17:34:36 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 70e82cd981
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 17:34:19 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9416

commit 238609f25f
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 17:33:23 2023 +0800

     Improve performance of loading database table view

commit 2dd558b609
Merge: fe0b1e8d6 8fb35f556
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 17:16:45 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit fe0b1e8d60
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 17:16:31 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9415

commit 8fb35f5565
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 17:15:36 2023 +0800

    🎨 Database template columns support number filter Fix https://github.com/siyuan-note/siyuan/issues/9414

commit 01670f2b00
Merge: f792d141f ffcdb5d39
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 17:07:48 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit f792d141fc
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 17:07:09 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9408

commit ffcdb5d398
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 16:37:09 2023 +0800

    🐛 SVG images cannot be displayed on some systems https://github.com/siyuan-note/siyuan/issues/9413

commit fb1f80cf4d
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 12:22:55 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9406

commit da51aded35
Merge: a4bcae87e 09ef5fddf
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 12:11:42 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit a4bcae87ee
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 12:11:29 2023 +0800

    🐛 数据库数字填0无效

commit 09ef5fddf9
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 12:01:53 2023 +0800

    🎨 Database template columns support calculations https://github.com/siyuan-note/siyuan/issues/9408

commit 1b595d014a
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 12:01:53 2023 +0800

    🎨 #9408

commit 21d1a0515a
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 11:54:15 2023 +0800

    💄 编辑后表头不固定

commit c5206f7084
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 11:14:29 2023 +0800

    🐛 fix https://github.com/siyuan-note/siyuan/issues/9405

commit f0f55d3b02
Merge: 019412404 92151f715
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 10:54:19 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 0194124047
Author: Vanessa <lly219@gmail.com>
Date:   Thu Oct 12 10:54:09 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9403

commit 92151f7150
Author: Daniel <845765@qq.com>
Date:   Thu Oct 12 10:12:44 2023 +0800

    🎨 Change database template column custom attribute action Fix https://github.com/siyuan-note/siyuan/issues/9401

commit b8e8aa0593
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 17:00:21 2023 +0800

    🔨 Clean code

commit b17aff5773
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 23:54:40 2023 +0800

    🐛

commit 11174958bc
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 23:50:28 2023 +0800

    🐛 预览模式下点击只读

commit 130884d758
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 23:23:01 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9404

commit 7486e1a6e2
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 17:28:40 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9402

commit eb93255cf3
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 14:57:14 2023 +0800

    🔨 Clean code

commit fd46593815
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 14:55:06 2023 +0800

    🔖 Release v2.10.10

commit 337c79571d
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 11:59:25 2023 +0800

    🎨 Improve install new version on Windows

commit f6f1148de1
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 11:08:44 2023 +0800

    📝 Update changelogs

commit f0ad3268ba
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 11:30:00 2023 +0800

    🎨

commit 2eb89f0673
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 11:25:21 2023 +0800

    🚨

commit 0db516e4b9
Merge: 23c3f9f15 e43cf4cf5
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 11:24:41 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 23c3f9f154
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 11:24:29 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9383

commit e43cf4cf55
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 10:52:10 2023 +0800

    📝 Update changelogs

commit b30cb0984a
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 10:49:04 2023 +0800

    📝 Update changelogs

commit d4a3226a56
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 10:48:40 2023 +0800

    📝 Update changelogs

commit 65adab61c9
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 10:48:29 2023 +0800

    🎨 Adding row overwriting data after enabling filter in database https://github.com/siyuan-note/siyuan/issues/9395

commit 210a3ac547
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 10:04:39 2023 +0800

    🎨 Improve handling of database column filters containing empty values Fix https://github.com/siyuan-note/siyuan/issues/9394

commit 37f950ba4f
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 09:39:22 2023 +0800

    💄 icon

commit 7b1c30bc26
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 09:30:13 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9396

commit 6ef13aba78
Merge: acd2eb167 e4907e789
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 09:18:43 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit acd2eb1677
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 09:18:33 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9396

commit e4907e7896
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 09:16:57 2023 +0800

    🎨 The block in the editor shows the database icon https://github.com/siyuan-note/siyuan/issues/8894

commit 6f249d768f
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 09:15:03 2023 +0800

    ⬆️ Upgrade kernel deps

commit bb04bf9f70
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 09:04:39 2023 +0800

    🎨 Show notebooks in hpath of block ref search list results https://github.com/siyuan-note/siyuan/issues/9378

commit 30b0dd08fa
Merge: c1de5e148 ccb65454a
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 08:58:55 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit c1de5e1488
Author: Vanessa <lly219@gmail.com>
Date:   Wed Oct 11 08:58:44 2023 +0800

    💄 https://github.com/siyuan-note/siyuan/issues/8894

commit ccb65454a2
Author: Daniel <845765@qq.com>
Date:   Wed Oct 11 08:50:13 2023 +0800

    🎨 Improve handling of database column filters containing empty values Fix https://github.com/siyuan-note/siyuan/issues/9394

commit 28e4e1ef2f
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 22:31:46 2023 +0800

    🎨 Rename the .sya annotation file when renaming a PDF asset https://github.com/siyuan-note/siyuan/issues/9390

commit 964c822c2b
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 22:02:46 2023 +0800

    🎨 Improve database created and updated column values https://github.com/siyuan-note/siyuan/issues/9391

commit f404d7fe85
Merge: ed7084c7b 301b6d9f7
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 22:00:57 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit ed7084c7be
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 22:00:43 2023 +0800

    💄

commit 301b6d9f70
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 21:55:43 2023 +0800

    🎨 Improve database created and updated column values https://github.com/siyuan-note/siyuan/issues/9391

commit f62be4719e
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 21:50:36 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9385

commit 8e2565f347
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 21:39:57 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9386

commit e54d8f1a4d
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 21:31:20 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9393

commit 1fb7187936
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 21:23:29 2023 +0800

    📝 fix https://github.com/siyuan-note/siyuan/issues/9392

commit ea00753f38
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 21:18:17 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9392

commit 4318aa4463
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 20:51:28 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9376

commit f1d4f8472b
Merge: 3f4c00efc 64df2ffa4
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 20:42:43 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 3f4c00efcd
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 20:42:14 2023 +0800

    🎨 https://github.com/siyuan-note/siyuan/issues/9376

commit 64df2ffa42
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 20:37:51 2023 +0800

    🎨 Rows in the database without bound blocks should not show created and updated Fix https://github.com/siyuan-note/siyuan/issues/9391

commit 691a0bea33
Merge: 0e5cae300 7e9243d8d
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 20:41:05 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 0e5cae3001
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 20:40:38 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9206

commit 7e9243d8dc
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 20:05:48 2023 +0800

    🎨 Rows in the database without bound blocks should not show created and updated Fix https://github.com/siyuan-note/siyuan/issues/9391

commit 7aa4aacfc3
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 17:30:10 2023 +0800

    💄 fix https://github.com/siyuan-note/siyuan/issues/9206

commit d02381d3f2
Merge: 449d2dbf8 6e9099ea1
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 17:09:14 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 449d2dbf87
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 17:09:03 2023 +0800

    ♻️ https://github.com/siyuan-note/siyuan/pull/9256

commit 6e9099ea12
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 16:52:40 2023 +0800

    🔒 Authenticate requests of assets other than 127.0.0.1 Fix https://github.com/siyuan-note/siyuan/issues/9388

commit 11786381cf
Author: Yingyi / 颖逸 <49649786+Zuoqiu-Yingyi@users.noreply.github.com>
Date:   Tue Oct 10 16:21:50 2023 +0800

    Improve event bus `open-siyuan-url-plugin` (#9256)

    * 🎨 Improve plugin event bus `open-siyuan-url-plugin`

    * 🐛 Avoid plug-in names with the same prefix

    * Update onGetConfig.ts

commit 2c36af78bc
Author: Vanessa <lly219@gmail.com>
Date:   Tue Oct 10 16:15:24 2023 +0800

    🚨

commit b0e3efa774
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 11:41:46 2023 +0800

    🔖 Release v2.10.9

commit d690475ae6
Merge: c8a6f4185 811bac942
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 10:58:46 2023 +0800

    Merge remote-tracking branch 'origin/master'

commit c8a6f4185e
Author: Daniel <845765@qq.com>
Date:   Tue Oct 10 10:18:57 2023 +0800

    🔖 Release v2.10.9

commit cdcec7e58d
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 23:29:25 2023 +0800

    📝 Update changelogs

commit 1eccb8ba4d
Merge: a3094fe3e 3827753b7
Author: Vanessa <lly219@gmail.com>
Date:   Mon Oct 9 23:26:13 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit a3094fe3ea
Author: Vanessa <lly219@gmail.com>
Date:   Mon Oct 9 23:25:48 2023 +0800

    🐛 fix https://github.com/siyuan-note/siyuan/issues/9384

commit 3827753b7c
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 23:07:34 2023 +0800

    🎨 Upgrade Electron https://github.com/siyuan-note/siyuan/issues/9342

commit 567394afba
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 22:42:39 2023 +0800

    📝 Update changelogs

commit ff6220abaa
Author: Yingyi / 颖逸 <49649786+Zuoqiu-Yingyi@users.noreply.github.com>
Date:   Mon Oct 9 21:51:39 2023 +0800

    🎨 add `@electron/remote` dependency (#9381)

commit da0fa0853f
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 21:45:36 2023 +0800

    🎨 Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382

commit 0ed6884761
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 21:09:35 2023 +0800

    🐛 Update av Fix https://github.com/siyuan-note/siyuan/issues/9380

commit 288eb24474
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 17:30:19 2023 +0800

    🎨 Show notebooks in hpath of block ref search list results https://github.com/siyuan-note/siyuan/issues/9378

commit 4965b7b845
Merge: 803069d80 902849153
Author: Vanessa <lly219@gmail.com>
Date:   Mon Oct 9 17:18:28 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 803069d807
Author: Vanessa <lly219@gmail.com>
Date:   Mon Oct 9 17:18:17 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9370

commit 902849153a
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 17:17:40 2023 +0800

    🎨 Add created and updated type column to database https://github.com/siyuan-note/siyuan/issues/9371

commit faadbf5960
Author: Daniel <845765@qq.com>
Date:   Mon Oct 9 16:48:28 2023 +0800

    🎨 Add created and updated type column to database https://github.com/siyuan-note/siyuan/issues/9371

commit 9ca11625bd
Merge: 43f06e57d 644e0319d
Author: Vanessa <lly219@gmail.com>
Date:   Mon Oct 9 16:45:06 2023 +0800

    Merge remote-tracking branch 'origin/dev' into dev

commit 43f06e57d9
Author: Vanessa <lly219@gmail.com>
Date:   Mon Oct 9 16:44:46 2023 +0800

    🎨 fix https://github.com/siyuan-note/siyuan/issues/9370

commit 811bac942d
Author: Daniel <845765@qq.com>
Date:   Wed Oct 4 13:03:36 2023 +0800

    🎨 Free disk space for docker image building GitHub Action

commit 66aa802765
Author: Daniel <845765@qq.com>
Date:   Wed Oct 4 13:03:28 2023 +0800

    🎨 Free disk space for docker image building GitHub Action

* Update anno.ts

* Update index.ts

* 🎨 Adapt to align styles

* 🎨 Adapt to using arrow keys/Esc to select a cell/row

* Update row.ts

* 🎨 Adjusted the cell width in attribute view

* 🐛 Fixed the issue that the first column was misaligned

* Update index.ts

* Update action.ts
This commit is contained in:
Yingyi / 颖逸 2023-11-09 16:35:49 +08:00 committed by GitHub
parent 695029776c
commit 2e46bee776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 199 additions and 204 deletions

View File

@ -1,4 +1,8 @@
.av {
display: flex;
flex-direction: column;
align-items: center;
user-select: none;
box-sizing: border-box;
@ -27,6 +31,11 @@
opacity: 1;
}
&__container {
// width: fit-content;
max-width: 100%;
}
&__header {
top: -43px;
z-index: 2;
@ -60,14 +69,15 @@
&__gutters {
@extend .protyle-gutters;
position: fixed;
position: absolute;
line-height: normal;
top: 0;
left: -44px;
left: 0;
opacity: 0;
display: flex;
width: 24px;
svg {
height: 25px;
button {
padding: 0;
}
}
@ -84,6 +94,10 @@
cursor: pointer;
}
&__body {
float: left;
}
&__row {
display: flex;
border-bottom: 1px solid var(--b3-theme-surface-lighter);
@ -111,10 +125,6 @@
&--select {
background-color: var(--b3-theme-primary-lightest);
.av__firstcol svg {
opacity: 1;
}
}
&--header {
@ -181,18 +191,15 @@
&--add {
color: var(--b3-theme-on-surface);
padding: 5px 5px 5px 7px;
display: flex;
align-items: center;
transition: background 20ms ease-in 0s;
font-size: 87.5%;
svg {
height: 12px;
width: 12px;
color: var(--b3-theme-on-surface);
margin-right: 5px;
flex-shrink: 0;
.av__calc {
padding: 0 5px;
align-items: center;
position: sticky;
left: 49px;
}
&:hover {
@ -201,6 +208,27 @@
}
}
&__firstcol {
display: flex;
flex-direction: row-reverse;
position: sticky;
left: 0;
z-index: 1;
width: 48px;
background-color: var(--b3-theme-background);
border-right: 1px solid var(--b3-theme-surface-lighter);
svg {
color: var(--b3-theme-on-surface);
height: 36px;
width: 24px;
padding: 5px;
box-sizing: border-box;
float: left;
}
}
&__cell {
box-sizing: border-box;
position: relative;
@ -234,6 +262,18 @@
top: 5px;
}
&[data-wrap=true] {
white-space: pre-wrap;
}
&[data-wrap=false] {
white-space: nowrap;
img.av__cellassetimg {
max-height: 26px;
}
}
&:hover .block__icon {
opacity: 1;
background-color: var(--b3-theme-background-light) !important;
@ -259,6 +299,7 @@
&__celltext {
overflow: hidden;
line-height: normal;
.b3-chip {
margin: 1px 2px;
@ -276,22 +317,6 @@
}
}
&__firstcol {
svg {
color: var(--b3-theme-on-surface);
height: 33px;
width: 24px;
opacity: 0;
padding: 5px;
box-sizing: border-box;
float: left;
}
&:hover svg {
opacity: 1;
}
}
&__widthdrag {
position: absolute;
cursor: col-resize;
@ -373,20 +398,13 @@
&.protyle-wysiwyg--select,
&.protyle-wysiwyg--hl {
.av__row--header,
.av__row--footer {
.av__row--footer,
.av__firstcol {
background-color: transparent;
}
}
}
img.av__cellassetimg {
max-height: 20px;
border-radius: var(--b3-border-radius);
margin: 1px 2px;
max-width: none;
vertical-align: top;
}
html[data-theme-mode="dark"] .av__panel .b3-menu__item {
mix-blend-mode: lighten;
}

View File

@ -69,6 +69,10 @@
line-height: 26px;
min-height: 26px;
img.av__cellassetimg {
height: 32px;
}
&:hover {
background-color: var(--b3-theme-background);
}

View File

@ -8,6 +8,7 @@
-webkit-font-smoothing: subpixel-antialiased;
color: var(--b3-tooltips-color);
word-wrap: break-word;
white-space: pre;
background-color: var(--b3-tooltips-background);
border-radius: var(--b3-border-radius);
line-height: 17px;

View File

@ -4,18 +4,10 @@ import {Plugin} from "./index";
/// #if !MOBILE
import {exportLayout, resizeTopBar} from "../layout/util";
/// #endif
import {API} from "./API";
import {PluginRequire} from "./require";
import {getFrontend, isMobile, isWindow} from "../util/functions";
import {Constants} from "../constants";
const getObject = (key: string) => {
const api = {
siyuan: API
};
// @ts-ignore
return api[key];
};
const runCode = (code: string, sourceURL: string) => {
return window.eval("(function anonymous(require, module, exports){".concat(code, "\n})\n//# sourceURL=").concat(sourceURL, "\n"));
};
@ -40,7 +32,7 @@ const loadPluginJS = async (app: App, item: IPluginData) => {
const exportsObj: { [key: string]: any } = {};
const moduleObj = {exports: exportsObj};
try {
runCode(item.js, "plugin:" + encodeURIComponent(item.name))(getObject, moduleObj, exportsObj);
runCode(item.js, "plugin:" + encodeURIComponent(item.name))(PluginRequire.require, moduleObj, exportsObj);
} catch (e) {
console.error(`plugin ${item.name} run error:`, e);
return;

11
app/src/plugin/require.ts Normal file
View File

@ -0,0 +1,11 @@
import {API as siyuan} from "./API";
const libs: Record<string, any> = {
siyuan,
} as const;
export const PluginRequire = {
require(module: string) {
return libs[module];
}
}

View File

@ -1616,8 +1616,7 @@ export class Gutter {
click: () => {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.margin = "";
resizeAV(e);
e.style.alignItems = "flex-start";
} else {
e.style.textAlign = "left";
}
@ -1630,8 +1629,7 @@ export class Gutter {
click: () => {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.margin = "0 auto";
resizeAV(e);
e.style.alignItems = "center";
} else {
e.style.textAlign = "center";
}
@ -1644,8 +1642,7 @@ export class Gutter {
click: () => {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.margin = "0 0 0 auto";
resizeAV(e);
e.style.alignItems = "flex-end";
} else {
e.style.textAlign = "right";
}
@ -1656,7 +1653,11 @@ export class Gutter {
icon: "iconMenu",
click: () => {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
e.style.textAlign = "justify";
if (e.classList.contains("av")) {
e.style.alignItems = "stretch";
} else {
e.style.textAlign = "justify";
}
});
}
}, {
@ -1686,12 +1687,11 @@ export class Gutter {
icon: "iconTrashcan",
click: () => {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
e.style.direction = "";
if (e.classList.contains("av")) {
e.style.margin = "";
resizeAV(e);
e.style.alignItems = "";
} else {
e.style.textAlign = "";
e.style.direction = "";
}
});
}
@ -1754,7 +1754,6 @@ export class Gutter {
id: e.getAttribute("data-node-id"),
data: e.outerHTML
});
resizeAV(e);
});
transaction(protyle, operations, undoOperations);
window.siyuan.menus.menu.remove();

View File

@ -24,6 +24,25 @@ import {unicode2Emoji} from "../../../emoji";
import {selectRow} from "./row";
import * as dayjs from "dayjs";
export const avAdd = (protyle: IProtyle, blockElement: HTMLElement, rowElement: HTMLElement, above: boolean) => {
const avID = blockElement.getAttribute("data-av-id");
const srcIDs = [Lute.NewNodeID()];
const previousID = above ? (rowElement.previousElementSibling.getAttribute("data-id") || "") : rowElement.getAttribute("data-id");
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
previousID,
srcIDs,
isDetached: true,
}], [{
action: "removeAttrViewBlock",
srcIDs,
avID,
}]);
insertAttrViewBlockAnimation(blockElement, 1, previousID, avID);
popTextCell(protyle, [rowElement[above ? "previousElementSibling" : "nextElementSibling"].querySelector('[data-detached="true"]')], "block");
}
export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLElement }) => {
const blockElement = hasClosestBlock(event.target);
if (!blockElement) {
@ -37,6 +56,29 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
}
}
const addRowElement = hasClosestByClassName(event.target, "av__row--add");
if (addRowElement) {
const avID = blockElement.getAttribute("data-av-id");
const srcIDs = [Lute.NewNodeID()];
const previousID = addRowElement.previousElementSibling.getAttribute("data-id") || "";
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
previousID,
srcIDs,
isDetached: true,
}], [{
action: "removeAttrViewBlock",
srcIDs,
avID,
}]);
insertAttrViewBlockAnimation(blockElement, 1, previousID, avID);
popTextCell(protyle, [addRowElement.previousElementSibling.querySelector('[data-detached="true"]')], "block");
event.preventDefault();
event.stopPropagation();
return true;
}
const copyElement = hasClosestByAttribute(event.target, "data-type", "copy");
if (copyElement) {
writeText(copyElement.previousElementSibling.textContent.trim());
@ -63,26 +105,11 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
return true;
}
const gutterElement = hasClosestByClassName(event.target, "ariaLabel");
const gutterElement = hasClosestByClassName(event.target, "av__gutter");
if (gutterElement && gutterElement.parentElement.classList.contains("av__gutters")) {
const rowElement = gutterElement.parentElement.parentElement;
const rowElement = gutterElement.parentElement.parentElement.parentElement;
if (gutterElement.dataset.action === "add") {
const avID = blockElement.getAttribute("data-av-id");
const srcIDs = [Lute.NewNodeID()];
const previousID = event.altKey ? (rowElement.previousElementSibling.getAttribute("data-id") || "") : rowElement.getAttribute("data-id");
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
previousID,
srcIDs,
isDetached: true,
}], [{
action: "removeAttrViewBlock",
srcIDs,
avID,
}]);
insertAttrViewBlockAnimation(blockElement, 1, previousID, avID);
popTextCell(protyle, [rowElement[event.altKey ? "previousElementSibling" : "nextElementSibling"].querySelector('[data-detached="true"]')], "block");
avAdd(protyle, blockElement, rowElement, event.altKey);
} else {
const gutterRect = gutterElement.getBoundingClientRect();
avContextmenu(protyle, rowElement, {
@ -97,10 +124,10 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
return true;
}
const checkElement = hasClosestByClassName(event.target, "av__firstcol");
if (checkElement) {
const firstcolElement = hasClosestByClassName(event.target, "av__firstcol");
if (firstcolElement) {
window.siyuan.menus.menu.remove();
selectRow(checkElement, "toggle");
selectRow(firstcolElement, "toggle");
event.preventDefault();
event.stopPropagation();
return true;
@ -202,7 +229,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
selectRow(cellElement.parentElement.querySelector(".av__firstcol"), "toggle");
} else {
cellElement.parentElement.parentElement.querySelectorAll(".av__row--select").forEach(item => {
item.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconUncheck");
item.querySelector(".av__firstcol .icon__check use").setAttribute("xlink:href", "#iconUncheck");
item.classList.remove("av__row--select");
});
updateHeader(cellElement.parentElement);
@ -221,29 +248,6 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
return true;
}
const addRowElement = hasClosestByClassName(event.target, "av__row--add");
if (addRowElement) {
const avID = blockElement.getAttribute("data-av-id");
const srcIDs = [Lute.NewNodeID()];
const previousID = addRowElement.previousElementSibling.getAttribute("data-id") || "";
transaction(protyle, [{
action: "insertAttrViewBlock",
avID,
previousID,
srcIDs,
isDetached: true,
}], [{
action: "removeAttrViewBlock",
srcIDs,
avID,
}]);
insertAttrViewBlockAnimation(blockElement, 1, previousID, avID);
popTextCell(protyle, [addRowElement.previousElementSibling.querySelector('[data-detached="true"]')], "block");
event.preventDefault();
event.stopPropagation();
return true;
}
return false;
};
@ -259,7 +263,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
blockElement.querySelectorAll(".av__row--select").forEach(item => {
item.classList.remove("av__row--select");
});
blockElement.querySelectorAll(".av__firstcol use").forEach(item => {
blockElement.querySelectorAll(".av__firstcol .icon__check use").forEach(item => {
item.setAttribute("xlink:href", "#iconUncheck");
});
}
@ -269,7 +273,7 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
return true;
}
rowElement.classList.add("av__row--select");
rowElement.querySelector(".av__firstcol use").setAttribute("xlink:href", "#iconCheck");
rowElement.querySelector(".av__firstcol .icon__check use").setAttribute("xlink:href", "#iconCheck");
const rowIds: string[] = [];
const blockIds: string[] = [];
const rowElements = blockElement.querySelectorAll(".av__row--select:not(.av__row--header)");
@ -305,6 +309,24 @@ export const avContextmenu = (protyle: IProtyle, rowElement: HTMLElement, positi
}
});
if (rowIds.length === 1) {
menu.addSeparator();
menu.addItem({
label: window.siyuan.languages.addAttr,
icon: "iconAdd",
type: "submenu",
submenu: [
{
label: window.siyuan.languages.insertRowAbove,
icon: "iconBefore",
click: () => avAdd(protyle, blockElement, rowElement, true),
},
{
label: window.siyuan.languages.insertRowBelow,
icon: "iconAfter",
click: () => avAdd(protyle, blockElement, rowElement, false),
},
]
});
menu.addSeparator();
openEditorTab(protyle.app, rowIds[0]);
menu.addItem({

View File

@ -53,13 +53,13 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) =
}, (response) => {
const data = response.data.view as IAVTable;
// header
let tableHTML = '<div class="av__row av__row--header"><div class="av__firstcol"><svg style="height: 32px"><use xlink:href="#iconUncheck"></use></svg></div>';
let tableHTML = '<div class="av__row av__row--header"><div class="av__firstcol"><svg class="icon__check"><use xlink:href="#iconUncheck"></use></svg></div>';
let calcHTML = "";
data.columns.forEach((column: IAVColumn) => {
if (column.hidden) {
return;
}
tableHTML += `<div class="av__cell" data-col-id="${column.id}" data-icon="${column.icon}" data-dtype="${column.type}"
tableHTML += `<div class="av__cell" data-col-id="${column.id}" data-icon="${column.icon}" data-dtype="${column.type}" data-wrap="${column.wrap}"
style="width: ${column.width || "200px"};
${column.wrap ? "" : "white-space: nowrap;"}">
<div draggable="true" class="av__cellheader">
@ -80,11 +80,17 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
// body
data.rows.forEach((row: IAVRow) => {
tableHTML += `<div class="av__row" data-id="${row.id}">
<div class="av__gutters">
<button class="ariaLabel" data-action="add" data-position="right" aria-label="${isMac() ? window.siyuan.languages.addBelowAbove : window.siyuan.languages.addBelowAbove.replace("", "Alt+")}"><svg><use xlink:href="#iconAdd"></use></svg></button>
<button class="ariaLabel" draggable="true" data-position="right" aria-label="${window.siyuan.languages.rowTip}"><svg><use xlink:href="#iconDrag"></use></svg></button>
</div>
<div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>`;
<div class="av__firstcol">
<svg class="icon__check"><use xlink:href="#iconUncheck"></use></svg>
<div class="av__gutters">
<button class="av__gutter ariaLabel" draggable="true" data-position="right" aria-label="${window.siyuan.languages.rowTip}">
<svg><use xlink:href="#iconDrag"></use></svg>
</button>
<button class="av__gutter ariaLabel" data-action="add" data-position="right" aria-label="${isMac() ? window.siyuan.languages.addBelowAbove : window.siyuan.languages.addBelowAbove.replace("", "Alt+")}">
<svg><use xlink:href="#iconAdd"></use></svg>
</button>
</div>
</div>`;
row.cells.forEach((cell, index) => {
if (data.columns[index].hidden) {
return;
@ -154,12 +160,12 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
text += `<span ${cell.valueType !== "number" ? "" : 'style="right:auto;left:5px"'} data-type="copy" class="b3-tooltips b3-tooltips__n block__icon" aria-label="${window.siyuan.languages.copy}"><svg><use xlink:href="#iconCopy"></use></svg></span>`;
}
}
tableHTML += `<div class="av__cell" data-id="${cell.id}" data-col-id="${data.columns[index].id}"
tableHTML += `<div class="av__cell" data-id="${cell.id}" data-col-id="${data.columns[index].id}" data-wrap="${data.columns[index].wrap}"
${cell.valueType === "block" ? 'data-block-id="' + (cell.value.block.id || "") + '"' : ""}
${cell.value?.isDetached ? ' data-detached="true"' : ""}
style="width: ${data.columns[index].width || "200px"};
${cell.bgColor ? `background-color:${cell.bgColor};` : ""}
white-space: ${data.columns[index].wrap ? "pre-wrap" : "nowrap"};
${cell.valueType !== "number" ? "" : "flex-direction: row-reverse;"}
${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
});
@ -173,7 +179,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
</div>`;
});
setTimeout(() => {
e.firstElementChild.outerHTML = `<div>
e.firstElementChild.outerHTML = `<div class="av__container">
<div class="av__header">
<div class="layout-tab-bar fn__flex">
${tabHTML}
@ -197,13 +203,17 @@ ${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
<div class="av__counter fn__none"></div>
</div>
<div class="av__scroll">
<div style="float: left;">
<div class="av__body">
${tableHTML}
<div class="av__row--add">
<svg><use xlink:href="#iconAdd"></use></svg>
${window.siyuan.languages.addAttr}
<div class="av__firstcol">
<svg><use xlink:href="#iconAdd"></use></svg>
</div>
<div class="av__calc" style>
${window.siyuan.languages.addAttr}
</div>
</div>
<div class="av__row--footer"><div style="width: 24px"></div>${calcHTML}</div>
<div class="av__row--footer"><div class="av__firstcol"></div>${calcHTML}</div>
</div>
</div>
</div>`;

View File

@ -1,27 +1,27 @@
import {hasClosestBlock} from "../../util/hasClosest";
import {focusBlock} from "../../util/selection";
export const selectRow = (checkElement: Element, type: "toggle" | "select" | "unselect" | "unselectAll") => {
const rowElement = checkElement.parentElement;
const useElement = checkElement.querySelector("use");
export const selectRow = (firstcolElement: Element, type: "toggle" | "select" | "unselect" | "unselectAll") => {
const rowElement = firstcolElement.parentElement;
const useElement = firstcolElement.querySelector(".icon__check use");
if (rowElement.classList.contains("av__row--header") || type === "unselectAll") {
if ("#iconCheck" === useElement.getAttribute("xlink:href")) {
rowElement.parentElement.querySelectorAll(".av__firstcol").forEach(item => {
item.querySelector("use").setAttribute("xlink:href", "#iconUncheck");
rowElement.parentElement.querySelectorAll(".av__row .av__firstcol").forEach(item => {
item.querySelector(".icon__check use").setAttribute("xlink:href", "#iconUncheck");
item.parentElement.classList.remove("av__row--select");
});
} else {
rowElement.parentElement.querySelectorAll(".av__firstcol").forEach(item => {
item.querySelector("use").setAttribute("xlink:href", "#iconCheck");
rowElement.parentElement.querySelectorAll(".av__row .av__firstcol").forEach(item => {
item.querySelector(".icon__check use").setAttribute("xlink:href", "#iconCheck");
item.parentElement.classList.add("av__row--select");
});
}
} else {
if (type === "select" || (useElement.getAttribute("xlink:href") === "#iconUncheck" && type === "toggle")) {
checkElement.parentElement.classList.add("av__row--select");
firstcolElement.parentElement.classList.add("av__row--select");
useElement.setAttribute("xlink:href", "#iconCheck");
} else if (type === "unselect" || (useElement.getAttribute("xlink:href") === "#iconCheck" && type === "toggle")) {
checkElement.parentElement.classList.remove("av__row--select");
firstcolElement.parentElement.classList.remove("av__row--select");
useElement.setAttribute("xlink:href", "#iconUncheck");
}
}
@ -37,7 +37,7 @@ export const updateHeader = (rowElement: HTMLElement) => {
const selectCount = rowElement.parentElement.querySelectorAll(".av__row--select:not(.av__row--header)").length;
const diffCount = rowElement.parentElement.childElementCount - 3 - selectCount;
const headElement = rowElement.parentElement.firstElementChild;
const headUseElement = headElement.querySelector("use");
const headUseElement = headElement.querySelector(".icon__check use");
const counterElement = blockElement.querySelector(".av__counter");
const avHeadElement = blockElement.querySelector(".av__header") as HTMLElement;
if (diffCount === 0 && rowElement.parentElement.childElementCount - 3 !== 0) {

View File

@ -24,30 +24,6 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
}
}
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
if (item.parentElement.classList.contains("protyle-wysiwyg")) {
const headerTop = item.offsetTop + 43;
const headerElement = item.querySelector(".av__row--header") as HTMLElement;
if (headerElement) {
if (headerTop < element.scrollTop && headerTop + headerElement.parentElement.clientHeight > element.scrollTop) {
headerElement.style.transform = `translateY(${element.scrollTop - headerTop}px)`;
} else {
headerElement.style.transform = "";
}
}
const footerElement = item.querySelector(".av__row--footer") as HTMLElement;
if (footerElement) {
const footerBottom = headerTop + footerElement.parentElement.clientHeight;
const scrollBottom = element.scrollTop + element.clientHeight + 5;
if (headerTop + 42 + 36 * 2 < scrollBottom && footerBottom > scrollBottom) {
footerElement.style.transform = `translateY(${scrollBottom - footerBottom}px)`;
} else {
footerElement.style.transform = "";
}
}
}
});
if (!protyle.element.classList.contains("block__edit") && !isMobile()) {
protyle.contentElement.setAttribute("data-scrolltop", element.scrollTop.toString());
}

View File

@ -42,11 +42,6 @@ export const resize = (protyle: IProtyle) => {
}
}
}
if (abs.padding > MIN_ABS || abs.width > MIN_ABS || isNaN(abs.padding)) {
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
resizeAV(item);
});
}
}, Constants.TIMEOUT_TRANSITION); // 等待 setPadding 动画结束
};
@ -54,34 +49,11 @@ export const resizeAV = (item: HTMLElement) => {
if (!item.classList.contains("av") || item.getAttribute("data-render") !== "true") {
return;
}
const attrElement = item.querySelector(".protyle-attr") as HTMLElement
if (item.style.width.endsWith("%") || item.style.margin) {
const avHeaderElement = item.firstElementChild.firstElementChild as HTMLElement;
avHeaderElement.style.paddingLeft = "";
avHeaderElement.style.paddingRight = "";
const avBodyElement = item.querySelector(".av__scroll").firstElementChild as HTMLElement;
avBodyElement.style.paddingLeft = "";
avBodyElement.style.paddingRight = "";
attrElement.style.paddingRight = "";
item.style.alignSelf = "";
if (!item.style.width.endsWith("%")) {
item.style.width = "";
item.style.maxWidth = "100%";
}
const containerElement = item.querySelector<HTMLElement>(".av__container");
if (item.style.width.endsWith("%")) {
containerElement.style.width = "auto";
} else {
const paddingLeft = item.parentElement.style.paddingLeft;
const paddingRight = item.parentElement.style.paddingRight;
const avHeaderElement = item.firstElementChild.firstElementChild as HTMLElement;
avHeaderElement.style.paddingLeft = paddingLeft;
avHeaderElement.style.paddingRight = paddingRight;
const avBodyElement = item.querySelector(".av__scroll").firstElementChild as HTMLElement;
avBodyElement.style.paddingLeft = paddingLeft;
avBodyElement.style.paddingRight = paddingRight;
attrElement.style.paddingRight = paddingRight;
item.style.alignSelf = "center";
if (item.parentElement.clientWidth > 0) {
item.style.width = item.parentElement.clientWidth + "px";
item.style.maxWidth = "";
}
containerElement.style.width = "";
}
};

View File

@ -1452,12 +1452,6 @@ export class WYSIWYG {
if (embedElement) {
protyle.gutter.render(protyle, embedElement, this.element);
} else {
// database 行块标
const rowElement = hasClosestByClassName(event.target, "av__row");
if (rowElement && rowElement.dataset.id) {
const rowRect = rowElement.getBoundingClientRect();
rowElement.firstElementChild.setAttribute("style", `left:${rowRect.left - 44}px;top:${rowRect.top}px`);
}
protyle.gutter.render(protyle, nodeElement, this.element);
}
}

View File

@ -69,7 +69,6 @@ import {escapeHtml} from "../../util/escape";
import {insertHTML} from "../util/insertHTML";
import {removeSearchMark} from "../toolbar/util";
import {avKeydown} from "../render/av/keydown";
import {resizeAV} from "../util/resize";
export const getContentByInlineHTML = (range: Range, cb: (content: string) => void) => {
@ -1147,8 +1146,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}
updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.margin = "";
resizeAV(e);
e.style.alignItems = "flex-start";
} else {
e.style.textAlign = "left";
}
@ -1169,8 +1167,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}
updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.margin = "0 auto";
resizeAV(e);
e.style.alignItems = "center";
} else {
e.style.textAlign = "center";
}
@ -1187,8 +1184,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}
updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.margin = "0 0 0 auto";
resizeAV(e);
e.style.alignItems = "flex-end";
} else {
e.style.textAlign = "right";
}