@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
@@ -1,4 +1,5 @@
1
- import { EXEMPTION_FALLBACK, RELATION_SIDE_FALLBACK, SEVERITY_FALLBACK, } from './_pkgs/affine-block-surface/index.js';
1
+ import { EXEMPTION_FALLBACK, PROVENANCE_FALLBACK, RELATION_SIDE_FALLBACK, SEVERITY_FALLBACK, } from './_pkgs/affine-block-surface/index.js';
2
+ import { CATALOGUE_CATEGORY_KEY_PREFIX, humanizeCategory, } from './_pkgs/affine-widget-edgeless-toolbar/index.js';
2
3
  import { collectTranslationKeys, commandTranslationEntries, mergeTranslationEntries, } from './_pkgs/std/index.js';
3
4
  import { getCommands } from './commands.js';
4
5
  import { FRAMEWORK_DESCRIPTORS } from './frameworks.js';
@@ -13,6 +14,11 @@ const FRAMEWORK_TRANSLATION_GROUPS = [];
13
14
  const CHROME_TABLES = [
14
15
  ['com.labre.validation.severity.', SEVERITY_FALLBACK],
15
16
  ['com.labre.validation.state.exempted.', EXEMPTION_FALLBACK],
17
+ // The four kinds of authority a rule can claim. `organization` is enumerated
18
+ // with the rest although nothing declares it yet: the table is the TYPE, and
19
+ // a host building a catalogue must not have to come back for a fourth word
20
+ // the day the first org profile ships.
21
+ ['com.labre.validation.provenance.', PROVENANCE_FALLBACK],
16
22
  ['com.labre.reading.relations.', RELATION_SIDE_FALLBACK],
17
23
  ];
18
24
  const chromeTableEntries = () => CHROME_TABLES.flatMap(([prefix, table]) => Object.entries(table).map(([suffix, fallback]) => ({
@@ -20,6 +26,32 @@ const chromeTableEntries = () => CHROME_TABLES.flatMap(([prefix, table]) => Obje
20
26
  fallback,
21
27
  source: 'chrome',
22
28
  })));
29
+ /**
30
+ * The artefact catalogue's group headers — one key per `category` any command
31
+ * declares, with the sidepanel's own humanised fallback.
32
+ *
33
+ * DERIVED, not restated: the categories are walked out of `getCommands()`, so a
34
+ * framework that invents a category gets its header key in the manifest by
35
+ * construction — which is the whole point on the eve of a BPMN pack that will
36
+ * declare several. The fallback comes from `humanizeCategory`, the very
37
+ * function the panel renders with, so the two cannot drift.
38
+ *
39
+ * Flag-independent like the rest of the manifest: `getCommands()` with no flags
40
+ * enumerates every command, so a catalogue built once covers a framework
41
+ * switched on later.
42
+ */
43
+ const catalogueCategoryEntries = () => {
44
+ const categories = new Set();
45
+ for (const command of getCommands()) {
46
+ if (command.category)
47
+ categories.add(command.category);
48
+ }
49
+ return [...categories].map(category => ({
50
+ key: `${CATALOGUE_CATEGORY_KEY_PREFIX}${category}`,
51
+ fallback: humanizeCategory(category),
52
+ source: 'chrome',
53
+ }));
54
+ };
23
55
  /**
24
56
  * Chrome wordings: the `translateKey(std, key, fallback)` literals of the
25
57
  * library's own panels and toolbars. Restated data, guarded against drift AND
@@ -43,8 +75,23 @@ const CHROME_KEYS = [
43
75
  ['com.labre.validation.map-quality.section', 'Map quality'],
44
76
  ['com.labre.validation.map-quality.checklist.yours', 'To be checked by you:'],
45
77
  ['com.labre.validation.map-quality.close', 'Close'],
78
+ // Senior sub-menu, past the fourteen-slot cap
79
+ ['com.labre.catalogue.open', 'More artefacts…'],
80
+ [
81
+ 'com.labre.catalogue.open.description',
82
+ 'This framework offers more than the menu can show.',
83
+ ],
84
+ // Artefact catalogue sidepanel
85
+ ['com.labre.catalogue.title', 'Artefacts'],
86
+ ['com.labre.catalogue.close', 'Close'],
87
+ ['com.labre.catalogue.other', 'Other'],
88
+ ['com.labre.catalogue.ranked', 'Recent & frequent'],
46
89
  // Qualify (tags) toolbar
47
90
  ['com.labre.tags.toolbar.label', 'Qualify'],
91
+ // Morph ("Change type") toolbar — generic chrome, like the two above: the
92
+ // KINDS it offers are named by each framework's own creation commands, and
93
+ // only the drop-down's own word lives here.
94
+ ['com.labre.morph.toolbar.label', 'Change type'],
48
95
  // Reading panel
49
96
  ['com.labre.reading.toolbar.label', 'Read this component'],
50
97
  ['com.labre.reading.panel.label', 'Proposed record'],
@@ -89,6 +136,47 @@ const CHROME_KEYS = [
89
136
  ['com.labre.reading.record.linked', 'Linked'],
90
137
  ['com.labre.reading.record.none', 'Not linked to a record.'],
91
138
  ['com.labre.reading.drift.message', 'The board and the record disagree'],
139
+ // BPMN interchange: what an export could not write down. Chrome and not
140
+ // framework prose — these are the words the library's own notification puts
141
+ // around a report the writer produced, so they ship with an English default
142
+ // and a standalone playground reads correctly with no catalogue registered.
143
+ [
144
+ 'com.labre.commands.bpmn.exportXml.warnings',
145
+ 'What this export could not write down',
146
+ ],
147
+ // Wardley's own, and the same sentence: one key per WRITER, because an
148
+ // export's losses are the capability's own words and there is no generic
149
+ // pipeline writing them (the import's wordings below are shared precisely
150
+ // because there is one).
151
+ [
152
+ 'com.labre.commands.wardley.exportOwm.warnings',
153
+ 'What this export could not write down',
154
+ ],
155
+ // What an IMPORT did with the file — one set of keys for every format, not
156
+ // one per format. The format's own name is composed into the wording
157
+ // ("BPMN" + "file imported", "OWM 2.0" after the counts), which is the same
158
+ // compromise the three count labels below already make: the seam has no
159
+ // interpolation, so a proper noun and a countable noun are the largest units
160
+ // this library can hand over without inventing grammar. A key per format
161
+ // would ask a host to translate the same sentence once per reader we ship,
162
+ // and would leave every new format silently untranslated.
163
+ ['com.labre.interchange.import.done', 'file imported'],
164
+ ['com.labre.interchange.import.failed', 'This file could not be imported'],
165
+ [
166
+ 'com.labre.interchange.import.remarks',
167
+ 'What the import could not keep as it was',
168
+ ],
169
+ [
170
+ 'com.labre.interchange.import.console',
171
+ 'remarks — the full report is in the browser console.',
172
+ ],
173
+ // The three count labels of the summary line. Separate keys rather than one
174
+ // sentence with holes in it: the seam has no interpolation and no
175
+ // pluralisation (both are the host's), so a countable noun is the largest
176
+ // unit this library can hand over without inventing grammar.
177
+ ['com.labre.interchange.import.drawn', 'drawn'],
178
+ ['com.labre.interchange.import.carried', 'carried'],
179
+ ['com.labre.interchange.import.quarantined', 'quarantined'],
92
180
  ];
93
181
  /**
94
182
  * Every i18n key THIS package can ask the host for, with its English fallback
@@ -104,7 +192,7 @@ const CHROME_KEYS = [
104
192
  * not filtered either.
105
193
  */
106
194
  export function getTranslationKeyManifest() {
107
- return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), CHROME_KEYS.map(([key, fallback]) => ({
195
+ return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), catalogueCategoryEntries(), CHROME_KEYS.map(([key, fallback]) => ({
108
196
  key,
109
197
  fallback,
110
198
  source: 'chrome',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-core",
3
3
  "description": "Labre editor — the full BlockSuite-derived editor as one package.",
4
- "version": "0.32.0",
4
+ "version": "0.33.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",