@formicoidea/labre-core 0.32.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/dist/_pkgs/affine-block-attachment/attachment-block.js +1 -1
  2. package/dist/_pkgs/affine-block-callout/callout-block.js +1 -1
  3. package/dist/_pkgs/affine-block-code/code-block-inline.js +1 -1
  4. package/dist/_pkgs/affine-block-code/code-toolbar/config.js +3 -1
  5. package/dist/_pkgs/affine-block-code/code-toolbar/index.js +1 -1
  6. package/dist/_pkgs/affine-block-database/data-source.js +1 -2
  7. package/dist/_pkgs/affine-block-database/external-data-source.js +1 -1
  8. package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +1 -1
  9. package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.js +1 -1
  10. package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-service.js +1 -1
  11. package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +2 -2
  12. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +1 -1
  13. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/utils.js +1 -1
  14. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +1 -1
  15. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +1 -1
  16. package/dist/_pkgs/affine-block-frame/frame-manager.js +3 -1
  17. package/dist/_pkgs/affine-block-frame/frame-tool.js +1 -1
  18. package/dist/_pkgs/affine-block-image/components/page-image-block.js +1 -1
  19. package/dist/_pkgs/affine-block-image/image-edgeless-block.js +1 -1
  20. package/dist/_pkgs/affine-block-list/utils/forward-delete.js +1 -1
  21. package/dist/_pkgs/affine-block-note/commands/select-block.js +1 -1
  22. package/dist/_pkgs/affine-block-note/commands/select-blocks-between.js +1 -1
  23. package/dist/_pkgs/affine-block-note/move-block.js +1 -1
  24. package/dist/_pkgs/affine-block-paragraph/utils/forward-delete.js +2 -2
  25. package/dist/_pkgs/affine-block-paragraph/utils/merge-with-prev.js +1 -1
  26. package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +1 -1
  27. package/dist/_pkgs/affine-block-root/edgeless/edgeless-keyboard.js +1 -1
  28. package/dist/_pkgs/affine-block-root/edgeless/utils/clipboard-utils.js +1 -1
  29. package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.js +1 -1
  30. package/dist/_pkgs/affine-block-surface/adapters/plain-text/element-adapter/type.js +1 -1
  31. package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +18 -3
  32. package/dist/_pkgs/affine-block-surface/element-model/index.js +12 -2
  33. package/dist/_pkgs/affine-block-surface/extensions/audit.js +23 -6
  34. package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +10 -5
  35. package/dist/_pkgs/affine-block-surface/extensions/editor-anchored-panel.js +2 -1
  36. package/dist/_pkgs/affine-block-surface/extensions/element-renderer.js +1 -1
  37. package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +1 -1
  38. package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +4 -0
  39. package/dist/_pkgs/affine-block-surface/extensions/index.js +4 -0
  40. package/dist/_pkgs/affine-block-surface/extensions/interchange-import.d.ts +172 -0
  41. package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +393 -0
  42. package/dist/_pkgs/affine-block-surface/extensions/interchange.d.ts +306 -0
  43. package/dist/_pkgs/affine-block-surface/extensions/interchange.js +64 -0
  44. package/dist/_pkgs/affine-block-surface/extensions/map-quality-widget.js +61 -61
  45. package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.d.ts +248 -0
  46. package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +248 -0
  47. package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +78 -80
  48. package/dist/_pkgs/affine-block-surface/extensions/reading.js +2 -2
  49. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +107 -0
  50. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +958 -0
  51. package/dist/_pkgs/affine-block-surface/extensions/validation.d.ts +809 -20
  52. package/dist/_pkgs/affine-block-surface/extensions/validation.js +1661 -50
  53. package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.d.ts +50 -6
  54. package/dist/_pkgs/affine-block-surface/extensions/violation-detail-widget.js +129 -32
  55. package/dist/_pkgs/affine-block-surface/framework-background/def.d.ts +289 -0
  56. package/dist/_pkgs/affine-block-surface/framework-background/def.js +126 -1
  57. package/dist/_pkgs/affine-block-surface/framework-background/labels.d.ts +42 -2
  58. package/dist/_pkgs/affine-block-surface/framework-background/labels.js +80 -4
  59. package/dist/_pkgs/affine-block-surface/framework-background/renderer.js +172 -11
  60. package/dist/_pkgs/affine-block-surface/renderer/overlay.js +1 -1
  61. package/dist/_pkgs/affine-block-surface-ref/portal/note.js +2 -2
  62. package/dist/_pkgs/affine-block-table/commands.js +1 -1
  63. package/dist/_pkgs/affine-components/edgeless-shape-color-picker/color-picker.js +1 -1
  64. package/dist/_pkgs/affine-components/embed-card-modal/embed-card-edit-modal.js +1 -1
  65. package/dist/_pkgs/affine-components/filterable-list/styles.js +1 -1
  66. package/dist/_pkgs/affine-components/peek/peekable.js +1 -1
  67. package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -0
  68. package/dist/_pkgs/affine-components/toolbar/index.js +1 -0
  69. package/dist/_pkgs/affine-components/toolbar/menu-button.js +1 -1
  70. package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +55 -0
  71. package/dist/_pkgs/affine-components/toolbar/picker-menu.js +47 -0
  72. package/dist/_pkgs/affine-fragment-frame-panel/body/frame-panel-body.js +2 -2
  73. package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +2 -2
  74. package/dist/_pkgs/affine-fragment-frame-panel/header/frames-setting-menu.js +1 -1
  75. package/dist/_pkgs/affine-fragment-outline/mobile-outline-panel.js +1 -1
  76. package/dist/_pkgs/affine-gfx-brush/toolbar/components/pen/pen-tool-button.js +1 -1
  77. package/dist/_pkgs/affine-gfx-connector/connector-manager.js +7 -10
  78. package/dist/_pkgs/affine-gfx-connector/connector-tool.d.ts +19 -1
  79. package/dist/_pkgs/affine-gfx-connector/connector-tool.js +10 -2
  80. package/dist/_pkgs/affine-gfx-connector/connector-watcher.js +1 -4
  81. package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +2 -1
  82. package/dist/_pkgs/affine-gfx-connector/direction/invert-direction.js +1 -3
  83. package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +1 -1
  84. package/dist/_pkgs/affine-gfx-connector/element-renderer/utils.js +1 -1
  85. package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +1 -1
  86. package/dist/_pkgs/affine-gfx-mindmap/adapter/markdown/index.js +1 -1
  87. package/dist/_pkgs/affine-gfx-mindmap/adapter/utils.js +1 -1
  88. package/dist/_pkgs/affine-gfx-mindmap/templates/index.js +583 -4
  89. package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-menu.js +23 -23
  90. package/dist/_pkgs/affine-gfx-mindmap/toolbar/mindmap-tool-button.js +5 -1
  91. package/dist/_pkgs/affine-gfx-mindmap/view/utils.js +1 -1
  92. package/dist/_pkgs/affine-gfx-note/overlay/overlay.js +1 -1
  93. package/dist/_pkgs/affine-gfx-note/toolbar/note-senior-button.js +1 -1
  94. package/dist/_pkgs/affine-gfx-shape/consts.js +1 -1
  95. package/dist/_pkgs/affine-gfx-shape/draggable/shape-draggable.js +1 -1
  96. package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/polygon.js +17 -9
  97. package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/utils.js +8 -3
  98. package/dist/_pkgs/affine-gfx-shape/element-view.js +19 -12
  99. package/dist/_pkgs/affine-gfx-shape/overlay/polygon-drawing-overlay.js +1 -1
  100. package/dist/_pkgs/affine-gfx-shape/overlay/polygon-vertex-editing-overlay.js +12 -7
  101. package/dist/_pkgs/affine-gfx-shape/overlay/shape-overlay.js +1 -1
  102. package/dist/_pkgs/affine-gfx-shape/polygon-tool.js +4 -2
  103. package/dist/_pkgs/affine-gfx-shape/shape-tool.js +1 -1
  104. package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +1 -3
  105. package/dist/_pkgs/affine-gfx-template/builtin/other.js +66 -17
  106. package/dist/_pkgs/affine-gfx-template/toolbar/overlay-scrollbar.js +1 -1
  107. package/dist/_pkgs/affine-gfx-template/toolbar/template-panel.js +1 -1
  108. package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +1 -1
  109. package/dist/_pkgs/affine-inline-link/command.js +1 -1
  110. package/dist/_pkgs/affine-inline-preset/command/format-block.js +1 -1
  111. package/dist/_pkgs/affine-inline-preset/command/format-native.js +2 -2
  112. package/dist/_pkgs/affine-inline-preset/command/format-text.js +1 -1
  113. package/dist/_pkgs/affine-inline-preset/inline-spec.js +1 -1
  114. package/dist/_pkgs/affine-inline-reference/reference-node/reference-node.js +1 -1
  115. package/dist/_pkgs/affine-model/elements/bpmn/node.d.ts +40 -7
  116. package/dist/_pkgs/affine-model/elements/bpmn/node.js +4 -2
  117. package/dist/_pkgs/affine-model/elements/bpmn/pool.d.ts +74 -17
  118. package/dist/_pkgs/affine-model/elements/bpmn/pool.js +55 -26
  119. package/dist/_pkgs/affine-model/elements/c4/board.d.ts +88 -0
  120. package/dist/_pkgs/affine-model/elements/c4/board.js +128 -0
  121. package/dist/_pkgs/affine-model/elements/c4/boundary.d.ts +63 -0
  122. package/dist/_pkgs/affine-model/elements/c4/boundary.js +134 -0
  123. package/dist/_pkgs/affine-model/elements/c4/index.d.ts +3 -0
  124. package/dist/_pkgs/affine-model/elements/c4/index.js +3 -0
  125. package/dist/_pkgs/affine-model/elements/c4/node.d.ts +97 -0
  126. package/dist/_pkgs/affine-model/elements/c4/node.js +130 -0
  127. package/dist/_pkgs/affine-model/elements/connector/connector.js +1 -1
  128. package/dist/_pkgs/affine-model/elements/context-map/context-map.d.ts +27 -0
  129. package/dist/_pkgs/affine-model/elements/context-map/context-map.js +94 -0
  130. package/dist/_pkgs/affine-model/elements/context-map/index.d.ts +1 -0
  131. package/dist/_pkgs/affine-model/elements/context-map/index.js +1 -0
  132. package/dist/_pkgs/affine-model/elements/core-domain/core-domain.d.ts +34 -17
  133. package/dist/_pkgs/affine-model/elements/core-domain/core-domain.js +28 -26
  134. package/dist/_pkgs/affine-model/elements/event-storming/event-storming.d.ts +36 -0
  135. package/dist/_pkgs/affine-model/elements/event-storming/event-storming.js +103 -0
  136. package/dist/_pkgs/affine-model/elements/event-storming/index.d.ts +1 -0
  137. package/dist/_pkgs/affine-model/elements/event-storming/index.js +1 -0
  138. package/dist/_pkgs/affine-model/elements/index.d.ts +11 -0
  139. package/dist/_pkgs/affine-model/elements/index.js +3 -0
  140. package/dist/_pkgs/affine-model/elements/shape/api/polygon.js +2 -8
  141. package/dist/_pkgs/affine-shared/adapters/html/block-adapter.js +1 -1
  142. package/dist/_pkgs/affine-shared/adapters/markdown/block-adapter.js +1 -1
  143. package/dist/_pkgs/affine-shared/adapters/markdown/delta-converter.js +1 -1
  144. package/dist/_pkgs/affine-shared/adapters/notion-html/block-adapter.js +1 -1
  145. package/dist/_pkgs/affine-shared/adapters/notion-html/delta-converter.js +1 -1
  146. package/dist/_pkgs/affine-shared/adapters/plain-text/block-adapter.js +1 -1
  147. package/dist/_pkgs/affine-shared/adapters/plain-text/delta-converter.js +1 -1
  148. package/dist/_pkgs/affine-shared/adapters/utils/color.js +5 -2
  149. package/dist/_pkgs/affine-shared/commands/model-crud/draft-selected-models.js +1 -1
  150. package/dist/_pkgs/affine-shared/commands/selection/focus-block-end.js +1 -1
  151. package/dist/_pkgs/affine-shared/commands/selection/focus-block-start.js +1 -1
  152. package/dist/_pkgs/affine-shared/consts/index.d.ts +10 -0
  153. package/dist/_pkgs/affine-shared/consts/index.js +10 -0
  154. package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.d.ts +55 -0
  155. package/dist/_pkgs/affine-shared/services/artefact-catalogue-service.js +35 -0
  156. package/dist/_pkgs/affine-shared/services/audit-service.d.ts +11 -0
  157. package/dist/_pkgs/affine-shared/services/command-usage-service.d.ts +31 -0
  158. package/dist/_pkgs/affine-shared/services/command-usage-service.js +109 -0
  159. package/dist/_pkgs/affine-shared/services/comment-service/block-comment-manager.js +1 -1
  160. package/dist/_pkgs/affine-shared/services/doc-display-meta-service.js +1 -1
  161. package/dist/_pkgs/affine-shared/services/embed-iframe/embed-iframe-config.js +1 -1
  162. package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
  163. package/dist/_pkgs/affine-shared/services/index.js +2 -0
  164. package/dist/_pkgs/affine-shared/services/pivot-materiality-publisher.js +2 -1
  165. package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +73 -1
  166. package/dist/_pkgs/affine-shared/services/toolbar-service/registry.d.ts +44 -0
  167. package/dist/_pkgs/affine-shared/services/toolbar-service/registry.js +161 -3
  168. package/dist/_pkgs/affine-shared/services/universe-tag-defs-service.js +5 -3
  169. package/dist/_pkgs/affine-shared/test-utils/affine-template.js +1 -1
  170. package/dist/_pkgs/affine-shared/utils/edgeless.js +1 -1
  171. package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +34 -0
  172. package/dist/_pkgs/affine-shared/utils/file/filesys.js +48 -7
  173. package/dist/_pkgs/affine-shared/utils/zod-schema.js +1 -3
  174. package/dist/_pkgs/affine-widget-drag-handle/utils.js +1 -1
  175. package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +1 -1
  176. package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +1 -1
  177. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.d.ts +14 -0
  178. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-default.js +40 -0
  179. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.d.ts +158 -0
  180. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +572 -0
  181. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.d.ts +46 -0
  182. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/catalogue-groups.js +66 -0
  183. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.d.ts +13 -0
  184. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/chord-format.js +50 -0
  185. package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.d.ts +6 -0
  186. package/dist/_pkgs/affine-widget-edgeless-toolbar/edgeless-toolbar.js +15 -5
  187. package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +2 -0
  188. package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +2 -0
  189. package/dist/_pkgs/affine-widget-edgeless-toolbar/extension/index.d.ts +7 -0
  190. package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
  191. package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
  192. package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.d.ts +19 -0
  193. package/dist/_pkgs/affine-widget-edgeless-toolbar/menu/command-menu.js +51 -10
  194. package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +9 -0
  195. package/dist/_pkgs/affine-widget-keyboard-toolbar/keyboard-tool-panel.js +1 -1
  196. package/dist/_pkgs/affine-widget-linked-doc/import-doc/import-doc.js +1 -1
  197. package/dist/_pkgs/affine-widget-linked-doc/linked-doc-popover.js +1 -1
  198. package/dist/_pkgs/affine-widget-page-dragging-area/index.js +1 -1
  199. package/dist/_pkgs/affine-widget-remote-selection/doc/doc-remote-selection.js +1 -1
  200. package/dist/_pkgs/affine-widget-toolbar/toolbar.js +6 -2
  201. package/dist/_pkgs/affine-widget-toolbar/utils.js +6 -2
  202. package/dist/_pkgs/data-view/view-presets/calendar/pc/actions.js +8 -12
  203. package/dist/_pkgs/data-view/view-presets/calendar/pc/view.js +52 -40
  204. package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +3 -1
  205. package/dist/_pkgs/data-view/view-presets/table/pc/group.js +3 -1
  206. package/dist/_pkgs/std/clipboard/utils.js +4 -1
  207. package/dist/_pkgs/std/extension/command-registry.d.ts +159 -5
  208. package/dist/_pkgs/std/extension/command-registry.js +202 -4
  209. package/dist/_pkgs/std/extension/shortcut.js +2 -1
  210. package/dist/_pkgs/std/gfx/grid.js +1 -1
  211. package/dist/_pkgs/std/gfx/index.d.ts +1 -1
  212. package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +160 -0
  213. package/dist/_pkgs/std/gfx/model/surface/element-model.js +75 -1
  214. package/dist/_pkgs/std/gfx/model/surface/role.js +5 -3
  215. package/dist/_pkgs/std/gfx/model/surface/surface-model.js +2 -1
  216. package/dist/_pkgs/std/gfx/selection.js +1 -1
  217. package/dist/_pkgs/std/gfx/viewport.js +1 -1
  218. package/dist/_pkgs/std/inline/extensions/inline-manager.js +1 -1
  219. package/dist/_pkgs/std/inline/extensions/markdown-matcher.js +1 -1
  220. package/dist/_pkgs/store/model/store/crud.js +4 -1
  221. package/dist/commands.js +1 -1
  222. package/dist/extensions/command-usage.d.ts +23 -0
  223. package/dist/extensions/command-usage.js +37 -0
  224. package/dist/extensions/view.js +12 -0
  225. package/dist/frameworks.js +32 -0
  226. package/dist/translations.js +90 -2
  227. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A keystroke sequence (`ShortcutDescriptor.defaultKeys`) spelled the way the
3
+ * platform spells it: `⌘⇧Z` on a Mac, `Ctrl+Shift+Z` elsewhere, and a chord as
4
+ * its keystrokes separated by a space (`['w', 'c']` → `W C`).
5
+ *
6
+ * Symbols and `+` rather than words, because this line is NOT translated — the
7
+ * catalogue's rows carry it beside a label the host did translate, and a
8
+ * hard-coded "then" would be the one English word left in a French panel.
9
+ *
10
+ * `isMac` is a parameter rather than a read of `IS_MAC` so the spelling is
11
+ * testable on either platform from either platform.
12
+ */
13
+ export declare function formatChord(keys: readonly string[], isMac: boolean): string;
@@ -0,0 +1,50 @@
1
+ /** Modifier tokens as a Mac spells them. */
2
+ const MAC_SYMBOLS = {
3
+ mod: '⌘',
4
+ meta: '⌘',
5
+ cmd: '⌘',
6
+ ctrl: '⌃',
7
+ control: '⌃',
8
+ alt: '⌥',
9
+ shift: '⇧',
10
+ };
11
+ /** …and as everything else spells them. */
12
+ const OTHER_NAMES = {
13
+ mod: 'Ctrl',
14
+ meta: 'Win',
15
+ cmd: 'Win',
16
+ ctrl: 'Ctrl',
17
+ control: 'Ctrl',
18
+ alt: 'Alt',
19
+ shift: 'Shift',
20
+ };
21
+ /**
22
+ * A keystroke sequence (`ShortcutDescriptor.defaultKeys`) spelled the way the
23
+ * platform spells it: `⌘⇧Z` on a Mac, `Ctrl+Shift+Z` elsewhere, and a chord as
24
+ * its keystrokes separated by a space (`['w', 'c']` → `W C`).
25
+ *
26
+ * Symbols and `+` rather than words, because this line is NOT translated — the
27
+ * catalogue's rows carry it beside a label the host did translate, and a
28
+ * hard-coded "then" would be the one English word left in a French panel.
29
+ *
30
+ * `isMac` is a parameter rather than a read of `IS_MAC` so the spelling is
31
+ * testable on either platform from either platform.
32
+ */
33
+ export function formatChord(keys, isMac) {
34
+ const table = isMac ? MAC_SYMBOLS : OTHER_NAMES;
35
+ const part = (token) => {
36
+ const symbol = table[token.toLowerCase()];
37
+ if (symbol)
38
+ return symbol;
39
+ // A bare key: `'w'` reads as `W`; `'ArrowUp'` and `'Space'` as they are.
40
+ return token.length === 1 ? token.toUpperCase() : token;
41
+ };
42
+ return keys
43
+ .map(keystroke =>
44
+ // `-(?!$)` so a literal `-` key survives being the separator too.
45
+ keystroke
46
+ .split(/-(?!$)/)
47
+ .map(part)
48
+ .join(isMac ? '' : '+'))
49
+ .join(' ');
50
+ }
@@ -27,6 +27,12 @@ export declare class EdgelessToolbarWidget extends WidgetComponent<RootBlockMode
27
27
  private get _hiddenQuickTools();
28
28
  private get _quickTools();
29
29
  private get _quickToolsWidthTotal();
30
+ /**
31
+ * The wording shown for a senior tool. A framework declares an i18n key and
32
+ * the host catalogue answers it; `name` is the English fallback, and the only
33
+ * thing the core tools have.
34
+ */
35
+ private _seniorToolLabel;
30
36
  private get _seniorNextTooltip();
31
37
  private get _seniorPrevTooltip();
32
38
  private get _seniorScrollNextDisabled();
@@ -37,7 +37,7 @@ import { DefaultTool, EdgelessLegacySlotIdentifier, } from '../affine-block-surf
37
37
  import { popMenu, popupTargetFromElement, } from '../affine-components/context-menu/index.js';
38
38
  import { darkToolbarStyles, lightToolbarStyles, } from '../affine-components/toolbar/index.js';
39
39
  import { ColorScheme } from '../affine-model/index.js';
40
- import { EditPropsStore, ThemeProvider, } from '../affine-shared/services/index.js';
40
+ import { EditPropsStore, ThemeProvider, translateKey, } from '../affine-shared/services/index.js';
41
41
  import { stopPropagation } from '../affine-shared/utils/index.js';
42
42
  import { ArrowLeftSmallIcon, ArrowRightSmallIcon, MoreHorizontalIcon, } from '@blocksuite/icons/lit';
43
43
  import { WidgetComponent, WidgetViewExtension } from '../std/index.js';
@@ -318,17 +318,27 @@ let EdgelessToolbarWidget = (() => {
318
318
  return (this._quickTools.length * (QUICK_TOOL_SIZE + QUICK_TOOLS_GAP) -
319
319
  QUICK_TOOLS_GAP);
320
320
  }
321
+ /**
322
+ * The wording shown for a senior tool. A framework declares an i18n key and
323
+ * the host catalogue answers it; `name` is the English fallback, and the only
324
+ * thing the core tools have.
325
+ */
326
+ _seniorToolLabel(tool) {
327
+ if (!tool)
328
+ return '';
329
+ return tool.labelKey
330
+ ? translateKey(this.std, tool.labelKey, tool.name)
331
+ : tool.name;
332
+ }
321
333
  get _seniorNextTooltip() {
322
334
  if (this._seniorScrollNextDisabled)
323
335
  return '';
324
- const nextTool = this._seniorTools[this.scrollSeniorToolIndex + this.scrollSeniorToolSize];
325
- return nextTool?.name ?? '';
336
+ return this._seniorToolLabel(this._seniorTools[this.scrollSeniorToolIndex + this.scrollSeniorToolSize]);
326
337
  }
327
338
  get _seniorPrevTooltip() {
328
339
  if (this._seniorScrollPrevDisabled)
329
340
  return '';
330
- const prevTool = this._seniorTools[this.scrollSeniorToolIndex - 1];
331
- return prevTool?.name ?? '';
341
+ return this._seniorToolLabel(this._seniorTools[this.scrollSeniorToolIndex - 1]);
332
342
  }
333
343
  get _seniorScrollNextDisabled() {
334
344
  return (this.scrollSeniorToolIndex + this.scrollSeniorToolSize >=
@@ -1,5 +1,6 @@
1
1
  import { EdgelessToolIconButton } from './button/tool-icon-button.js';
2
2
  import { EdgelessToolbarButton } from './button/toolbar-button.js';
3
+ import { EdgelessArtefactCatalogueWidget } from './catalogue/artefact-catalogue-widget.js';
3
4
  import { EdgelessToolbarWidget } from './edgeless-toolbar.js';
4
5
  import { EdgelessSlideMenu } from './menu/slide-menu.js';
5
6
  import { ToolbarArrowUpIcon } from './menu/toolbar-arrow-up-icon.js';
@@ -8,6 +9,7 @@ import { EdgelessFontWeightAndStylePanel } from './panel/font-weight-and-style-p
8
9
  export declare function effects(): void;
9
10
  declare global {
10
11
  interface HTMLElementTagNameMap {
12
+ 'edgeless-artefact-catalogue-widget': EdgelessArtefactCatalogueWidget;
11
13
  'edgeless-tool-icon-button': EdgelessToolIconButton;
12
14
  'edgeless-toolbar-button': EdgelessToolbarButton;
13
15
  'edgeless-toolbar-widget': EdgelessToolbarWidget;
@@ -1,5 +1,6 @@
1
1
  import { EdgelessToolIconButton } from './button/tool-icon-button.js';
2
2
  import { EdgelessToolbarButton } from './button/toolbar-button.js';
3
+ import { EDGELESS_ARTEFACT_CATALOGUE_WIDGET, EdgelessArtefactCatalogueWidget, } from './catalogue/artefact-catalogue-widget.js';
3
4
  import { EDGELESS_TOOLBAR_WIDGET, EdgelessToolbarWidget, } from './edgeless-toolbar.js';
4
5
  import { EdgelessSlideMenu } from './menu/slide-menu.js';
5
6
  import { ToolbarArrowUpIcon } from './menu/toolbar-arrow-up-icon.js';
@@ -7,6 +8,7 @@ import { EdgelessFontFamilyPanel } from './panel/font-family-panel.js';
7
8
  import { EdgelessFontWeightAndStylePanel } from './panel/font-weight-and-style-panel.js';
8
9
  export function effects() {
9
10
  customElements.define(EDGELESS_TOOLBAR_WIDGET, EdgelessToolbarWidget);
11
+ customElements.define(EDGELESS_ARTEFACT_CATALOGUE_WIDGET, EdgelessArtefactCatalogueWidget);
10
12
  customElements.define('edgeless-toolbar-button', EdgelessToolbarButton);
11
13
  customElements.define('edgeless-tool-icon-button', EdgelessToolIconButton);
12
14
  customElements.define('edgeless-font-weight-and-style-panel', EdgelessFontWeightAndStylePanel);
@@ -18,6 +18,13 @@ export interface SeniorTool {
18
18
  * Used to show in nav-button's tooltip
19
19
  */
20
20
  name: string;
21
+ /**
22
+ * i18n key resolved through the house `TranslationProvider` seam, so a
23
+ * framework's button reads in the user's language. `name` remains the
24
+ * fallback and stays required: the core tools (note, shape, template…) have
25
+ * no framework descriptor and therefore no key to declare.
26
+ */
27
+ labelKey?: string;
21
28
  content: TemplateResult;
22
29
  enable?: boolean;
23
30
  /**
@@ -1,3 +1,7 @@
1
+ export * from './catalogue/artefact-catalogue-default.js';
2
+ export * from './catalogue/artefact-catalogue-widget.js';
3
+ export * from './catalogue/catalogue-groups.js';
4
+ export * from './catalogue/chord-format.js';
1
5
  export * from './config/index.js';
2
6
  export * from './context.js';
3
7
  export * from './create-popper.js';
@@ -1,3 +1,7 @@
1
+ export * from './catalogue/artefact-catalogue-default.js';
2
+ export * from './catalogue/artefact-catalogue-widget.js';
3
+ export * from './catalogue/catalogue-groups.js';
4
+ export * from './catalogue/chord-format.js';
1
5
  export * from './config/index.js';
2
6
  export * from './context.js';
3
7
  export * from './create-popper.js';
@@ -20,6 +20,15 @@ export declare abstract class EdgelessCommandMenu extends EdgelessCommandMenu_ba
20
20
  static styles: CSSResultGroup;
21
21
  /** Which framework's commands this popover shows. */
22
22
  protected abstract owner: CommandOwner;
23
+ /**
24
+ * The buttons, and whether the owner outgrew the fourteen slots.
25
+ *
26
+ * Recomputed per render on purpose: it opens with the popover, not with a
27
+ * frame, and the usage measure it reads is the whole point — a list cached
28
+ * across openings would show the user yesterday's ranking of what they did
29
+ * this morning.
30
+ */
31
+ private get _selection();
23
32
  get commands(): CommandDescriptor[];
24
33
  private _invoke;
25
34
  /**
@@ -33,6 +42,16 @@ export declare abstract class EdgelessCommandMenu extends EdgelessCommandMenu_ba
33
42
  * fallbacks, resolved through the host's catalogue.
34
43
  */
35
44
  private _tooltip;
45
+ /**
46
+ * The way out of a menu that no longer shows everything.
47
+ *
48
+ * It appears only past the cap, and only when something answers
49
+ * {@link ArtefactCatalogueProvider}: a button that opens nothing is a dead
50
+ * control, and the thirteen ranked slots are only defensible as a *shortcut*
51
+ * to a catalogue the user can still reach in full. Thirteen plus this one is
52
+ * fourteen — the overflowed row is exactly as wide as the cap.
53
+ */
54
+ private _renderCatalogueButton;
36
55
  render(): import("lit-html").TemplateResult<1>;
37
56
  }
38
57
  export {};
@@ -1,6 +1,7 @@
1
- import { translateKey } from '../../affine-shared/services/index.js';
2
- import { getCommandIcon, getCommandsForSurface, runCommand, } from '../../std/index.js';
3
- import { css, html, LitElement } from 'lit';
1
+ import { ArtefactCatalogueProvider, translateKey, } from '../../affine-shared/services/index.js';
2
+ import { CommandUsageIdentifier, getCommandIcon, getCommandsForSurface, runCommand, selectSeniorMenuCommands, } from '../../std/index.js';
3
+ import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
4
+ import { css, html, LitElement, nothing } from 'lit';
4
5
  import { EdgelessToolbarToolMixin } from '../mixins/tool.mixin.js';
5
6
  /**
6
7
  * The senior button sub-menu, rendered FROM the command registry.
@@ -40,8 +41,21 @@ export class EdgelessCommandMenu extends EdgelessToolbarToolMixin(LitElement) {
40
41
  height: 24px;
41
42
  }
42
43
  `; }
44
+ /**
45
+ * The buttons, and whether the owner outgrew the fourteen slots.
46
+ *
47
+ * Recomputed per render on purpose: it opens with the popover, not with a
48
+ * frame, and the usage measure it reads is the whole point — a list cached
49
+ * across openings would show the user yesterday's ranking of what they did
50
+ * this morning.
51
+ */
52
+ get _selection() {
53
+ const std = this.edgeless.std;
54
+ const usage = std.getOptional(CommandUsageIdentifier);
55
+ return selectSeniorMenuCommands(getCommandsForSurface(std, this.owner, 'senior-menu'), getCommandsForSurface(std, this.owner, 'catalogue'), id => usage?.statsOf(id));
56
+ }
43
57
  get commands() {
44
- return getCommandsForSurface(this.edgeless.std, this.owner, 'senior-menu');
58
+ return this._selection.commands;
45
59
  }
46
60
  _invoke(command) {
47
61
  // The ONE emission point: no `_track()` helper anywhere in the menus.
@@ -79,18 +93,45 @@ export class EdgelessCommandMenu extends EdgelessToolbarToolMixin(LitElement) {
79
93
  >${hint}</span
80
94
  >`;
81
95
  }
96
+ /**
97
+ * The way out of a menu that no longer shows everything.
98
+ *
99
+ * It appears only past the cap, and only when something answers
100
+ * {@link ArtefactCatalogueProvider}: a button that opens nothing is a dead
101
+ * control, and the thirteen ranked slots are only defensible as a *shortcut*
102
+ * to a catalogue the user can still reach in full. Thirteen plus this one is
103
+ * fourteen — the overflowed row is exactly as wide as the cap.
104
+ */
105
+ _renderCatalogueButton() {
106
+ const std = this.edgeless.std;
107
+ const catalogue = std.getOptional(ArtefactCatalogueProvider);
108
+ if (!catalogue)
109
+ return nothing;
110
+ const label = translateKey(std, 'com.labre.catalogue.open', 'More artefacts…');
111
+ return html `<edgeless-tool-icon-button
112
+ .tooltip=${html `${label}<span
113
+ style="display:block;max-width:220px;margin-top:2px;opacity:0.75;font-size:11px;line-height:1.35;white-space:normal"
114
+ >${translateKey(std, 'com.labre.catalogue.open.description', 'This framework offers more than the menu can show.')}</span
115
+ >`}
116
+ @click=${() => catalogue.open(this.owner)}
117
+ >
118
+ ${MoreHorizontalIcon()}
119
+ </edgeless-tool-icon-button>`;
120
+ }
82
121
  render() {
83
122
  const std = this.edgeless.std;
123
+ const { commands, overflow } = this._selection;
84
124
  return html `
85
125
  <edgeless-slide-menu>
86
126
  <div class="menu-content">
87
127
  <div class="button-group-container">
88
- ${this.commands.map(command => html `<edgeless-tool-icon-button
89
- .tooltip=${this._tooltip(command)}
90
- @click=${() => this._invoke(command)}
91
- >
92
- ${getCommandIcon(std, command.iconKey)}
93
- </edgeless-tool-icon-button>`)}
128
+ ${commands.map(command => html `<edgeless-tool-icon-button
129
+ .tooltip=${this._tooltip(command)}
130
+ @click=${() => this._invoke(command)}
131
+ >
132
+ ${getCommandIcon(std, command.iconKey)}
133
+ </edgeless-tool-icon-button>`)}
134
+ ${overflow ? this._renderCatalogueButton() : nothing}
94
135
  </div>
95
136
  </div>
96
137
  </edgeless-slide-menu>
@@ -1,4 +1,6 @@
1
1
  import { ViewExtensionProvider, } from '../affine-ext-loader/index.js';
2
+ import { artefactCatalogueDefaultExtension } from './catalogue/artefact-catalogue-default.js';
3
+ import { edgelessArtefactCatalogueWidget } from './catalogue/artefact-catalogue-widget.js';
2
4
  import { edgelessToolbarWidget } from './edgeless-toolbar.js';
3
5
  import { effects } from './effects.js';
4
6
  export class EdgelessToolbarViewExtension extends ViewExtensionProvider {
@@ -14,6 +16,13 @@ export class EdgelessToolbarViewExtension extends ViewExtensionProvider {
14
16
  super.setup(context);
15
17
  if (this.isEdgeless(context.scope)) {
16
18
  context.register(edgelessToolbarWidget);
19
+ // The artefact catalogue and the default implementation of the seam that
20
+ // opens it, side by side and unconditionally: the panel is core chrome,
21
+ // and ADR 0009's gating is carried by the frameworks — a framework whose
22
+ // flag is off never passes its owner to `open`. A host with its own
23
+ // sidebar overrides the seam and the widget then never opens.
24
+ context.register(edgelessArtefactCatalogueWidget);
25
+ context.register(artefactCatalogueDefaultExtension);
17
26
  }
18
27
  }
19
28
  }
@@ -33,7 +33,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { SignalWatcher, WithDisposable } from '../global/lit/index.js';
36
- import { PropTypes, requiredProperties, ShadowlessElement, } from '../std/index.js';
36
+ import { PropTypes, requiredProperties, ShadowlessElement } from '../std/index.js';
37
37
  import { html, nothing } from 'lit';
38
38
  import { property } from 'lit/decorators.js';
39
39
  import { repeat } from 'lit/directives/repeat.js';
@@ -33,7 +33,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { CloseIcon, ExportToHTMLIcon, ExportToMarkdownIcon, HelpIcon, NewIcon, NotionIcon, } from '../../affine-components/icons/index.js';
36
- import { openFilesWith, openSingleFileWith, } from '../../affine-shared/utils/index.js';
36
+ import { openFilesWith, openSingleFileWith } from '../../affine-shared/utils/index.js';
37
37
  import { WithDisposable } from '../../global/lit/index.js';
38
38
  import { html, LitElement } from 'lit';
39
39
  import { query, state } from 'lit/decorators.js';
@@ -46,7 +46,7 @@ import { property, query, queryAll, state } from 'lit/decorators.js';
46
46
  import { styleMap } from 'lit/directives/style-map.js';
47
47
  import throttle from 'lodash-es/throttle.js';
48
48
  import { linkedDocPopoverStyles } from './styles.js';
49
- import { createLinkedDocKeydownInterceptor, resolveSignal, } from './utils.js';
49
+ import { createLinkedDocKeydownInterceptor, resolveSignal } from './utils.js';
50
50
  let LinkedDocPopover = (() => {
51
51
  let _classDecorators = [requiredProperties({
52
52
  context: PropTypes.object,
@@ -33,7 +33,7 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { ViewportElementProvider } from '../affine-shared/services/index.js';
36
- import { autoScroll, getScrollContainer, } from '../affine-shared/utils/index.js';
36
+ import { autoScroll, getScrollContainer } from '../affine-shared/utils/index.js';
37
37
  import { BlockComponent, BlockSelection, WidgetComponent, WidgetViewExtension, } from '../std/index.js';
38
38
  import { html, nothing } from 'lit';
39
39
  import { state } from 'lit/decorators.js';
@@ -36,7 +36,7 @@ import { AttachmentBlockModel, BookmarkBlockModel, CodeBlockModel, DatabaseBlock
36
36
  import { getSelectionRectsCommand } from '../../affine-shared/commands/index.js';
37
37
  import { EMBED_BLOCK_MODEL_LIST } from '../../affine-shared/consts/index.js';
38
38
  import { matchModels } from '../../affine-shared/utils/index.js';
39
- import { BlockSelection, TextSelection, WidgetComponent, } from '../../std/index.js';
39
+ import { BlockSelection, TextSelection, WidgetComponent } from '../../std/index.js';
40
40
  import { GfxControllerIdentifier } from '../../std/gfx/index.js';
41
41
  import { computed, effect } from '@preact/signals-core';
42
42
  import { css, html, nothing } from 'lit';
@@ -293,8 +293,12 @@ export class AffineToolbarWidget extends WidgetComponent {
293
293
  // Chencks if block's config exists.
294
294
  if (block) {
295
295
  const modelFlavour = block.model.flavour;
296
- const existed = toolbarRegistry.modules.has(modelFlavour) ||
297
- toolbarRegistry.modules.has(`custom:${modelFlavour}`);
296
+ // `modulesFor`, not `modules.has`: the question is whether this
297
+ // flavour has a row AT ALL, and since a flavour may be claimed by
298
+ // an owner-suffixed contributor as well as by its own key, a raw
299
+ // variant lookup would answer "no row" for a flavour that draws one.
300
+ const existed = toolbarRegistry.modulesFor(modelFlavour).length > 0 ||
301
+ toolbarRegistry.modulesFor(`custom:${modelFlavour}`).length > 0;
298
302
  if (existed) {
299
303
  flavour = modelFlavour;
300
304
  }
@@ -364,8 +364,12 @@ export function renderToolbar(toolbar, context, flavour, source = () => emptyToo
364
364
  'custom:affine:*',
365
365
  ]
366
366
  .flat()
367
- .map(key => toolbarRegistry.modules.get(key))
368
- .filter(module => !!module)
367
+ // Every module of each key, not just one: a flavour may be shared by
368
+ // several contributors (`custom:affine:surface:group` carries Wardley's
369
+ // qualification dropdown AND C4's morph), and they are told apart by the
370
+ // owner suffix on their DI variant — see `toolbarModuleKey`.
371
+ .map(key => toolbarRegistry.modulesFor(key))
372
+ .flat()
369
373
  .filter(module => typeof module.config.when === 'function'
370
374
  ? module.config.when(context)
371
375
  : (module.config.when ?? true))
@@ -44,21 +44,17 @@ export const openCalendarEntry = (root, view, entry, target, options) => {
44
44
  </div>
45
45
  ${entry.location
46
46
  ? html `<div class="calendar-event-popover-row">
47
- <span class="calendar-event-popover-icon"
48
- >${PinIcon()}</span
49
- >
50
- <span>${entry.location}</span>
51
- </div>`
47
+ <span class="calendar-event-popover-icon">${PinIcon()}</span>
48
+ <span>${entry.location}</span>
49
+ </div>`
52
50
  : ''}
53
51
  ${entry.description
54
52
  ? html `<div class="calendar-event-popover-row">
55
- <span class="calendar-event-popover-icon"
56
- >${TextIcon()}</span
57
- >
58
- <span class="calendar-event-popover-description"
59
- >${entry.description}</span
60
- >
61
- </div>`
53
+ <span class="calendar-event-popover-icon">${TextIcon()}</span>
54
+ <span class="calendar-event-popover-description"
55
+ >${entry.description}</span
56
+ >
57
+ </div>`
62
58
  : ''}
63
59
  </div>
64
60
  `,
@@ -532,7 +532,10 @@ export class CalendarViewUI extends DataViewUIBase {
532
532
  return html `
533
533
  <div
534
534
  ${ref(element => this.logic.bindEntryDraggable(dndKey, entry, element))}
535
- class="calendar-entry ${entry.kind} ${segmentClass} ${this.logic.selectedEntryId === entry.id ? 'selected' : ''}"
535
+ class="calendar-entry ${entry.kind} ${segmentClass} ${this.logic
536
+ .selectedEntryId === entry.id
537
+ ? 'selected'
538
+ : ''}"
536
539
  role="button"
537
540
  tabindex="0"
538
541
  aria-label=${entry.title || 'Untitled'}
@@ -546,23 +549,23 @@ export class CalendarViewUI extends DataViewUIBase {
546
549
  >
547
550
  ${showLeftHandle
548
551
  ? html `<span
549
- class="calendar-resize-handle left"
550
- @pointerdown=${(event) => this.logic.startResize(entry, 'start', event)}
551
- ></span>`
552
+ class="calendar-resize-handle left"
553
+ @pointerdown=${(event) => this.logic.startResize(entry, 'start', event)}
554
+ ></span>`
552
555
  : nothing}
553
556
  ${this.renderEntryTitle(entry)}
554
557
  ${entry.kind === 'row' && entry.cardProperties.length
555
558
  ? html `<span class="calendar-entry-properties">
556
- ${entry.cardProperties.map(property => html `<span class="calendar-entry-property"
557
- >${property.value}</span
558
- >`)}
559
- </span>`
559
+ ${entry.cardProperties.map(property => html `<span class="calendar-entry-property"
560
+ >${property.value}</span
561
+ >`)}
562
+ </span>`
560
563
  : nothing}
561
564
  ${showRightHandle
562
565
  ? html `<span
563
- class="calendar-resize-handle right"
564
- @pointerdown=${(event) => this.logic.startResize(entry, 'end', event)}
565
- ></span>`
566
+ class="calendar-resize-handle right"
567
+ @pointerdown=${(event) => this.logic.startResize(entry, 'end', event)}
568
+ ></span>`
566
569
  : nothing}
567
570
  </div>
568
571
  `;
@@ -577,13 +580,15 @@ export class CalendarViewUI extends DataViewUIBase {
577
580
  if (entry.titleSegments?.length) {
578
581
  return html `<span class="calendar-entry-title title-segments">
579
582
  ${entry.titleSegments.map(segment => html `<span
580
- class="calendar-entry-title-segment ${segment.linkedDoc ? 'linked-doc-segment' : ''}"
583
+ class="calendar-entry-title-segment ${segment.linkedDoc
584
+ ? 'linked-doc-segment'
585
+ : ''}"
581
586
  >
582
587
  ${segment.linkedDoc ? LinkedPageIcon() : nothing}
583
588
  ${segment.text
584
589
  ? html `<span class="calendar-entry-title-text"
585
- >${segment.text}</span
586
- >`
590
+ >${segment.text}</span
591
+ >`
587
592
  : nothing}
588
593
  </span>`)}
589
594
  </span>`;
@@ -667,8 +672,11 @@ export class CalendarViewUI extends DataViewUIBase {
667
672
  if (!preview)
668
673
  return nothing;
669
674
  return html `<div
670
- class="calendar-entry-preview ${preview.continuesLeft ? 'continues-left' : ''} ${preview.continuesRight ? 'continues-right' : ''}"
671
- style="grid-column:${preview.sIdx + 1} / span ${preview.span};grid-row:${preview.slot + 1};"
675
+ class="calendar-entry-preview ${preview.continuesLeft
676
+ ? 'continues-left'
677
+ : ''} ${preview.continuesRight ? 'continues-right' : ''}"
678
+ style="grid-column:${preview.sIdx +
679
+ 1} / span ${preview.span};grid-row:${preview.slot + 1};"
672
680
  >
673
681
  ${preview.title}
674
682
  </div>`;
@@ -688,11 +696,11 @@ export class CalendarViewUI extends DataViewUIBase {
688
696
  ${this.logic.view.readonly$.value
689
697
  ? nothing
690
698
  : html `<button
691
- class="calendar-empty-month-hint-action"
692
- @click=${() => this.logic.createRowOnDate(getDefaultCreateDate(this.logic.currentMonth))}
693
- >
694
- ${PlusIcon()}<span>New row</span>
695
- </button>`}
699
+ class="calendar-empty-month-hint-action"
700
+ @click=${() => this.logic.createRowOnDate(getDefaultCreateDate(this.logic.currentMonth))}
701
+ >
702
+ ${PlusIcon()}<span>New row</span>
703
+ </button>`}
696
704
  <button
697
705
  class="calendar-empty-month-hint-close"
698
706
  aria-label="Dismiss"
@@ -727,11 +735,11 @@ export class CalendarViewUI extends DataViewUIBase {
727
735
  ${this.logic.isCurrentMonth()
728
736
  ? nothing
729
737
  : html `<button
730
- class="calendar-today-button"
731
- @click=${() => this.logic.goToday()}
732
- >
733
- <span>Today</span>
734
- </button>`}
738
+ class="calendar-today-button"
739
+ @click=${() => this.logic.goToday()}
740
+ >
741
+ <span>Today</span>
742
+ </button>`}
735
743
  <button
736
744
  class="calendar-icon-button"
737
745
  aria-label="Previous month"
@@ -769,7 +777,11 @@ export class CalendarViewUI extends DataViewUIBase {
769
777
  return html `
770
778
  <div
771
779
  data-date=${day.date}
772
- class="calendar-day ${day.inMonth ? '' : 'is-outside'} ${day.date === today ? 'is-today' : ''} ${this.logic.isDayInPreview(day.date)
780
+ class="calendar-day ${day.inMonth
781
+ ? ''
782
+ : 'is-outside'} ${day.date === today
783
+ ? 'is-today'
784
+ : ''} ${this.logic.isDayInPreview(day.date)
773
785
  ? 'is-drop-target'
774
786
  : ''}"
775
787
  style="--calendar-segment-slots:${getCalendarDaySegmentSlots(day, movingEntryId)};"
@@ -786,13 +798,13 @@ export class CalendarViewUI extends DataViewUIBase {
786
798
  </div>
787
799
  ${canReserveNewRow
788
800
  ? html `<button
789
- class="calendar-new-row"
790
- aria-label="+ New row"
791
- ?disabled=${this.logic.isInteracting}
792
- @click=${() => this.logic.createRowOnDate(day.date)}
793
- >
794
- ${PlusIcon()}<span>New row</span>
795
- </button>`
801
+ class="calendar-new-row"
802
+ aria-label="+ New row"
803
+ ?disabled=${this.logic.isInteracting}
804
+ @click=${() => this.logic.createRowOnDate(day.date)}
805
+ >
806
+ ${PlusIcon()}<span>New row</span>
807
+ </button>`
796
808
  : nothing}
797
809
  </div>
798
810
  `;
@@ -824,12 +836,12 @@ export class CalendarViewUI extends DataViewUIBase {
824
836
  </div>
825
837
  ${setup
826
838
  ? html `<div class="calendar-setup">
827
- <button
828
- @click=${(event) => this.logic.openSetupMenu(event.currentTarget)}
829
- >
830
- ${TodayIcon()}<span>Select or create date property</span>
831
- </button>
832
- </div>`
839
+ <button
840
+ @click=${(event) => this.logic.openSetupMenu(event.currentTarget)}
841
+ >
842
+ ${TodayIcon()}<span>Select or create date property</span>
843
+ </button>
844
+ </div>`
833
845
  : nothing}
834
846
  </div>
835
847
  `;
@@ -246,7 +246,9 @@ let MobileTableGroup = (() => {
246
246
  class="group-toggle-btn"
247
247
  role="button"
248
248
  aria-expanded=${this.collapsed$.value ? 'false' : 'true'}
249
- aria-label=${this.collapsed$.value ? 'Expand group' : 'Collapse group'}
249
+ aria-label=${this.collapsed$.value
250
+ ? 'Expand group'
251
+ : 'Collapse group'}
250
252
  tabindex="0"
251
253
  @click=${this._toggleCollapse}
252
254
  @keydown=${(e) => {
@@ -303,7 +303,9 @@ let TableGroup = (() => {
303
303
  class="group-toggle-btn"
304
304
  role="button"
305
305
  aria-expanded=${this.collapsed$.value ? 'false' : 'true'}
306
- aria-label=${this.collapsed$.value ? 'Expand group' : 'Collapse group'}
306
+ aria-label=${this.collapsed$.value
307
+ ? 'Expand group'
308
+ : 'Collapse group'}
307
309
  tabindex="0"
308
310
  @click=${this._toggleCollapse}
309
311
  @keydown=${(e) => {