@formicoidea/labre-core 0.42.0 → 0.45.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 (367) hide show
  1. package/dist/_pkgs/affine-block-attachment/utils.js +4 -0
  2. package/dist/_pkgs/affine-block-bookmark/configs/toolbar.js +17 -4
  3. package/dist/_pkgs/affine-block-callout/commands/turn-into-callout.d.ts +29 -0
  4. package/dist/_pkgs/affine-block-callout/commands/turn-into-callout.js +81 -0
  5. package/dist/_pkgs/affine-block-callout/configs/slash-menu.js +6 -4
  6. package/dist/_pkgs/affine-block-callout/configs/turn-into.d.ts +8 -0
  7. package/dist/_pkgs/affine-block-callout/configs/turn-into.js +19 -0
  8. package/dist/_pkgs/affine-block-callout/translations.d.ts +4 -2
  9. package/dist/_pkgs/affine-block-callout/translations.js +4 -2
  10. package/dist/_pkgs/affine-block-callout/view.js +3 -0
  11. package/dist/_pkgs/affine-block-code/code-block-service.d.ts +13 -0
  12. package/dist/_pkgs/affine-block-code/code-block-service.js +26 -0
  13. package/dist/_pkgs/affine-block-code/code-block.d.ts +6 -0
  14. package/dist/_pkgs/affine-block-code/code-block.js +11 -2
  15. package/dist/_pkgs/affine-block-code/code-toolbar/components/lang-button.js +31 -8
  16. package/dist/_pkgs/affine-block-data-view/configs/tooltips.js +1 -1
  17. package/dist/_pkgs/affine-block-database/configs/tooltips.js +1 -1
  18. package/dist/_pkgs/affine-block-edgeless-text/edgeless-text-block.js +4 -2
  19. package/dist/_pkgs/affine-block-edgeless-text/edgeless-toolbar/config.d.ts +11 -0
  20. package/dist/_pkgs/affine-block-edgeless-text/svg-painter.d.ts +20 -0
  21. package/dist/_pkgs/affine-block-edgeless-text/svg-painter.js +76 -0
  22. package/dist/_pkgs/affine-block-edgeless-text/view.js +2 -0
  23. package/dist/_pkgs/affine-block-embed/common/iframe-sandbox.d.ts +39 -0
  24. package/dist/_pkgs/affine-block-embed/common/iframe-sandbox.js +39 -0
  25. package/dist/_pkgs/affine-block-embed/configs/toolbar.js +11 -2
  26. package/dist/_pkgs/affine-block-embed/embed-figma-block/embed-figma-block.js +2 -0
  27. package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.d.ts +14 -1
  28. package/dist/_pkgs/affine-block-embed/embed-iframe-block/components/embed-iframe-error-card.js +21 -2
  29. package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +11 -2
  30. package/dist/_pkgs/affine-block-embed/embed-iframe-block/consts.d.ts +0 -2
  31. package/dist/_pkgs/affine-block-embed/embed-iframe-block/consts.js +2 -5
  32. package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.d.ts +1 -1
  33. package/dist/_pkgs/affine-block-embed/embed-iframe-block/embed-iframe-block.js +14 -6
  34. package/dist/_pkgs/affine-block-embed/embed-iframe-block/types.d.ts +16 -0
  35. package/dist/_pkgs/affine-block-embed/embed-iframe-block/types.js +17 -1
  36. package/dist/_pkgs/affine-block-embed/embed-loom-block/embed-loom-block.js +2 -0
  37. package/dist/_pkgs/affine-block-embed/embed-youtube-block/embed-youtube-block.js +2 -0
  38. package/dist/_pkgs/affine-block-embed/index.d.ts +1 -0
  39. package/dist/_pkgs/affine-block-embed/index.js +1 -0
  40. package/dist/_pkgs/affine-block-embed/translations.d.ts +8 -0
  41. package/dist/_pkgs/affine-block-embed/translations.js +28 -0
  42. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-edgeless-linked-doc-block.js +3 -1
  43. package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/embed-linked-doc-block.js +4 -2
  44. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +7 -2
  45. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-edgeless-synced-doc-block.js +3 -1
  46. package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/embed-synced-doc-block.js +2 -2
  47. package/dist/_pkgs/affine-block-frame/frame-manager.d.ts +5 -0
  48. package/dist/_pkgs/affine-block-frame/frame-manager.js +53 -19
  49. package/dist/_pkgs/affine-block-frame/frame-tool.js +3 -1
  50. package/dist/_pkgs/affine-block-image/utils.js +4 -1
  51. package/dist/_pkgs/affine-block-latex/adapters/markdown/preprocessor.d.ts +8 -0
  52. package/dist/_pkgs/affine-block-latex/adapters/markdown/preprocessor.js +9 -5
  53. package/dist/_pkgs/affine-block-list/utils/get-list-icon.js +3 -1
  54. package/dist/_pkgs/affine-block-note/configs/tooltips.js +1 -1
  55. package/dist/_pkgs/affine-block-note/translations.d.ts +0 -1
  56. package/dist/_pkgs/affine-block-note/translations.js +0 -5
  57. package/dist/_pkgs/affine-block-root/adapters/html.js +2 -2
  58. package/dist/_pkgs/affine-block-root/commands/copy-link-commands.d.ts +2 -0
  59. package/dist/_pkgs/affine-block-root/commands/copy-link-commands.js +155 -0
  60. package/dist/_pkgs/affine-block-root/configs/toolbar.js +17 -1
  61. package/dist/_pkgs/affine-block-root/edgeless/clipboard/clipboard.js +2 -1
  62. package/dist/_pkgs/affine-block-root/edgeless/clipboard/command.js +161 -83
  63. package/dist/_pkgs/affine-block-root/edgeless/clipboard/paste-order.d.ts +21 -0
  64. package/dist/_pkgs/affine-block-root/edgeless/clipboard/paste-order.js +85 -0
  65. package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.d.ts +6 -0
  66. package/dist/_pkgs/affine-block-root/edgeless/edgeless-root-block.js +18 -1
  67. package/dist/_pkgs/affine-block-root/edgeless/utils/clone-utils.d.ts +9 -0
  68. package/dist/_pkgs/affine-block-root/edgeless/utils/clone-utils.js +28 -0
  69. package/dist/_pkgs/affine-block-root/index.d.ts +1 -0
  70. package/dist/_pkgs/affine-block-root/index.js +1 -0
  71. package/dist/_pkgs/affine-block-root/keyboard/commands.js +9 -6
  72. package/dist/_pkgs/affine-block-root/preview/edgeless-root-preview-block.js +15 -2
  73. package/dist/_pkgs/affine-block-root/view.js +2 -0
  74. package/dist/_pkgs/affine-block-surface/adapters/markdown/element-adapter/type.d.ts +1 -1
  75. package/dist/_pkgs/affine-block-surface/element-model/index.d.ts +1 -1
  76. package/dist/_pkgs/affine-block-surface/element-model/index.js +1 -1
  77. package/dist/_pkgs/affine-block-surface/extensions/audit.js +13 -61
  78. package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/commands.d.ts +2 -0
  79. package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/commands.js +71 -0
  80. package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/index.d.ts +1 -0
  81. package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/index.js +1 -0
  82. package/dist/_pkgs/affine-block-surface/extensions/clipboard-config.js +4 -0
  83. package/dist/_pkgs/affine-block-surface/extensions/crud-extension.js +4 -0
  84. package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.d.ts +12 -0
  85. package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +27 -7
  86. package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.d.ts +2 -1
  87. package/dist/_pkgs/affine-block-surface/extensions/export-svg/command.js +22 -3
  88. package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.d.ts +6 -3
  89. package/dist/_pkgs/affine-block-surface/extensions/export-svg/index.js +4 -2
  90. package/dist/_pkgs/affine-block-surface/extensions/export-svg/parts.d.ts +63 -0
  91. package/dist/_pkgs/affine-block-surface/extensions/export-svg/parts.js +67 -0
  92. package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.d.ts +62 -5
  93. package/dist/_pkgs/affine-block-surface/extensions/export-svg/render.js +98 -18
  94. package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.d.ts +14 -0
  95. package/dist/_pkgs/affine-block-surface/extensions/export-svg/svg-context.js +82 -1
  96. package/dist/_pkgs/affine-block-surface/extensions/export-svg/toolbar.d.ts +2 -2
  97. package/dist/_pkgs/affine-block-surface/extensions/export-svg/toolbar.js +112 -10
  98. package/dist/_pkgs/affine-block-surface/extensions/export-svg/translations.d.ts +13 -0
  99. package/dist/_pkgs/affine-block-surface/extensions/export-svg/translations.js +33 -0
  100. package/dist/_pkgs/affine-block-surface/extensions/index.d.ts +3 -0
  101. package/dist/_pkgs/affine-block-surface/extensions/index.js +3 -0
  102. package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +13 -1
  103. package/dist/_pkgs/affine-block-surface/extensions/legend.d.ts +8 -0
  104. package/dist/_pkgs/affine-block-surface/extensions/legend.js +59 -3
  105. package/dist/_pkgs/affine-block-surface/extensions/morph-toolbar.js +4 -0
  106. package/dist/_pkgs/affine-block-surface/extensions/reading-widget.d.ts +13 -6
  107. package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +26 -10
  108. package/dist/_pkgs/affine-block-surface/extensions/reading.d.ts +82 -6
  109. package/dist/_pkgs/affine-block-surface/extensions/reading.js +99 -21
  110. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/actions.d.ts +80 -0
  111. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/actions.js +248 -0
  112. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.d.ts +82 -0
  113. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.js +342 -0
  114. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/index.d.ts +3 -0
  115. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/index.js +3 -0
  116. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/tree.d.ts +137 -0
  117. package/dist/_pkgs/affine-block-surface/extensions/selection-pane/tree.js +323 -0
  118. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.d.ts +3 -0
  119. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch-translations.js +23 -0
  120. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.d.ts +112 -4
  121. package/dist/_pkgs/affine-block-surface/extensions/svg-sketch.js +98 -19
  122. package/dist/_pkgs/affine-block-surface/extensions/user-layers/actions.d.ts +76 -0
  123. package/dist/_pkgs/affine-block-surface/extensions/user-layers/actions.js +299 -0
  124. package/dist/_pkgs/affine-block-surface/extensions/user-layers/active-layer.d.ts +20 -0
  125. package/dist/_pkgs/affine-block-surface/extensions/user-layers/active-layer.js +34 -0
  126. package/dist/_pkgs/affine-block-surface/extensions/user-layers/commands.d.ts +67 -0
  127. package/dist/_pkgs/affine-block-surface/extensions/user-layers/commands.js +172 -0
  128. package/dist/_pkgs/affine-block-surface/extensions/user-layers/creation.d.ts +40 -0
  129. package/dist/_pkgs/affine-block-surface/extensions/user-layers/creation.js +69 -0
  130. package/dist/_pkgs/affine-block-surface/extensions/user-layers/index.d.ts +5 -0
  131. package/dist/_pkgs/affine-block-surface/extensions/user-layers/index.js +5 -0
  132. package/dist/_pkgs/affine-block-surface/extensions/user-layers/translations.d.ts +10 -0
  133. package/dist/_pkgs/affine-block-surface/extensions/user-layers/translations.js +14 -0
  134. package/dist/_pkgs/affine-block-surface/framework-background/background-view.js +1 -1
  135. package/dist/_pkgs/affine-block-surface/framework-background/facts.d.ts +55 -2
  136. package/dist/_pkgs/affine-block-surface/framework-background/facts.js +63 -1
  137. package/dist/_pkgs/affine-block-surface/framework-background/fit.d.ts +36 -0
  138. package/dist/_pkgs/affine-block-surface/framework-background/fit.js +30 -0
  139. package/dist/_pkgs/affine-block-surface/framework-background/index.d.ts +1 -0
  140. package/dist/_pkgs/affine-block-surface/framework-background/index.js +1 -0
  141. package/dist/_pkgs/affine-block-surface/framework-background/stacking.d.ts +16 -8
  142. package/dist/_pkgs/affine-block-surface/framework-background/stacking.js +26 -14
  143. package/dist/_pkgs/affine-block-surface/renderer/canvas-renderer.js +17 -3
  144. package/dist/_pkgs/affine-block-surface/renderer/dom-renderer.d.ts +3 -1
  145. package/dist/_pkgs/affine-block-surface/renderer/dom-renderer.js +22 -2
  146. package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.js +2 -7
  147. package/dist/_pkgs/affine-block-surface/renderer/paint-predicate.d.ts +30 -0
  148. package/dist/_pkgs/affine-block-surface/renderer/paint-predicate.js +29 -0
  149. package/dist/_pkgs/affine-block-surface/surface-block.js +6 -0
  150. package/dist/_pkgs/affine-block-surface/surface-model.js +5 -0
  151. package/dist/_pkgs/affine-block-surface/surface-transformer.js +5 -0
  152. package/dist/_pkgs/affine-block-surface/tool/default-tool.js +28 -5
  153. package/dist/_pkgs/affine-block-surface/view.js +23 -1
  154. package/dist/_pkgs/affine-block-surface-ref/configs/tooltips.js +2 -2
  155. package/dist/_pkgs/affine-block-surface-ref/surface-ref-block.js +12 -2
  156. package/dist/_pkgs/affine-components/color-picker/palette-carousel.js +5 -0
  157. package/dist/_pkgs/affine-components/color-picker/styles.js +1 -1
  158. package/dist/_pkgs/affine-components/context-menu/button.js +17 -1
  159. package/dist/_pkgs/affine-components/filterable-list/index.js +30 -9
  160. package/dist/_pkgs/affine-components/icons/ai.js +3 -3
  161. package/dist/_pkgs/affine-components/icons/index.d.ts +0 -1
  162. package/dist/_pkgs/affine-components/icons/index.js +0 -1
  163. package/dist/_pkgs/affine-components/icons/list.js +7 -1
  164. package/dist/_pkgs/affine-components/icons/text.d.ts +1 -0
  165. package/dist/_pkgs/affine-components/icons/text.js +11 -0
  166. package/dist/_pkgs/affine-components/size-dropdown-menu/dropdown-menu.js +6 -1
  167. package/dist/_pkgs/affine-components/toolbar/index.d.ts +1 -1
  168. package/dist/_pkgs/affine-components/toolbar/index.js +1 -1
  169. package/dist/_pkgs/affine-components/toolbar/menu-button.d.ts +7 -0
  170. package/dist/_pkgs/affine-components/toolbar/menu-button.js +30 -0
  171. package/dist/_pkgs/affine-components/toolbar/picker-menu.d.ts +16 -1
  172. package/dist/_pkgs/affine-components/toolbar/picker-menu.js +2 -2
  173. package/dist/_pkgs/affine-components/toolbar/toolbar.d.ts +1 -0
  174. package/dist/_pkgs/affine-components/toolbar/toolbar.js +67 -0
  175. package/dist/_pkgs/affine-fragment-adapter-panel/adapter-panel.d.ts +2 -2
  176. package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card-title-editor.js +1 -1
  177. package/dist/_pkgs/affine-fragment-frame-panel/card/frame-card.js +3 -3
  178. package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.d.ts +1 -1
  179. package/dist/_pkgs/affine-fragment-frame-panel/header/frame-panel-header.js +8 -27
  180. package/dist/_pkgs/affine-fragment-frame-panel/index.d.ts +1 -0
  181. package/dist/_pkgs/affine-fragment-frame-panel/index.js +1 -0
  182. package/dist/_pkgs/affine-gfx-brush/toolbar/components/eraser/icons.js +1 -1
  183. package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.d.ts +11 -2
  184. package/dist/_pkgs/affine-gfx-connector/direction/direction-reveal.js +11 -2
  185. package/dist/_pkgs/affine-gfx-connector/element-renderer/connector-dom/index.js +3 -1
  186. package/dist/_pkgs/affine-gfx-connector/element-renderer/index.js +21 -4
  187. package/dist/_pkgs/affine-gfx-connector/text/edgeless-connector-label-editor.js +6 -4
  188. package/dist/_pkgs/affine-gfx-connector/toolbar/config.js +24 -8
  189. package/dist/_pkgs/affine-gfx-connector/translations.d.ts +3 -0
  190. package/dist/_pkgs/affine-gfx-connector/translations.js +23 -0
  191. package/dist/_pkgs/affine-gfx-group/command/group-api.js +52 -1
  192. package/dist/_pkgs/affine-gfx-mindmap/indicator-overlay/index.js +6 -2
  193. package/dist/_pkgs/affine-gfx-mindmap/toolbar/config.js +4 -2
  194. package/dist/_pkgs/affine-gfx-mindmap/translations.d.ts +6 -0
  195. package/dist/_pkgs/affine-gfx-mindmap/translations.js +10 -0
  196. package/dist/_pkgs/affine-gfx-shape/element-renderer/shape/index.js +21 -3
  197. package/dist/_pkgs/affine-gfx-shape/text/edgeless-shape-text-editor.js +2 -0
  198. package/dist/_pkgs/affine-gfx-shape/toolbar/config.js +5 -3
  199. package/dist/_pkgs/affine-gfx-shape/translations.d.ts +7 -0
  200. package/dist/_pkgs/affine-gfx-shape/translations.js +11 -0
  201. package/dist/_pkgs/affine-gfx-template/builtin/other.js +13 -7
  202. package/dist/_pkgs/affine-gfx-template/services/template-middlewares.d.ts +9 -0
  203. package/dist/_pkgs/affine-gfx-template/services/template-middlewares.js +23 -1
  204. package/dist/_pkgs/affine-gfx-template/services/template.js +2 -1
  205. package/dist/_pkgs/affine-gfx-template/toolbar/template-loading.js +1 -1
  206. package/dist/_pkgs/affine-gfx-template/translations.d.ts +5 -0
  207. package/dist/_pkgs/affine-gfx-template/translations.js +38 -0
  208. package/dist/_pkgs/affine-gfx-text/edgeless-text-editor.js +5 -3
  209. package/dist/_pkgs/affine-gfx-text/element-renderer/index.js +20 -3
  210. package/dist/_pkgs/affine-gfx-text/element-renderer/utils.d.ts +67 -1
  211. package/dist/_pkgs/affine-gfx-text/element-renderer/utils.js +101 -0
  212. package/dist/_pkgs/affine-gfx-text/toolbar/actions.d.ts +11 -0
  213. package/dist/_pkgs/affine-gfx-text/toolbar/actions.js +56 -3
  214. package/dist/_pkgs/affine-gfx-text/toolbar/config.d.ts +11 -0
  215. package/dist/_pkgs/affine-gfx-text/toolbar/config.js +1 -1
  216. package/dist/_pkgs/affine-gfx-text/translations.d.ts +8 -0
  217. package/dist/_pkgs/affine-gfx-text/translations.js +12 -0
  218. package/dist/_pkgs/affine-inline-latex/latex-node/latex-editor-menu.js +2 -1
  219. package/dist/_pkgs/affine-inline-preset/adapters/html/html-inline.d.ts +3 -0
  220. package/dist/_pkgs/affine-inline-preset/adapters/html/html-inline.js +31 -0
  221. package/dist/_pkgs/affine-inline-preset/adapters/html/inline-delta.d.ts +4 -0
  222. package/dist/_pkgs/affine-inline-preset/adapters/html/inline-delta.js +14 -0
  223. package/dist/_pkgs/affine-inline-preset/command/config.js +21 -3
  224. package/dist/_pkgs/affine-inline-preset/command/index.d.ts +1 -1
  225. package/dist/_pkgs/affine-inline-preset/command/index.js +1 -1
  226. package/dist/_pkgs/affine-inline-preset/command/text-style.d.ts +2 -1
  227. package/dist/_pkgs/affine-inline-preset/command/text-style.js +1 -0
  228. package/dist/_pkgs/affine-inline-preset/default-inline-manager.js +2 -1
  229. package/dist/_pkgs/affine-inline-preset/inline-spec.d.ts +4 -0
  230. package/dist/_pkgs/affine-inline-preset/inline-spec.js +14 -0
  231. package/dist/_pkgs/affine-inline-preset/translations.d.ts +2 -2
  232. package/dist/_pkgs/affine-inline-preset/translations.js +2 -2
  233. package/dist/_pkgs/affine-model/blocks/attachment/attachment-model.js +2 -0
  234. package/dist/_pkgs/affine-model/blocks/bookmark/bookmark-model.js +2 -0
  235. package/dist/_pkgs/affine-model/blocks/edgeless-text/edgeless-text-model.d.ts +1 -1
  236. package/dist/_pkgs/affine-model/blocks/edgeless-text/edgeless-text-model.js +2 -0
  237. package/dist/_pkgs/affine-model/blocks/embed/iframe/iframe-model.js +2 -0
  238. package/dist/_pkgs/affine-model/blocks/frame/frame-model.js +2 -0
  239. package/dist/_pkgs/affine-model/blocks/image/image-model.js +2 -0
  240. package/dist/_pkgs/affine-model/blocks/latex/latex-model.js +2 -0
  241. package/dist/_pkgs/affine-model/blocks/note/note-model.js +2 -0
  242. package/dist/_pkgs/affine-model/consts/text.d.ts +41 -2
  243. package/dist/_pkgs/affine-model/consts/text.js +50 -1
  244. package/dist/_pkgs/affine-model/elements/shape/shape.d.ts +6 -1
  245. package/dist/_pkgs/affine-model/elements/shape/shape.js +14 -1
  246. package/dist/_pkgs/affine-model/elements/text/text.d.ts +6 -1
  247. package/dist/_pkgs/affine-model/elements/text/text.js +13 -1
  248. package/dist/_pkgs/affine-model/utils/helper.js +2 -0
  249. package/dist/_pkgs/affine-rich-text/conversion.d.ts +25 -0
  250. package/dist/_pkgs/affine-rich-text/conversion.js +9 -0
  251. package/dist/_pkgs/affine-rich-text/index.d.ts +1 -1
  252. package/dist/_pkgs/affine-rich-text/index.js +1 -1
  253. package/dist/_pkgs/affine-shared/commands/model-crud/replace-selected-text-with-blocks.d.ts +1 -1
  254. package/dist/_pkgs/affine-shared/services/canvas-grid.d.ts +63 -0
  255. package/dist/_pkgs/affine-shared/services/canvas-grid.js +109 -0
  256. package/dist/_pkgs/affine-shared/services/canvas-local-visibility.d.ts +64 -0
  257. package/dist/_pkgs/affine-shared/services/canvas-local-visibility.js +192 -0
  258. package/dist/_pkgs/affine-shared/services/edit-props-store.d.ts +27 -0
  259. package/dist/_pkgs/affine-shared/services/edit-props-store.js +34 -0
  260. package/dist/_pkgs/affine-shared/services/editor-setting-service.d.ts +3 -0
  261. package/dist/_pkgs/affine-shared/services/editor-setting-service.js +7 -0
  262. package/dist/_pkgs/affine-shared/services/feature-flag-service.d.ts +4 -0
  263. package/dist/_pkgs/affine-shared/services/font-loader/config.d.ts +13 -2
  264. package/dist/_pkgs/affine-shared/services/font-loader/config.js +43 -54
  265. package/dist/_pkgs/affine-shared/services/index.d.ts +3 -0
  266. package/dist/_pkgs/affine-shared/services/index.js +3 -0
  267. package/dist/_pkgs/affine-shared/services/selection-pane-service.d.ts +44 -0
  268. package/dist/_pkgs/affine-shared/services/selection-pane-service.js +28 -0
  269. package/dist/_pkgs/affine-shared/services/telemetry-service/lifecycle.d.ts +69 -0
  270. package/dist/_pkgs/affine-shared/services/telemetry-service/telemetry-service.d.ts +2 -2
  271. package/dist/_pkgs/affine-shared/services/theme-service.d.ts +19 -0
  272. package/dist/_pkgs/affine-shared/services/theme-service.js +24 -0
  273. package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +25 -0
  274. package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +90 -0
  275. package/dist/_pkgs/affine-shared/styles/index.d.ts +1 -0
  276. package/dist/_pkgs/affine-shared/styles/index.js +1 -0
  277. package/dist/_pkgs/affine-shared/styles/panel-header.d.ts +31 -0
  278. package/dist/_pkgs/affine-shared/styles/panel-header.js +61 -0
  279. package/dist/_pkgs/affine-shared/styles/text.js +7 -7
  280. package/dist/_pkgs/affine-shared/types/index.d.ts +6 -0
  281. package/dist/_pkgs/affine-shared/utils/canvas-export-colors.d.ts +26 -0
  282. package/dist/_pkgs/affine-shared/utils/canvas-export-colors.js +127 -0
  283. package/dist/_pkgs/affine-shared/utils/file/filesys.d.ts +8 -11
  284. package/dist/_pkgs/affine-shared/utils/file/filesys.js +8 -11
  285. package/dist/_pkgs/affine-shared/utils/index.d.ts +2 -0
  286. package/dist/_pkgs/affine-shared/utils/index.js +2 -0
  287. package/dist/_pkgs/affine-shared/utils/label-mode.d.ts +47 -0
  288. package/dist/_pkgs/affine-shared/utils/label-mode.js +55 -0
  289. package/dist/_pkgs/affine-shared/utils/model/merge-to-code-model.js +7 -1
  290. package/dist/_pkgs/affine-shared/utils/model/transform-model.js +5 -0
  291. package/dist/_pkgs/affine-widget-edgeless-dragging-area/edgeless-dragging-area-rect.js +2 -2
  292. package/dist/_pkgs/affine-widget-edgeless-selected-rect/utils.js +15 -4
  293. package/dist/_pkgs/affine-widget-edgeless-toolbar/catalogue/artefact-catalogue-widget.js +25 -49
  294. package/dist/_pkgs/affine-widget-edgeless-toolbar/config/types.d.ts +15 -0
  295. package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.d.ts +1 -1
  296. package/dist/_pkgs/affine-widget-edgeless-toolbar/config/utils.js +7 -2
  297. package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.d.ts +4 -0
  298. package/dist/_pkgs/affine-widget-edgeless-toolbar/effects.js +4 -0
  299. package/dist/_pkgs/affine-widget-edgeless-toolbar/index.d.ts +4 -0
  300. package/dist/_pkgs/affine-widget-edgeless-toolbar/index.js +4 -0
  301. package/dist/_pkgs/affine-widget-edgeless-toolbar/panel/font-family-panel.d.ts +18 -0
  302. package/dist/_pkgs/affine-widget-edgeless-toolbar/panel/font-family-panel.js +52 -6
  303. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/drop.d.ts +61 -0
  304. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/drop.js +91 -0
  305. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/labels.d.ts +17 -0
  306. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/labels.js +95 -0
  307. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-default.d.ts +10 -0
  308. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-default.js +31 -0
  309. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-tool.d.ts +26 -0
  310. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-tool.js +82 -0
  311. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-widget.d.ts +170 -0
  312. package/dist/_pkgs/affine-widget-edgeless-toolbar/selection-pane/selection-pane-widget.js +1381 -0
  313. package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.d.ts +58 -0
  314. package/dist/_pkgs/affine-widget-edgeless-toolbar/translations.js +171 -1
  315. package/dist/_pkgs/affine-widget-edgeless-toolbar/view.js +10 -0
  316. package/dist/_pkgs/affine-widget-frame-title/edgeless-frame-title-editor.js +2 -1
  317. package/dist/_pkgs/affine-widget-note-slicer/note-slicer.js +7 -3
  318. package/dist/_pkgs/affine-widget-slash-menu/translations.d.ts +16 -0
  319. package/dist/_pkgs/affine-widget-slash-menu/translations.js +23 -1
  320. package/dist/_pkgs/affine-widget-toolbar/utils.js +57 -14
  321. package/dist/_pkgs/data-view/core/detail/field.js +2 -1
  322. package/dist/_pkgs/data-view/core/filter/literal/define.js +3 -1
  323. package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +1 -1
  324. package/dist/_pkgs/data-view/property-presets/checkbox/cell-renderer.js +8 -2
  325. package/dist/_pkgs/data-view/view-presets/kanban/pc/cell.js +1 -1
  326. package/dist/_pkgs/data-view/view-presets/kanban/pc/controller/drag.js +2 -1
  327. package/dist/_pkgs/data-view/view-presets/table/pc/controller/drag.js +2 -1
  328. package/dist/_pkgs/data-view/view-presets/table/pc/controller/selection.js +1 -1
  329. package/dist/_pkgs/data-view/view-presets/table/pc/header/vertical-indicator.js +2 -1
  330. package/dist/_pkgs/data-view/view-presets/table/pc/row/row-select-checkbox.js +3 -1
  331. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/drag.js +2 -1
  332. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/controller/selection.js +1 -1
  333. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/header/vertical-indicator.js +2 -1
  334. package/dist/_pkgs/data-view/view-presets/table/pc-virtual/row/row-header.js +3 -1
  335. package/dist/_pkgs/std/gfx/controller.d.ts +13 -0
  336. package/dist/_pkgs/std/gfx/controller.js +22 -2
  337. package/dist/_pkgs/std/gfx/grid.d.ts +31 -2
  338. package/dist/_pkgs/std/gfx/index.d.ts +3 -1
  339. package/dist/_pkgs/std/gfx/index.js +3 -1
  340. package/dist/_pkgs/std/gfx/interactivity/manager.js +7 -0
  341. package/dist/_pkgs/std/gfx/layer.js +73 -5
  342. package/dist/_pkgs/std/gfx/local-visibility.d.ts +88 -0
  343. package/dist/_pkgs/std/gfx/local-visibility.js +217 -0
  344. package/dist/_pkgs/std/gfx/model/gfx-block-model.d.ts +13 -0
  345. package/dist/_pkgs/std/gfx/model/surface/element-model.d.ts +34 -0
  346. package/dist/_pkgs/std/gfx/model/surface/element-model.js +65 -1
  347. package/dist/_pkgs/std/gfx/model/surface/role.d.ts +10 -5
  348. package/dist/_pkgs/std/gfx/model/surface/surface-model.d.ts +27 -0
  349. package/dist/_pkgs/std/gfx/model/surface/surface-model.js +43 -0
  350. package/dist/_pkgs/std/gfx/model/surface/user-layers.d.ts +68 -0
  351. package/dist/_pkgs/std/gfx/model/surface/user-layers.js +127 -0
  352. package/dist/_pkgs/std/utils/layer.d.ts +10 -0
  353. package/dist/_pkgs/std/utils/layer.js +64 -13
  354. package/dist/_pkgs/std/view/element/gfx-block-component.js +10 -2
  355. package/dist/commands.js +6 -2
  356. package/dist/translations.js +15 -6
  357. package/package.json +13 -2
  358. package/dist/_pkgs/affine-components/icons/file-icons-rc.d.ts +0 -1
  359. package/dist/_pkgs/affine-components/icons/file-icons-rc.js +0 -130
  360. package/dist/_pkgs/affine-shared/test-utils/affine-template.d.ts +0 -6
  361. package/dist/_pkgs/affine-shared/test-utils/affine-template.js +0 -258
  362. package/dist/_pkgs/affine-shared/test-utils/affine-test-utils.d.ts +0 -8
  363. package/dist/_pkgs/affine-shared/test-utils/affine-test-utils.js +0 -81
  364. package/dist/_pkgs/affine-shared/test-utils/create-test-host.d.ts +0 -23
  365. package/dist/_pkgs/affine-shared/test-utils/create-test-host.js +0 -187
  366. package/dist/_pkgs/affine-shared/test-utils/index.d.ts +0 -3
  367. package/dist/_pkgs/affine-shared/test-utils/index.js +0 -3
@@ -13,6 +13,10 @@ export declare const inlineCodeDeltaToHtmlAdapterMatcher: import("../../../store
13
13
  export declare const underlineDeltaToHtmlAdapterMatcher: import("../../../store/index.js").ExtensionType & {
14
14
  identifier: import("../../../global/di/types.js").ServiceIdentifier<import("../../../affine-shared/adapters/index.js").InlineDeltaToHtmlAdapterMatcher>;
15
15
  };
16
+ /** HTML has no overline tag: a span carries it as CSS (ADR 0030 §5). */
17
+ export declare const overlineDeltaToHtmlAdapterMatcher: import("../../../store/index.js").ExtensionType & {
18
+ identifier: import("../../../global/di/types.js").ServiceIdentifier<import("../../../affine-shared/adapters/index.js").InlineDeltaToHtmlAdapterMatcher>;
19
+ };
16
20
  export declare const highlightBackgroundDeltaToHtmlAdapterMatcher: import("../../../store/index.js").ExtensionType & {
17
21
  identifier: import("../../../global/di/types.js").ServiceIdentifier<import("../../../affine-shared/adapters/index.js").InlineDeltaToHtmlAdapterMatcher>;
18
22
  };
@@ -60,6 +60,19 @@ export const underlineDeltaToHtmlAdapterMatcher = InlineDeltaToHtmlAdapterExtens
60
60
  };
61
61
  },
62
62
  });
63
+ /** HTML has no overline tag: a span carries it as CSS (ADR 0030 §5). */
64
+ export const overlineDeltaToHtmlAdapterMatcher = InlineDeltaToHtmlAdapterExtension({
65
+ name: 'overline',
66
+ match: delta => !!delta.attributes?.overline,
67
+ toAST: (_, context) => {
68
+ return {
69
+ type: 'element',
70
+ tagName: 'span',
71
+ properties: { style: 'text-decoration: overline;' },
72
+ children: [context.current],
73
+ };
74
+ },
75
+ });
63
76
  export const highlightBackgroundDeltaToHtmlAdapterMatcher = InlineDeltaToHtmlAdapterExtension({
64
77
  name: 'highlight-background',
65
78
  match: delta => !!delta.attributes?.background,
@@ -123,6 +136,7 @@ export const InlineDeltaToHtmlAdapterExtensions = [
123
136
  italicDeltaToHtmlAdapterMatcher,
124
137
  strikeDeltaToHtmlAdapterMatcher,
125
138
  underlineDeltaToHtmlAdapterMatcher,
139
+ overlineDeltaToHtmlAdapterMatcher,
126
140
  highlightBackgroundDeltaToHtmlAdapterMatcher,
127
141
  highlightColorDeltaToHtmlAdapterMatcher,
128
142
  inlineCodeDeltaToHtmlAdapterMatcher,
@@ -1,9 +1,9 @@
1
- import { BoldIcon, CodeIcon, ItalicIcon, LinkIcon, StrikethroughIcon, UnderlineIcon, } from '../../affine-components/icons/index.js';
1
+ import { BoldIcon, CodeIcon, ItalicIcon, LinkIcon, OverlineIcon, StrikethroughIcon, UnderlineIcon, } from '../../affine-components/icons/index.js';
2
2
  import { toggleLink } from '../../affine-inline-link/index.js';
3
3
  import {} from '../../affine-shared/services/index.js';
4
4
  import { TextSelection } from '../../std/index.js';
5
- import { isTextAttributeActive, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, } from './text-style.js';
6
- import { TEXT_FORMAT_BOLD, TEXT_FORMAT_CODE, TEXT_FORMAT_ITALIC, TEXT_FORMAT_LINK, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE, } from '../translations.js';
5
+ import { isTextAttributeActive, toggleBold, toggleCode, toggleItalic, toggleOverline, toggleStrike, toggleUnderline, } from './text-style.js';
6
+ import { TEXT_FORMAT_BOLD, TEXT_FORMAT_CODE, TEXT_FORMAT_ITALIC, TEXT_FORMAT_LINK, TEXT_FORMAT_OVERLINE, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE, } from '../translations.js';
7
7
  export const textFormatConfigs = [
8
8
  {
9
9
  id: 'bold',
@@ -56,6 +56,24 @@ export const textFormatConfigs = [
56
56
  host.std.command.chain().pipe(toggleUnderline).run();
57
57
  },
58
58
  },
59
+ {
60
+ // No default chord: `Mod-u` is underline's and none is free everywhere;
61
+ // a host binds one through the shortcuts pane (ADR 0030 §5).
62
+ id: 'overline',
63
+ name: 'Overline',
64
+ nameWording: TEXT_FORMAT_OVERLINE,
65
+ icon: OverlineIcon,
66
+ activeWhen: host => {
67
+ const [result] = host.std.command
68
+ .chain()
69
+ .pipe(isTextAttributeActive, { key: 'overline' })
70
+ .run();
71
+ return result;
72
+ },
73
+ action: host => {
74
+ host.std.command.chain().pipe(toggleOverline).run();
75
+ },
76
+ },
59
77
  {
60
78
  id: 'strike',
61
79
  name: 'Strikethrough',
@@ -5,5 +5,5 @@ export { deleteTextCommand } from './delete-text.js';
5
5
  export { formatBlockCommand } from './format-block.js';
6
6
  export { formatNativeCommand } from './format-native.js';
7
7
  export { formatTextCommand } from './format-text.js';
8
- export { getTextAttributes, isTextAttributeActive, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleTextStyleCommand, toggleUnderline, } from './text-style.js';
8
+ export { getTextAttributes, isTextAttributeActive, toggleBold, toggleCode, toggleItalic, toggleOverline, toggleStrike, toggleTextStyleCommand, toggleUnderline, } from './text-style.js';
9
9
  export { isFormatSupported } from './utils.js';
@@ -4,5 +4,5 @@ export { deleteTextCommand } from './delete-text.js';
4
4
  export { formatBlockCommand } from './format-block.js';
5
5
  export { formatNativeCommand } from './format-native.js';
6
6
  export { formatTextCommand } from './format-text.js';
7
- export { getTextAttributes, isTextAttributeActive, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleTextStyleCommand, toggleUnderline, } from './text-style.js';
7
+ export { getTextAttributes, isTextAttributeActive, toggleBold, toggleCode, toggleItalic, toggleOverline, toggleStrike, toggleTextStyleCommand, toggleUnderline, } from './text-style.js';
8
8
  export { isFormatSupported } from './utils.js';
@@ -1,11 +1,12 @@
1
1
  import type { AffineTextAttributes, AffineTextStyleAttributes } from '../../affine-shared/types/index.js';
2
2
  import type { Command } from '../../std/index.js';
3
3
  export declare const toggleTextStyleCommand: Command<{
4
- key: Extract<keyof AffineTextStyleAttributes, 'bold' | 'italic' | 'underline' | 'strike' | 'code'>;
4
+ key: Extract<keyof AffineTextStyleAttributes, 'bold' | 'italic' | 'underline' | 'overline' | 'strike' | 'code'>;
5
5
  }>;
6
6
  export declare const toggleBold: Command;
7
7
  export declare const toggleItalic: Command;
8
8
  export declare const toggleUnderline: Command;
9
+ export declare const toggleOverline: Command;
9
10
  export declare const toggleStrike: Command;
10
11
  export declare const toggleCode: Command;
11
12
  export declare const getTextAttributes: Command<{}, {
@@ -41,6 +41,7 @@ const toggleTextStyleCommandWrapper = (key) => {
41
41
  export const toggleBold = toggleTextStyleCommandWrapper('bold');
42
42
  export const toggleItalic = toggleTextStyleCommandWrapper('italic');
43
43
  export const toggleUnderline = toggleTextStyleCommandWrapper('underline');
44
+ export const toggleOverline = toggleTextStyleCommandWrapper('overline');
44
45
  export const toggleStrike = toggleTextStyleCommandWrapper('strike');
45
46
  export const toggleCode = toggleTextStyleCommandWrapper('code');
46
47
  export const getTextAttributes = (ctx, next) => {
@@ -5,13 +5,14 @@ import { LinkInlineSpecExtension } from '../affine-inline-link/index.js';
5
5
  import { MentionInlineSpecExtension } from '../affine-inline-mention/index.js';
6
6
  import { ReferenceInlineSpecExtension } from '../affine-inline-reference/index.js';
7
7
  import { InlineManagerExtension } from '../std/inline/index.js';
8
- import { BackgroundInlineSpecExtension, BoldInlineSpecExtension, CodeInlineSpecExtension, ColorInlineSpecExtension, ItalicInlineSpecExtension, StrikeInlineSpecExtension, UnderlineInlineSpecExtension, } from './inline-spec.js';
8
+ import { BackgroundInlineSpecExtension, BoldInlineSpecExtension, CodeInlineSpecExtension, ColorInlineSpecExtension, ItalicInlineSpecExtension, OverlineInlineSpecExtension, StrikeInlineSpecExtension, UnderlineInlineSpecExtension, } from './inline-spec.js';
9
9
  export const DefaultInlineManagerExtension = InlineManagerExtension({
10
10
  id: 'DefaultInlineManager',
11
11
  specs: [
12
12
  BoldInlineSpecExtension.identifier,
13
13
  ItalicInlineSpecExtension.identifier,
14
14
  UnderlineInlineSpecExtension.identifier,
15
+ OverlineInlineSpecExtension.identifier,
15
16
  StrikeInlineSpecExtension.identifier,
16
17
  CodeInlineSpecExtension.identifier,
17
18
  BackgroundInlineSpecExtension.identifier,
@@ -11,6 +11,10 @@ export declare const ItalicInlineSpecExtension: ExtensionType & {
11
11
  export declare const UnderlineInlineSpecExtension: ExtensionType & {
12
12
  identifier: import("../global/di/types.js").ServiceIdentifier<import("../std/inline/index.js").InlineSpecs<AffineTextAttributes>>;
13
13
  };
14
+ /** Underline's twin, declared at the affine level only (ADR 0030 §5). */
15
+ export declare const OverlineInlineSpecExtension: ExtensionType & {
16
+ identifier: import("../global/di/types.js").ServiceIdentifier<import("../std/inline/index.js").InlineSpecs<AffineTextAttributes>>;
17
+ };
14
18
  export declare const StrikeInlineSpecExtension: ExtensionType & {
15
19
  identifier: import("../global/di/types.js").ServiceIdentifier<import("../std/inline/index.js").InlineSpecs<AffineTextAttributes>>;
16
20
  };
@@ -37,6 +37,19 @@ export const UnderlineInlineSpecExtension = InlineSpecExtension({
37
37
  return html `<affine-text .delta=${delta}></affine-text>`;
38
38
  },
39
39
  });
40
+ /** Underline's twin, declared at the affine level only (ADR 0030 §5). */
41
+ export const OverlineInlineSpecExtension = InlineSpecExtension({
42
+ name: 'overline',
43
+ schema: z.object({
44
+ overline: z.literal(true).optional().nullable().catch(undefined),
45
+ }),
46
+ match: delta => {
47
+ return !!delta.attributes?.overline;
48
+ },
49
+ renderer: ({ delta }) => {
50
+ return html `<affine-text .delta=${delta}></affine-text>`;
51
+ },
52
+ });
40
53
  export const StrikeInlineSpecExtension = InlineSpecExtension({
41
54
  name: 'strike',
42
55
  schema: z.object({
@@ -89,6 +102,7 @@ export const InlineSpecExtensions = [
89
102
  BoldInlineSpecExtension,
90
103
  ItalicInlineSpecExtension,
91
104
  UnderlineInlineSpecExtension,
105
+ OverlineInlineSpecExtension,
92
106
  StrikeInlineSpecExtension,
93
107
  CodeInlineSpecExtension,
94
108
  BackgroundInlineSpecExtension,
@@ -1,4 +1,4 @@
1
- import { type ChromeWording, TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE } from '../affine-shared/services/index.js';
1
+ import { type ChromeWording, TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_OVERLINE, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE } from '../affine-shared/services/index.js';
2
2
  /**
3
3
  * `@labre/affine-inline-preset`'s own wordings — `command/config.ts`'s
4
4
  * `textFormatConfigs`. This is DATA (no `std` of its own): `name` is
@@ -14,7 +14,7 @@ import { type ChromeWording, TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_S
14
14
  * re-exported here under this package's own name; only "Code" stays this
15
15
  * format's own.
16
16
  */
17
- export { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_UNDERLINE, TEXT_FORMAT_STRIKETHROUGH, };
17
+ export { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_UNDERLINE, TEXT_FORMAT_OVERLINE, TEXT_FORMAT_STRIKETHROUGH, };
18
18
  export declare const TEXT_FORMAT_CODE: ChromeWording;
19
19
  export declare const TEXT_FORMAT_LINK: ChromeWording;
20
20
  /**
@@ -1,4 +1,4 @@
1
- import { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE, TOOLBAR_LINK, } from '../affine-shared/services/index.js';
1
+ import { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_OVERLINE, TEXT_FORMAT_STRIKETHROUGH, TEXT_FORMAT_UNDERLINE, TOOLBAR_LINK, } from '../affine-shared/services/index.js';
2
2
  /**
3
3
  * `@labre/affine-inline-preset`'s own wordings — `command/config.ts`'s
4
4
  * `textFormatConfigs`. This is DATA (no `std` of its own): `name` is
@@ -14,7 +14,7 @@ import { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_STRIKETHROUGH, TEXT_F
14
14
  * re-exported here under this package's own name; only "Code" stays this
15
15
  * format's own.
16
16
  */
17
- export { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_UNDERLINE, TEXT_FORMAT_STRIKETHROUGH, };
17
+ export { TEXT_FORMAT_BOLD, TEXT_FORMAT_ITALIC, TEXT_FORMAT_UNDERLINE, TEXT_FORMAT_OVERLINE, TEXT_FORMAT_STRIKETHROUGH, };
18
18
  export const TEXT_FORMAT_CODE = [
19
19
  'com.labre.text-format.code',
20
20
  'Code',
@@ -18,6 +18,8 @@ export const defaultAttachmentProps = {
18
18
  index: 'a0',
19
19
  xywh: '[0,0,0,0]',
20
20
  lockedBySelf: false,
21
+ hiddenForEveryone: undefined,
22
+ layer: undefined,
21
23
  rotate: 0,
22
24
  'meta:createdAt': undefined,
23
25
  'meta:updatedAt': undefined,
@@ -18,6 +18,8 @@ const defaultBookmarkProps = {
18
18
  index: 'a0',
19
19
  xywh: '[0,0,0,0]',
20
20
  lockedBySelf: false,
21
+ hiddenForEveryone: undefined,
22
+ layer: undefined,
21
23
  rotate: 0,
22
24
  'meta:createdAt': undefined,
23
25
  'meta:updatedAt': undefined,
@@ -4,7 +4,7 @@ import { FontFamily, FontStyle, FontWeight, TextAlign, type TextStyleProps } fro
4
4
  type EdgelessTextProps = {
5
5
  hasMaxWidth: boolean;
6
6
  comments?: Record<string, boolean>;
7
- } & Omit<TextStyleProps, 'fontSize'> & GfxCommonBlockProps;
7
+ } & Omit<TextStyleProps, 'fontSize' | 'textDecoration'> & GfxCommonBlockProps;
8
8
  export declare const EdgelessTextZodSchema: z.ZodDefault<z.ZodObject<{
9
9
  color: z.ZodUnion<[z.ZodString, z.ZodObject<{
10
10
  normal: z.ZodString;
@@ -25,6 +25,8 @@ export const EdgelessTextBlockSchema = defineBlockSchema({
25
25
  xywh: '[0,0,16,16]',
26
26
  index: 'a0',
27
27
  lockedBySelf: false,
28
+ hiddenForEveryone: undefined,
29
+ layer: undefined,
28
30
  scale: 1,
29
31
  rotate: 0,
30
32
  hasMaxWidth: false,
@@ -13,6 +13,8 @@ export const defaultEmbedIframeProps = {
13
13
  xywh: '[0,0,0,0]',
14
14
  index: 'a0',
15
15
  lockedBySelf: false,
16
+ hiddenForEveryone: undefined,
17
+ layer: undefined,
16
18
  scale: 1,
17
19
  };
18
20
  export class EmbedIframeBlockModel extends GfxCompatible(BlockModel) {
@@ -21,6 +21,8 @@ export const FrameBlockSchema = defineBlockSchema({
21
21
  childElementIds: Object.create(null),
22
22
  presentationIndex: generateKeyBetweenV2(null, null),
23
23
  lockedBySelf: false,
24
+ hiddenForEveryone: undefined,
25
+ layer: undefined,
24
26
  comments: undefined,
25
27
  }),
26
28
  metadata: {
@@ -9,6 +9,8 @@ const defaultImageProps = {
9
9
  index: 'a0',
10
10
  xywh: '[0,0,0,0]',
11
11
  lockedBySelf: false,
12
+ hiddenForEveryone: undefined,
13
+ layer: undefined,
12
14
  rotate: 0,
13
15
  size: -1,
14
16
  comments: undefined,
@@ -6,6 +6,8 @@ export const LatexBlockSchema = defineBlockSchema({
6
6
  xywh: '[0,0,16,16]',
7
7
  index: 'a0',
8
8
  lockedBySelf: false,
9
+ hiddenForEveryone: undefined,
10
+ layer: undefined,
9
11
  scale: 1,
10
12
  rotate: 0,
11
13
  latex: '',
@@ -36,6 +36,8 @@ export const NoteBlockSchema = defineBlockSchema({
36
36
  background: DefaultTheme.noteBackgrounColor,
37
37
  index: 'a0',
38
38
  lockedBySelf: false,
39
+ hiddenForEveryone: undefined,
40
+ layer: undefined,
39
41
  hidden: false,
40
42
  displayMode: NoteDisplayMode.DocAndEdgeless,
41
43
  edgeless: {
@@ -11,6 +11,30 @@ export declare enum TextVerticalAlign {
11
11
  Center = "center",
12
12
  Top = "top"
13
13
  }
14
+ /**
15
+ * The line a canvas text is decorated with, as a CSS `text-decoration-line`
16
+ * token list (ADR 0030).
17
+ *
18
+ * **These string values are PERSISTED** — on a `text`, on a `shape` and inside
19
+ * a connector's `labelStyle` — so the enum is **append-only**: a member may be
20
+ * added, never renamed, never removed, never given a different string value.
21
+ *
22
+ * Readers split the value on whitespace and act on the tokens they know, never
23
+ * `switch` on the whole string: a token a newer client adds (`line-through`,
24
+ * say) is skipped by this build one token at a time, so
25
+ * `'underline line-through'` still paints its underline here.
26
+ *
27
+ * `undefined` (the key absent) and `None` paint the same on every element. They
28
+ * differ for one reader only — the UML object glyph's legacy rule, drawn for a
29
+ * name that never carried the field — which is why turning the decoration off
30
+ * writes `None` rather than clearing the key.
31
+ */
32
+ export declare enum TextDecoration {
33
+ None = "none",
34
+ Underline = "underline",
35
+ Overline = "overline",
36
+ UnderlineOverline = "underline overline"
37
+ }
14
38
  export type TextStyleProps = {
15
39
  color: Color;
16
40
  fontFamily: FontFamily;
@@ -18,6 +42,8 @@ export type TextStyleProps = {
18
42
  fontStyle: FontStyle;
19
43
  fontWeight: FontWeight;
20
44
  textAlign: TextAlign;
45
+ /** Optional and never written by default: see {@link TextDecoration}. */
46
+ textDecoration?: TextDecoration;
21
47
  };
22
48
  export declare enum FontWeight {
23
49
  Bold = "700",
@@ -31,17 +57,30 @@ export declare enum FontStyle {
31
57
  Italic = "italic",
32
58
  Normal = "normal"
33
59
  }
60
+ /**
61
+ * A stored value: every member stays forever, whether or not a host still
62
+ * ships its files. `Satoshi` is in no default font list since #396 (its
63
+ * licence forbids offering it as a selectable font in a SaaS or design tool),
64
+ * but an element that carries it keeps loading and painting with the
65
+ * `sans-serif` fallback. `PlusJakartaSans` (SIL OFL 1.1) is its replacement.
66
+ */
34
67
  export declare enum FontFamily {
35
68
  BebasNeue = "blocksuite:surface:BebasNeue",
36
69
  Inter = "blocksuite:surface:Inter",
37
70
  Kalam = "blocksuite:surface:Kalam",
38
71
  Lora = "blocksuite:surface:Lora",
39
72
  OrelegaOne = "blocksuite:surface:OrelegaOne",
73
+ PlusJakartaSans = "blocksuite:surface:PlusJakartaSans",
40
74
  Poppins = "blocksuite:surface:Poppins",
41
75
  Satoshi = "blocksuite:surface:Satoshi"
42
76
  }
43
- export declare const FontFamilyMap: Record<FontFamily, "BebasNeue" | "Inter" | "Kalam" | "Lora" | "OrelegaOne" | "Poppins" | "Satoshi">;
44
- export declare const FontFamilyList: { [K in FontFamily]: [K, (typeof FontFamilyMap)[K]]; }[FontFamily][];
77
+ export declare const FontFamilyMap: Record<FontFamily, "BebasNeue" | "Inter" | "Kalam" | "Lora" | "OrelegaOne" | "PlusJakartaSans" | "Poppins" | "Satoshi">;
78
+ /**
79
+ * Every family with the name the picker shows, in declaration order. What a
80
+ * picker OFFERS is this list narrowed to the families the host configured
81
+ * (`FontConfig`, #396); this is the order and the names it keeps.
82
+ */
83
+ export declare const FontFamilyList: [FontFamily, string][];
45
84
  export declare enum TextResizing {
46
85
  AUTO_WIDTH_AND_HEIGHT = 0,
47
86
  AUTO_HEIGHT = 1
@@ -13,6 +13,31 @@ export var TextVerticalAlign;
13
13
  TextVerticalAlign["Center"] = "center";
14
14
  TextVerticalAlign["Top"] = "top";
15
15
  })(TextVerticalAlign || (TextVerticalAlign = {}));
16
+ /**
17
+ * The line a canvas text is decorated with, as a CSS `text-decoration-line`
18
+ * token list (ADR 0030).
19
+ *
20
+ * **These string values are PERSISTED** — on a `text`, on a `shape` and inside
21
+ * a connector's `labelStyle` — so the enum is **append-only**: a member may be
22
+ * added, never renamed, never removed, never given a different string value.
23
+ *
24
+ * Readers split the value on whitespace and act on the tokens they know, never
25
+ * `switch` on the whole string: a token a newer client adds (`line-through`,
26
+ * say) is skipped by this build one token at a time, so
27
+ * `'underline line-through'` still paints its underline here.
28
+ *
29
+ * `undefined` (the key absent) and `None` paint the same on every element. They
30
+ * differ for one reader only — the UML object glyph's legacy rule, drawn for a
31
+ * name that never carried the field — which is why turning the decoration off
32
+ * writes `None` rather than clearing the key.
33
+ */
34
+ export var TextDecoration;
35
+ (function (TextDecoration) {
36
+ TextDecoration["None"] = "none";
37
+ TextDecoration["Underline"] = "underline";
38
+ TextDecoration["Overline"] = "overline";
39
+ TextDecoration["UnderlineOverline"] = "underline overline";
40
+ })(TextDecoration || (TextDecoration = {}));
16
41
  export var FontWeight;
17
42
  (function (FontWeight) {
18
43
  FontWeight["Bold"] = "700";
@@ -27,6 +52,13 @@ export var FontStyle;
27
52
  FontStyle["Italic"] = "italic";
28
53
  FontStyle["Normal"] = "normal";
29
54
  })(FontStyle || (FontStyle = {}));
55
+ /**
56
+ * A stored value: every member stays forever, whether or not a host still
57
+ * ships its files. `Satoshi` is in no default font list since #396 (its
58
+ * licence forbids offering it as a selectable font in a SaaS or design tool),
59
+ * but an element that carries it keeps loading and painting with the
60
+ * `sans-serif` fallback. `PlusJakartaSans` (SIL OFL 1.1) is its replacement.
61
+ */
30
62
  export var FontFamily;
31
63
  (function (FontFamily) {
32
64
  FontFamily["BebasNeue"] = "blocksuite:surface:BebasNeue";
@@ -34,11 +66,28 @@ export var FontFamily;
34
66
  FontFamily["Kalam"] = "blocksuite:surface:Kalam";
35
67
  FontFamily["Lora"] = "blocksuite:surface:Lora";
36
68
  FontFamily["OrelegaOne"] = "blocksuite:surface:OrelegaOne";
69
+ FontFamily["PlusJakartaSans"] = "blocksuite:surface:PlusJakartaSans";
37
70
  FontFamily["Poppins"] = "blocksuite:surface:Poppins";
38
71
  FontFamily["Satoshi"] = "blocksuite:surface:Satoshi";
39
72
  })(FontFamily || (FontFamily = {}));
40
73
  export const FontFamilyMap = createEnumMap(FontFamily);
41
- export const FontFamilyList = Object.entries(FontFamilyMap);
74
+ /**
75
+ * The name a family goes by where its enum key cannot spell it: a proper name
76
+ * with spaces. Proper names carry no i18n key, like the other family names
77
+ * (ADR 0023).
78
+ */
79
+ const SPACED_FONT_FAMILY_NAMES = {
80
+ [FontFamily.PlusJakartaSans]: 'Plus Jakarta Sans',
81
+ };
82
+ /**
83
+ * Every family with the name the picker shows, in declaration order. What a
84
+ * picker OFFERS is this list narrowed to the families the host configured
85
+ * (`FontConfig`, #396); this is the order and the names it keeps.
86
+ */
87
+ export const FontFamilyList = Object.entries(FontFamilyMap).map(([family, key]) => [
88
+ family,
89
+ SPACED_FONT_FAMILY_NAMES[family] ?? key,
90
+ ]);
42
91
  export var TextResizing;
43
92
  (function (TextResizing) {
44
93
  TextResizing[TextResizing["AUTO_WIDTH_AND_HEIGHT"] = 0] = "AUTO_WIDTH_AND_HEIGHT";
@@ -3,7 +3,7 @@ import { Bound } from '../../../global/gfx/index.js';
3
3
  import type { BaseElementProps, PointTestOptions } from '../../../std/gfx/index.js';
4
4
  import { GfxLocalElementModel, GfxPrimitiveElementModel } from '../../../std/gfx/index.js';
5
5
  import * as Y from 'yjs';
6
- import { FontStyle, FontWeight, ShapeStyle, ShapeType, StrokeStyle, TextAlign, TextFitMode, TextResizing, type TextStyleProps, TextVerticalAlign } from '../../consts/index.js';
6
+ import { FontStyle, FontWeight, ShapeStyle, ShapeType, StrokeStyle, TextAlign, type TextDecoration, TextFitMode, TextResizing, type TextStyleProps, TextVerticalAlign } from '../../consts/index.js';
7
7
  import { type Color } from '../../themes/index.js';
8
8
  export type ShapeProps = BaseElementProps & {
9
9
  shapeType: ShapeType;
@@ -98,6 +98,11 @@ export declare class ShapeElementModel extends GfxPrimitiveElementModel<ShapePro
98
98
  accessor strokeWidth: number;
99
99
  accessor text: Y.Text | undefined;
100
100
  accessor textAlign: TextAlign;
101
+ /**
102
+ * Absent until the author sets it, so a shape whose text is never decorated
103
+ * stores exactly the keys it stored before the field existed (ADR 0030).
104
+ */
105
+ accessor textDecoration: TextDecoration | undefined;
101
106
  accessor textDisplay: boolean;
102
107
  accessor textHorizontalAlign: TextAlign;
103
108
  accessor textResizing: TextResizing;
@@ -102,6 +102,9 @@ let ShapeElementModel = (() => {
102
102
  let _textAlign_decorators;
103
103
  let _textAlign_initializers = [];
104
104
  let _textAlign_extraInitializers = [];
105
+ let _textDecoration_decorators;
106
+ let _textDecoration_initializers = [];
107
+ let _textDecoration_extraInitializers = [];
105
108
  let _textDisplay_decorators;
106
109
  let _textDisplay_initializers = [];
107
110
  let _textDisplay_extraInitializers = [];
@@ -155,6 +158,7 @@ let ShapeElementModel = (() => {
155
158
  _strokeWidth_decorators = [field()];
156
159
  _text_decorators = [field()];
157
160
  _textAlign_decorators = [field(TextAlign.Center)];
161
+ _textDecoration_decorators = [field()];
158
162
  _textDisplay_decorators = [local()];
159
163
  _textHorizontalAlign_decorators = [field(TextAlign.Center)];
160
164
  _textResizing_decorators = [field(TextResizing.AUTO_HEIGHT)];
@@ -185,6 +189,7 @@ let ShapeElementModel = (() => {
185
189
  __esDecorate(this, null, _strokeWidth_decorators, { kind: "accessor", name: "strokeWidth", static: false, private: false, access: { has: obj => "strokeWidth" in obj, get: obj => obj.strokeWidth, set: (obj, value) => { obj.strokeWidth = value; } }, metadata: _metadata }, _strokeWidth_initializers, _strokeWidth_extraInitializers);
186
190
  __esDecorate(this, null, _text_decorators, { kind: "accessor", name: "text", static: false, private: false, access: { has: obj => "text" in obj, get: obj => obj.text, set: (obj, value) => { obj.text = value; } }, metadata: _metadata }, _text_initializers, _text_extraInitializers);
187
191
  __esDecorate(this, null, _textAlign_decorators, { kind: "accessor", name: "textAlign", static: false, private: false, access: { has: obj => "textAlign" in obj, get: obj => obj.textAlign, set: (obj, value) => { obj.textAlign = value; } }, metadata: _metadata }, _textAlign_initializers, _textAlign_extraInitializers);
192
+ __esDecorate(this, null, _textDecoration_decorators, { kind: "accessor", name: "textDecoration", static: false, private: false, access: { has: obj => "textDecoration" in obj, get: obj => obj.textDecoration, set: (obj, value) => { obj.textDecoration = value; } }, metadata: _metadata }, _textDecoration_initializers, _textDecoration_extraInitializers);
188
193
  __esDecorate(this, null, _textDisplay_decorators, { kind: "accessor", name: "textDisplay", static: false, private: false, access: { has: obj => "textDisplay" in obj, get: obj => obj.textDisplay, set: (obj, value) => { obj.textDisplay = value; } }, metadata: _metadata }, _textDisplay_initializers, _textDisplay_extraInitializers);
189
194
  __esDecorate(this, null, _textHorizontalAlign_decorators, { kind: "accessor", name: "textHorizontalAlign", static: false, private: false, access: { has: obj => "textHorizontalAlign" in obj, get: obj => obj.textHorizontalAlign, set: (obj, value) => { obj.textHorizontalAlign = value; } }, metadata: _metadata }, _textHorizontalAlign_initializers, _textHorizontalAlign_extraInitializers);
190
195
  __esDecorate(this, null, _textResizing_decorators, { kind: "accessor", name: "textResizing", static: false, private: false, access: { has: obj => "textResizing" in obj, get: obj => obj.textResizing, set: (obj, value) => { obj.textResizing = value; } }, metadata: _metadata }, _textResizing_initializers, _textResizing_extraInitializers);
@@ -306,6 +311,13 @@ let ShapeElementModel = (() => {
306
311
  #textAlign_accessor_storage;
307
312
  get textAlign() { return this.#textAlign_accessor_storage; }
308
313
  set textAlign(value) { this.#textAlign_accessor_storage = value; }
314
+ #textDecoration_accessor_storage;
315
+ /**
316
+ * Absent until the author sets it, so a shape whose text is never decorated
317
+ * stores exactly the keys it stored before the field existed (ADR 0030).
318
+ */
319
+ get textDecoration() { return this.#textDecoration_accessor_storage; }
320
+ set textDecoration(value) { this.#textDecoration_accessor_storage = value; }
309
321
  #textDisplay_accessor_storage;
310
322
  get textDisplay() { return this.#textDisplay_accessor_storage; }
311
323
  set textDisplay(value) { this.#textDisplay_accessor_storage = value; }
@@ -397,7 +409,8 @@ let ShapeElementModel = (() => {
397
409
  this.#strokeWidth_accessor_storage = (__runInitializers(this, _strokeStyle_extraInitializers), __runInitializers(this, _strokeWidth_initializers, 4));
398
410
  this.#text_accessor_storage = (__runInitializers(this, _strokeWidth_extraInitializers), __runInitializers(this, _text_initializers, undefined));
399
411
  this.#textAlign_accessor_storage = (__runInitializers(this, _text_extraInitializers), __runInitializers(this, _textAlign_initializers, void 0));
400
- this.#textDisplay_accessor_storage = (__runInitializers(this, _textAlign_extraInitializers), __runInitializers(this, _textDisplay_initializers, true));
412
+ this.#textDecoration_accessor_storage = (__runInitializers(this, _textAlign_extraInitializers), __runInitializers(this, _textDecoration_initializers, undefined));
413
+ this.#textDisplay_accessor_storage = (__runInitializers(this, _textDecoration_extraInitializers), __runInitializers(this, _textDisplay_initializers, true));
401
414
  this.#textHorizontalAlign_accessor_storage = (__runInitializers(this, _textDisplay_extraInitializers), __runInitializers(this, _textHorizontalAlign_initializers, void 0));
402
415
  this.#textResizing_accessor_storage = (__runInitializers(this, _textHorizontalAlign_extraInitializers), __runInitializers(this, _textResizing_initializers, TextResizing.AUTO_HEIGHT));
403
416
  this.#textFitMode_accessor_storage = (__runInitializers(this, _textResizing_extraInitializers), __runInitializers(this, _textFitMode_initializers, TextFitMode.Grow));
@@ -3,7 +3,7 @@ import { Bound } from '../../../global/gfx/index.js';
3
3
  import type { BaseElementProps } from '../../../std/gfx/index.js';
4
4
  import { GfxPrimitiveElementModel } from '../../../std/gfx/index.js';
5
5
  import * as Y from 'yjs';
6
- import { FontFamily, FontStyle, FontWeight, TextAlign, type TextStyleProps } from '../../consts/index.js';
6
+ import { FontFamily, FontStyle, FontWeight, TextAlign, type TextDecoration, type TextStyleProps } from '../../consts/index.js';
7
7
  import { type Color } from '../../themes/index.js';
8
8
  export type TextElementProps = BaseElementProps & {
9
9
  text: Y.Text;
@@ -25,5 +25,10 @@ export declare class TextElementModel extends GfxPrimitiveElementModel<TextEleme
25
25
  accessor rotate: number;
26
26
  accessor text: Y.Text;
27
27
  accessor textAlign: TextAlign;
28
+ /**
29
+ * Absent until the author sets it, so a text that is never decorated stores
30
+ * exactly the keys it stored before the field existed (ADR 0030).
31
+ */
32
+ accessor textDecoration: TextDecoration | undefined;
28
33
  accessor xywh: SerializedXYWH;
29
34
  }
@@ -66,6 +66,9 @@ let TextElementModel = (() => {
66
66
  let _textAlign_decorators;
67
67
  let _textAlign_initializers = [];
68
68
  let _textAlign_extraInitializers = [];
69
+ let _textDecoration_decorators;
70
+ let _textDecoration_initializers = [];
71
+ let _textDecoration_extraInitializers = [];
69
72
  let _xywh_decorators;
70
73
  let _xywh_initializers = [];
71
74
  let _xywh_extraInitializers = [];
@@ -81,6 +84,7 @@ let TextElementModel = (() => {
81
84
  _rotate_decorators = [field(0)];
82
85
  _text_decorators = [field()];
83
86
  _textAlign_decorators = [field()];
87
+ _textDecoration_decorators = [field()];
84
88
  _xywh_decorators = [field('[0,0,0,0]')];
85
89
  __esDecorate(this, null, _color_decorators, { kind: "accessor", name: "color", static: false, private: false, access: { has: obj => "color" in obj, get: obj => obj.color, set: (obj, value) => { obj.color = value; } }, metadata: _metadata }, _color_initializers, _color_extraInitializers);
86
90
  __esDecorate(this, null, _fontFamily_decorators, { kind: "accessor", name: "fontFamily", static: false, private: false, access: { has: obj => "fontFamily" in obj, get: obj => obj.fontFamily, set: (obj, value) => { obj.fontFamily = value; } }, metadata: _metadata }, _fontFamily_initializers, _fontFamily_extraInitializers);
@@ -91,6 +95,7 @@ let TextElementModel = (() => {
91
95
  __esDecorate(this, null, _rotate_decorators, { kind: "accessor", name: "rotate", static: false, private: false, access: { has: obj => "rotate" in obj, get: obj => obj.rotate, set: (obj, value) => { obj.rotate = value; } }, metadata: _metadata }, _rotate_initializers, _rotate_extraInitializers);
92
96
  __esDecorate(this, null, _text_decorators, { kind: "accessor", name: "text", static: false, private: false, access: { has: obj => "text" in obj, get: obj => obj.text, set: (obj, value) => { obj.text = value; } }, metadata: _metadata }, _text_initializers, _text_extraInitializers);
93
97
  __esDecorate(this, null, _textAlign_decorators, { kind: "accessor", name: "textAlign", static: false, private: false, access: { has: obj => "textAlign" in obj, get: obj => obj.textAlign, set: (obj, value) => { obj.textAlign = value; } }, metadata: _metadata }, _textAlign_initializers, _textAlign_extraInitializers);
98
+ __esDecorate(this, null, _textDecoration_decorators, { kind: "accessor", name: "textDecoration", static: false, private: false, access: { has: obj => "textDecoration" in obj, get: obj => obj.textDecoration, set: (obj, value) => { obj.textDecoration = value; } }, metadata: _metadata }, _textDecoration_initializers, _textDecoration_extraInitializers);
94
99
  __esDecorate(this, null, _xywh_decorators, { kind: "accessor", name: "xywh", static: false, private: false, access: { has: obj => "xywh" in obj, get: obj => obj.xywh, set: (obj, value) => { obj.xywh = value; } }, metadata: _metadata }, _xywh_initializers, _xywh_extraInitializers);
95
100
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
96
101
  }
@@ -145,7 +150,14 @@ let TextElementModel = (() => {
145
150
  #textAlign_accessor_storage = (__runInitializers(this, _text_extraInitializers), __runInitializers(this, _textAlign_initializers, TextAlign.Center));
146
151
  get textAlign() { return this.#textAlign_accessor_storage; }
147
152
  set textAlign(value) { this.#textAlign_accessor_storage = value; }
148
- #xywh_accessor_storage = (__runInitializers(this, _textAlign_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,16,16]'));
153
+ #textDecoration_accessor_storage = (__runInitializers(this, _textAlign_extraInitializers), __runInitializers(this, _textDecoration_initializers, undefined));
154
+ /**
155
+ * Absent until the author sets it, so a text that is never decorated stores
156
+ * exactly the keys it stored before the field existed (ADR 0030).
157
+ */
158
+ get textDecoration() { return this.#textDecoration_accessor_storage; }
159
+ set textDecoration(value) { this.#textDecoration_accessor_storage = value; }
160
+ #xywh_accessor_storage = (__runInitializers(this, _textDecoration_extraInitializers), __runInitializers(this, _xywh_initializers, '[0,0,16,16]'));
149
161
  get xywh() { return this.#xywh_accessor_storage; }
150
162
  set xywh(value) { this.#xywh_accessor_storage = value; }
151
163
  constructor() {
@@ -12,6 +12,8 @@ export function createEmbedBlockSchema({ name, version, toModel, props, transfor
12
12
  index: 'a0',
13
13
  xywh: '[0,0,0,0]',
14
14
  lockedBySelf: false,
15
+ hiddenForEveryone: undefined,
16
+ layer: undefined,
15
17
  rotate: 0,
16
18
  comments: undefined,
17
19
  'meta:createdAt': undefined,
@@ -1,4 +1,6 @@
1
1
  import { type ChromeWording } from '../affine-shared/services/index.js';
2
+ import type { BlockStdScope } from '../std/index.js';
3
+ import type { BlockModel, ExtensionType } from '../store/index.js';
2
4
  import type { TemplateResult } from 'lit';
3
5
  /**
4
6
  * Text primitive entries used in slash menu and format bar,
@@ -25,3 +27,26 @@ export interface TextConversionConfig {
25
27
  descriptionWording?: ChromeWording;
26
28
  }
27
29
  export declare const textConversionConfigs: TextConversionConfig[];
30
+ /**
31
+ * A "Turn into" entry contributed by a block package from its OWN view
32
+ * extension, for a conversion `updateBlockType` cannot carry (#418).
33
+ *
34
+ * `textConversionConfigs` above is static and unconditional: every entry in it
35
+ * is offered whatever the host's flags say. A block whose tooling is
36
+ * flag-gated (ADR 0009) therefore cannot be listed there; it registers this
37
+ * entry from its gated view extension instead, so `{ callout: false }` removes
38
+ * the entry with the rest of the callout's tooling. Mirrors
39
+ * `SlashMenuConfigExtension`: one DI variant per flavour, read with `getAll`
40
+ * by the menu that draws the entries.
41
+ */
42
+ export interface TextConversionEntry {
43
+ flavour: string;
44
+ name: string;
45
+ nameWording: ChromeWording;
46
+ icon: TemplateResult;
47
+ /** Whether the entry is offered for the models currently selected. */
48
+ when: (std: BlockStdScope, models: BlockModel[]) => boolean;
49
+ run: (std: BlockStdScope, models: BlockModel[]) => void;
50
+ }
51
+ export declare const TextConversionEntryIdentifier: import("../global/di/types.js").ServiceIdentifier<TextConversionEntry> & (<U extends TextConversionEntry = TextConversionEntry>(variant: import("../global/di/types.js").ServiceVariant) => import("../global/di/types.js").ServiceIdentifier<U>);
52
+ export declare function TextConversionEntryExtension(entry: TextConversionEntry): ExtensionType;