@formicoidea/labre-core 0.48.0 → 0.49.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 (222) hide show
  1. package/dist/_pkgs/affine-block-data-view/configs/slash-menu.js +3 -1
  2. package/dist/_pkgs/affine-block-data-view/view.d.ts +17 -1
  3. package/dist/_pkgs/affine-block-data-view/view.js +21 -2
  4. package/dist/_pkgs/affine-block-database/commands.d.ts +2 -2
  5. package/dist/_pkgs/affine-block-database/commands.js +3 -3
  6. package/dist/_pkgs/affine-block-database/components/values-banner.d.ts +28 -0
  7. package/dist/_pkgs/affine-block-database/components/values-banner.js +199 -0
  8. package/dist/_pkgs/affine-block-database/configs/slash-menu.d.ts +6 -1
  9. package/dist/_pkgs/affine-block-database/configs/slash-menu.js +57 -70
  10. package/dist/_pkgs/affine-block-database/data-source.d.ts +9 -5
  11. package/dist/_pkgs/affine-block-database/data-source.js +11 -7
  12. package/dist/_pkgs/affine-block-database/database-block-styles.d.ts +2 -0
  13. package/dist/_pkgs/affine-block-database/database-block-styles.js +15 -0
  14. package/dist/_pkgs/affine-block-database/database-block.d.ts +23 -0
  15. package/dist/_pkgs/affine-block-database/database-block.js +141 -19
  16. package/dist/_pkgs/affine-block-database/effects.js +2 -0
  17. package/dist/_pkgs/affine-block-database/external-data-source.d.ts +69 -2
  18. package/dist/_pkgs/affine-block-database/external-data-source.js +88 -16
  19. package/dist/_pkgs/affine-block-database/index.d.ts +2 -0
  20. package/dist/_pkgs/affine-block-database/index.js +2 -0
  21. package/dist/_pkgs/affine-block-database/linked-view.d.ts +38 -0
  22. package/dist/_pkgs/affine-block-database/linked-view.js +109 -0
  23. package/dist/_pkgs/affine-block-database/properties/index.d.ts +2 -0
  24. package/dist/_pkgs/affine-block-database/properties/index.js +2 -0
  25. package/dist/_pkgs/affine-block-database/properties/text/hosted.d.ts +15 -0
  26. package/dist/_pkgs/affine-block-database/properties/text/hosted.js +24 -0
  27. package/dist/_pkgs/affine-block-database/properties/title/hosted.d.ts +16 -0
  28. package/dist/_pkgs/affine-block-database/properties/title/hosted.js +42 -0
  29. package/dist/_pkgs/affine-block-database/service/index.d.ts +3 -0
  30. package/dist/_pkgs/affine-block-database/service/index.js +3 -0
  31. package/dist/_pkgs/affine-block-database/service/new-row-menu.d.ts +49 -0
  32. package/dist/_pkgs/affine-block-database/service/new-row-menu.js +21 -0
  33. package/dist/_pkgs/affine-block-database/service/open-row.d.ts +77 -0
  34. package/dist/_pkgs/affine-block-database/service/open-row.js +62 -0
  35. package/dist/_pkgs/affine-block-database/service/properties-panel.d.ts +23 -0
  36. package/dist/_pkgs/affine-block-database/service/properties-panel.js +33 -0
  37. package/dist/_pkgs/affine-block-database/translations.d.ts +10 -0
  38. package/dist/_pkgs/affine-block-database/translations.js +35 -0
  39. package/dist/_pkgs/affine-block-database/view-creation.d.ts +10 -0
  40. package/dist/_pkgs/affine-block-database/view-creation.js +14 -0
  41. package/dist/_pkgs/affine-block-database/view.d.ts +31 -1
  42. package/dist/_pkgs/affine-block-database/view.js +44 -5
  43. package/dist/_pkgs/affine-block-database/views/index.d.ts +30 -3
  44. package/dist/_pkgs/affine-block-database/views/index.js +44 -3
  45. package/dist/_pkgs/affine-components/date-picker/date-picker.d.ts +20 -0
  46. package/dist/_pkgs/affine-components/date-picker/date-picker.js +60 -26
  47. package/dist/_pkgs/affine-components/date-picker/style.js +1 -0
  48. package/dist/_pkgs/affine-components/translations.d.ts +4 -0
  49. package/dist/_pkgs/affine-components/translations.js +26 -0
  50. package/dist/_pkgs/affine-fragment-doc-title/doc-title.d.ts +18 -0
  51. package/dist/_pkgs/affine-fragment-doc-title/doc-title.js +41 -2
  52. package/dist/_pkgs/affine-fragment-doc-title/title-band/band-cell.d.ts +8 -0
  53. package/dist/_pkgs/affine-fragment-doc-title/title-band/band-cell.js +12 -0
  54. package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.d.ts +5 -0
  55. package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.js +44 -4
  56. package/dist/_pkgs/affine-model/blocks/database/types.d.ts +16 -0
  57. package/dist/_pkgs/affine-model/blocks/database/types.js +5 -1
  58. package/dist/_pkgs/affine-shared/services/data-source-picker-service.d.ts +139 -0
  59. package/dist/_pkgs/affine-shared/services/data-source-picker-service.js +22 -0
  60. package/dist/_pkgs/affine-shared/services/index.d.ts +1 -0
  61. package/dist/_pkgs/affine-shared/services/index.js +1 -0
  62. package/dist/_pkgs/affine-shared/services/telemetry-service/database.d.ts +59 -0
  63. package/dist/_pkgs/affine-shared/services/title-band-service.d.ts +24 -0
  64. package/dist/_pkgs/data-view/core/component/cell-status/cell-status-css.d.ts +2 -0
  65. package/dist/_pkgs/data-view/core/component/cell-status/cell-status-css.js +16 -0
  66. package/dist/_pkgs/data-view/core/component/cell-status/cell-status.d.ts +10 -0
  67. package/dist/_pkgs/data-view/core/component/cell-status/cell-status.js +23 -0
  68. package/dist/_pkgs/data-view/core/component/index.d.ts +1 -0
  69. package/dist/_pkgs/data-view/core/component/index.js +1 -0
  70. package/dist/_pkgs/data-view/core/component/overflow/fit.d.ts +26 -0
  71. package/dist/_pkgs/data-view/core/component/overflow/fit.js +48 -0
  72. package/dist/_pkgs/data-view/core/component/overflow/overflow.d.ts +26 -3
  73. package/dist/_pkgs/data-view/core/component/overflow/overflow.js +84 -31
  74. package/dist/_pkgs/data-view/core/component/tags/colors.d.ts +7 -0
  75. package/dist/_pkgs/data-view/core/component/tags/colors.js +22 -10
  76. package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.d.ts +18 -0
  77. package/dist/_pkgs/data-view/core/component/tags/multi-tag-select.js +63 -21
  78. package/dist/_pkgs/data-view/core/data-source/base.d.ts +5 -1
  79. package/dist/_pkgs/data-view/core/data-source/base.js +7 -1
  80. package/dist/_pkgs/data-view/core/data-source/hydration.d.ts +44 -0
  81. package/dist/_pkgs/data-view/core/data-source/hydration.js +31 -0
  82. package/dist/_pkgs/data-view/core/data-source/index.d.ts +1 -0
  83. package/dist/_pkgs/data-view/core/data-source/index.js +1 -0
  84. package/dist/_pkgs/data-view/core/data-view.d.ts +22 -2
  85. package/dist/_pkgs/data-view/core/data-view.js +14 -0
  86. package/dist/_pkgs/data-view/core/effect.js +2 -0
  87. package/dist/_pkgs/data-view/core/group-by/collapsed-state.d.ts +3 -0
  88. package/dist/_pkgs/data-view/core/group-by/collapsed-state.js +59 -0
  89. package/dist/_pkgs/data-view/core/group-by/group-properties.d.ts +21 -0
  90. package/dist/_pkgs/data-view/core/group-by/group-properties.js +38 -0
  91. package/dist/_pkgs/data-view/core/group-by/group-title.js +4 -0
  92. package/dist/_pkgs/data-view/core/group-by/group-visibility.d.ts +40 -0
  93. package/dist/_pkgs/data-view/core/group-by/group-visibility.js +291 -0
  94. package/dist/_pkgs/data-view/core/group-by/setting.d.ts +11 -3
  95. package/dist/_pkgs/data-view/core/group-by/setting.js +81 -8
  96. package/dist/_pkgs/data-view/core/group-by/trait.d.ts +22 -0
  97. package/dist/_pkgs/data-view/core/group-by/trait.js +62 -1
  98. package/dist/_pkgs/data-view/core/index.d.ts +3 -0
  99. package/dist/_pkgs/data-view/core/index.js +3 -0
  100. package/dist/_pkgs/data-view/core/property/base-cell.d.ts +15 -1
  101. package/dist/_pkgs/data-view/core/property/base-cell.js +28 -3
  102. package/dist/_pkgs/data-view/core/property/standalone-cell.d.ts +15 -1
  103. package/dist/_pkgs/data-view/core/property/standalone-cell.js +19 -1
  104. package/dist/_pkgs/data-view/core/telemetry.d.ts +16 -0
  105. package/dist/_pkgs/data-view/core/telemetry.js +22 -0
  106. package/dist/_pkgs/data-view/core/utils/new-tab-click.d.ts +2 -0
  107. package/dist/_pkgs/data-view/core/utils/new-tab-click.js +4 -0
  108. package/dist/_pkgs/data-view/core/utils/wording.d.ts +11 -0
  109. package/dist/_pkgs/data-view/core/utils/wording.js +9 -0
  110. package/dist/_pkgs/data-view/core/view/data-view.d.ts +7 -0
  111. package/dist/_pkgs/data-view/core/view/default-name.d.ts +10 -0
  112. package/dist/_pkgs/data-view/core/view/default-name.js +14 -0
  113. package/dist/_pkgs/data-view/core/view/index.d.ts +2 -0
  114. package/dist/_pkgs/data-view/core/view/index.js +2 -0
  115. package/dist/_pkgs/data-view/core/view/open-in.d.ts +27 -0
  116. package/dist/_pkgs/data-view/core/view/open-in.js +39 -0
  117. package/dist/_pkgs/data-view/core/view-manager/cell.d.ts +5 -0
  118. package/dist/_pkgs/data-view/core/view-manager/cell.js +11 -0
  119. package/dist/_pkgs/data-view/core/view-manager/index.d.ts +3 -0
  120. package/dist/_pkgs/data-view/core/view-manager/index.js +3 -0
  121. package/dist/_pkgs/data-view/core/view-manager/new-row-menu-opener.d.ts +18 -0
  122. package/dist/_pkgs/data-view/core/view-manager/new-row-menu-opener.js +2 -0
  123. package/dist/_pkgs/data-view/core/view-manager/properties-panel-opener.d.ts +8 -0
  124. package/dist/_pkgs/data-view/core/view-manager/properties-panel-opener.js +9 -0
  125. package/dist/_pkgs/data-view/core/view-manager/property.d.ts +8 -0
  126. package/dist/_pkgs/data-view/core/view-manager/single-view.d.ts +28 -1
  127. package/dist/_pkgs/data-view/core/view-manager/single-view.js +45 -1
  128. package/dist/_pkgs/data-view/core/view-manager/view-creation.d.ts +49 -0
  129. package/dist/_pkgs/data-view/core/view-manager/view-creation.js +40 -0
  130. package/dist/_pkgs/data-view/core/view-manager/view-manager.d.ts +6 -2
  131. package/dist/_pkgs/data-view/core/view-manager/view-manager.js +2 -2
  132. package/dist/_pkgs/data-view/property-presets/date/cell-renderer.d.ts +2 -0
  133. package/dist/_pkgs/data-view/property-presets/date/cell-renderer.js +11 -2
  134. package/dist/_pkgs/data-view/property-presets/multi-select/cell-renderer.js +2 -0
  135. package/dist/_pkgs/data-view/property-presets/select/cell-renderer.js +2 -0
  136. package/dist/_pkgs/data-view/translations.d.ts +55 -0
  137. package/dist/_pkgs/data-view/translations.js +181 -0
  138. package/dist/_pkgs/data-view/view-presets/calendar/define.js +3 -1
  139. package/dist/_pkgs/data-view/view-presets/convert.js +2 -0
  140. package/dist/_pkgs/data-view/view-presets/effect.js +4 -0
  141. package/dist/_pkgs/data-view/view-presets/flat/flat-converts.d.ts +2 -0
  142. package/dist/_pkgs/data-view/view-presets/flat/flat-converts.js +35 -0
  143. package/dist/_pkgs/data-view/view-presets/flat/flat-view-manager.d.ts +79 -0
  144. package/dist/_pkgs/data-view/view-presets/flat/flat-view-manager.js +194 -0
  145. package/dist/_pkgs/data-view/view-presets/flat/flat-view-ui.d.ts +56 -0
  146. package/dist/_pkgs/data-view/view-presets/flat/flat-view-ui.js +266 -0
  147. package/dist/_pkgs/data-view/view-presets/gallery/define.d.ts +14 -0
  148. package/dist/_pkgs/data-view/view-presets/gallery/define.js +15 -0
  149. package/dist/_pkgs/data-view/view-presets/gallery/effect.d.ts +1 -0
  150. package/dist/_pkgs/data-view/view-presets/gallery/effect.js +4 -0
  151. package/dist/_pkgs/data-view/view-presets/gallery/gallery-view.d.ts +27 -0
  152. package/dist/_pkgs/data-view/view-presets/gallery/gallery-view.js +179 -0
  153. package/dist/_pkgs/data-view/view-presets/gallery/index.d.ts +2 -0
  154. package/dist/_pkgs/data-view/view-presets/gallery/index.js +2 -0
  155. package/dist/_pkgs/data-view/view-presets/gallery/renderer.d.ts +1 -0
  156. package/dist/_pkgs/data-view/view-presets/gallery/renderer.js +11 -0
  157. package/dist/_pkgs/data-view/view-presets/index.d.ts +5 -0
  158. package/dist/_pkgs/data-view/view-presets/index.js +7 -0
  159. package/dist/_pkgs/data-view/view-presets/kanban/define.js +3 -1
  160. package/dist/_pkgs/data-view/view-presets/kanban/kanban-view-manager.js +5 -53
  161. package/dist/_pkgs/data-view/view-presets/kanban/mobile/card.js +8 -1
  162. package/dist/_pkgs/data-view/view-presets/kanban/mobile/cell.js +6 -1
  163. package/dist/_pkgs/data-view/view-presets/kanban/mobile/group.d.ts +4 -2
  164. package/dist/_pkgs/data-view/view-presets/kanban/mobile/group.js +52 -6
  165. package/dist/_pkgs/data-view/view-presets/kanban/mobile/kanban-view-ui-logic.js +5 -1
  166. package/dist/_pkgs/data-view/view-presets/kanban/pc/card.js +2 -0
  167. package/dist/_pkgs/data-view/view-presets/kanban/pc/cell.js +4 -0
  168. package/dist/_pkgs/data-view/view-presets/kanban/pc/group.d.ts +4 -2
  169. package/dist/_pkgs/data-view/view-presets/kanban/pc/group.js +51 -6
  170. package/dist/_pkgs/data-view/view-presets/kanban/pc/kanban-view-ui-logic.js +5 -1
  171. package/dist/_pkgs/data-view/view-presets/list/define.d.ts +14 -0
  172. package/dist/_pkgs/data-view/view-presets/list/define.js +15 -0
  173. package/dist/_pkgs/data-view/view-presets/list/effect.d.ts +1 -0
  174. package/dist/_pkgs/data-view/view-presets/list/effect.js +4 -0
  175. package/dist/_pkgs/data-view/view-presets/list/index.d.ts +2 -0
  176. package/dist/_pkgs/data-view/view-presets/list/index.js +2 -0
  177. package/dist/_pkgs/data-view/view-presets/list/list-view.d.ts +24 -0
  178. package/dist/_pkgs/data-view/view-presets/list/list-view.js +194 -0
  179. package/dist/_pkgs/data-view/view-presets/list/renderer.d.ts +1 -0
  180. package/dist/_pkgs/data-view/view-presets/list/renderer.js +11 -0
  181. package/dist/_pkgs/data-view/view-presets/table/collapsed-state.d.ts +3 -14
  182. package/dist/_pkgs/data-view/view-presets/table/collapsed-state.js +6 -30
  183. package/dist/_pkgs/data-view/view-presets/table/consts.d.ts +2 -0
  184. package/dist/_pkgs/data-view/view-presets/table/consts.js +2 -0
  185. package/dist/_pkgs/data-view/view-presets/table/define.js +3 -1
  186. package/dist/_pkgs/data-view/view-presets/table/mobile/cell.js +4 -1
  187. package/dist/_pkgs/data-view/view-presets/table/mobile/column-header.js +2 -2
  188. package/dist/_pkgs/data-view/view-presets/table/mobile/group.d.ts +3 -1
  189. package/dist/_pkgs/data-view/view-presets/table/mobile/group.js +20 -5
  190. package/dist/_pkgs/data-view/view-presets/table/mobile/row.js +10 -2
  191. package/dist/_pkgs/data-view/view-presets/table/mobile/table-view-ui-logic.js +4 -1
  192. package/dist/_pkgs/data-view/view-presets/table/pc/cell.js +4 -1
  193. package/dist/_pkgs/data-view/view-presets/table/pc/controller/hotkeys.js +1 -1
  194. package/dist/_pkgs/data-view/view-presets/table/pc/group.d.ts +3 -1
  195. package/dist/_pkgs/data-view/view-presets/table/pc/group.js +20 -5
  196. package/dist/_pkgs/data-view/view-presets/table/pc/menu.d.ts +1 -1
  197. package/dist/_pkgs/data-view/view-presets/table/pc/menu.js +2 -1
  198. package/dist/_pkgs/data-view/view-presets/table/pc/row/row.js +3 -2
  199. package/dist/_pkgs/data-view/view-presets/table/pc/table-view-ui-logic.js +4 -1
  200. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/hotkeys.js +1 -1
  201. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/bottom/stats/column-stats-column.js +5 -1
  202. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +22 -19
  203. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/cell.js +4 -1
  204. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/table-view-ui-logic.js +7 -2
  205. package/dist/_pkgs/data-view/view-presets/table/stats/column-stats-column.js +5 -1
  206. package/dist/_pkgs/data-view/view-presets/table/table-view-manager.js +5 -53
  207. package/dist/_pkgs/data-view/widget-presets/tools/presets/table-add-row/add-row.d.ts +1 -0
  208. package/dist/_pkgs/data-view/widget-presets/tools/presets/table-add-row/add-row.js +60 -2
  209. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-options.d.ts +18 -1
  210. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-options.js +121 -124
  211. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-settings.d.ts +43 -0
  212. package/dist/_pkgs/data-view/widget-presets/tools/presets/view-options/view-settings.js +187 -0
  213. package/dist/_pkgs/data-view/widget-presets/views-bar/views-view.d.ts +36 -3
  214. package/dist/_pkgs/data-view/widget-presets/views-bar/views-view.js +187 -59
  215. package/dist/extensions/view.d.ts +2 -2
  216. package/dist/extensions/view.js +10 -3
  217. package/dist/flags.d.ts +8 -4
  218. package/dist/flags.js +8 -4
  219. package/dist/frameworks.d.ts +27 -0
  220. package/dist/frameworks.js +28 -0
  221. package/dist/translations.js +13 -1
  222. package/package.json +5 -1
@@ -33,20 +33,51 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
33
  return useValue ? value : void 0;
34
34
  };
35
35
  import { menu, popFilterableSimpleMenu, popMenu, popupTargetFromElement, } from '../../../affine-components/context-menu/index.js';
36
+ import { fillPlaceholders, TOOLBAR_DELETE, TOOLBAR_DUPLICATE, translateKey, } from '../../../affine-shared/services/index.js';
37
+ import { stdContext } from '../../../std/index.js';
36
38
  import { DeleteIcon, DuplicateIcon, InfoIcon, MoreHorizontalIcon, MoveLeftIcon, MoveRightIcon, PlusIcon, } from '@blocksuite/icons/lit';
37
- import { css, html } from 'lit';
39
+ import { IS_MOBILE } from '../../../global/env/index.js';
40
+ import { consume } from '@lit/context';
41
+ import { css, html, nothing } from 'lit';
38
42
  import { property } from 'lit/decorators.js';
39
43
  import { classMap } from 'lit/directives/class-map.js';
44
+ import { viewDefaultName } from '../../core/view/default-name.js';
45
+ import { modeShownAsFallback } from '../../core/view-manager/single-view.js';
46
+ import { AddViewMenuIdentifier, duplicateAsShownPreset, ViewCreationOffKey, } from '../../core/view-manager/view-creation.js';
40
47
  import { WidgetBase } from '../../core/widget/widget-base.js';
48
+ import { VIEW_DUPLICATE_AS_TABLE, VIEW_SHOWN_AS_TABLE, VIEWS_BAR_ADD_VIEW, VIEWS_BAR_EDIT_VIEW, VIEWS_BAR_MORE, VIEWS_BAR_MOVE_LEFT, VIEWS_BAR_MOVE_RIGHT, VIEWS_BAR_VIEW_NAME, } from '../../translations.js';
49
+ /** A finger-sized tab, "N more" and "+" on a phone (ADR 0035 §1, B5, B11). */
50
+ export const VIEWS_BAR_TOUCH_TARGET = 44;
51
+ /**
52
+ * The views bar of a database (ADR 0035 B11, labre PRD REQ-DB-7): one tab per
53
+ * view while the width allows, the rest under "N more", then "+".
54
+ *
55
+ * - The tabs are measured by `component-overflow` (`fitOverflow`): views keep
56
+ * their order, and the current view's tab is always drawn, in place of the
57
+ * last one that would have fitted, so the view you look at never hides.
58
+ * - "N more" lists the views without a tab; picking one draws it.
59
+ * - "+" is the bar's only creation entry. It pops the `AddViewMenu` the
60
+ * `core-database` bundle registers (sources) when there is one, the
61
+ * creatable presets otherwise. Readonly, or with creation switched off for
62
+ * the source (`ViewCreationOffKey`, ADR 0035 §5), there is no "+".
63
+ * - On a phone the tabs, "N more" and "+" are 44px tall, nothing else changes.
64
+ *
65
+ * Stays in core: a core-only host must reach every stored view (ADR 0035 §1).
66
+ */
41
67
  let DataViewHeaderViews = (() => {
42
68
  let _classSuper = WidgetBase;
69
+ let _std_decorators;
70
+ let _std_initializers = [];
71
+ let _std_extraInitializers = [];
43
72
  let _onChangeView_decorators;
44
73
  let _onChangeView_initializers = [];
45
74
  let _onChangeView_extraInitializers = [];
46
75
  return class DataViewHeaderViews extends _classSuper {
47
76
  static {
48
77
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
78
+ _std_decorators = [consume({ context: stdContext })];
49
79
  _onChangeView_decorators = [property({ attribute: false })];
80
+ __esDecorate(this, null, _std_decorators, { kind: "accessor", name: "std", static: false, private: false, access: { has: obj => "std" in obj, get: obj => obj.std, set: (obj, value) => { obj.std = value; } }, metadata: _metadata }, _std_initializers, _std_extraInitializers);
50
81
  __esDecorate(this, null, _onChangeView_decorators, { kind: "accessor", name: "onChangeView", static: false, private: false, access: { has: obj => "onChangeView" in obj, get: obj => obj.onChangeView, set: (obj, value) => { obj.onChangeView = value; } }, metadata: _metadata }, _onChangeView_initializers, _onChangeView_extraInitializers);
51
82
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
52
83
  }
@@ -56,6 +87,20 @@ let DataViewHeaderViews = (() => {
56
87
  display: flex;
57
88
  user-select: none;
58
89
  gap: 4px;
90
+ min-width: 0;
91
+ }
92
+ data-view-header-views.mobile {
93
+ height: ${VIEWS_BAR_TOUCH_TARGET}px;
94
+ }
95
+ data-view-header-views.mobile .database-view-button {
96
+ min-height: ${VIEWS_BAR_TOUCH_TARGET}px;
97
+ min-width: ${VIEWS_BAR_TOUCH_TARGET}px;
98
+ }
99
+ data-view-header-views .component-overflow-item {
100
+ padding-right: 4px;
101
+ }
102
+ data-view-header-views .component-overflow-more {
103
+ gap: 4px;
59
104
  }
60
105
  data-view-header-views::-webkit-scrollbar-thumb {
61
106
  width: 1px;
@@ -101,14 +146,45 @@ let DataViewHeaderViews = (() => {
101
146
  color: var(--affine-text-primary-color);
102
147
  background-color: var(--affine-hover-color-filled);
103
148
  }
149
+
150
+ .database-view-button .shown-as {
151
+ font-size: 12px;
152
+ color: var(--affine-text-secondary-color);
153
+ padding-right: 2px;
154
+ }
104
155
  `; }
105
- addView(type) {
106
- const id = this.viewManager.viewAdd(type);
107
- this.viewManager.setCurrentView(id);
108
- this.dataViewLogic.root.config.eventTrace('AddDatabaseView', {
109
- type: type,
156
+ #std_accessor_storage;
157
+ // Absent outside an editor host (a standalone mount): wordings fall back.
158
+ get std() { return this.#std_accessor_storage; }
159
+ set std(value) { this.#std_accessor_storage = value; }
160
+ /** A popup renders outside the host, so wordings are resolved here. */
161
+ wording(wording, params) {
162
+ return this.std
163
+ ? translateKey(this.std, ...wording, params)
164
+ : fillPlaceholders(wording[1], params);
165
+ }
166
+ /** The host switched view creation off for this source (ADR 0035 §5). */
167
+ get creationOff() {
168
+ return this.dataSource.serviceGet(ViewCreationOffKey) === true;
169
+ }
170
+ presetItems() {
171
+ return this.dataSource.viewMetas.map(v => {
172
+ return menu.action({
173
+ name: viewDefaultName(v, this.std),
174
+ testId: 'database-add-view-preset',
175
+ prefix: html `<uni-lit .uni=${v.renderer.icon}></uni-lit>`,
176
+ select: () => {
177
+ this.addView(v.type);
178
+ },
179
+ });
110
180
  });
111
181
  }
182
+ moreLabel(count) {
183
+ const [key, fallback] = VIEWS_BAR_MORE;
184
+ return this.std
185
+ ? translateKey(this.std, key, fallback, { count })
186
+ : fillPlaceholders(fallback, { count });
187
+ }
112
188
  get readonly() {
113
189
  return this.viewManager.readonly$.value;
114
190
  }
@@ -123,11 +199,18 @@ let DataViewHeaderViews = (() => {
123
199
  }
124
200
  this.openViewOption(popupTargetFromElement(event.currentTarget), id);
125
201
  }
202
+ connectedCallback() {
203
+ super.connectedCallback();
204
+ this.classList.toggle('mobile', IS_MOBILE);
205
+ }
126
206
  render() {
207
+ const views = this.viewManager.views$.value;
208
+ const current = this.viewManager.currentViewId$.value;
127
209
  return html `
128
210
  <component-overflow
129
211
  .renderItem="${this.renderViews()}"
130
212
  .renderMore="${this.renderMore}"
213
+ .pinned="${current ? views.indexOf(current) : -1}"
131
214
  ></component-overflow>
132
215
  `;
133
216
  }
@@ -136,22 +219,36 @@ let DataViewHeaderViews = (() => {
136
219
  set onChangeView(value) { this.#onChangeView_accessor_storage = value; }
137
220
  constructor() {
138
221
  super(...arguments);
222
+ this.#std_accessor_storage = __runInitializers(this, _std_initializers, void 0);
223
+ /**
224
+ * The bar's "add a view of this preset", also handed to the bundle's "+"
225
+ * menu: the name is resolved here, at the gesture, and written as is
226
+ * (ADR 0023); `DatabaseViewAdded` is reported once (B17), `source` saying
227
+ * whether the gesture created the source the view reads.
228
+ */
229
+ this.addView = (__runInitializers(this, _std_extraInitializers), (type, source = 'existing') => {
230
+ const id = this.viewManager.viewAdd(type, viewDefaultName(this.dataSource.viewMetaGet(type), this.std));
231
+ this.viewManager.setCurrentView(id);
232
+ this.onChangeView?.(id);
233
+ this.dataViewLogic.root.config.eventTrace('DatabaseViewAdded', {
234
+ viewType: type,
235
+ source,
236
+ });
237
+ return id;
238
+ });
139
239
  this._addViewMenu = (event) => {
140
- popFilterableSimpleMenu(popupTargetFromElement(event.currentTarget), this.dataSource.viewMetas.map(v => {
141
- return menu.action({
142
- name: v.model.defaultName,
143
- prefix: html `<uni-lit .uni=${v.renderer.icon}></uni-lit>`,
144
- select: () => {
145
- this.addView(v.type);
146
- },
147
- });
148
- }));
240
+ const items = this.std?.getOptional(AddViewMenuIdentifier)?.items({
241
+ std: this.std,
242
+ dataSource: this.dataSource,
243
+ viewManager: this.viewManager,
244
+ addView: this.addView,
245
+ }) ?? this.presetItems();
246
+ popFilterableSimpleMenu(popupTargetFromElement(event.currentTarget), items);
149
247
  };
150
- this._showMore = (event) => {
151
- const views = this.viewManager.views$.value;
248
+ this._showMore = (event, hidden) => {
152
249
  popFilterableSimpleMenu(popupTargetFromElement(event.currentTarget), [
153
250
  menu.group({
154
- items: views.flatMap(id => {
251
+ items: hidden.flatMap(id => {
155
252
  const openViewOption = (event) => {
156
253
  event.stopPropagation();
157
254
  this.openViewOption(popupTargetFromElement(event.currentTarget), id);
@@ -167,8 +264,10 @@ let DataViewHeaderViews = (() => {
167
264
  name: view.name$.value ?? '',
168
265
  label: () => html `${view.name$.value}`,
169
266
  isSelected: this.viewManager.currentViewId$.value === id,
267
+ testId: 'database-views-more-item',
170
268
  select: () => {
171
269
  this.viewManager.setCurrentView(id);
270
+ this.onChangeView?.(id);
172
271
  },
173
272
  postfix: html `<div
174
273
  class="dv-hover dv-round-4"
@@ -180,18 +279,6 @@ let DataViewHeaderViews = (() => {
180
279
  });
181
280
  }),
182
281
  }),
183
- menu.group({
184
- items: this.dataSource.viewMetas.map(v => {
185
- return menu.action({
186
- name: `Create ${v.model.defaultName}`,
187
- hide: () => this.readonly,
188
- prefix: PlusIcon(),
189
- select: () => {
190
- this.addView(v.type);
191
- },
192
- });
193
- }),
194
- }),
195
282
  ]);
196
283
  };
197
284
  this.openViewOption = (target, id) => {
@@ -208,20 +295,29 @@ let DataViewHeaderViews = (() => {
208
295
  if (!view) {
209
296
  return;
210
297
  }
298
+ // A view drawn through a fallback preset has read-only settings and data
299
+ // that is never rewritten (ADR 0035 §6): no rename, no settings, and
300
+ // "Duplicate as table" in place of a duplicate of a mode we cannot draw.
301
+ const fallback = view.shownAsFallback$.value;
211
302
  popMenu(target, {
212
303
  options: {
213
304
  items: [
214
- menu.input({
215
- initialValue: view.name$.value,
216
- placeholder: 'View name',
217
- onChange: text => {
218
- view.nameSet(text);
219
- },
220
- }),
305
+ ...(fallback
306
+ ? []
307
+ : [
308
+ menu.input({
309
+ initialValue: view.name$.value,
310
+ placeholder: this.wording(VIEWS_BAR_VIEW_NAME),
311
+ onChange: text => {
312
+ view.nameSet(text);
313
+ },
314
+ }),
315
+ ]),
221
316
  menu.group({
222
317
  items: [
223
318
  menu.action({
224
- name: 'Edit View',
319
+ name: this.wording(VIEWS_BAR_EDIT_VIEW),
320
+ hide: () => fallback,
225
321
  prefix: InfoIcon(),
226
322
  select: () => {
227
323
  this.closest('affine-data-view-renderer')
@@ -230,7 +326,7 @@ let DataViewHeaderViews = (() => {
230
326
  },
231
327
  }),
232
328
  menu.action({
233
- name: 'Move Left',
329
+ name: this.wording(VIEWS_BAR_MOVE_LEFT),
234
330
  hide: () => index === 0,
235
331
  prefix: MoveLeftIcon(),
236
332
  select: () => {
@@ -239,7 +335,7 @@ let DataViewHeaderViews = (() => {
239
335
  },
240
336
  }),
241
337
  menu.action({
242
- name: 'Move Right',
338
+ name: this.wording(VIEWS_BAR_MOVE_RIGHT),
243
339
  prefix: MoveRightIcon(),
244
340
  hide: () => index === views.length - 1,
245
341
  select: () => {
@@ -252,14 +348,24 @@ let DataViewHeaderViews = (() => {
252
348
  menu.group({
253
349
  items: [
254
350
  menu.action({
255
- name: 'Duplicate',
351
+ name: this.wording(TOOLBAR_DUPLICATE),
352
+ hide: () => fallback,
256
353
  prefix: DuplicateIcon(),
257
354
  select: () => {
258
355
  this.viewManager.viewDuplicate(id);
259
356
  },
260
357
  }),
261
358
  menu.action({
262
- name: 'Delete',
359
+ name: this.wording(VIEW_DUPLICATE_AS_TABLE),
360
+ hide: () => !fallback,
361
+ prefix: DuplicateIcon(),
362
+ testId: 'database-view-duplicate-as-table',
363
+ select: () => {
364
+ duplicateAsShownPreset(this.viewManager, id);
365
+ },
366
+ }),
367
+ menu.action({
368
+ name: this.wording(TOOLBAR_DELETE),
263
369
  prefix: DeleteIcon(),
264
370
  select: () => {
265
371
  view.delete();
@@ -272,24 +378,36 @@ let DataViewHeaderViews = (() => {
272
378
  },
273
379
  });
274
380
  };
275
- this.renderMore = (count) => {
381
+ this.renderMore = (_count, hiddenIndices) => {
276
382
  const views = this.viewManager.views$.value;
277
- if (count === views.length) {
278
- if (this.readonly) {
279
- return;
280
- }
281
- return html `<div
282
- class="database-view-button dv-icon-16 dv-hover"
283
- data-testid="database-add-view-button"
284
- @click="${this._addViewMenu}"
285
- >
286
- ${PlusIcon()}
287
- </div>`;
288
- }
383
+ const hidden = hiddenIndices.flatMap(index => {
384
+ const id = views[index];
385
+ return id ? [id] : [];
386
+ });
387
+ const addLabel = this.wording(VIEWS_BAR_ADD_VIEW);
289
388
  return html `
290
- <div class="database-view-button dv-hover" @click="${this._showMore}">
291
- ${views.length - count} More
292
- </div>
389
+ ${hidden.length
390
+ ? html `<div
391
+ class="database-view-button dv-hover"
392
+ data-overflow-more
393
+ data-testid="database-views-more"
394
+ @click="${(event) => this._showMore(event, hidden)}"
395
+ >
396
+ ${this.moreLabel(hidden.length)}
397
+ </div>`
398
+ : nothing}
399
+ ${this.readonly || this.creationOff
400
+ ? nothing
401
+ : html `<div
402
+ class="database-view-button dv-icon-16 dv-hover"
403
+ data-testid="database-add-view-button"
404
+ role="button"
405
+ aria-label="${addLabel}"
406
+ title="${addLabel}"
407
+ @click="${this._addViewMenu}"
408
+ >
409
+ ${PlusIcon()}
410
+ </div>`}
293
411
  `;
294
412
  };
295
413
  this.renderViews = () => {
@@ -301,14 +419,24 @@ let DataViewHeaderViews = (() => {
301
419
  selected: this.viewManager.currentViewId$.value === id,
302
420
  });
303
421
  const view = this.viewManager.viewDataGet(id);
422
+ const shownAs = view && modeShownAsFallback(this.dataSource, view.mode)
423
+ ? this.wording(VIEW_SHOWN_AS_TABLE)
424
+ : undefined;
304
425
  return html `
305
426
  <div
306
427
  class="${classList}"
307
- style="margin-right: 4px;"
428
+ data-testid="database-view-tab"
429
+ data-view-id="${id}"
430
+ title="${shownAs ?? nothing}"
308
431
  @click="${(event) => this.clickView(event, id)}"
309
432
  >
310
433
  <uni-lit class="icon" .uni="${this.getRenderer(id)?.icon}"></uni-lit>
311
434
  <div class="name">${view?.name}</div>
435
+ ${shownAs
436
+ ? html `<span class="shown-as" data-testid="database-view-shown-as"
437
+ >${shownAs}</span
438
+ >`
439
+ : nothing}
312
440
  </div>
313
441
  `;
314
442
  });
@@ -1,4 +1,4 @@
1
- import { AdapterPanelViewExtension } from '../_pkgs/affine-fragment-adapter-panel/view.js';
1
+ import { DataViewViewExtension } from '../_pkgs/affine-block-data-view/view.js';
2
2
  import { type LabreFlags } from '../flags.js';
3
3
  /**
4
4
  * View extensions.
@@ -9,4 +9,4 @@ import { type LabreFlags } from '../flags.js';
9
9
  * already drawn disappearing from the canvas. Omitted flags default to
10
10
  * enabled. See {@link BlockFlags} and `docs/adr/0009`.
11
11
  */
12
- export declare function getInternalViewExtensions(flags?: LabreFlags): (typeof AdapterPanelViewExtension)[];
12
+ export declare function getInternalViewExtensions(flags?: LabreFlags): (typeof DataViewViewExtension)[];
@@ -2,8 +2,8 @@ import { AttachmentViewExtension } from '../_pkgs/affine-block-attachment/view.j
2
2
  import { BookmarkViewExtension } from '../_pkgs/affine-block-bookmark/view.js';
3
3
  import { CalloutRenderViewExtension, CalloutViewExtension, } from '../_pkgs/affine-block-callout/view.js';
4
4
  import { CodeBlockViewExtension } from '../_pkgs/affine-block-code/view.js';
5
- import { DataViewViewExtension } from '../_pkgs/affine-block-data-view/view.js';
6
- import { DatabaseViewExtension } from '../_pkgs/affine-block-database/view.js';
5
+ import { DataViewRenderViewExtension, DataViewViewExtension, } from '../_pkgs/affine-block-data-view/view.js';
6
+ import { DatabaseRenderViewExtension, DatabaseViewExtension, } from '../_pkgs/affine-block-database/view.js';
7
7
  import { DividerViewExtension } from '../_pkgs/affine-block-divider/view.js';
8
8
  import { EdgelessTextViewExtension } from '../_pkgs/affine-block-edgeless-text/view.js';
9
9
  import { EmbedViewExtension } from '../_pkgs/affine-block-embed/view.js';
@@ -110,11 +110,14 @@ export function getInternalViewExtensions(flags) {
110
110
  ...(on('bookmark') ? [BookmarkViewExtension] : []),
111
111
  // Split like the frameworks (ADR 0009, #418): a stored callout paints,
112
112
  // edits and keeps its block toolbar; the flag removes only the creation
113
- // entries (slash item, Turn into). The other blocks are not split yet.
113
+ // entries (slash item, Turn into). Database and data-view are split the
114
+ // same way (ADR 0035 §5, B4); the other blocks are not split yet.
114
115
  CalloutRenderViewExtension,
115
116
  ...(on('callout') ? [CalloutViewExtension] : []),
116
117
  ...(on('code') ? [CodeBlockViewExtension] : []),
118
+ DataViewRenderViewExtension,
117
119
  ...(on('data-view') ? [DataViewViewExtension] : []),
120
+ DatabaseRenderViewExtension,
118
121
  ...(on('database') ? [DatabaseViewExtension] : []),
119
122
  ...(on('divider') ? [DividerViewExtension] : []),
120
123
  ...(on('edgeless-text') ? [EdgelessTextViewExtension] : []),
@@ -135,6 +138,10 @@ export function getInternalViewExtensions(flags) {
135
138
  // `OPTIONAL_CAPABILITIES` for why it is not an `OPTIONAL_BLOCKS` entry.
136
139
  ...(isCapabilityEnabled(flags, 'ai-audit') ? [AuditViewExtension] : []),
137
140
  RootViewExtension,
141
+ // Database editing chrome, published apart as `core-database` (ADR 0035
142
+ // §4, `EDITOR_BUNDLES`): the always-on half and the creation half under
143
+ // core's own `database` key. Core's published copy loses these two lines;
144
+ // the playground and the integration suite keep them.
138
145
  // Inline
139
146
  InlineCommentViewExtension,
140
147
  FootnoteViewExtension,
package/dist/flags.d.ts CHANGED
@@ -40,16 +40,20 @@
40
40
  * Caveats:
41
41
  * - The reversal covers **surface elements** (everything living in the surface
42
42
  * `elements` map: brush, mindmap, wardley, edgy, cynefin, estuarine, bpmn,
43
- * coreDomain). BLOCKS (database, code, image, latex, frame, edgeless-text, …)
43
+ * coreDomain). BLOCKS (code, image, latex, frame, edgeless-text, …)
44
44
  * still have their whole view extension gated, because their renderer and
45
45
  * their tooling live in the same extension. Their data is safe — schema and
46
46
  * store side are unconditional, so the document loads, round-trips and
47
47
  * re-renders untouched once the flag is back on — but a disabled block
48
48
  * currently renders as nothing until its view extension is split the way the
49
49
  * frameworks' were. See the "Consequences" section of `docs/adr/0009`.
50
- * `callout` is the one block split so far (2026-10-11 amendment of that
51
- * ADR): with `{ callout: false }` a stored callout still renders, stays
52
- * editable and keeps its block toolbar; only its creation entries go.
50
+ * `callout` was the first block split (2026-10-11 amendment of that ADR):
51
+ * with `{ callout: false }` a stored callout still renders, stays editable
52
+ * and keeps its block toolbar; only its creation entries go. `database` and
53
+ * `data-view` are split the same way (ADR 0035 §5, amendment of ADR 0009):
54
+ * with `{ database: false }` a stored database renders, every stored view
55
+ * included, its cells stay editable and its rows open; only the slash
56
+ * entries and "+ view" go. `data-view` gates nothing yet.
53
57
  * - `latex` covers both the latex block and inline latex.
54
58
  * - `frame` also covers the frame panel fragment.
55
59
  * - `ddd-templates` covers all four DDD Templates-panel categories, so the
package/dist/flags.js CHANGED
@@ -40,16 +40,20 @@
40
40
  * Caveats:
41
41
  * - The reversal covers **surface elements** (everything living in the surface
42
42
  * `elements` map: brush, mindmap, wardley, edgy, cynefin, estuarine, bpmn,
43
- * coreDomain). BLOCKS (database, code, image, latex, frame, edgeless-text, …)
43
+ * coreDomain). BLOCKS (code, image, latex, frame, edgeless-text, …)
44
44
  * still have their whole view extension gated, because their renderer and
45
45
  * their tooling live in the same extension. Their data is safe — schema and
46
46
  * store side are unconditional, so the document loads, round-trips and
47
47
  * re-renders untouched once the flag is back on — but a disabled block
48
48
  * currently renders as nothing until its view extension is split the way the
49
49
  * frameworks' were. See the "Consequences" section of `docs/adr/0009`.
50
- * `callout` is the one block split so far (2026-10-11 amendment of that
51
- * ADR): with `{ callout: false }` a stored callout still renders, stays
52
- * editable and keeps its block toolbar; only its creation entries go.
50
+ * `callout` was the first block split (2026-10-11 amendment of that ADR):
51
+ * with `{ callout: false }` a stored callout still renders, stays editable
52
+ * and keeps its block toolbar; only its creation entries go. `database` and
53
+ * `data-view` are split the same way (ADR 0035 §5, amendment of ADR 0009):
54
+ * with `{ database: false }` a stored database renders, every stored view
55
+ * included, its cells stay editable and its rows open; only the slash
56
+ * entries and "+ view" go. `data-view` gates nothing yet.
53
57
  * - `latex` covers both the latex block and inline latex.
54
58
  * - `frame` also covers the frame panel fragment.
55
59
  * - `ddd-templates` covers all four DDD Templates-panel categories, so the
@@ -50,5 +50,32 @@ export declare const AUXILIARY_BUNDLES: {
50
50
  viewExtension: string;
51
51
  }[];
52
52
  }[];
53
+ /**
54
+ * Bundles that extend CORE's own blocks with editing chrome (ADR 0035 §2, §4):
55
+ * `core-*`, released in lockstep with core and pinned to its exact version.
56
+ * Read by `scripts/build-bundles.mjs` like {@link AUXILIARY_BUNDLES}, with one
57
+ * difference that is the reason for a third list: the flag of a gated
58
+ * extension here is core's own key (`database` gates core's creation tooling
59
+ * too), so the script strips the import, the registrations and the
60
+ * translation group from core's copies but NEVER the flag from `flags.ts`.
61
+ *
62
+ * The chrome only adds ways to create and arrange: a host that installs core
63
+ * alone still sees and edits every stored database. Guarded by
64
+ * `core-database-boundary.unit.spec.ts`.
65
+ */
66
+ export declare const EDITOR_BUNDLES: {
67
+ bundle: string;
68
+ label: string;
69
+ info: string;
70
+ pkg: string;
71
+ dir: string;
72
+ extensions: ({
73
+ viewExtension: string;
74
+ flag?: undefined;
75
+ } | {
76
+ flag: string;
77
+ viewExtension: string;
78
+ })[];
79
+ }[];
53
80
  export declare const frameworkDescriptor: (id: FrameworkId) => FrameworkDescriptor | undefined;
54
81
  export {};
@@ -201,5 +201,33 @@ export const AUXILIARY_BUNDLES = [
201
201
  ],
202
202
  },
203
203
  ];
204
+ /**
205
+ * Bundles that extend CORE's own blocks with editing chrome (ADR 0035 §2, §4):
206
+ * `core-*`, released in lockstep with core and pinned to its exact version.
207
+ * Read by `scripts/build-bundles.mjs` like {@link AUXILIARY_BUNDLES}, with one
208
+ * difference that is the reason for a third list: the flag of a gated
209
+ * extension here is core's own key (`database` gates core's creation tooling
210
+ * too), so the script strips the import, the registrations and the
211
+ * translation group from core's copies but NEVER the flag from `flags.ts`.
212
+ *
213
+ * The chrome only adds ways to create and arrange: a host that installs core
214
+ * alone still sees and edits every stored database. Guarded by
215
+ * `core-database-boundary.unit.spec.ts`.
216
+ */
217
+ export const EDITOR_BUNDLES = [
218
+ {
219
+ bundle: 'core-database',
220
+ label: 'core-database',
221
+ info: 'coreDatabaseBundle',
222
+ pkg: '@labre/affine-database-editor',
223
+ dir: 'affine/database-editor',
224
+ extensions: [
225
+ // always-on: view bar, full-page host, properties panel element
226
+ { viewExtension: 'DatabaseEditorViewExtension' },
227
+ // creation entries, under core's own key
228
+ { flag: 'database', viewExtension: 'DatabaseEditorToolingViewExtension' },
229
+ ],
230
+ },
231
+ ];
204
232
  const BY_ID = new Map(FRAMEWORK_DESCRIPTORS.map(d => [d.id, d]));
205
233
  export const frameworkDescriptor = (id) => BY_ID.get(id);
@@ -1,5 +1,6 @@
1
1
  import { ATTACHMENT_WORDINGS } from './_pkgs/affine-block-attachment/translations.js';
2
2
  import { BOOKMARK_WORDINGS } from './_pkgs/affine-block-bookmark/translations.js';
3
+ import { DATABASE_WORDINGS } from './_pkgs/affine-block-database/translations.js';
3
4
  import { EMBED_WORDINGS } from './_pkgs/affine-block-embed/translations.js';
4
5
  import { EMBED_DOC_WORDINGS } from './_pkgs/affine-block-embed-doc/translations.js';
5
6
  import { FRAME_CHROME_WORDINGS, FRAME_WORDINGS, } from './_pkgs/affine-block-frame/translations.js';
@@ -8,6 +9,7 @@ import { EXEMPTION_FALLBACK, EXPORT_SVG_WORDINGS, PROVENANCE_FALLBACK, READING_F
8
9
  import { SURFACE_REF_CHROME_WORDINGS, SURFACE_REF_WORDINGS, } from './_pkgs/affine-block-surface-ref/translations.js';
9
10
  import { ADAPTER_PANEL_WORDINGS } from './_pkgs/affine-fragment-adapter-panel/translations.js';
10
11
  import { DOC_TITLE_WORDINGS } from './_pkgs/affine-fragment-doc-title/translations.js';
12
+ import { DATA_VIEW_WORDINGS } from './_pkgs/data-view/translations.js';
11
13
  import { OUTLINE_WORDINGS } from './_pkgs/affine-fragment-outline/translations.js';
12
14
  import { COMPONENTS_WORDINGS } from './_pkgs/affine-components/translations.js';
13
15
  import { ROOT_CHROME_WORDINGS, ROOT_SEED_WORDINGS, } from './_pkgs/affine-block-root/translations.js';
@@ -54,6 +56,14 @@ import { FRAMEWORK_DESCRIPTORS } from './frameworks.js';
54
56
  const AUXILIARY_TRANSLATION_GROUPS = [
55
57
  // One line per bundle: the bundler strips it by its `owner`.
56
58
  ];
59
+ /**
60
+ * The editor bundles' contributions (`EDITOR_BUNDLES` in `frameworks.ts`):
61
+ * chrome over core's own blocks, shipped apart. Same one-line shape, stripped
62
+ * from core's copy by its `owner` (the bundle name).
63
+ */
64
+ const EDITOR_TRANSLATION_GROUPS = [
65
+ // One line per bundle: the bundler strips it by its `owner`.
66
+ ];
57
67
  const FRAMEWORK_TRANSLATION_GROUPS = [];
58
68
  /**
59
69
  * The chrome wordings that are TABLES: closed enumerations whose key is a
@@ -281,6 +291,8 @@ const PACKAGE_WORDINGS = [
281
291
  PARAGRAPH_WORDINGS,
282
292
  ADAPTER_PANEL_WORDINGS,
283
293
  DOC_TITLE_WORDINGS,
294
+ DATA_VIEW_WORDINGS,
295
+ DATABASE_WORDINGS,
284
296
  SHAPE_WORDINGS,
285
297
  TEXT_WORDINGS,
286
298
  MINDMAP_CHROME_WORDINGS,
@@ -350,7 +362,7 @@ const PACKAGE_SEED_WORDINGS = [
350
362
  * not filtered either.
351
363
  */
352
364
  export function getTranslationKeyManifest() {
353
- return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), ...AUXILIARY_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), catalogueCategoryEntries(),
365
+ return mergeTranslationEntries(commandTranslationEntries(getCommands()), collectTranslationKeys('framework', FRAMEWORK_DESCRIPTORS), ...FRAMEWORK_TRANSLATION_GROUPS.map(group => group.entries), ...AUXILIARY_TRANSLATION_GROUPS.map(group => group.entries), ...EDITOR_TRANSLATION_GROUPS.map(group => group.entries), chromeTableEntries(), catalogueCategoryEntries(),
354
366
  // The editor's own shared vocabulary — the toasts, the toolbar verbs, the
355
367
  // view switcher, the board tooltips — DECLARED in
356
368
  // `@labre/affine-shared/services` beside nothing at all, and walked here
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.48.0",
4
+ "version": "0.49.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -878,6 +878,10 @@
878
878
  "types": "./dist/_pkgs/global/utils/index.d.ts",
879
879
  "import": "./dist/_pkgs/global/utils/index.js"
880
880
  },
881
+ "./_pkgs/global/utils/types.js": {
882
+ "types": "./dist/_pkgs/global/utils/types.d.ts",
883
+ "import": "./dist/_pkgs/global/utils/types.js"
884
+ },
881
885
  "./_pkgs/store": {
882
886
  "types": "./dist/_pkgs/store/index.d.ts",
883
887
  "import": "./dist/_pkgs/store/index.js"