@ecsplico/editor 3.2.0 → 3.4.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 (57) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/code/CodeSurface.vue.d.ts +3 -3
  3. package/dist/document/DocumentSurface.vue.d.ts +3 -3
  4. package/dist/features/ai/protocol/generate.d.ts +1 -1
  5. package/dist/features/composites/components/CompositeChrome.js +10 -9
  6. package/dist/features/composites/components/CompositeChrome.js.map +1 -1
  7. package/dist/features/composites/components/CompositeView.js +5 -1
  8. package/dist/features/composites/components/CompositeView.js.map +1 -1
  9. package/dist/features/composites/feature.js +12 -1
  10. package/dist/features/composites/feature.js.map +1 -1
  11. package/dist/features/composites/index.d.ts +2 -1
  12. package/dist/features/composites/index.js +2 -1
  13. package/dist/features/composites/kinds.d.ts +10 -1
  14. package/dist/features/composites/kinds.js.map +1 -1
  15. package/dist/features/composites/merge.d.ts +24 -0
  16. package/dist/features/composites/merge.js +50 -0
  17. package/dist/features/composites/merge.js.map +1 -0
  18. package/dist/features/composites/nodes.d.ts +1 -0
  19. package/dist/features/composites/nodes.js +1 -1
  20. package/dist/features/composites/nodes.js.map +1 -1
  21. package/dist/features/composites/outline.d.ts +9 -2
  22. package/dist/features/composites/outline.js +41 -3
  23. package/dist/features/composites/outline.js.map +1 -1
  24. package/dist/features/composites/react/CompositeChrome.js +11 -9
  25. package/dist/features/composites/react/CompositeChrome.js.map +1 -1
  26. package/dist/features/composites/react/CompositeView.js +4 -1
  27. package/dist/features/composites/react/CompositeView.js.map +1 -1
  28. package/dist/features/composites/rows.d.ts +2 -0
  29. package/dist/features/composites/rows.js +1 -0
  30. package/dist/features/composites/rows.js.map +1 -1
  31. package/dist/i18n/de/composites.js +1 -0
  32. package/dist/i18n/de/composites.js.map +1 -1
  33. package/dist/i18n/de/tree.js +1 -0
  34. package/dist/i18n/de/tree.js.map +1 -1
  35. package/dist/i18n/de.d.ts +2 -0
  36. package/dist/i18n/en/composites.js +1 -0
  37. package/dist/i18n/en/composites.js.map +1 -1
  38. package/dist/i18n/en/tree.js +1 -0
  39. package/dist/i18n/en/tree.js.map +1 -1
  40. package/dist/markdown/MarkdownSurface.vue.d.ts +5 -5
  41. package/dist/nuxt/module.d.ts +4 -0
  42. package/dist/server/handlers/ai.d.ts +1 -1
  43. package/dist/styles/composites.css +10 -1
  44. package/dist/tree/DocumentTree.js +25 -9
  45. package/dist/tree/DocumentTree.js.map +1 -1
  46. package/dist/tree/react/DocumentTree.js +14 -2
  47. package/dist/tree/react/DocumentTree.js.map +1 -1
  48. package/dist/tree/tree-host.js +11 -1
  49. package/dist/tree/tree-host.js.map +1 -1
  50. package/dist/tree/tree-items.js +3 -1
  51. package/dist/tree/tree-items.js.map +1 -1
  52. package/dist/tree/tree-model.js +9 -0
  53. package/dist/tree/tree-model.js.map +1 -1
  54. package/dist/vue/AdvancedEditor.vue.d.ts +4 -4
  55. package/dist/vue/SimpleEditor.vue.d.ts +4 -4
  56. package/dist/vue/components/EditorSurface.vue.d.ts +4 -4
  57. package/package.json +1 -1
@@ -101,6 +101,7 @@ function CompositeChrome({ editor }) {
101
101
  return [{
102
102
  row,
103
103
  anchor,
104
+ editable: editable && row.controls,
104
105
  left,
105
106
  top: (inStrip ? anchor.toggleTop + anchor.toggleSize / 2 : anchor.lastCenter) - ROW_HEIGHT / 2,
106
107
  width: Math.max((frame?.right ?? anchor.right) - left, 120),
@@ -121,6 +122,7 @@ function CompositeChrome({ editor }) {
121
122
  frame,
122
123
  expanded,
123
124
  revealedTitles,
125
+ editable,
124
126
  t
125
127
  ]);
126
128
  function toggleExpanded(row) {
@@ -141,8 +143,8 @@ function CompositeChrome({ editor }) {
141
143
  children: /* @__PURE__ */ jsx("span", {
142
144
  role: "button",
143
145
  tabIndex: 0,
144
- draggable: editable,
145
- className: cn("absolute z-10 flex items-center justify-center rounded-sm bg-background text-muted-foreground transition-[color,background-color,opacity] duration-120 motion-reduce:transition-none hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary", editable ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", iconOnHover && !hoveredKeys.has(item.row.key) && chipsHoveredKey !== item.row.key && "opacity-0 hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100"),
146
+ draggable: item.editable,
147
+ className: cn("absolute z-10 flex items-center justify-center rounded-sm bg-background text-muted-foreground transition-[color,background-color,opacity] duration-120 motion-reduce:transition-none hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary", item.editable ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", iconOnHover && !hoveredKeys.has(item.row.key) && chipsHoveredKey !== item.row.key && "opacity-0 hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100"),
146
148
  style: {
147
149
  top: `${item.anchor.toggleTop}px`,
148
150
  left: `${item.anchor.toggleLeft}px`,
@@ -150,7 +152,7 @@ function CompositeChrome({ editor }) {
150
152
  height: `${item.anchor.toggleSize}px`
151
153
  },
152
154
  "aria-label": t("composites.chrome.details", { kind: item.row.kindLabel }),
153
- title: editable ? t("composites.chrome.detailsDrag", { kind: item.row.kindLabel }) : t("composites.chrome.details", { kind: item.row.kindLabel }),
155
+ title: item.editable ? t("composites.chrome.detailsDrag", { kind: item.row.kindLabel }) : t("composites.chrome.details", { kind: item.row.kindLabel }),
154
156
  onKeyDown: (event) => {
155
157
  if (event.key !== "Enter" && event.key !== " ") return;
156
158
  event.preventDefault();
@@ -170,9 +172,9 @@ function CompositeChrome({ editor }) {
170
172
  children: /* @__PURE__ */ jsx(CompositeDetails, {
171
173
  editor,
172
174
  row: item.row,
173
- editable
175
+ editable: item.editable
174
176
  })
175
- })] }), (editable || item.basket || item.status || item.derived || item.row.tagsVisible && item.row.tags.length > 0) && /* @__PURE__ */ jsxs("div", {
177
+ })] }), (item.editable || item.basket || item.status || item.derived || item.row.tagsVisible && item.row.tags.length > 0) && /* @__PURE__ */ jsxs("div", {
176
178
  className: "absolute z-10 flex items-center gap-px overflow-hidden rounded-md bg-background",
177
179
  style: {
178
180
  top: `${item.top}px`,
@@ -183,7 +185,7 @@ function CompositeChrome({ editor }) {
183
185
  onMouseEnter: () => setChipsHoveredKey(item.row.key),
184
186
  onMouseLeave: () => setChipsHoveredKey(null),
185
187
  children: [
186
- editable ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CompositeBasketMenu, {
188
+ item.editable ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CompositeBasketMenu, {
187
189
  editor,
188
190
  row: item.row,
189
191
  children: /* @__PURE__ */ jsx("button", {
@@ -245,7 +247,7 @@ function CompositeChrome({ editor }) {
245
247
  }), t("composites.derivation.stale")]
246
248
  })
247
249
  ] }),
248
- item.status && (editable ? /* @__PURE__ */ jsx(CompositeStatusMenu, {
250
+ item.status && (item.editable ? /* @__PURE__ */ jsx(CompositeStatusMenu, {
249
251
  editor,
250
252
  row: item.row,
251
253
  children: /* @__PURE__ */ jsxs("button", {
@@ -269,7 +271,7 @@ function CompositeChrome({ editor }) {
269
271
  children: [/* @__PURE__ */ jsxs("span", {
270
272
  className: "truncate",
271
273
  children: ["#", tag]
272
- }), editable && /* @__PURE__ */ jsx("button", {
274
+ }), item.editable && /* @__PURE__ */ jsx("button", {
273
275
  type: "button",
274
276
  className: "flex h-4 w-0 shrink-0 items-center justify-center overflow-hidden rounded-sm opacity-0 transition-all duration-150 group-hover:ml-1 group-hover:w-4 group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:ml-1 focus-visible:w-4 focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-primary",
275
277
  "aria-label": t("composites.tag.remove", { tag }),
@@ -280,7 +282,7 @@ function CompositeChrome({ editor }) {
280
282
  })
281
283
  })]
282
284
  }, tag)),
283
- editable && item.row.tagsVisible && /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
285
+ item.editable && item.row.tagsVisible && /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
284
286
  asChild: true,
285
287
  children: /* @__PURE__ */ jsx("button", {
286
288
  type: "button",
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeChrome.js","names":[],"sources":["../../../../src/features/composites/react/CompositeChrome.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { Fragment, type KeyboardEvent, useEffect, useMemo, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { startBlockDrag } from '../../../core'\nimport { Icon } from '../../../react/Icon'\nimport { useStore } from '../../../react/use-store'\nimport { useEditorSettings } from '../../../react/settings'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\nimport { Popover, PopoverContent, PopoverTrigger } from '../../../react/ui/popover'\nimport { cn } from '../../../react/ui/utils'\nimport { compositeSectionOf } from '../anchors'\nimport { derivedChromeOf } from '../derived-chrome'\nimport { rowStatus } from '../meta-display'\nimport { basketById, basketOf, titleHiddenOf } from '../baskets'\nimport { compositeBasketsOf } from '../nodes'\nimport { compositeOfRow, type CompositeRow, setCompositeTags } from '../rows'\nimport { CompositeBasketMenu } from './CompositeBasketMenu'\nimport { CompositeDetails } from './CompositeDetails'\nimport { CompositeStatusMenu } from './CompositeStatusMenu'\nimport { CompositeTagsEditor } from './CompositeTagsEditor'\nimport { useCompositeAnchors } from './use-composite-anchors'\nimport { useCompositeRows } from './use-composite-rows'\n\n/**\n * Chrome of every composite, laid over the editor (mounted by the composites feature): on the title line the status\n * chip and one chip per tag (with a `+` chip to add tags), and on the front the kind icon. The icon is a button that\n * opens the details popover (kind with a confirmation before it changes, the kind's fields and the summary;\n * `CompositeDetails`) and, in an editable editor, the composite's drag handle: dragging it moves the composite\n * (`startBlockDrag`). With `blocks.kindIcon: 'hover'` it shows only while the composite is hovered, its popover is\n * open or the icon has keyboard focus. Chips and popover also render in read-only editors, without edit affordances.\n * The node view's own description and tags rows are hidden by CSS; this overlay shows and edits them.\n */\nexport function CompositeChrome({ editor }: { editor: Editor }) {\n const { rows } = useCompositeRows(editor)\n const { host, anchors, frame } = useCompositeAnchors(editor, rows)\n\n // `isEditable` is not reactive: follow it on every transaction (`EditorSurface` dispatches one after `setEditable`).\n const [editable, setEditable] = useState(() => !editor.isDestroyed && editor.isEditable)\n useEffect(() => {\n const sync = () => setEditable(!editor.isDestroyed && editor.isEditable)\n sync()\n editor.on('transaction', sync)\n return () => {\n editor.off('transaction', sync)\n }\n }, [editor])\n\n const { settings } = useEditorSettings()\n const { t } = useEditorI18n()\n const iconOnHover = settings.blocks.kindIcon === 'hover'\n\n // Hover state of `kindIcon: 'hover'`: the keys of the rows whose composite is under the pointer (that one and every\n // composite around it), plus the row whose chips the pointer is on (they sit outside the editor's DOM).\n const [hoveredKeys, setHoveredKeys] = useState<ReadonlySet<string>>(NO_KEYS)\n const [chipsHoveredKey, setChipsHoveredKey] = useState<string | null>(null)\n const latestRows = useRef(rows)\n latestRows.current = rows\n\n useEffect(() => {\n let hoveredSection: Element | null = null\n const onMouseleave = () => {\n hoveredSection = null\n setHoveredKeys(NO_KEYS)\n }\n const onMouseover = (event: MouseEvent) => {\n const section = event.target instanceof Element ? event.target.closest('.composite') : null\n if (section === hoveredSection) return\n hoveredSection = section\n const chain = new Set<Element>()\n for (let el = section; el; el = el.parentElement?.closest('.composite') ?? null) chain.add(el)\n const { view, state } = editor\n setHoveredKeys(new Set(latestRows.current.filter((row) => {\n const found = compositeOfRow(state.doc, row)\n const dom = found ? view.nodeDOM(found.pos) : null\n const section = dom instanceof Element ? compositeSectionOf(dom) : null\n return section !== null && chain.has(section)\n }).map(row => row.key)))\n }\n\n onMouseleave()\n if (!iconOnHover || editor.isDestroyed) return\n const { dom } = editor.view\n dom.addEventListener('mouseover', onMouseover)\n dom.addEventListener('mouseleave', onMouseleave)\n return () => {\n dom.removeEventListener('mouseover', onMouseover)\n dom.removeEventListener('mouseleave', onMouseleave)\n }\n }, [editor, iconOnHover])\n\n function onIconDragStart(event: DragEvent, row: CompositeRow) {\n const found = compositeOfRow(editor.state.doc, row)\n if (!found || !startBlockDrag(editor, event, found.pos)) event.preventDefault()\n }\n\n const expanded = useStore(editor.storage.composite.expanded)\n const revealedTitles = useStore(editor.storage.composite.revealedTitles)\n\n const placed = useMemo(() => {\n const baskets = compositeBasketsOf(editor)\n // End of the collapsed derived Baustein the rows being walked sit in: its clipped content shows no chrome.\n let hiddenUntil = -1\n return rows.flatMap((row) => {\n if (row.pos < hiddenUntil) return []\n const derived = derivedChromeOf(editor, row)\n const open = !derived || !row.id || expanded.has(row.id)\n if (!open) hiddenUntil = row.end\n const anchor = anchors.get(row.key)\n if (!anchor) return []\n const titleHidden = titleHiddenOf(row)\n // A hidden title leaves nothing to measure: the chips sit in the strip beside the kind icon (`composites.css`).\n const inStrip = titleHidden && !(row.id && revealedTitles.has(row.id)) && anchor.toggleSize > 0\n // An empty title shows a placeholder the anchor cannot measure: keep clear of it.\n const left = inStrip ? anchor.toggleLeft + anchor.toggleSize + 6 : anchor.lineEnd + (anchor.titleEmpty ? 116 : 12)\n return [{\n row,\n anchor,\n left,\n top: (inStrip ? anchor.toggleTop + anchor.toggleSize / 2 : anchor.lastCenter) - ROW_HEIGHT / 2,\n width: Math.max((frame?.right ?? anchor.right) - left, 120),\n status: rowStatus(row, t),\n derived: derived && { stale: derived.stale, open, toggleable: !!row.id },\n basket: basketById(baskets, basketOf(row)) ?? null,\n titleHidden,\n }]\n })\n }, [editor, rows, anchors, frame, expanded, revealedTitles, t])\n\n function toggleExpanded(row: CompositeRow) {\n if (row.id) editor.commands.toggleCompositeExpanded(row.id)\n }\n\n function removeTag(row: CompositeRow, tag: string) {\n setCompositeTags(editor, row, row.tags.filter(candidate => candidate !== tag))\n }\n\n function toggleTitleHidden(row: CompositeRow) {\n const found = compositeOfRow(editor.state.doc, row)\n if (found) editor.commands.setCompositeTitleHidden(!titleHiddenOf(row), found.pos)\n }\n\n if (!host) return null\n\n return createPortal(\n <div className=\"absolute top-0 left-0 h-0 w-0\">\n {placed.map(item => (\n <Fragment key={item.row.key}>\n {item.anchor.toggleSize > 0 && (\n <Popover>\n <PopoverTrigger asChild>\n {/* A span, not a `button`: Firefox does not start drags from buttons. */}\n <span\n role=\"button\"\n tabIndex={0}\n draggable={editable}\n className={cn(\n 'absolute z-10 flex items-center justify-center rounded-sm bg-background text-muted-foreground transition-[color,background-color,opacity] duration-120 motion-reduce:transition-none hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary',\n editable ? 'cursor-grab active:cursor-grabbing' : 'cursor-pointer',\n iconOnHover && !hoveredKeys.has(item.row.key) && chipsHoveredKey !== item.row.key && 'opacity-0 hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100',\n )}\n style={{ top: `${item.anchor.toggleTop}px`, left: `${item.anchor.toggleLeft}px`, width: `${item.anchor.toggleSize}px`, height: `${item.anchor.toggleSize}px` }}\n aria-label={t('composites.chrome.details', { kind: item.row.kindLabel })}\n title={editable ? t('composites.chrome.detailsDrag', { kind: item.row.kindLabel }) : t('composites.chrome.details', { kind: item.row.kindLabel })}\n onKeyDown={(event: KeyboardEvent<HTMLElement>) => {\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n event.currentTarget.click()\n }}\n onDragStart={event => onIconDragStart(event.nativeEvent, item.row)}\n >\n <Icon key={item.row.icon} name={item.row.icon} className=\"size-3.5\" />\n </span>\n </PopoverTrigger>\n <PopoverContent\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n className={DETAILS_POPOVER}\n >\n <CompositeDetails editor={editor} row={item.row} editable={editable} />\n </PopoverContent>\n </Popover>\n )}\n\n {(editable || item.basket || item.status || item.derived || (item.row.tagsVisible && item.row.tags.length > 0)) && (\n <div\n className=\"absolute z-10 flex items-center gap-px overflow-hidden rounded-md bg-background\"\n style={{ top: `${item.top}px`, left: `${item.left}px`, maxWidth: `${item.width}px`, height: `${ROW_HEIGHT}px` }}\n onMouseEnter={() => setChipsHoveredKey(item.row.key)}\n onMouseLeave={() => setChipsHoveredKey(null)}\n >\n {editable\n ? (\n <>\n <CompositeBasketMenu editor={editor} row={item.row}>\n <button\n type=\"button\"\n className={CHIP_BUTTON}\n aria-label={t('composites.basket.label')}\n title={item.basket ? `${t('composites.basket.label')}: ${item.basket.label}` : t('composites.basket.label')}\n >\n {item.basket\n ? <span className=\"size-2.5 rounded-full\" style={{ backgroundColor: item.basket.color }} />\n : <Icon name=\"i-lucide-circle-dashed\" className=\"size-3.5\" />}\n </button>\n </CompositeBasketMenu>\n <button\n type=\"button\"\n className={CHIP_BUTTON}\n aria-label={t(item.titleHidden ? 'composites.titleHidden.show' : 'composites.titleHidden.hide')}\n title={t(item.titleHidden ? 'composites.titleHidden.show' : 'composites.titleHidden.hide')}\n onClick={() => toggleTitleHidden(item.row)}\n >\n <Icon name={item.titleHidden ? 'i-lucide-eye' : 'i-lucide-eye-off'} className=\"size-3.5\" />\n </button>\n </>\n )\n : item.basket && (\n <span className={CHIP} title={item.basket.label}>\n <span className=\"size-2.5 rounded-full\" style={{ backgroundColor: item.basket.color }} />\n </span>\n )}\n\n {item.derived && (\n <>\n {item.derived.toggleable && (\n <button\n type=\"button\"\n className={CHIP_BUTTON}\n aria-expanded={item.derived.open}\n aria-label={t(item.derived.open ? 'composites.derivation.collapse' : 'composites.derivation.expand')}\n title={t(item.derived.open ? 'composites.derivation.collapse' : 'composites.derivation.expand')}\n onClick={() => toggleExpanded(item.row)}\n >\n <Icon name={item.derived.open ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'} className=\"size-3.5\" />\n </button>\n )}\n <span className={CHIP}>\n <Icon name=\"i-lucide-git-branch\" className=\"size-3.5\" />{t('composites.derivation.badge')}\n </span>\n {item.derived.stale && (\n <span className={cn(CHIP, 'text-(--sk-warning)')}>\n <Icon name=\"i-lucide-triangle-alert\" className=\"size-3.5\" />{t('composites.derivation.stale')}\n </span>\n )}\n </>\n )}\n\n {item.status && (editable\n ? (\n <CompositeStatusMenu editor={editor} row={item.row}>\n <button type=\"button\" className={CHIP_BUTTON} aria-label={t('composites.status.label', { status: item.status.label })}>\n <Icon name={item.status.icon} className={cn('size-3.5', STATUS_COLOR[item.status.color] ?? item.status.color)} />{item.status.label}\n </button>\n </CompositeStatusMenu>\n )\n : (\n <span className={CHIP}>\n <Icon name={item.status.icon} className={cn('size-3.5', STATUS_COLOR[item.status.color] ?? item.status.color)} />{item.status.label}\n </span>\n ))}\n\n {(item.row.tagsVisible ? item.row.tags : []).map(tag => (\n <span key={tag} className={cn(CHIP, 'group max-w-40 gap-0')}>\n <span className=\"truncate\">#{tag}</span>\n {editable && (\n <button\n type=\"button\"\n className=\"flex h-4 w-0 shrink-0 items-center justify-center overflow-hidden rounded-sm opacity-0 transition-all duration-150 group-hover:ml-1 group-hover:w-4 group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:ml-1 focus-visible:w-4 focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-primary\"\n aria-label={t('composites.tag.remove', { tag })}\n onClick={() => removeTag(item.row, tag)}\n >\n <Icon name=\"i-lucide-x\" className=\"size-3\" />\n </button>\n )}\n </span>\n ))}\n\n {editable && item.row.tagsVisible && (\n <Popover>\n <PopoverTrigger asChild>\n <button type=\"button\" className={CHIP_BUTTON} aria-label={t('composites.tag.add')} title={t('composites.tag.add')}>\n <Icon name=\"i-lucide-plus\" className=\"size-3.5\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n side=\"bottom\"\n align=\"start\"\n sideOffset={6}\n className=\"w-auto gap-0 p-0\"\n onCloseAutoFocus={event => event.preventDefault()}\n >\n <div className=\"w-64 p-3\">\n <CompositeTagsEditor editor={editor} row={item.row} />\n </div>\n </PopoverContent>\n </Popover>\n )}\n </div>\n )}\n </Fragment>\n ))}\n </div>,\n host,\n )\n}\n\nconst NO_KEYS: ReadonlySet<string> = new Set()\n\n/** Chips start right after the title's last character and run on to the editor's right edge. */\nconst ROW_HEIGHT = 24\n\nconst CHIP = 'inline-flex h-5 shrink-0 items-center gap-1 rounded-sm px-1.5 text-xs leading-none whitespace-nowrap text-muted-foreground'\nconst CHIP_BUTTON = `${CHIP} transition-colors duration-150 hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary`\n\n/** `statusStyle` names Nuxt UI text colors: the shadcn counterparts (`--sk-info` and `--sk-success` come from the token stylesheets). */\nconst STATUS_COLOR: Record<string, string> = {\n 'text-muted': 'text-muted-foreground',\n 'text-info': 'text-(--sk-info)',\n 'text-success': 'text-(--sk-success)',\n 'text-dimmed': 'text-muted-foreground/70',\n}\n\n/** Scale and fade in from the icon (`transform-origin` is Radix's), a bit longer than the default; `composites.css` defines the keyframes and the reduced-motion override. */\nconst DETAILS_POPOVER = 'w-auto gap-0 p-0 composite-popover data-[state=open]:animate-[composite-pop-in_160ms_var(--ease-out)] data-[state=closed]:animate-[composite-pop-out_120ms_var(--ease-out)]'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,gBAAgB,EAAE,UAA8B;CAC9D,MAAM,EAAE,SAAS,iBAAiB,MAAM;CACxC,MAAM,EAAE,MAAM,SAAS,UAAU,oBAAoB,QAAQ,IAAI;CAGjE,MAAM,CAAC,UAAU,eAAe,eAAe,CAAC,OAAO,eAAe,OAAO,UAAU;CACvF,gBAAgB;EACd,MAAM,aAAa,YAAY,CAAC,OAAO,eAAe,OAAO,UAAU;EACvE,KAAK;EACL,OAAO,GAAG,eAAe,IAAI;EAC7B,aAAa;GACX,OAAO,IAAI,eAAe,IAAI;EAChC;CACF,GAAG,CAAC,MAAM,CAAC;CAEX,MAAM,EAAE,aAAa,kBAAkB;CACvC,MAAM,EAAE,MAAM,cAAc;CAC5B,MAAM,cAAc,SAAS,OAAO,aAAa;CAIjD,MAAM,CAAC,aAAa,kBAAkB,SAA8B,OAAO;CAC3E,MAAM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,0BAA+B,IAAI,IAAI;;AAG7C,MAAM,aAAa;AAEnB,MAAM,OAAO;AACb,MAAM,cAAc,GAAG,KAAK;;AAG5B,MAAM,eAAuC;CAC3C,cAAc;CACd,aAAa;CACb,gBAAgB;CAChB,eAAe;AACjB;;AAGA,MAAM,kBAAkB"}
1
+ {"version":3,"file":"CompositeChrome.js","names":[],"sources":["../../../../src/features/composites/react/CompositeChrome.tsx"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport { Fragment, type KeyboardEvent, useEffect, useMemo, useRef, useState } from 'react'\nimport { createPortal } from 'react-dom'\nimport { startBlockDrag } from '../../../core'\nimport { Icon } from '../../../react/Icon'\nimport { useStore } from '../../../react/use-store'\nimport { useEditorSettings } from '../../../react/settings'\nimport { useEditorI18n } from '../../../react/use-editor-i18n'\nimport { Popover, PopoverContent, PopoverTrigger } from '../../../react/ui/popover'\nimport { cn } from '../../../react/ui/utils'\nimport { compositeSectionOf } from '../anchors'\nimport { derivedChromeOf } from '../derived-chrome'\nimport { rowStatus } from '../meta-display'\nimport { basketById, basketOf, titleHiddenOf } from '../baskets'\nimport { compositeBasketsOf } from '../nodes'\nimport { compositeOfRow, type CompositeRow, setCompositeTags } from '../rows'\nimport { CompositeBasketMenu } from './CompositeBasketMenu'\nimport { CompositeDetails } from './CompositeDetails'\nimport { CompositeStatusMenu } from './CompositeStatusMenu'\nimport { CompositeTagsEditor } from './CompositeTagsEditor'\nimport { useCompositeAnchors } from './use-composite-anchors'\nimport { useCompositeRows } from './use-composite-rows'\n\n/**\n * Chrome of every composite, laid over the editor (mounted by the composites feature): on the title line the status\n * chip and one chip per tag (with a `+` chip to add tags), and on the front the kind icon. The icon is a button that\n * opens the details popover (kind with a confirmation before it changes, the kind's fields and the summary;\n * `CompositeDetails`) and, in an editable editor, the composite's drag handle: dragging it moves the composite\n * (`startBlockDrag`). With `blocks.kindIcon: 'hover'` it shows only while the composite is hovered, its popover is\n * open or the icon has keyboard focus. Chips and popover also render in read-only editors, without edit affordances.\n * The node view's own description and tags rows are hidden by CSS; this overlay shows and edits them.\n */\nexport function CompositeChrome({ editor }: { editor: Editor }) {\n const { rows } = useCompositeRows(editor)\n const { host, anchors, frame } = useCompositeAnchors(editor, rows)\n\n // `isEditable` is not reactive: follow it on every transaction (`EditorSurface` dispatches one after `setEditable`).\n const [editable, setEditable] = useState(() => !editor.isDestroyed && editor.isEditable)\n useEffect(() => {\n const sync = () => setEditable(!editor.isDestroyed && editor.isEditable)\n sync()\n editor.on('transaction', sync)\n return () => {\n editor.off('transaction', sync)\n }\n }, [editor])\n\n const { settings } = useEditorSettings()\n const { t } = useEditorI18n()\n const iconOnHover = settings.blocks.kindIcon === 'hover'\n\n // Hover state of `kindIcon: 'hover'`: the keys of the rows whose composite is under the pointer (that one and every\n // composite around it), plus the row whose chips the pointer is on (they sit outside the editor's DOM).\n const [hoveredKeys, setHoveredKeys] = useState<ReadonlySet<string>>(NO_KEYS)\n const [chipsHoveredKey, setChipsHoveredKey] = useState<string | null>(null)\n const latestRows = useRef(rows)\n latestRows.current = rows\n\n useEffect(() => {\n let hoveredSection: Element | null = null\n const onMouseleave = () => {\n hoveredSection = null\n setHoveredKeys(NO_KEYS)\n }\n const onMouseover = (event: MouseEvent) => {\n const section = event.target instanceof Element ? event.target.closest('.composite') : null\n if (section === hoveredSection) return\n hoveredSection = section\n const chain = new Set<Element>()\n for (let el = section; el; el = el.parentElement?.closest('.composite') ?? null) chain.add(el)\n const { view, state } = editor\n setHoveredKeys(new Set(latestRows.current.filter((row) => {\n const found = compositeOfRow(state.doc, row)\n const dom = found ? view.nodeDOM(found.pos) : null\n const section = dom instanceof Element ? compositeSectionOf(dom) : null\n return section !== null && chain.has(section)\n }).map(row => row.key)))\n }\n\n onMouseleave()\n if (!iconOnHover || editor.isDestroyed) return\n const { dom } = editor.view\n dom.addEventListener('mouseover', onMouseover)\n dom.addEventListener('mouseleave', onMouseleave)\n return () => {\n dom.removeEventListener('mouseover', onMouseover)\n dom.removeEventListener('mouseleave', onMouseleave)\n }\n }, [editor, iconOnHover])\n\n function onIconDragStart(event: DragEvent, row: CompositeRow) {\n const found = compositeOfRow(editor.state.doc, row)\n if (!found || !startBlockDrag(editor, event, found.pos)) event.preventDefault()\n }\n\n const expanded = useStore(editor.storage.composite.expanded)\n const revealedTitles = useStore(editor.storage.composite.revealedTitles)\n\n const placed = useMemo(() => {\n const baskets = compositeBasketsOf(editor)\n // End of the collapsed derived Baustein the rows being walked sit in: its clipped content shows no chrome.\n let hiddenUntil = -1\n return rows.flatMap((row) => {\n if (row.pos < hiddenUntil) return []\n const derived = derivedChromeOf(editor, row)\n const open = !derived || !row.id || expanded.has(row.id)\n if (!open) hiddenUntil = row.end\n const anchor = anchors.get(row.key)\n if (!anchor) return []\n const titleHidden = titleHiddenOf(row)\n // A hidden title leaves nothing to measure: the chips sit in the strip beside the kind icon (`composites.css`).\n const inStrip = titleHidden && !(row.id && revealedTitles.has(row.id)) && anchor.toggleSize > 0\n // An empty title shows a placeholder the anchor cannot measure: keep clear of it.\n const left = inStrip ? anchor.toggleLeft + anchor.toggleSize + 6 : anchor.lineEnd + (anchor.titleEmpty ? 116 : 12)\n return [{\n row,\n anchor,\n // A kind without `chrome.controls` renders as in a read-only editor.\n editable: editable && row.controls,\n left,\n top: (inStrip ? anchor.toggleTop + anchor.toggleSize / 2 : anchor.lastCenter) - ROW_HEIGHT / 2,\n width: Math.max((frame?.right ?? anchor.right) - left, 120),\n status: rowStatus(row, t),\n derived: derived && { stale: derived.stale, open, toggleable: !!row.id },\n basket: basketById(baskets, basketOf(row)) ?? null,\n titleHidden,\n }]\n })\n }, [editor, rows, anchors, frame, expanded, revealedTitles, editable, t])\n\n function toggleExpanded(row: CompositeRow) {\n if (row.id) editor.commands.toggleCompositeExpanded(row.id)\n }\n\n function removeTag(row: CompositeRow, tag: string) {\n setCompositeTags(editor, row, row.tags.filter(candidate => candidate !== tag))\n }\n\n function toggleTitleHidden(row: CompositeRow) {\n const found = compositeOfRow(editor.state.doc, row)\n if (found) editor.commands.setCompositeTitleHidden(!titleHiddenOf(row), found.pos)\n }\n\n if (!host) return null\n\n return createPortal(\n <div className=\"absolute top-0 left-0 h-0 w-0\">\n {placed.map(item => (\n <Fragment key={item.row.key}>\n {item.anchor.toggleSize > 0 && (\n <Popover>\n <PopoverTrigger asChild>\n {/* A span, not a `button`: Firefox does not start drags from buttons. */}\n <span\n role=\"button\"\n tabIndex={0}\n draggable={item.editable}\n className={cn(\n 'absolute z-10 flex items-center justify-center rounded-sm bg-background text-muted-foreground transition-[color,background-color,opacity] duration-120 motion-reduce:transition-none hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary',\n item.editable ? 'cursor-grab active:cursor-grabbing' : 'cursor-pointer',\n iconOnHover && !hoveredKeys.has(item.row.key) && chipsHoveredKey !== item.row.key && 'opacity-0 hover:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100',\n )}\n style={{ top: `${item.anchor.toggleTop}px`, left: `${item.anchor.toggleLeft}px`, width: `${item.anchor.toggleSize}px`, height: `${item.anchor.toggleSize}px` }}\n aria-label={t('composites.chrome.details', { kind: item.row.kindLabel })}\n title={item.editable ? t('composites.chrome.detailsDrag', { kind: item.row.kindLabel }) : t('composites.chrome.details', { kind: item.row.kindLabel })}\n onKeyDown={(event: KeyboardEvent<HTMLElement>) => {\n if (event.key !== 'Enter' && event.key !== ' ') return\n event.preventDefault()\n event.currentTarget.click()\n }}\n onDragStart={event => onIconDragStart(event.nativeEvent, item.row)}\n >\n <Icon key={item.row.icon} name={item.row.icon} className=\"size-3.5\" />\n </span>\n </PopoverTrigger>\n <PopoverContent\n side=\"bottom\"\n align=\"start\"\n sideOffset={4}\n className={DETAILS_POPOVER}\n >\n <CompositeDetails editor={editor} row={item.row} editable={item.editable} />\n </PopoverContent>\n </Popover>\n )}\n\n {(item.editable || item.basket || item.status || item.derived || (item.row.tagsVisible && item.row.tags.length > 0)) && (\n <div\n className=\"absolute z-10 flex items-center gap-px overflow-hidden rounded-md bg-background\"\n style={{ top: `${item.top}px`, left: `${item.left}px`, maxWidth: `${item.width}px`, height: `${ROW_HEIGHT}px` }}\n onMouseEnter={() => setChipsHoveredKey(item.row.key)}\n onMouseLeave={() => setChipsHoveredKey(null)}\n >\n {item.editable\n ? (\n <>\n <CompositeBasketMenu editor={editor} row={item.row}>\n <button\n type=\"button\"\n className={CHIP_BUTTON}\n aria-label={t('composites.basket.label')}\n title={item.basket ? `${t('composites.basket.label')}: ${item.basket.label}` : t('composites.basket.label')}\n >\n {item.basket\n ? <span className=\"size-2.5 rounded-full\" style={{ backgroundColor: item.basket.color }} />\n : <Icon name=\"i-lucide-circle-dashed\" className=\"size-3.5\" />}\n </button>\n </CompositeBasketMenu>\n <button\n type=\"button\"\n className={CHIP_BUTTON}\n aria-label={t(item.titleHidden ? 'composites.titleHidden.show' : 'composites.titleHidden.hide')}\n title={t(item.titleHidden ? 'composites.titleHidden.show' : 'composites.titleHidden.hide')}\n onClick={() => toggleTitleHidden(item.row)}\n >\n <Icon name={item.titleHidden ? 'i-lucide-eye' : 'i-lucide-eye-off'} className=\"size-3.5\" />\n </button>\n </>\n )\n : item.basket && (\n <span className={CHIP} title={item.basket.label}>\n <span className=\"size-2.5 rounded-full\" style={{ backgroundColor: item.basket.color }} />\n </span>\n )}\n\n {item.derived && (\n <>\n {item.derived.toggleable && (\n <button\n type=\"button\"\n className={CHIP_BUTTON}\n aria-expanded={item.derived.open}\n aria-label={t(item.derived.open ? 'composites.derivation.collapse' : 'composites.derivation.expand')}\n title={t(item.derived.open ? 'composites.derivation.collapse' : 'composites.derivation.expand')}\n onClick={() => toggleExpanded(item.row)}\n >\n <Icon name={item.derived.open ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'} className=\"size-3.5\" />\n </button>\n )}\n <span className={CHIP}>\n <Icon name=\"i-lucide-git-branch\" className=\"size-3.5\" />{t('composites.derivation.badge')}\n </span>\n {item.derived.stale && (\n <span className={cn(CHIP, 'text-(--sk-warning)')}>\n <Icon name=\"i-lucide-triangle-alert\" className=\"size-3.5\" />{t('composites.derivation.stale')}\n </span>\n )}\n </>\n )}\n\n {item.status && (item.editable\n ? (\n <CompositeStatusMenu editor={editor} row={item.row}>\n <button type=\"button\" className={CHIP_BUTTON} aria-label={t('composites.status.label', { status: item.status.label })}>\n <Icon name={item.status.icon} className={cn('size-3.5', STATUS_COLOR[item.status.color] ?? item.status.color)} />{item.status.label}\n </button>\n </CompositeStatusMenu>\n )\n : (\n <span className={CHIP}>\n <Icon name={item.status.icon} className={cn('size-3.5', STATUS_COLOR[item.status.color] ?? item.status.color)} />{item.status.label}\n </span>\n ))}\n\n {(item.row.tagsVisible ? item.row.tags : []).map(tag => (\n <span key={tag} className={cn(CHIP, 'group max-w-40 gap-0')}>\n <span className=\"truncate\">#{tag}</span>\n {item.editable && (\n <button\n type=\"button\"\n className=\"flex h-4 w-0 shrink-0 items-center justify-center overflow-hidden rounded-sm opacity-0 transition-all duration-150 group-hover:ml-1 group-hover:w-4 group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:ml-1 focus-visible:w-4 focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-primary\"\n aria-label={t('composites.tag.remove', { tag })}\n onClick={() => removeTag(item.row, tag)}\n >\n <Icon name=\"i-lucide-x\" className=\"size-3\" />\n </button>\n )}\n </span>\n ))}\n\n {item.editable && item.row.tagsVisible && (\n <Popover>\n <PopoverTrigger asChild>\n <button type=\"button\" className={CHIP_BUTTON} aria-label={t('composites.tag.add')} title={t('composites.tag.add')}>\n <Icon name=\"i-lucide-plus\" className=\"size-3.5\" />\n </button>\n </PopoverTrigger>\n <PopoverContent\n side=\"bottom\"\n align=\"start\"\n sideOffset={6}\n className=\"w-auto gap-0 p-0\"\n onCloseAutoFocus={event => event.preventDefault()}\n >\n <div className=\"w-64 p-3\">\n <CompositeTagsEditor editor={editor} row={item.row} />\n </div>\n </PopoverContent>\n </Popover>\n )}\n </div>\n )}\n </Fragment>\n ))}\n </div>,\n host,\n )\n}\n\nconst NO_KEYS: ReadonlySet<string> = new Set()\n\n/** Chips start right after the title's last character and run on to the editor's right edge. */\nconst ROW_HEIGHT = 24\n\nconst CHIP = 'inline-flex h-5 shrink-0 items-center gap-1 rounded-sm px-1.5 text-xs leading-none whitespace-nowrap text-muted-foreground'\nconst CHIP_BUTTON = `${CHIP} transition-colors duration-150 hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary`\n\n/** `statusStyle` names Nuxt UI text colors: the shadcn counterparts (`--sk-info` and `--sk-success` come from the token stylesheets). */\nconst STATUS_COLOR: Record<string, string> = {\n 'text-muted': 'text-muted-foreground',\n 'text-info': 'text-(--sk-info)',\n 'text-success': 'text-(--sk-success)',\n 'text-dimmed': 'text-muted-foreground/70',\n}\n\n/** Scale and fade in from the icon (`transform-origin` is Radix's), a bit longer than the default; `composites.css` defines the keyframes and the reduced-motion override. */\nconst DETAILS_POPOVER = 'w-auto gap-0 p-0 composite-popover data-[state=open]:animate-[composite-pop-in_160ms_var(--ease-out)] data-[state=closed]:animate-[composite-pop-out_120ms_var(--ease-out)]'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,gBAAgB,EAAE,UAA8B;CAC9D,MAAM,EAAE,SAAS,iBAAiB,MAAM;CACxC,MAAM,EAAE,MAAM,SAAS,UAAU,oBAAoB,QAAQ,IAAI;CAGjE,MAAM,CAAC,UAAU,eAAe,eAAe,CAAC,OAAO,eAAe,OAAO,UAAU;CACvF,gBAAgB;EACd,MAAM,aAAa,YAAY,CAAC,OAAO,eAAe,OAAO,UAAU;EACvE,KAAK;EACL,OAAO,GAAG,eAAe,IAAI;EAC7B,aAAa;GACX,OAAO,IAAI,eAAe,IAAI;EAChC;CACF,GAAG,CAAC,MAAM,CAAC;CAEX,MAAM,EAAE,aAAa,kBAAkB;CACvC,MAAM,EAAE,MAAM,cAAc;CAC5B,MA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qBAAD;OAA6B;OAAQ,KAAK,KAAK;MAAM,CAAA;KAClD,CAAA;IACS,CAAA,CACT,EAAA,CAAA;GAER;EAEC,CAAA,CAAA,EAAA,GA1JK,KAAK,IAAI,GA0Jd,CACX;CACE,CAAA,GACL,IACF;AACF;AAEA,MAAM,0BAA+B,IAAI,IAAI;;AAG7C,MAAM,aAAa;AAEnB,MAAM,OAAO;AACb,MAAM,cAAc,GAAG,KAAK;;AAG5B,MAAM,eAAuC;CAC3C,cAAc;CACd,aAAa;CACb,gBAAgB;CAChB,eAAe;AACjB;;AAGA,MAAM,kBAAkB"}
@@ -17,11 +17,13 @@ function CompositeView({ editor, node, selected }) {
17
17
  const collapsed = typeof id === "string" && id !== "" && derivationOf(node) !== null && !expanded.has(id);
18
18
  const basket = basketOf(node);
19
19
  const basketColor = compositeBasketsOf(editor).find((candidate) => candidate.id === basket)?.color;
20
+ const kindTone = kind.chrome?.tone || void 0;
20
21
  const revealedTitles = useStore(editor.storage.composite.revealedTitles);
21
22
  const titleHidden = titleHiddenOf(node) && !(typeof id === "string" && revealedTitles.has(id));
22
23
  const placeholderVars = {
23
24
  "--composite-title-placeholder": cssString(kind.titlePlaceholder),
24
- ...basketColor ? { "--sk-basket-color": basketColor } : {}
25
+ ...basketColor ? { "--sk-basket-color": basketColor } : {},
26
+ ...kindTone ? { "--sk-kind-tone": kindTone } : {}
25
27
  };
26
28
  return /* @__PURE__ */ jsxs(NodeViewWrapper, {
27
29
  as: "section",
@@ -30,6 +32,7 @@ function CompositeView({ editor, node, selected }) {
30
32
  "data-kind": node.attrs.kind,
31
33
  "data-id": node.attrs.id || void 0,
32
34
  "data-basket": basket ?? void 0,
35
+ "data-kind-tone": kindTone ? "" : void 0,
33
36
  "data-title-hidden": titleHidden ? "" : void 0,
34
37
  style: placeholderVars,
35
38
  children: [/* @__PURE__ */ jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeView.js","names":[],"sources":["../../../../src/features/composites/react/CompositeView.tsx"],"sourcesContent":["import { NodeViewContent, NodeViewWrapper, type NodeViewProps } from '@tiptap/react'\nimport type { CSSProperties } from 'react'\nimport { cn } from '../../../react/ui/utils'\nimport { basketOf, titleHiddenOf } from '../baskets'\nimport { compositeKind } from '../kinds'\nimport { useStore } from '../../../react/use-store'\nimport { derivationOf } from '../derivation'\nimport { compositeBasketsOf, compositeKindsOf } from '../nodes'\n\n/** `text` as a CSS string literal (for `content:`). */\nconst cssString = (text: string) => `\"${text.replace(/[\"\\\\]/g, '\\\\$&').replace(/\\n/g, '\\\\a ')}\"`\n\n/** The composite block: the section with its content. The kind icon is drawn by the composite chrome overlay. */\nexport function CompositeView({ editor, node, selected }: NodeViewProps) {\n const kind = compositeKind(compositeKindsOf(editor), String(node.attrs.kind))\n // A derived Baustein (one with a `meta.derivation`) shows collapsed to a faded preview until it is opened; the content\n // stays laid out (CSS clips it), so editing positions are unaffected. The chrome's chevron and a caret inside open it.\n const expanded = useStore(editor.storage.composite.expanded)\n const id: unknown = node.attrs.id\n const collapsed = typeof id === 'string' && id !== '' && derivationOf(node) !== null && !expanded.has(id)\n // Colour basket (`meta.basket`): `data-basket` carries the id, the stripe takes the basket's colour from `--sk-basket-color`.\n const basket = basketOf(node)\n const basketColor = compositeBasketsOf(editor).find(candidate => candidate.id === basket)?.color\n // A hidden title (`meta.titleHidden`) stays hidden until a caret enters it (`revealedTitles`, see `CompositeNode`).\n const revealedTitles = useStore(editor.storage.composite.revealedTitles)\n const titleHidden = titleHiddenOf(node) && !(typeof id === 'string' && revealedTitles.has(id))\n // Placeholder of the empty title (composites.css `content: var(…)`); a nested composite sets its own.\n const placeholderVars = {\n '--composite-title-placeholder': cssString(kind.titlePlaceholder),\n ...(basketColor ? { '--sk-basket-color': basketColor } : {}),\n } as CSSProperties\n return (\n <NodeViewWrapper\n as=\"section\"\n className={cn('composite', collapsed && 'is-collapsed', selected && 'is-selected rounded-md ring-1 ring-primary')}\n data-type=\"composite\"\n data-kind={node.attrs.kind}\n data-id={node.attrs.id || undefined}\n data-basket={basket ?? undefined}\n data-title-hidden={titleHidden ? '' : undefined}\n style={placeholderVars}\n >\n {/* Anchor of the kind icon on the left border: it only takes the icon's place and size. The composite chrome overlay\n measures it and draws the icon as the button that opens the details popover and drags the composite. */}\n <span className=\"composite__toggle\" contentEditable={false} aria-hidden=\"true\" />\n <NodeViewContent className=\"composite__content\" />\n </NodeViewWrapper>\n )\n}\n"],"mappings":";;;;;;;;;;AAUA,MAAM,aAAa,SAAiB,IAAI,KAAK,QAAQ,UAAU,MAAM,CAAC,CAAC,QAAQ,OAAO,MAAM,EAAE;;AAG9F,SAAgB,cAAc,EAAE,QAAQ,MAAM,YAA2B;CACvE,MAAM,OAAO,cAAc,iBAAiB,MAAM,GAAG,OAAO,KAAK,MAAM,IAAI,CAAC;CAG5E,MAAM,WAAW,SAAS,OAAO,QAAQ,UAAU,QAAQ;CAC3D,MAAM,KAAc,KAAK,MAAM;CAC/B,MAAM,YAAY,OAAO,OAAO,YAAY,OAAO,MAAM,aAAa,IAAI,MAAM,QAAQ,CAAC,SAAS,IAAI,EAAE;CAExG,MAAM,SAAS,SAAS,IAAI;CAC5B,MAAM,cAAc,mBAAmB,MAAM,CAAC,CAAC,MAAK,cAAa,UAAU,OAAO,MAAM,CAAC,EAAE;CAE3F,MAAM,iBAAiB,SAAS,OAAO,QAAQ,UAAU,cAAc;CACvE,MAAM,cAAc,cAAc,IAAI,KAAK,EAAE,OAAO,OAAO,YAAY,eAAe,IAAI,EAAE;CAE5F,MAAM,kBAAkB;EACtB,iCAAiC,UAAU,KAAK,gBAAgB;EAChE,GAAI,cAAc,EAAE,qBAAqB,YAAY,IAAI,CAAC;CAC5D;CACA,OACE,qBAAC,iBAAD;EACE,IAAG;EACH,WAAW,GAAG,aAAa,aAAa,gBAAgB,YAAY,4CAA4C;EAChH,aAAU;EACV,aAAW,KAAK,MAAM;EACtB,WAAS,KAAK,MAAM,MAAM,KAAA;EAC1B,eAAa,UAAU,KAAA;EACvB,qBAAmB,cAAc,KAAK,KAAA;EACtC,OAAO;EART,UAAA,CAYE,oBAAC,QAAD;GAAM,WAAU;GAAoB,iBAAiB;GAAO,eAAY;EAAQ,CAAA,GAChF,oBAAC,iBAAD,EAAiB,WAAU,qBAAsB,CAAA,CAClC;;AAErB"}
1
+ {"version":3,"file":"CompositeView.js","names":[],"sources":["../../../../src/features/composites/react/CompositeView.tsx"],"sourcesContent":["import { NodeViewContent, NodeViewWrapper, type NodeViewProps } from '@tiptap/react'\nimport type { CSSProperties } from 'react'\nimport { cn } from '../../../react/ui/utils'\nimport { basketOf, titleHiddenOf } from '../baskets'\nimport { compositeKind } from '../kinds'\nimport { useStore } from '../../../react/use-store'\nimport { derivationOf } from '../derivation'\nimport { compositeBasketsOf, compositeKindsOf } from '../nodes'\n\n/** `text` as a CSS string literal (for `content:`). */\nconst cssString = (text: string) => `\"${text.replace(/[\"\\\\]/g, '\\\\$&').replace(/\\n/g, '\\\\a ')}\"`\n\n/** The composite block: the section with its content. The kind icon is drawn by the composite chrome overlay. */\nexport function CompositeView({ editor, node, selected }: NodeViewProps) {\n const kind = compositeKind(compositeKindsOf(editor), String(node.attrs.kind))\n // A derived Baustein (one with a `meta.derivation`) shows collapsed to a faded preview until it is opened; the content\n // stays laid out (CSS clips it), so editing positions are unaffected. The chrome's chevron and a caret inside open it.\n const expanded = useStore(editor.storage.composite.expanded)\n const id: unknown = node.attrs.id\n const collapsed = typeof id === 'string' && id !== '' && derivationOf(node) !== null && !expanded.has(id)\n // Colour basket (`meta.basket`): `data-basket` carries the id, the stripe takes the basket's colour from `--sk-basket-color`.\n const basket = basketOf(node)\n const basketColor = compositeBasketsOf(editor).find(candidate => candidate.id === basket)?.color\n // Kind tone (`CompositeKind.chrome.tone`): `data-kind-tone` marks the wrapper, the surface reads the colour from `--sk-kind-tone`.\n const kindTone = kind.chrome?.tone || undefined\n // A hidden title (`meta.titleHidden`) stays hidden until a caret enters it (`revealedTitles`, see `CompositeNode`).\n const revealedTitles = useStore(editor.storage.composite.revealedTitles)\n const titleHidden = titleHiddenOf(node) && !(typeof id === 'string' && revealedTitles.has(id))\n // Placeholder of the empty title (composites.css `content: var(…)`); a nested composite sets its own.\n const placeholderVars = {\n '--composite-title-placeholder': cssString(kind.titlePlaceholder),\n ...(basketColor ? { '--sk-basket-color': basketColor } : {}),\n ...(kindTone ? { '--sk-kind-tone': kindTone } : {}),\n } as CSSProperties\n return (\n <NodeViewWrapper\n as=\"section\"\n className={cn('composite', collapsed && 'is-collapsed', selected && 'is-selected rounded-md ring-1 ring-primary')}\n data-type=\"composite\"\n data-kind={node.attrs.kind}\n data-id={node.attrs.id || undefined}\n data-basket={basket ?? undefined}\n data-kind-tone={kindTone ? '' : undefined}\n data-title-hidden={titleHidden ? '' : undefined}\n style={placeholderVars}\n >\n {/* Anchor of the kind icon on the left border: it only takes the icon's place and size. The composite chrome overlay\n measures it and draws the icon as the button that opens the details popover and drags the composite. */}\n <span className=\"composite__toggle\" contentEditable={false} aria-hidden=\"true\" />\n <NodeViewContent className=\"composite__content\" />\n </NodeViewWrapper>\n )\n}\n"],"mappings":";;;;;;;;;;AAUA,MAAM,aAAa,SAAiB,IAAI,KAAK,QAAQ,UAAU,MAAM,CAAC,CAAC,QAAQ,OAAO,MAAM,EAAE;;AAG9F,SAAgB,cAAc,EAAE,QAAQ,MAAM,YAA2B;CACvE,MAAM,OAAO,cAAc,iBAAiB,MAAM,GAAG,OAAO,KAAK,MAAM,IAAI,CAAC;CAG5E,MAAM,WAAW,SAAS,OAAO,QAAQ,UAAU,QAAQ;CAC3D,MAAM,KAAc,KAAK,MAAM;CAC/B,MAAM,YAAY,OAAO,OAAO,YAAY,OAAO,MAAM,aAAa,IAAI,MAAM,QAAQ,CAAC,SAAS,IAAI,EAAE;CAExG,MAAM,SAAS,SAAS,IAAI;CAC5B,MAAM,cAAc,mBAAmB,MAAM,CAAC,CAAC,MAAK,cAAa,UAAU,OAAO,MAAM,CAAC,EAAE;CAE3F,MAAM,WAAW,KAAK,QAAQ,QAAQ,KAAA;CAEtC,MAAM,iBAAiB,SAAS,OAAO,QAAQ,UAAU,cAAc;CACvE,MAAM,cAAc,cAAc,IAAI,KAAK,EAAE,OAAO,OAAO,YAAY,eAAe,IAAI,EAAE;CAE5F,MAAM,kBAAkB;EACtB,iCAAiC,UAAU,KAAK,gBAAgB;EAChE,GAAI,cAAc,EAAE,qBAAqB,YAAY,IAAI,CAAC;EAC1D,GAAI,WAAW,EAAE,kBAAkB,SAAS,IAAI,CAAC;CACnD;CACA,OACE,qBAAC,iBAAD;EACE,IAAG;EACH,WAAW,GAAG,aAAa,aAAa,gBAAgB,YAAY,4CAA4C;EAChH,aAAU;EACV,aAAW,KAAK,MAAM;EACtB,WAAS,KAAK,MAAM,MAAM,KAAA;EAC1B,eAAa,UAAU,KAAA;EACvB,kBAAgB,WAAW,KAAK,KAAA;EAChC,qBAAmB,cAAc,KAAK,KAAA;EACtC,OAAO;EATT,UAAA,CAaE,oBAAC,QAAD;GAAM,WAAU;GAAoB,iBAAiB;GAAO,eAAY;EAAQ,CAAA,GAChF,oBAAC,iBAAD,EAAiB,WAAU,qBAAsB,CAAA,CAClC;;AAErB"}
@@ -29,6 +29,8 @@ export interface CompositeRow {
29
29
  fields: readonly CompositeMetaField[];
30
30
  /** `false` when the composite's kind hides its tag row (`CompositeKind.chrome.tags === false`): chips, the add-tag control and the tags field stay away. */
31
31
  tagsVisible: boolean;
32
+ /** `false` when the composite's kind has `chrome.controls === false`: its chrome (basket, status, title visibility, tags, drag handle) is read-only even in an editable editor. */
33
+ controls: boolean;
32
34
  /** Nesting level among composites, 0 = outermost. */
33
35
  depth: number;
34
36
  }
@@ -43,6 +43,7 @@ function compositeRows(doc, kinds) {
43
43
  meta: node.attrs.meta ?? {},
44
44
  fields: kind.fields,
45
45
  tagsVisible: kind.chrome?.tags !== false,
46
+ controls: kind.chrome?.controls !== false,
46
47
  depth
47
48
  };
48
49
  rows.push(row);
@@ -1 +1 @@
1
- {"version":3,"file":"rows.js","names":[],"sources":["../../../src/features/composites/rows.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport type { Node as PMNode } from '@tiptap/pm/model'\nimport { blockIdOf, findBlockById } from '../../core/schema'\nimport { type CompositeKind, type CompositeMetaField, compositeKind } from './kinds'\nimport { referenceLabel, referenceTarget } from './reference-label'\n\n/** One composite („Baustein“) of a document with its metadata, flattened in document order. */\nexport interface CompositeRow {\n /** Block ID, or `pos:<pos>` for a composite without one yet; unique within the document. */\n key: string\n id: string | null\n /** Position of the composite when the row was read; the write helpers re-resolve it, so a stale value is safe. */\n pos: number\n /** Position right after the composite, as of when the row was read. */\n end: number\n kind: string\n kindLabel: string\n icon: string\n /** Title text, empty for an untitled composite. */\n title: string\n /** Text of the description (summary), empty when there is none. */\n description: string\n /**\n * The description holds text only (marks such as bold, author or comment allowed, no mentions or tags); only then\n * can `setCompositeDescription` write it without losing inline content.\n */\n descriptionTextOnly: boolean\n tags: string[]\n meta: Record<string, unknown>\n /** The meta fields of the composite's kind. */\n fields: readonly CompositeMetaField[]\n /** `false` when the composite's kind hides its tag row (`CompositeKind.chrome.tags === false`): chips, the add-tag control and the tags field stay away. */\n tagsVisible: boolean\n /** Nesting level among composites, 0 = outermost. */\n depth: number\n}\n\n/** A distinct `@mention` chip of a document. */\nexport interface CompositeMention {\n id: string\n label: string\n color: string | null\n}\n\n/** A reference to a Baustein: a `reference` chip in the text of block `from`, or a `reference` field of the Baustein `from`. */\nexport interface CompositeReference {\n /** Block ID of the referenced Baustein. */\n target: string\n /** Block ID of the nearest block around the chip (the Baustein itself for a field); `null` when that block has no ID yet. */\n from: string | null\n /** The chip's locator (`S. 12`, `03:14`); `null` for a field or a chip without one. */\n locator: string | null\n}\n\nconst COMPOSITE = 'composite'\n\n/** True when `node`'s content is empty or text only (with any marks, but no inline nodes such as mentions or tags). */\nfunction isTextOnly(node: PMNode): boolean {\n let textOnly = true\n node.forEach((child) => {\n if (!child.isText) textOnly = false\n })\n return textOnly\n}\n\n/**\n * Reads every composite of `doc` (also inside quotes and lists) as a row, in document order, the distinct\n * `@mention` chips anywhere in the document and every reference (`reference` chips and `reference` fields) in document\n * order. Unknown kinds get the `section` kind's presentation under their own ID.\n */\nexport function compositeRows(doc: PMNode, kinds: readonly CompositeKind[]): { rows: CompositeRow[], mentions: CompositeMention[], references: CompositeReference[] } {\n const rows: CompositeRow[] = []\n const mentions = new Map<string, CompositeMention>()\n const references: CompositeReference[] = []\n\n function walk(parent: PMNode, start: number, depth: number, block: string | null) {\n parent.forEach((node, offset) => {\n const pos = start + offset\n if (node.type.name === COMPOSITE) {\n const kind = compositeKind(kinds, String(node.attrs.kind))\n const id = blockIdOf(node)\n const tags: unknown = node.maybeChild(2)?.attrs.tags\n const description = node.maybeChild(1)\n const row: CompositeRow = {\n key: id ?? `pos:${pos}`,\n id,\n pos,\n end: pos + node.nodeSize,\n kind: kind.id,\n kindLabel: kind.label,\n icon: kind.icon,\n title: node.firstChild?.textContent.trim() ?? '',\n description: description?.textContent ?? '',\n descriptionTextOnly: description ? isTextOnly(description) : true,\n tags: Array.isArray(tags) ? tags.filter((tag): tag is string => typeof tag === 'string') : [],\n meta: (node.attrs.meta ?? {}) as Record<string, unknown>,\n fields: kind.fields,\n tagsVisible: kind.chrome?.tags !== false,\n depth,\n }\n rows.push(row)\n for (const field of kind.fields) {\n const value = field.type === 'reference' ? row.meta[field.key] : undefined\n if (typeof value === 'string' && value) references.push({ target: value, from: id, locator: null })\n }\n walk(node, pos + 1, depth + 1, id ?? block)\n }\n else if (node.type.name === 'reference') {\n const target = String(node.attrs.target ?? '')\n if (target) references.push({ target, from: block, locator: typeof node.attrs.locator === 'string' && node.attrs.locator ? node.attrs.locator : null })\n }\n else if (node.type.name === 'mention') {\n const mentionId = String(node.attrs.id ?? '')\n if (mentionId && !mentions.has(mentionId)) {\n mentions.set(mentionId, {\n id: mentionId,\n label: String(node.attrs.label ?? mentionId),\n color: typeof node.attrs.color === 'string' ? node.attrs.color : null,\n })\n }\n }\n else if (!node.isLeaf) {\n walk(node, pos + 1, depth, blockIdOf(node) ?? block)\n }\n })\n }\n walk(doc, 0, 0, null)\n return { rows, mentions: [...mentions.values()], references }\n}\n\n/** A place that refers to a Baustein: the block holding the chip (or the Baustein with the field) and a short text of it. */\nexport interface CompositeBacklink {\n from: string\n locator: string | null\n excerpt: string\n}\n\nconst EXCERPT_LENGTH = 40\n\n/** The text of `node` as read on screen: inline atoms count as their label (`@name`, `#tag`, a reference chip's short citation + locator), not as nothing. */\nfunction visibleText(doc: PMNode, kinds: readonly CompositeKind[], node: PMNode): string {\n return node.textBetween(0, node.content.size, ' ', (leaf) => {\n const attrs = leaf.attrs\n switch (leaf.type.name) {\n case 'mention': return `@${String(attrs.label ?? attrs.id ?? '')}`\n case 'tag': return `#${String(attrs.name ?? '')}`\n case 'reference': {\n const target = findBlockById(doc, String(attrs.target ?? ''))\n const label = target?.node.type.name === COMPOSITE ? referenceLabel(referenceTarget(target.node, kinds)) : String(attrs.label ?? '')\n return typeof attrs.locator === 'string' && attrs.locator ? `${label}, ${attrs.locator}` : label\n }\n default: return ''\n }\n })\n}\n\n/** Every reference to the Baustein `target` in document order; references whose enclosing block has no ID (or is gone) are left out, as nothing could reveal them. */\nexport function compositeBacklinks(doc: PMNode, kinds: readonly CompositeKind[], target: string): CompositeBacklink[] {\n const links: CompositeBacklink[] = []\n for (const reference of compositeRows(doc, kinds).references) {\n if (reference.target !== target || !reference.from) continue\n const found = findBlockById(doc, reference.from)\n if (!found) continue\n const source = found.node.type.name === COMPOSITE ? found.node.firstChild : found.node\n const text = source ? visibleText(doc, kinds, source).trim() : ''\n links.push({ from: reference.from, locator: reference.locator, excerpt: text.length > EXCERPT_LENGTH ? `${text.slice(0, EXCERPT_LENGTH)}…` : text })\n }\n return links\n}\n\n/** The innermost row around document position `pos`, `null` outside of any composite. */\nexport function compositeRowAt(rows: readonly CompositeRow[], pos: number): CompositeRow | null {\n let found: CompositeRow | null = null\n // Pre-order: the last match is the innermost composite.\n for (const row of rows) {\n if (row.pos <= pos && pos < row.end) found = row\n }\n return found\n}\n\n/**\n * The composite `row` stands for in `doc`: by block ID, else (the row has no ID yet) by its position.\n * Positions are re-resolved on every call, so a stale `row.pos` is safe for rows with an ID.\n */\nexport function compositeOfRow(doc: PMNode, row: Pick<CompositeRow, 'id' | 'pos'>): { pos: number, node: PMNode } | null {\n if (row.id) {\n const found = findBlockById(doc, row.id)\n return found?.node.type.name === COMPOSITE ? found : null\n }\n const node = doc.nodeAt(row.pos)\n return node?.type.name === COMPOSITE ? { pos: row.pos, node } : null\n}\n\n/**\n * `meta` with `value` stored under `field.key`: a number field converts a numeric string, an empty value (`''`,\n * `null`, `undefined`, `NaN`) removes the key. A `multiselect` field keeps the string entries of an array value and\n * removes the key when none is left. Returns a new object; `meta` is not changed.\n */\nexport function compositeMetaWith(meta: Record<string, unknown>, field: Pick<CompositeMetaField, 'key' | 'type'>, value: unknown): Record<string, unknown> {\n const next = { ...meta }\n if (field.type === 'multiselect') {\n const chosen = Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : []\n if (chosen.length) next[field.key] = chosen\n else delete next[field.key]\n return next\n }\n const stored = field.type === 'number' && typeof value === 'string' && value !== '' ? Number(value) : value\n if (stored === '' || stored === null || stored === undefined || Number.isNaN(stored)) delete next[field.key]\n else next[field.key] = stored\n return next\n}\n\n/** Stores `value` under the meta field `key` of the row's composite (see `compositeMetaWith`), in one transaction. */\nexport function setCompositeMetaField(editor: Editor, row: Pick<CompositeRow, 'id' | 'pos' | 'fields'>, key: string, value: unknown): boolean {\n const field = row.fields.find(candidate => candidate.key === key) ?? { key, type: 'text' as const }\n return editor.commands.command(({ tr }) => {\n const found = compositeOfRow(tr.doc, row)\n if (!found) return false\n tr.setNodeMarkup(found.pos, undefined, { ...found.node.attrs, meta: compositeMetaWith(found.node.attrs.meta ?? {}, field, value) })\n return true\n })\n}\n\n/** Replaces the tags row of the row's composite (empty names are dropped), in one transaction. */\nexport function setCompositeTags(editor: Editor, row: Pick<CompositeRow, 'id' | 'pos'>, tags: readonly string[]): boolean {\n return editor.commands.command(({ tr }) => {\n const found = compositeOfRow(tr.doc, row)\n const title = found?.node.maybeChild(0)\n const description = found?.node.maybeChild(1)\n const tagsNode = found?.node.maybeChild(2)\n if (!found || !title || !description || tagsNode?.type.name !== 'compositeTags') return false\n const tagsPos = found.pos + 1 + title.nodeSize + description.nodeSize\n tr.setNodeMarkup(tagsPos, undefined, { ...tagsNode.attrs, tags: tags.filter(tag => tag) })\n return true\n })\n}\n\n/** The text `setCompositeDescription` stores for `text`: the description is one line, so line breaks collapse to spaces. */\nexport function compositeDescriptionText(text: string): string {\n return text.replace(/\\s*\\n\\s*/g, ' ').trim()\n}\n\n/**\n * Sets the text of the row's composite description to `compositeDescriptionText(text)`; an empty text empties it.\n * Only the changed span is replaced, so marks on the unchanged text (bold, author, comment) stay. Refuses (`false`)\n * when the description holds a mention or tag (it would be lost), and, when `expected` is given, when the\n * description no longer holds that text (a peer changed it since the caller read it; writing would drop that change).\n */\nexport function setCompositeDescription(editor: Editor, row: Pick<CompositeRow, 'id' | 'pos'>, text: string, expected?: string): boolean {\n const value = compositeDescriptionText(text)\n return editor.commands.command(({ tr }) => {\n const found = compositeOfRow(tr.doc, row)\n const title = found?.node.maybeChild(0)\n const description = found?.node.maybeChild(1)\n if (!found || !title || !description || description.type.name !== 'compositeDescription') return false\n if (!isTextOnly(description)) return false\n const current = description.textContent\n if (expected !== undefined && current !== expected) return false\n if (current === value) return true\n // Text only: every character is one position. Keep the common prefix and suffix, replace what lies between.\n let prefix = 0\n const max = Math.min(current.length, value.length)\n while (prefix < max && current[prefix] === value[prefix]) prefix++\n let suffix = 0\n while (suffix < max - prefix && current[current.length - 1 - suffix] === value[value.length - 1 - suffix]) suffix++\n const start = found.pos + 1 + title.nodeSize + 1\n // `insertText` with an empty text deletes the range; inserted text takes the marks at its start, as typing does.\n tr.insertText(value.slice(prefix, value.length - suffix), start + prefix, start + current.length - suffix)\n return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AACH"}
1
+ {"version":3,"file":"rows.js","names":[],"sources":["../../../src/features/composites/rows.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core'\nimport type { Node as PMNode } from '@tiptap/pm/model'\nimport { blockIdOf, findBlockById } from '../../core/schema'\nimport { type CompositeKind, type CompositeMetaField, compositeKind } from './kinds'\nimport { referenceLabel, referenceTarget } from './reference-label'\n\n/** One composite („Baustein“) of a document with its metadata, flattened in document order. */\nexport interface CompositeRow {\n /** Block ID, or `pos:<pos>` for a composite without one yet; unique within the document. */\n key: string\n id: string | null\n /** Position of the composite when the row was read; the write helpers re-resolve it, so a stale value is safe. */\n pos: number\n /** Position right after the composite, as of when the row was read. */\n end: number\n kind: string\n kindLabel: string\n icon: string\n /** Title text, empty for an untitled composite. */\n title: string\n /** Text of the description (summary), empty when there is none. */\n description: string\n /**\n * The description holds text only (marks such as bold, author or comment allowed, no mentions or tags); only then\n * can `setCompositeDescription` write it without losing inline content.\n */\n descriptionTextOnly: boolean\n tags: string[]\n meta: Record<string, unknown>\n /** The meta fields of the composite's kind. */\n fields: readonly CompositeMetaField[]\n /** `false` when the composite's kind hides its tag row (`CompositeKind.chrome.tags === false`): chips, the add-tag control and the tags field stay away. */\n tagsVisible: boolean\n /** `false` when the composite's kind has `chrome.controls === false`: its chrome (basket, status, title visibility, tags, drag handle) is read-only even in an editable editor. */\n controls: boolean\n /** Nesting level among composites, 0 = outermost. */\n depth: number\n}\n\n/** A distinct `@mention` chip of a document. */\nexport interface CompositeMention {\n id: string\n label: string\n color: string | null\n}\n\n/** A reference to a Baustein: a `reference` chip in the text of block `from`, or a `reference` field of the Baustein `from`. */\nexport interface CompositeReference {\n /** Block ID of the referenced Baustein. */\n target: string\n /** Block ID of the nearest block around the chip (the Baustein itself for a field); `null` when that block has no ID yet. */\n from: string | null\n /** The chip's locator (`S. 12`, `03:14`); `null` for a field or a chip without one. */\n locator: string | null\n}\n\nconst COMPOSITE = 'composite'\n\n/** True when `node`'s content is empty or text only (with any marks, but no inline nodes such as mentions or tags). */\nfunction isTextOnly(node: PMNode): boolean {\n let textOnly = true\n node.forEach((child) => {\n if (!child.isText) textOnly = false\n })\n return textOnly\n}\n\n/**\n * Reads every composite of `doc` (also inside quotes and lists) as a row, in document order, the distinct\n * `@mention` chips anywhere in the document and every reference (`reference` chips and `reference` fields) in document\n * order. Unknown kinds get the `section` kind's presentation under their own ID.\n */\nexport function compositeRows(doc: PMNode, kinds: readonly CompositeKind[]): { rows: CompositeRow[], mentions: CompositeMention[], references: CompositeReference[] } {\n const rows: CompositeRow[] = []\n const mentions = new Map<string, CompositeMention>()\n const references: CompositeReference[] = []\n\n function walk(parent: PMNode, start: number, depth: number, block: string | null) {\n parent.forEach((node, offset) => {\n const pos = start + offset\n if (node.type.name === COMPOSITE) {\n const kind = compositeKind(kinds, String(node.attrs.kind))\n const id = blockIdOf(node)\n const tags: unknown = node.maybeChild(2)?.attrs.tags\n const description = node.maybeChild(1)\n const row: CompositeRow = {\n key: id ?? `pos:${pos}`,\n id,\n pos,\n end: pos + node.nodeSize,\n kind: kind.id,\n kindLabel: kind.label,\n icon: kind.icon,\n title: node.firstChild?.textContent.trim() ?? '',\n description: description?.textContent ?? '',\n descriptionTextOnly: description ? isTextOnly(description) : true,\n tags: Array.isArray(tags) ? tags.filter((tag): tag is string => typeof tag === 'string') : [],\n meta: (node.attrs.meta ?? {}) as Record<string, unknown>,\n fields: kind.fields,\n tagsVisible: kind.chrome?.tags !== false,\n controls: kind.chrome?.controls !== false,\n depth,\n }\n rows.push(row)\n for (const field of kind.fields) {\n const value = field.type === 'reference' ? row.meta[field.key] : undefined\n if (typeof value === 'string' && value) references.push({ target: value, from: id, locator: null })\n }\n walk(node, pos + 1, depth + 1, id ?? block)\n }\n else if (node.type.name === 'reference') {\n const target = String(node.attrs.target ?? '')\n if (target) references.push({ target, from: block, locator: typeof node.attrs.locator === 'string' && node.attrs.locator ? node.attrs.locator : null })\n }\n else if (node.type.name === 'mention') {\n const mentionId = String(node.attrs.id ?? '')\n if (mentionId && !mentions.has(mentionId)) {\n mentions.set(mentionId, {\n id: mentionId,\n label: String(node.attrs.label ?? mentionId),\n color: typeof node.attrs.color === 'string' ? node.attrs.color : null,\n })\n }\n }\n else if (!node.isLeaf) {\n walk(node, pos + 1, depth, blockIdOf(node) ?? block)\n }\n })\n }\n walk(doc, 0, 0, null)\n return { rows, mentions: [...mentions.values()], references }\n}\n\n/** A place that refers to a Baustein: the block holding the chip (or the Baustein with the field) and a short text of it. */\nexport interface CompositeBacklink {\n from: string\n locator: string | null\n excerpt: string\n}\n\nconst EXCERPT_LENGTH = 40\n\n/** The text of `node` as read on screen: inline atoms count as their label (`@name`, `#tag`, a reference chip's short citation + locator), not as nothing. */\nfunction visibleText(doc: PMNode, kinds: readonly CompositeKind[], node: PMNode): string {\n return node.textBetween(0, node.content.size, ' ', (leaf) => {\n const attrs = leaf.attrs\n switch (leaf.type.name) {\n case 'mention': return `@${String(attrs.label ?? attrs.id ?? '')}`\n case 'tag': return `#${String(attrs.name ?? '')}`\n case 'reference': {\n const target = findBlockById(doc, String(attrs.target ?? ''))\n const label = target?.node.type.name === COMPOSITE ? referenceLabel(referenceTarget(target.node, kinds)) : String(attrs.label ?? '')\n return typeof attrs.locator === 'string' && attrs.locator ? `${label}, ${attrs.locator}` : label\n }\n default: return ''\n }\n })\n}\n\n/** Every reference to the Baustein `target` in document order; references whose enclosing block has no ID (or is gone) are left out, as nothing could reveal them. */\nexport function compositeBacklinks(doc: PMNode, kinds: readonly CompositeKind[], target: string): CompositeBacklink[] {\n const links: CompositeBacklink[] = []\n for (const reference of compositeRows(doc, kinds).references) {\n if (reference.target !== target || !reference.from) continue\n const found = findBlockById(doc, reference.from)\n if (!found) continue\n const source = found.node.type.name === COMPOSITE ? found.node.firstChild : found.node\n const text = source ? visibleText(doc, kinds, source).trim() : ''\n links.push({ from: reference.from, locator: reference.locator, excerpt: text.length > EXCERPT_LENGTH ? `${text.slice(0, EXCERPT_LENGTH)}…` : text })\n }\n return links\n}\n\n/** The innermost row around document position `pos`, `null` outside of any composite. */\nexport function compositeRowAt(rows: readonly CompositeRow[], pos: number): CompositeRow | null {\n let found: CompositeRow | null = null\n // Pre-order: the last match is the innermost composite.\n for (const row of rows) {\n if (row.pos <= pos && pos < row.end) found = row\n }\n return found\n}\n\n/**\n * The composite `row` stands for in `doc`: by block ID, else (the row has no ID yet) by its position.\n * Positions are re-resolved on every call, so a stale `row.pos` is safe for rows with an ID.\n */\nexport function compositeOfRow(doc: PMNode, row: Pick<CompositeRow, 'id' | 'pos'>): { pos: number, node: PMNode } | null {\n if (row.id) {\n const found = findBlockById(doc, row.id)\n return found?.node.type.name === COMPOSITE ? found : null\n }\n const node = doc.nodeAt(row.pos)\n return node?.type.name === COMPOSITE ? { pos: row.pos, node } : null\n}\n\n/**\n * `meta` with `value` stored under `field.key`: a number field converts a numeric string, an empty value (`''`,\n * `null`, `undefined`, `NaN`) removes the key. A `multiselect` field keeps the string entries of an array value and\n * removes the key when none is left. Returns a new object; `meta` is not changed.\n */\nexport function compositeMetaWith(meta: Record<string, unknown>, field: Pick<CompositeMetaField, 'key' | 'type'>, value: unknown): Record<string, unknown> {\n const next = { ...meta }\n if (field.type === 'multiselect') {\n const chosen = Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : []\n if (chosen.length) next[field.key] = chosen\n else delete next[field.key]\n return next\n }\n const stored = field.type === 'number' && typeof value === 'string' && value !== '' ? Number(value) : value\n if (stored === '' || stored === null || stored === undefined || Number.isNaN(stored)) delete next[field.key]\n else next[field.key] = stored\n return next\n}\n\n/** Stores `value` under the meta field `key` of the row's composite (see `compositeMetaWith`), in one transaction. */\nexport function setCompositeMetaField(editor: Editor, row: Pick<CompositeRow, 'id' | 'pos' | 'fields'>, key: string, value: unknown): boolean {\n const field = row.fields.find(candidate => candidate.key === key) ?? { key, type: 'text' as const }\n return editor.commands.command(({ tr }) => {\n const found = compositeOfRow(tr.doc, row)\n if (!found) return false\n tr.setNodeMarkup(found.pos, undefined, { ...found.node.attrs, meta: compositeMetaWith(found.node.attrs.meta ?? {}, field, value) })\n return true\n })\n}\n\n/** Replaces the tags row of the row's composite (empty names are dropped), in one transaction. */\nexport function setCompositeTags(editor: Editor, row: Pick<CompositeRow, 'id' | 'pos'>, tags: readonly string[]): boolean {\n return editor.commands.command(({ tr }) => {\n const found = compositeOfRow(tr.doc, row)\n const title = found?.node.maybeChild(0)\n const description = found?.node.maybeChild(1)\n const tagsNode = found?.node.maybeChild(2)\n if (!found || !title || !description || tagsNode?.type.name !== 'compositeTags') return false\n const tagsPos = found.pos + 1 + title.nodeSize + description.nodeSize\n tr.setNodeMarkup(tagsPos, undefined, { ...tagsNode.attrs, tags: tags.filter(tag => tag) })\n return true\n })\n}\n\n/** The text `setCompositeDescription` stores for `text`: the description is one line, so line breaks collapse to spaces. */\nexport function compositeDescriptionText(text: string): string {\n return text.replace(/\\s*\\n\\s*/g, ' ').trim()\n}\n\n/**\n * Sets the text of the row's composite description to `compositeDescriptionText(text)`; an empty text empties it.\n * Only the changed span is replaced, so marks on the unchanged text (bold, author, comment) stay. Refuses (`false`)\n * when the description holds a mention or tag (it would be lost), and, when `expected` is given, when the\n * description no longer holds that text (a peer changed it since the caller read it; writing would drop that change).\n */\nexport function setCompositeDescription(editor: Editor, row: Pick<CompositeRow, 'id' | 'pos'>, text: string, expected?: string): boolean {\n const value = compositeDescriptionText(text)\n return editor.commands.command(({ tr }) => {\n const found = compositeOfRow(tr.doc, row)\n const title = found?.node.maybeChild(0)\n const description = found?.node.maybeChild(1)\n if (!found || !title || !description || description.type.name !== 'compositeDescription') return false\n if (!isTextOnly(description)) return false\n const current = description.textContent\n if (expected !== undefined && current !== expected) return false\n if (current === value) return true\n // Text only: every character is one position. Keep the common prefix and suffix, replace what lies between.\n let prefix = 0\n const max = Math.min(current.length, value.length)\n while (prefix < max && current[prefix] === value[prefix]) prefix++\n let suffix = 0\n while (suffix < max - prefix && current[current.length - 1 - suffix] === value[value.length - 1 - suffix]) suffix++\n const start = found.pos + 1 + title.nodeSize + 1\n // `insertText` with an empty text deletes the range; inserted text takes the marks at its start, as typing does.\n tr.insertText(value.slice(prefix, value.length - suffix), start + prefix, start + current.length - suffix)\n return true\n })\n}\n"],"mappings":";;;;AAwDA,MAAM,YAAY;;AAGlB,SAAS,WAAW,MAAuB;CACzC,IAAI,WAAW;CACf,KAAK,SAAS,UAAU;EACtB,IAAI,CAAC,MAAM,QAAQ,WAAW;CAChC,CAAC;CACD,OAAO;AACT;;;;;;AAOA,SAAgB,cAAc,KAAa,OAA2H;CACpK,MAAM,OAAuB,CAAC;CAC9B,MAAM,2BAAW,IAAI,IAA8B;CACnD,MAAM,aAAmC,CAAC;CAE1C,SAAS,KAAK,QAAgB,OAAe,OAAe,OAAsB;EAChF,OAAO,SAAS,MAAM,WAAW;GAC/B,MAAM,MAAM,QAAQ;GACpB,IAAI,KAAK,KAAK,SAAS,WAAW;IAChC,MAAM,OAAO,cAAc,OAAO,OAAO,KAAK,MAAM,IAAI,CAAC;IACzD,MAAM,KAAK,UAAU,IAAI;IACzB,MAAM,OAAgB,KAAK,WAAW,CAAC,CAAC,EAAE,MAAM;IAChD,MAAM,cAAc,KAAK,WAAW,CAAC;IACrC,MAAM,MAAoB;KACxB,KAAK,MAAM,OAAO;KAClB;KACA;KACA,KAAK,MAAM,KAAK;KAChB,MAAM,KAAK;KACX,WAAW,KAAK;KAChB,MAAM,KAAK;KACX,OAAO,KAAK,YAAY,YAAY,KAAK,KAAK;KAC9C,aAAa,aAAa,eAAe;KACzC,qBAAqB,cAAc,WAAW,WAAW,IAAI;KAC7D,MAAM,MAAM,QAAQ,IAAI,IAAI,KAAK,QAAQ,QAAuB,OAAO,QAAQ,QAAQ,IAAI,CAAC;KAC5F,MAAO,KAAK,MAAM,QAAQ,CAAC;KAC3B,QAAQ,KAAK;KACb,aAAa,KAAK,QAAQ,SAAS;KACnC,UAAU,KAAK,QAAQ,aAAa;KACpC;IACF;IACA,KAAK,KAAK,GAAG;IAC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AQ,MAAM,MAAM,IAAI,MAAM,WAAW;EAE/C,GAAG,WAAW,MAAM,MAAM,QAAQ,MAAM,SAAS,MAAM,GAAG,QAAQ,QAAQ,QAAQ,QAAQ,SAAS,MAAM;EACzG,OAAO;CACT,CAAC;AACH"}
@@ -110,6 +110,7 @@ const de = {
110
110
  "composites.split.children": "In Unter-Bausteine teilen",
111
111
  "composites.split.lengthChildren": "Nach Länge in Unter-Bausteine teilen",
112
112
  "composites.split.lengthSiblings": "Nach Länge in Bausteine teilen",
113
+ "composites.merge.next": "Mit nächstem zusammenführen",
113
114
  "settings.editing.splitTargetChars": "Zielgröße beim Teilen (Zeichen)",
114
115
  "composites.toolbar.toKind": "In Baustein umwandeln",
115
116
  "composites.toolbar.structure": "Gliederung umwandeln",
@@ -1 +1 @@
1
- {"version":3,"file":"composites.js","names":[],"sources":["../../../src/i18n/de/composites.ts"],"sourcesContent":["export const de = {\n // Fallback title of an untitled Baustein (outline, table).\n 'composites.untitled': '(ohne Titel)',\n\n // Built-in kinds (`defaultCompositeKinds`): label, placeholders of the empty title/description, fields and their choices.\n 'composites.kind.section.label': 'Abschnitt',\n 'composites.kind.section.title': 'Überschrift',\n 'composites.kind.section.description': 'Zusammenfassung',\n 'composites.kind.task.label': 'Aufgabe',\n 'composites.kind.task.title': 'Aufgabe',\n 'composites.kind.task.description': 'Beschreibung',\n 'composites.kind.task.field.status': 'Status',\n 'composites.kind.task.status.open': 'Offen',\n 'composites.kind.task.status.doing': 'In Arbeit',\n 'composites.kind.task.status.done': 'Erledigt',\n 'composites.kind.task.field.due': 'Fällig',\n 'composites.kind.task.field.assignee': 'Zuständig',\n 'composites.kind.note.label': 'Notiz',\n 'composites.kind.note.title': 'Titel',\n 'composites.kind.note.description': 'Kurzbeschreibung',\n 'composites.kind.document.label': 'Dokument',\n 'composites.kind.document.title': 'Dokumentname',\n 'composites.kind.document.description': 'Zusammenfassung',\n 'composites.kind.document.field.filename': 'Dateiname',\n 'composites.kind.document.field.mimeType': 'Typ',\n 'composites.kind.document.field.size': 'Größe (Bytes)',\n 'composites.kind.document.field.importedAt': 'Importiert',\n 'composites.kind.recording.label': 'Aufnahme',\n 'composites.kind.recording.title': 'Titel der Aufnahme',\n 'composites.kind.recording.description': 'Zusammenfassung',\n 'composites.kind.recording.field.filename': 'Dateiname',\n 'composites.kind.recording.field.mimeType': 'Typ',\n 'composites.kind.recording.field.size': 'Größe (Bytes)',\n 'composites.kind.recording.field.importedAt': 'Importiert',\n 'composites.kind.recording.field.recordedAt': 'Aufgenommen am',\n 'composites.kind.recording.field.participants': 'Beteiligte',\n 'composites.kind.recording.field.durationSeconds': 'Dauer (Sekunden)',\n 'composites.kind.paper.label': 'Paper',\n 'composites.kind.paper.title': 'Titel der Arbeit',\n 'composites.kind.paper.description': 'Zusammenfassung',\n 'composites.kind.paper.field.filename': 'Dateiname',\n 'composites.kind.paper.field.mimeType': 'Typ',\n 'composites.kind.paper.field.size': 'Größe (Bytes)',\n 'composites.kind.paper.field.importedAt': 'Importiert',\n 'composites.kind.paper.field.bib': 'Literaturangabe',\n 'composites.kind.paper.field.doi': 'DOI',\n 'composites.kind.book.label': 'Buch',\n 'composites.kind.book.title': 'Buchtitel',\n 'composites.kind.book.description': 'Zusammenfassung',\n 'composites.kind.book.field.filename': 'Dateiname',\n 'composites.kind.book.field.mimeType': 'Typ',\n 'composites.kind.book.field.size': 'Größe (Bytes)',\n 'composites.kind.book.field.importedAt': 'Importiert',\n 'composites.kind.book.field.bib': 'Literaturangabe',\n 'composites.kind.book.field.isbn': 'ISBN',\n 'composites.kind.figure.label': 'Bild',\n 'composites.kind.figure.title': 'Bildtitel',\n 'composites.kind.figure.description': 'Bildbeschreibung',\n 'composites.kind.figure.field.filename': 'Dateiname',\n 'composites.kind.figure.field.mimeType': 'Typ',\n 'composites.kind.figure.field.size': 'Größe (Bytes)',\n 'composites.kind.figure.field.importedAt': 'Importiert',\n 'composites.kind.figure.field.credit': 'Quellenangabe',\n 'composites.kind.rendition.label': 'Lesefassung',\n 'composites.kind.rendition.title': 'Transkript, Volltext, Beschreibung …',\n 'composites.kind.rendition.description': 'Hinweis zur Entstehung',\n 'composites.kind.rendition.field.derivation': 'Herkunft',\n 'composites.kind.rendition.field.language': 'Sprache',\n /** Literature types of a `bibliography` field (CSL-JSON `type`). */\n 'composites.bib.type.article-journal': 'Zeitschriftenartikel',\n 'composites.bib.type.book': 'Buch',\n 'composites.bib.type.chapter': 'Buchkapitel',\n 'composites.bib.type.paper-conference': 'Konferenzbeitrag',\n 'composites.bib.type.thesis': 'Abschlussarbeit',\n 'composites.bib.type.report': 'Bericht',\n 'composites.bib.type.webpage': 'Webseite',\n 'composites.bib.type.article': 'Artikel',\n 'composites.bib.type.dataset': 'Datensatz',\n /** The `bibliography` field editor. */\n 'composites.bib.field.type': 'Art',\n 'composites.bib.field.authors': 'Autorinnen und Autoren',\n 'composites.bib.field.authorsHelp': 'Eine Person pro Zeile: Nachname, Vorname',\n 'composites.bib.field.year': 'Jahr',\n 'composites.bib.field.containerTitle': 'Zeitschrift / Sammelwerk',\n 'composites.bib.field.volume': 'Band',\n 'composites.bib.field.issue': 'Heft',\n 'composites.bib.field.page': 'Seiten',\n 'composites.bib.field.publisher': 'Verlag',\n 'composites.bib.field.doi': 'DOI',\n 'composites.bib.field.isbn': 'ISBN',\n 'composites.bib.field.url': 'URL',\n 'composites.bib.field.abstract': 'Kurzfassung',\n 'composites.bib.copyBibtex': 'BibTeX kopieren',\n 'composites.bib.copied': 'BibTeX kopiert',\n 'composites.bib.fetchDoi': 'DOI abrufen',\n 'composites.kind.folder.label': 'Ordner',\n 'composites.kind.folder.title': 'Ordnername',\n 'composites.kind.folder.description': 'Beschreibung',\n /** The select that changes a Baustein's kind (details popover, inspector). */\n 'composites.kind.select': 'Art des Bausteins',\n\n // Status chip.\n 'composites.status.none': 'Kein Status',\n 'composites.status.label': 'Status: {status}',\n\n // Feature: settings tab, `/` commands, block action, toolbar.\n 'composites.tab': 'Bearbeiten',\n 'composites.slash.section': 'Abschnitt',\n 'composites.slash.group': 'Überschriften in Bausteine',\n 'composites.slash.groupAll': 'Überschriften in Bausteine (verschachtelt)',\n 'composites.slash.flatten': 'Bausteine in Überschriften',\n 'composites.slash.flattenAll': 'Bausteine in Überschriften (alle Ebenen)',\n 'composites.blockAction.export': 'Als Markdown exportieren',\n 'composites.blockAction.bibtex': 'Literaturangabe exportieren (BibTeX)',\n // Splitting a Baustein (block actions) and the target size setting.\n 'composites.split.here': 'Baustein hier teilen',\n 'composites.split.children': 'In Unter-Bausteine teilen',\n 'composites.split.lengthChildren': 'Nach Länge in Unter-Bausteine teilen',\n 'composites.split.lengthSiblings': 'Nach Länge in Bausteine teilen',\n 'settings.editing.splitTargetChars': 'Zielgröße beim Teilen (Zeichen)',\n 'composites.toolbar.toKind': 'In Baustein umwandeln',\n 'composites.toolbar.structure': 'Gliederung umwandeln',\n 'composites.menu.kindHeading': 'Baustein',\n 'composites.menu.toComposites': 'Überschriften in Bausteine',\n 'composites.menu.toComposites.top': 'Nur oberste Ebene',\n 'composites.menu.toComposites.top.description': 'Nur die höchste Überschriftenebene wird zu Bausteinen',\n 'composites.menu.toComposites.all': 'Alle Ebenen (verschachtelt)',\n 'composites.menu.toComposites.all.description': 'Jede Überschriftenebene wird zu einem verschachtelten Baustein',\n 'composites.menu.toHeadings': 'Bausteine in Überschriften',\n 'composites.menu.toHeadings.top': 'Nur oberste Ebene',\n 'composites.menu.toHeadings.top.description': 'Die obersten Bausteine werden zu Überschriften; innere Bausteine bleiben',\n 'composites.menu.toHeadings.all': 'Alle Ebenen',\n 'composites.menu.toHeadings.all.description': 'Jeder Baustein wird zur Überschrift seiner Ebene; Beschreibung, Tags und Felder als Text',\n 'composites.menu.settings': 'Einstellungen…',\n 'composites.menu.preferred': 'Bevorzugt: {mode}',\n /** Conversion target label: the kind as a Baustein. */\n 'composites.convert.kind': '{kind} (Baustein)',\n\n // Chrome on the title line and the kind icon.\n 'composites.chrome.details': 'Art und Details: {kind}',\n 'composites.chrome.detailsDrag': 'Art und Details: {kind} · Ziehen zum Verschieben',\n 'composites.tag.remove': 'Tag #{tag} entfernen',\n 'composites.tag.add': 'Tag hinzufügen',\n\n // Tags editor (details popover, inspector).\n 'composites.tags.label': 'Tags',\n 'composites.tags.placeholder': 'Tags hinzufügen',\n 'composites.tags.create': '#{tag} erstellen',\n\n // Details popover.\n 'composites.details.confirmLost': 'Art wirklich ändern? Beim Wechsel zu „{kind}“ gehen diese Angaben verloren:',\n 'composites.details.confirm': 'Art wirklich ändern?',\n 'composites.details.cancel': 'Abbrechen',\n 'composites.details.change': 'Ändern',\n 'composites.details.summary': 'Zusammen\\u00ADfassung',\n\n // Reference chip (`[@`), locator and backlinks.\n 'composites.reference.insert': 'Verweis auf Baustein',\n 'composites.reference.empty': 'Keine passenden Bausteine',\n 'composites.reference.gone': 'Baustein gelöscht',\n 'composites.reference.locator': 'Stelle',\n 'composites.reference.locatorPlaceholder': 'Stelle, z. B. S. 12 oder 03:14',\n 'composites.reference.backlinks': 'Verweise',\n\n // Derived Bausteine (provenance badge, collapse toggle, details).\n 'composites.derivation.badge': 'abgeleitet',\n 'composites.derivation.stale': 'Quelle geändert',\n 'composites.derivation.foreign': 'aus anderem Dokument',\n 'composites.derivation.edited': 'bearbeitet',\n 'composites.derivation.expand': 'Abgeleiteten Inhalt aufklappen',\n 'composites.derivation.collapse': 'Abgeleiteten Inhalt zuklappen',\n 'composites.derivation.method': 'Methode',\n 'composites.derivation.model': 'Modell',\n 'composites.derivation.createdAt': 'Erzeugt',\n 'composites.derivation.openOutput': 'Original öffnen',\n 'composites.derivation.method.transcription': 'Transkription',\n 'composites.derivation.method.pdf-text': 'PDF-Text',\n 'composites.derivation.method.ocr': 'Texterkennung (OCR)',\n 'composites.derivation.method.description': 'Bildbeschreibung',\n 'composites.derivation.method.bibliography': 'Literaturangaben',\n 'composites.derivation.method.ai': 'KI-Ableitung',\n\n // Summary and field editors.\n 'composites.summary.placeholder': 'Kurze Zusammenfassung des Bausteins',\n 'composites.summary.label': 'Zusammenfassung',\n 'composites.summary.none': 'Keine Zusammenfassung',\n 'composites.summary.formatted': 'Enthält Formatierung oder Erwähnungen und lässt sich nur im Text bearbeiten.',\n 'composites.field.choose': '{field} wählen',\n 'composites.field.none': 'Keine Auswahl',\n\n // Inspector.\n 'composites.inspector.label': 'Eigenschaften',\n 'composites.inspector.document': 'Dokument',\n 'composites.inspector.composites': 'Bausteine',\n 'composites.inspector.summarized': '{n} von {total} zusammengefasst',\n 'composites.inspector.none': 'Keine',\n 'composites.inspector.mentions': 'Erwähnungen',\n 'composites.inspector.composite': 'Baustein',\n 'composites.inspector.kind': 'Art',\n 'composites.inspector.title': 'Titel',\n 'composites.inspector.titleHelp': 'Im Dokument bearbeiten',\n 'composites.inspector.untitled': 'Ohne Titel',\n 'composites.inspector.description': 'Beschreibung',\n 'composites.inspector.descriptionHelp': 'Enthält Erwähnungen oder Tags – im Dokument bearbeiten',\n 'composites.inspector.aiStatus': 'KI-Status',\n 'composites.inspector.summaryPresent': 'Zusammenfassung vorhanden',\n 'composites.inspector.summaryMissing': 'Zusammenfassung fehlt',\n\n // Table.\n 'composites.table.label': 'Bausteine als Tabelle',\n 'composites.table.emptyTitle': 'Dieses Dokument enthält noch keine Bausteine',\n 'composites.table.emptyText': 'Bausteine gliedern ein Dokument in Abschnitte, Aufgaben oder Notizen mit Titel, Zusammenfassung und Tags. Füge im Text über „/“ einen Baustein ein, dann erscheint er hier mit allen Angaben.',\n 'composites.table.column.composite': 'Baustein',\n 'composites.table.column.kind': 'Art',\n 'composites.table.column.tags': 'Tags',\n 'composites.table.column.summary': 'Zusammenfassung',\n 'composites.table.search.placeholder': 'Titel, Zusammenfassung, Tags',\n 'composites.table.search.label': 'Bausteine durchsuchen',\n 'composites.table.search.clear': 'Suche leeren',\n 'composites.table.filter.all': 'Alle',\n 'composites.table.filter.reset': 'Filter zurücksetzen',\n 'composites.table.filter.byKind': 'Nach Art filtern',\n 'composites.table.filter.byTag': 'Nach Tag filtern',\n 'composites.table.filter.noMatch': 'Kein Baustein passt zu diesen Filtern.',\n 'composites.table.count.one': '{n} von {total} Baustein',\n 'composites.table.count.other': '{n} von {total} Bausteinen',\n 'composites.table.noValue': 'Kein Wert',\n 'composites.table.noTags': 'Keine Tags',\n 'composites.table.summaryPresent': 'Zusammenfassung vorhanden',\n\n // Settings tab „Bearbeiten“.\n 'composites.settings.structure.title': 'Gliederung',\n 'composites.settings.structure.legend': 'Bevorzugte Gliederung',\n 'composites.settings.structure.flat.label': 'Überschriften',\n 'composites.settings.structure.flat.description': 'Werkzeugleiste mit Überschrift 1–3. KI-Texte werden flach mit Überschriften (##, ###) gegliedert; Bausteine, die die KI dennoch schreibt, werden zu Überschriften.',\n 'composites.settings.structure.composite.label': 'Bausteine',\n 'composites.settings.structure.composite.description': 'Werkzeugleiste ohne Überschrift 1–3. KI-Texte werden als Bausteine gegliedert, Unterabschnitte als verschachtelte Bausteine; Überschriften, die die KI dennoch schreibt, werden zu Bausteinen.',\n 'composites.settings.scope.legend': '„Gliederung umwandeln“ ohne Markierung bezieht sich auf',\n 'composites.settings.scope.container.label': 'Umgebender Baustein',\n 'composites.settings.scope.container.description': 'Den Baustein, in dem der Cursor steht; außerhalb von Bausteinen das ganze Dokument.',\n 'composites.settings.scope.document.label': 'Gesamtes Dokument',\n 'composites.settings.scope.document.description': 'Immer alle Blöcke des Dokuments.',\n 'composites.settings.scope.heading.label': 'Überschrift oder Baustein am Cursor',\n 'composites.settings.scope.heading.description': 'Beim Umwandeln in Bausteine: die Überschrift am oder vor dem Cursor mit ihrem Inhalt. Beim Umwandeln in Überschriften: der innerste Baustein um den Cursor.',\n 'composites.settings.sidebar.title': 'Seitenleiste',\n 'composites.settings.treeRoot.legend': 'Baum der Dokumente',\n 'composites.settings.treeRoot.folders.label': 'Ordner und Dateien verschachteln',\n 'composites.settings.treeRoot.folders.description': 'Die Seitenleiste zeigt die Ordner mit ihren Dateien; die geöffnete Datei steht als Eintrag darin.',\n 'composites.settings.treeRoot.file.label': 'Wurzel ist eine einzelne Datei',\n 'composites.settings.treeRoot.file.description': 'Ist eine Baustein-Datei geöffnet, zeigt die Seitenleiste sie als Wurzel mit ihren Ordnern und Dokumenten. Ohne geöffnete Baustein-Datei sind es die Ordner.',\n 'composites.settings.composites.title': 'Bausteine',\n 'composites.settings.defaultKind.label': 'Standard-Baustein',\n 'composites.settings.defaultKind.description': 'Art der Bausteine, die die Werkzeugleiste, „/“-Befehle und „Überschriften in Bausteine“ anlegen.',\n 'composites.settings.kindIcon.legend': 'Art-Symbol',\n 'composites.settings.kindIcon.always.label': 'Immer anzeigen',\n 'composites.settings.kindIcon.always.description': 'Das Symbol der Bausteinart steht dauerhaft vor dem Baustein.',\n 'composites.settings.kindIcon.hover.label': 'Nur beim Überfahren',\n 'composites.settings.kindIcon.hover.description': 'Das Symbol erscheint, wenn die Maus über dem Baustein steht, er den Fokus hat oder seine Details geöffnet sind.',\n 'composites.settings.dragHandle.legend': 'Ziehgriff (Blöcke ohne Symbol)',\n 'composites.settings.dragHandle.hover.label': 'Nur beim Überfahren',\n 'composites.settings.dragHandle.hover.description': 'Der Ziehgriff erscheint am Block unter der Maus.',\n 'composites.settings.dragHandle.always.label': 'Immer anzeigen',\n 'composites.settings.dragHandle.always.description': 'Jeder Block ohne Symbol zeigt seinen Ziehgriff dauerhaft.',\n\n // Accepted children per kind (`AcceptedChildren`, `moveIntoVerdict`): the notice of a refused edit and why a block cannot move.\n 'composites.nesting.title': 'Verschachtelung nicht möglich',\n 'composites.nesting.refused': '{parent} nimmt keine {child} auf.',\n 'composites.move.blockGone': 'Der Block existiert nicht mehr.',\n 'composites.move.targetGone': 'Das Ziel existiert nicht mehr.',\n 'composites.move.targetNotBlock': 'Das Ziel ist kein Baustein.',\n 'composites.move.intoSelf': 'Ein Block kann nicht in sich selbst verschoben werden.',\n 'composites.move.intoOwn': 'Ein Block kann nicht in einen Baustein verschoben werden, den er selbst enthält.',\n // Colour baskets of a Baustein and the hidden-title toggle in its chrome.\n 'composites.basket.label': 'Korb',\n 'composites.basket.none': 'Kein Korb',\n 'composites.basket.red': 'Rot',\n 'composites.basket.orange': 'Orange',\n 'composites.basket.yellow': 'Gelb',\n 'composites.basket.green': 'Grün',\n 'composites.basket.blue': 'Blau',\n 'composites.titleHidden.hide': 'Titel ausblenden',\n 'composites.titleHidden.show': 'Titel einblenden',\n // Focus mode: the block action, the chip while a Baustein is focused and its button.\n 'composites.focus.action': 'Fokussieren',\n 'composites.focus.leave': 'Fokus aufheben',\n 'composites.focus.chip': 'Fokus: {title}',\n 'composites.focus.release': 'Aufheben',\n} as const\n"],"mappings":";AAAA,MAAa,KAAK;CAEhB,uBAAuB;CAGvB,iCAAiC;CACjC,iCAAiC;CACjC,uCAAuC;CACvC,8BAA8B;CAC9B,8BAA8B;CAC9B,oCAAoC;CACpC,qCAAqC;CACrC,oCAAoC;CACpC,qCAAqC;CACrC,oCAAoC;CACpC,kCAAkC;CAClC,uCAAuC;CACvC,8BAA8B;CAC9B,8BAA8B;CAC9B,oCAAoC;CACpC,kCAAkC;CAClC,kCAAkC;CAClC,wCAAwC;CACxC,2CAA2C;CAC3C,2CAA2C;CAC3C,uCAAuC;CACvC,6CAA6C;CAC7C,mCAAmC;CACnC,mCAAmC;CACnC,yCAAyC;CACzC,4CAA4C;CAC5C,4CAA4C;CAC5C,wCAAwC;CACxC,8CAA8C;CAC9C,8CAA8C;CAC9C,gDAAgD;CAChD,mDAAmD;CACnD,+BAA+B;CAC/B,+BAA+B;CAC/B,qCAAqC;CACrC,wCAAwC;CACxC,wCAAwC;CACxC,oCAAoC;CACpC,0CAA0C;CAC1C,mCAAmC;CACnC,mCAAmC;CACnC,8BAA8B;CAC9B,8BAA8B;CAC9B,oCAAoC;CACpC,uCAAuC;CACvC,uCAAuC;CACvC,mCAAmC;CACnC,yCAAyC;CACzC,kCAAkC;CAClC,mCAAmC;CACnC,gCAAgC;CAChC,gCAAgC;CAChC,sCAAsC;CACtC,yCAAyC;C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AAiD;CACjD,wCAAwC;CACxC,yCAAyC;CACzC,+CAA+C;CAC/C,uCAAuC;CACvC,6CAA6C;CAC7C,mDAAmD;CACnD,4CAA4C;CAC5C,kDAAkD;CAClD,yCAAyC;CACzC,8CAA8C;CAC9C,oDAAoD;CACpD,+CAA+C;CAC/C,qDAAqD;CAGrD,4BAA4B;CAC5B,8BAA8B;CAC9B,6BAA6B;CAC7B,8BAA8B;CAC9B,kCAAkC;CAClC,4BAA4B;CAC5B,2BAA2B;CAE3B,2BAA2B;CAC3B,0BAA0B;CAC1B,yBAAyB;CACzB,4BAA4B;CAC5B,4BAA4B;CAC5B,2BAA2B;CAC3B,0BAA0B;CAC1B,+BAA+B;CAC/B,+BAA+B;CAE/B,2BAA2B;CAC3B,0BAA0B;CAC1B,yBAAyB;CACzB,4BAA4B;AAC9B"}
1
+ {"version":3,"file":"composites.js","names":[],"sources":["../../../src/i18n/de/composites.ts"],"sourcesContent":["export const de = {\n // Fallback title of an untitled Baustein (outline, table).\n 'composites.untitled': '(ohne Titel)',\n\n // Built-in kinds (`defaultCompositeKinds`): label, placeholders of the empty title/description, fields and their choices.\n 'composites.kind.section.label': 'Abschnitt',\n 'composites.kind.section.title': 'Überschrift',\n 'composites.kind.section.description': 'Zusammenfassung',\n 'composites.kind.task.label': 'Aufgabe',\n 'composites.kind.task.title': 'Aufgabe',\n 'composites.kind.task.description': 'Beschreibung',\n 'composites.kind.task.field.status': 'Status',\n 'composites.kind.task.status.open': 'Offen',\n 'composites.kind.task.status.doing': 'In Arbeit',\n 'composites.kind.task.status.done': 'Erledigt',\n 'composites.kind.task.field.due': 'Fällig',\n 'composites.kind.task.field.assignee': 'Zuständig',\n 'composites.kind.note.label': 'Notiz',\n 'composites.kind.note.title': 'Titel',\n 'composites.kind.note.description': 'Kurzbeschreibung',\n 'composites.kind.document.label': 'Dokument',\n 'composites.kind.document.title': 'Dokumentname',\n 'composites.kind.document.description': 'Zusammenfassung',\n 'composites.kind.document.field.filename': 'Dateiname',\n 'composites.kind.document.field.mimeType': 'Typ',\n 'composites.kind.document.field.size': 'Größe (Bytes)',\n 'composites.kind.document.field.importedAt': 'Importiert',\n 'composites.kind.recording.label': 'Aufnahme',\n 'composites.kind.recording.title': 'Titel der Aufnahme',\n 'composites.kind.recording.description': 'Zusammenfassung',\n 'composites.kind.recording.field.filename': 'Dateiname',\n 'composites.kind.recording.field.mimeType': 'Typ',\n 'composites.kind.recording.field.size': 'Größe (Bytes)',\n 'composites.kind.recording.field.importedAt': 'Importiert',\n 'composites.kind.recording.field.recordedAt': 'Aufgenommen am',\n 'composites.kind.recording.field.participants': 'Beteiligte',\n 'composites.kind.recording.field.durationSeconds': 'Dauer (Sekunden)',\n 'composites.kind.paper.label': 'Paper',\n 'composites.kind.paper.title': 'Titel der Arbeit',\n 'composites.kind.paper.description': 'Zusammenfassung',\n 'composites.kind.paper.field.filename': 'Dateiname',\n 'composites.kind.paper.field.mimeType': 'Typ',\n 'composites.kind.paper.field.size': 'Größe (Bytes)',\n 'composites.kind.paper.field.importedAt': 'Importiert',\n 'composites.kind.paper.field.bib': 'Literaturangabe',\n 'composites.kind.paper.field.doi': 'DOI',\n 'composites.kind.book.label': 'Buch',\n 'composites.kind.book.title': 'Buchtitel',\n 'composites.kind.book.description': 'Zusammenfassung',\n 'composites.kind.book.field.filename': 'Dateiname',\n 'composites.kind.book.field.mimeType': 'Typ',\n 'composites.kind.book.field.size': 'Größe (Bytes)',\n 'composites.kind.book.field.importedAt': 'Importiert',\n 'composites.kind.book.field.bib': 'Literaturangabe',\n 'composites.kind.book.field.isbn': 'ISBN',\n 'composites.kind.figure.label': 'Bild',\n 'composites.kind.figure.title': 'Bildtitel',\n 'composites.kind.figure.description': 'Bildbeschreibung',\n 'composites.kind.figure.field.filename': 'Dateiname',\n 'composites.kind.figure.field.mimeType': 'Typ',\n 'composites.kind.figure.field.size': 'Größe (Bytes)',\n 'composites.kind.figure.field.importedAt': 'Importiert',\n 'composites.kind.figure.field.credit': 'Quellenangabe',\n 'composites.kind.rendition.label': 'Lesefassung',\n 'composites.kind.rendition.title': 'Transkript, Volltext, Beschreibung …',\n 'composites.kind.rendition.description': 'Hinweis zur Entstehung',\n 'composites.kind.rendition.field.derivation': 'Herkunft',\n 'composites.kind.rendition.field.language': 'Sprache',\n /** Literature types of a `bibliography` field (CSL-JSON `type`). */\n 'composites.bib.type.article-journal': 'Zeitschriftenartikel',\n 'composites.bib.type.book': 'Buch',\n 'composites.bib.type.chapter': 'Buchkapitel',\n 'composites.bib.type.paper-conference': 'Konferenzbeitrag',\n 'composites.bib.type.thesis': 'Abschlussarbeit',\n 'composites.bib.type.report': 'Bericht',\n 'composites.bib.type.webpage': 'Webseite',\n 'composites.bib.type.article': 'Artikel',\n 'composites.bib.type.dataset': 'Datensatz',\n /** The `bibliography` field editor. */\n 'composites.bib.field.type': 'Art',\n 'composites.bib.field.authors': 'Autorinnen und Autoren',\n 'composites.bib.field.authorsHelp': 'Eine Person pro Zeile: Nachname, Vorname',\n 'composites.bib.field.year': 'Jahr',\n 'composites.bib.field.containerTitle': 'Zeitschrift / Sammelwerk',\n 'composites.bib.field.volume': 'Band',\n 'composites.bib.field.issue': 'Heft',\n 'composites.bib.field.page': 'Seiten',\n 'composites.bib.field.publisher': 'Verlag',\n 'composites.bib.field.doi': 'DOI',\n 'composites.bib.field.isbn': 'ISBN',\n 'composites.bib.field.url': 'URL',\n 'composites.bib.field.abstract': 'Kurzfassung',\n 'composites.bib.copyBibtex': 'BibTeX kopieren',\n 'composites.bib.copied': 'BibTeX kopiert',\n 'composites.bib.fetchDoi': 'DOI abrufen',\n 'composites.kind.folder.label': 'Ordner',\n 'composites.kind.folder.title': 'Ordnername',\n 'composites.kind.folder.description': 'Beschreibung',\n /** The select that changes a Baustein's kind (details popover, inspector). */\n 'composites.kind.select': 'Art des Bausteins',\n\n // Status chip.\n 'composites.status.none': 'Kein Status',\n 'composites.status.label': 'Status: {status}',\n\n // Feature: settings tab, `/` commands, block action, toolbar.\n 'composites.tab': 'Bearbeiten',\n 'composites.slash.section': 'Abschnitt',\n 'composites.slash.group': 'Überschriften in Bausteine',\n 'composites.slash.groupAll': 'Überschriften in Bausteine (verschachtelt)',\n 'composites.slash.flatten': 'Bausteine in Überschriften',\n 'composites.slash.flattenAll': 'Bausteine in Überschriften (alle Ebenen)',\n 'composites.blockAction.export': 'Als Markdown exportieren',\n 'composites.blockAction.bibtex': 'Literaturangabe exportieren (BibTeX)',\n // Splitting a Baustein (block actions) and the target size setting.\n 'composites.split.here': 'Baustein hier teilen',\n 'composites.split.children': 'In Unter-Bausteine teilen',\n 'composites.split.lengthChildren': 'Nach Länge in Unter-Bausteine teilen',\n 'composites.split.lengthSiblings': 'Nach Länge in Bausteine teilen',\n 'composites.merge.next': 'Mit nächstem zusammenführen',\n 'settings.editing.splitTargetChars': 'Zielgröße beim Teilen (Zeichen)',\n 'composites.toolbar.toKind': 'In Baustein umwandeln',\n 'composites.toolbar.structure': 'Gliederung umwandeln',\n 'composites.menu.kindHeading': 'Baustein',\n 'composites.menu.toComposites': 'Überschriften in Bausteine',\n 'composites.menu.toComposites.top': 'Nur oberste Ebene',\n 'composites.menu.toComposites.top.description': 'Nur die höchste Überschriftenebene wird zu Bausteinen',\n 'composites.menu.toComposites.all': 'Alle Ebenen (verschachtelt)',\n 'composites.menu.toComposites.all.description': 'Jede Überschriftenebene wird zu einem verschachtelten Baustein',\n 'composites.menu.toHeadings': 'Bausteine in Überschriften',\n 'composites.menu.toHeadings.top': 'Nur oberste Ebene',\n 'composites.menu.toHeadings.top.description': 'Die obersten Bausteine werden zu Überschriften; innere Bausteine bleiben',\n 'composites.menu.toHeadings.all': 'Alle Ebenen',\n 'composites.menu.toHeadings.all.description': 'Jeder Baustein wird zur Überschrift seiner Ebene; Beschreibung, Tags und Felder als Text',\n 'composites.menu.settings': 'Einstellungen…',\n 'composites.menu.preferred': 'Bevorzugt: {mode}',\n /** Conversion target label: the kind as a Baustein. */\n 'composites.convert.kind': '{kind} (Baustein)',\n\n // Chrome on the title line and the kind icon.\n 'composites.chrome.details': 'Art und Details: {kind}',\n 'composites.chrome.detailsDrag': 'Art und Details: {kind} · Ziehen zum Verschieben',\n 'composites.tag.remove': 'Tag #{tag} entfernen',\n 'composites.tag.add': 'Tag hinzufügen',\n\n // Tags editor (details popover, inspector).\n 'composites.tags.label': 'Tags',\n 'composites.tags.placeholder': 'Tags hinzufügen',\n 'composites.tags.create': '#{tag} erstellen',\n\n // Details popover.\n 'composites.details.confirmLost': 'Art wirklich ändern? Beim Wechsel zu „{kind}“ gehen diese Angaben verloren:',\n 'composites.details.confirm': 'Art wirklich ändern?',\n 'composites.details.cancel': 'Abbrechen',\n 'composites.details.change': 'Ändern',\n 'composites.details.summary': 'Zusammen\\u00ADfassung',\n\n // Reference chip (`[@`), locator and backlinks.\n 'composites.reference.insert': 'Verweis auf Baustein',\n 'composites.reference.empty': 'Keine passenden Bausteine',\n 'composites.reference.gone': 'Baustein gelöscht',\n 'composites.reference.locator': 'Stelle',\n 'composites.reference.locatorPlaceholder': 'Stelle, z. B. S. 12 oder 03:14',\n 'composites.reference.backlinks': 'Verweise',\n\n // Derived Bausteine (provenance badge, collapse toggle, details).\n 'composites.derivation.badge': 'abgeleitet',\n 'composites.derivation.stale': 'Quelle geändert',\n 'composites.derivation.foreign': 'aus anderem Dokument',\n 'composites.derivation.edited': 'bearbeitet',\n 'composites.derivation.expand': 'Abgeleiteten Inhalt aufklappen',\n 'composites.derivation.collapse': 'Abgeleiteten Inhalt zuklappen',\n 'composites.derivation.method': 'Methode',\n 'composites.derivation.model': 'Modell',\n 'composites.derivation.createdAt': 'Erzeugt',\n 'composites.derivation.openOutput': 'Original öffnen',\n 'composites.derivation.method.transcription': 'Transkription',\n 'composites.derivation.method.pdf-text': 'PDF-Text',\n 'composites.derivation.method.ocr': 'Texterkennung (OCR)',\n 'composites.derivation.method.description': 'Bildbeschreibung',\n 'composites.derivation.method.bibliography': 'Literaturangaben',\n 'composites.derivation.method.ai': 'KI-Ableitung',\n\n // Summary and field editors.\n 'composites.summary.placeholder': 'Kurze Zusammenfassung des Bausteins',\n 'composites.summary.label': 'Zusammenfassung',\n 'composites.summary.none': 'Keine Zusammenfassung',\n 'composites.summary.formatted': 'Enthält Formatierung oder Erwähnungen und lässt sich nur im Text bearbeiten.',\n 'composites.field.choose': '{field} wählen',\n 'composites.field.none': 'Keine Auswahl',\n\n // Inspector.\n 'composites.inspector.label': 'Eigenschaften',\n 'composites.inspector.document': 'Dokument',\n 'composites.inspector.composites': 'Bausteine',\n 'composites.inspector.summarized': '{n} von {total} zusammengefasst',\n 'composites.inspector.none': 'Keine',\n 'composites.inspector.mentions': 'Erwähnungen',\n 'composites.inspector.composite': 'Baustein',\n 'composites.inspector.kind': 'Art',\n 'composites.inspector.title': 'Titel',\n 'composites.inspector.titleHelp': 'Im Dokument bearbeiten',\n 'composites.inspector.untitled': 'Ohne Titel',\n 'composites.inspector.description': 'Beschreibung',\n 'composites.inspector.descriptionHelp': 'Enthält Erwähnungen oder Tags – im Dokument bearbeiten',\n 'composites.inspector.aiStatus': 'KI-Status',\n 'composites.inspector.summaryPresent': 'Zusammenfassung vorhanden',\n 'composites.inspector.summaryMissing': 'Zusammenfassung fehlt',\n\n // Table.\n 'composites.table.label': 'Bausteine als Tabelle',\n 'composites.table.emptyTitle': 'Dieses Dokument enthält noch keine Bausteine',\n 'composites.table.emptyText': 'Bausteine gliedern ein Dokument in Abschnitte, Aufgaben oder Notizen mit Titel, Zusammenfassung und Tags. Füge im Text über „/“ einen Baustein ein, dann erscheint er hier mit allen Angaben.',\n 'composites.table.column.composite': 'Baustein',\n 'composites.table.column.kind': 'Art',\n 'composites.table.column.tags': 'Tags',\n 'composites.table.column.summary': 'Zusammenfassung',\n 'composites.table.search.placeholder': 'Titel, Zusammenfassung, Tags',\n 'composites.table.search.label': 'Bausteine durchsuchen',\n 'composites.table.search.clear': 'Suche leeren',\n 'composites.table.filter.all': 'Alle',\n 'composites.table.filter.reset': 'Filter zurücksetzen',\n 'composites.table.filter.byKind': 'Nach Art filtern',\n 'composites.table.filter.byTag': 'Nach Tag filtern',\n 'composites.table.filter.noMatch': 'Kein Baustein passt zu diesen Filtern.',\n 'composites.table.count.one': '{n} von {total} Baustein',\n 'composites.table.count.other': '{n} von {total} Bausteinen',\n 'composites.table.noValue': 'Kein Wert',\n 'composites.table.noTags': 'Keine Tags',\n 'composites.table.summaryPresent': 'Zusammenfassung vorhanden',\n\n // Settings tab „Bearbeiten“.\n 'composites.settings.structure.title': 'Gliederung',\n 'composites.settings.structure.legend': 'Bevorzugte Gliederung',\n 'composites.settings.structure.flat.label': 'Überschriften',\n 'composites.settings.structure.flat.description': 'Werkzeugleiste mit Überschrift 1–3. KI-Texte werden flach mit Überschriften (##, ###) gegliedert; Bausteine, die die KI dennoch schreibt, werden zu Überschriften.',\n 'composites.settings.structure.composite.label': 'Bausteine',\n 'composites.settings.structure.composite.description': 'Werkzeugleiste ohne Überschrift 1–3. KI-Texte werden als Bausteine gegliedert, Unterabschnitte als verschachtelte Bausteine; Überschriften, die die KI dennoch schreibt, werden zu Bausteinen.',\n 'composites.settings.scope.legend': '„Gliederung umwandeln“ ohne Markierung bezieht sich auf',\n 'composites.settings.scope.container.label': 'Umgebender Baustein',\n 'composites.settings.scope.container.description': 'Den Baustein, in dem der Cursor steht; außerhalb von Bausteinen das ganze Dokument.',\n 'composites.settings.scope.document.label': 'Gesamtes Dokument',\n 'composites.settings.scope.document.description': 'Immer alle Blöcke des Dokuments.',\n 'composites.settings.scope.heading.label': 'Überschrift oder Baustein am Cursor',\n 'composites.settings.scope.heading.description': 'Beim Umwandeln in Bausteine: die Überschrift am oder vor dem Cursor mit ihrem Inhalt. Beim Umwandeln in Überschriften: der innerste Baustein um den Cursor.',\n 'composites.settings.sidebar.title': 'Seitenleiste',\n 'composites.settings.treeRoot.legend': 'Baum der Dokumente',\n 'composites.settings.treeRoot.folders.label': 'Ordner und Dateien verschachteln',\n 'composites.settings.treeRoot.folders.description': 'Die Seitenleiste zeigt die Ordner mit ihren Dateien; die geöffnete Datei steht als Eintrag darin.',\n 'composites.settings.treeRoot.file.label': 'Wurzel ist eine einzelne Datei',\n 'composites.settings.treeRoot.file.description': 'Ist eine Baustein-Datei geöffnet, zeigt die Seitenleiste sie als Wurzel mit ihren Ordnern und Dokumenten. Ohne geöffnete Baustein-Datei sind es die Ordner.',\n 'composites.settings.composites.title': 'Bausteine',\n 'composites.settings.defaultKind.label': 'Standard-Baustein',\n 'composites.settings.defaultKind.description': 'Art der Bausteine, die die Werkzeugleiste, „/“-Befehle und „Überschriften in Bausteine“ anlegen.',\n 'composites.settings.kindIcon.legend': 'Art-Symbol',\n 'composites.settings.kindIcon.always.label': 'Immer anzeigen',\n 'composites.settings.kindIcon.always.description': 'Das Symbol der Bausteinart steht dauerhaft vor dem Baustein.',\n 'composites.settings.kindIcon.hover.label': 'Nur beim Überfahren',\n 'composites.settings.kindIcon.hover.description': 'Das Symbol erscheint, wenn die Maus über dem Baustein steht, er den Fokus hat oder seine Details geöffnet sind.',\n 'composites.settings.dragHandle.legend': 'Ziehgriff (Blöcke ohne Symbol)',\n 'composites.settings.dragHandle.hover.label': 'Nur beim Überfahren',\n 'composites.settings.dragHandle.hover.description': 'Der Ziehgriff erscheint am Block unter der Maus.',\n 'composites.settings.dragHandle.always.label': 'Immer anzeigen',\n 'composites.settings.dragHandle.always.description': 'Jeder Block ohne Symbol zeigt seinen Ziehgriff dauerhaft.',\n\n // Accepted children per kind (`AcceptedChildren`, `moveIntoVerdict`): the notice of a refused edit and why a block cannot move.\n 'composites.nesting.title': 'Verschachtelung nicht möglich',\n 'composites.nesting.refused': '{parent} nimmt keine {child} auf.',\n 'composites.move.blockGone': 'Der Block existiert nicht mehr.',\n 'composites.move.targetGone': 'Das Ziel existiert nicht mehr.',\n 'composites.move.targetNotBlock': 'Das Ziel ist kein Baustein.',\n 'composites.move.intoSelf': 'Ein Block kann nicht in sich selbst verschoben werden.',\n 'composites.move.intoOwn': 'Ein Block kann nicht in einen Baustein verschoben werden, den er selbst enthält.',\n // Colour baskets of a Baustein and the hidden-title toggle in its chrome.\n 'composites.basket.label': 'Korb',\n 'composites.basket.none': 'Kein Korb',\n 'composites.basket.red': 'Rot',\n 'composites.basket.orange': 'Orange',\n 'composites.basket.yellow': 'Gelb',\n 'composites.basket.green': 'Grün',\n 'composites.basket.blue': 'Blau',\n 'composites.titleHidden.hide': 'Titel ausblenden',\n 'composites.titleHidden.show': 'Titel einblenden',\n // Focus mode: the block action, the chip while a Baustein is focused and its button.\n 'composites.focus.action': 'Fokussieren',\n 'composites.focus.leave': 'Fokus aufheben',\n 'composites.focus.chip': 'Fokus: {title}',\n 'composites.focus.release': 'Aufheben',\n} as const\n"],"mappings":";AAAA,MAAa,KAAK;CAEhB,uBAAuB;CAGvB,iCAAiC;CACjC,iCAAiC;CACjC,uCAAuC;CACvC,8BAA8B;CAC9B,8BAA8B;CAC9B,oCAAoC;CACpC,qCAAqC;CACrC,oCAAoC;CACpC,qCAAqC;CACrC,oCAAoC;CACpC,kCAAkC;CAClC,uCAAuC;CACvC,8BAA8B;CAC9B,8BAA8B;CAC9B,oCAAoC;CACpC,kCAAkC;CAClC,kCAAkC;CAClC,wCAAwC;CACxC,2CAA2C;CAC3C,2CAA2C;CAC3C,uCAAuC;CACvC,6CAA6C;CAC7C,mCAAmC;CACnC,mCAAmC;CACnC,yCAAyC;CACzC,4CAA4C;CAC5C,4CAA4C;CAC5C,wCAAwC;CACxC,8CAA8C;CAC9C,8CAA8C;CAC9C,gDAAgD;CAChD,mDAAmD;CACnD,+BAA+B;CAC/B,+BAA+B;CAC/B,qCAAqC;CACrC,wCAAwC;CACxC,wCAAwC;CACxC,oCAAoC;CACpC,0CAA0C;CAC1C,mCAAmC;CACnC,mCAAmC;CACnC,8BAA8B;CAC9B,8BAA8B;CAC9B,oCAAoC;CACpC,uCAAuC;CACvC,uCAAuC;CACvC,mCAAmC;CACnC,yCAAyC;CACzC,kCAAkC;CAClC,mCAAmC;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AqC;CACrC,uCAAuC;CACvC,8CAA8C;CAC9C,oDAAoD;CACpD,2CAA2C;CAC3C,iDAAiD;CACjD,wCAAwC;CACxC,yCAAyC;CACzC,+CAA+C;CAC/C,uCAAuC;CACvC,6CAA6C;CAC7C,mDAAmD;CACnD,4CAA4C;CAC5C,kDAAkD;CAClD,yCAAyC;CACzC,8CAA8C;CAC9C,oDAAoD;CACpD,+CAA+C;CAC/C,qDAAqD;CAGrD,4BAA4B;CAC5B,8BAA8B;CAC9B,6BAA6B;CAC7B,8BAA8B;CAC9B,kCAAkC;CAClC,4BAA4B;CAC5B,2BAA2B;CAE3B,2BAA2B;CAC3B,0BAA0B;CAC1B,yBAAyB;CACzB,4BAA4B;CAC5B,4BAA4B;CAC5B,2BAA2B;CAC3B,0BAA0B;CAC1B,+BAA+B;CAC/B,+BAA+B;CAE/B,2BAA2B;CAC3B,0BAA0B;CAC1B,yBAAyB;CACzB,4BAA4B;AAC9B"}
@@ -32,6 +32,7 @@ const de = {
32
32
  "tree.focus.root": "Dokument",
33
33
  "tree.focus.enter": "Fokussieren",
34
34
  "tree.focus.leave": "Fokus aufheben",
35
+ "tree.merge": "Mit nächstem zusammenführen",
35
36
  "tree.root.folders": "Ordner",
36
37
  "tree.root.file": "Datei als Wurzel",
37
38
  "tree.root.unavailable": "Nur mit einer geöffneten Baustein-Datei (Einstellung „Gliederung: Bausteine“).",
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","names":[],"sources":["../../../src/i18n/de/tree.ts"],"sourcesContent":["export const de = {\n 'tree.aria': 'Dokumente',\n 'tree.loading': 'Lädt…',\n 'tree.loadFailed': 'Dokumente konnten nicht geladen werden',\n 'tree.empty': 'Noch keine Dokumente',\n 'tree.rootFallback': 'Dokument',\n 'tree.untitled': '(ohne Titel)',\n 'tree.summary': 'Zusammenfassung vorhanden',\n 'tree.filter.show': 'Anzeigen',\n 'tree.filter.title': 'Anzeige filtern',\n 'tree.filter.reset': 'Filter zurücksetzen',\n 'tree.add': 'Hinzufügen',\n 'tree.delete': 'Löschen',\n 'tree.menu.newDocument': 'Neues Dokument',\n 'tree.menu.newFolder': 'Neuer Ordner',\n 'tree.menu.newSubfolder': 'Neuer Unterordner',\n 'tree.menu.newCompositeFolder': 'Neuer Ordner-Baustein',\n 'tree.menu.importFile': 'Datei importieren…',\n 'tree.menu.rename': 'Umbenennen',\n 'tree.folder.name': 'Ordnername',\n 'tree.folder.placeholder': 'Neuer Ordner',\n 'tree.folder.placeholderIn': 'Neuer Ordner in {parent}',\n 'tree.folder.renameFailed': 'Ordner nicht umbenannt',\n 'tree.removed': 'Dokument gelöscht',\n 'tree.undo': 'Rückgängig',\n 'tree.filterText.placeholder': 'Titel filtern',\n 'tree.filterText.clear': 'Titelfilter löschen',\n 'tree.noMatches': 'Keine Treffer',\n 'tree.basketFilter.label': 'Nach Korb filtern',\n 'tree.basketFilter.reset': 'Korbfilter zurücksetzen',\n 'tree.focus.root': 'Dokument',\n 'tree.focus.enter': 'Fokussieren',\n 'tree.focus.leave': 'Fokus aufheben',\n 'tree.root.folders': 'Ordner',\n 'tree.root.file': 'Datei als Wurzel',\n 'tree.root.unavailable': 'Nur mit einer geöffneten Baustein-Datei (Einstellung „Gliederung: Bausteine“).',\n\n // Why a drop on a row is refused (`dropVerdict`).\n 'tree.drop.nothing': 'Es wird nichts gezogen.',\n 'tree.drop.noDocumentMove': 'Im geöffneten Dokument lassen sich Dokumente und Ordner nicht verschieben.',\n 'tree.drop.foldersOnly': 'Nur Ordner nehmen Einträge auf.',\n 'tree.drop.documentInFolder': 'Das Dokument liegt schon in diesem Ordner.',\n 'tree.drop.folderIntoSelf': 'Ein Ordner lässt sich nicht in sich selbst oder einen seiner Unterordner verschieben.',\n 'tree.drop.folderInFolder': 'Der Ordner liegt schon in diesem Ordner.',\n 'tree.drop.blocksOnlyInDocument': 'Bausteine lassen sich nur im geöffneten Dokument verschieben.',\n 'tree.drop.noBlocksHere': 'Hier lassen sich keine Bausteine ablegen.',\n 'tree.drop.noTransfer': 'Dieser Editor nimmt keine Bausteine von außen an.',\n 'tree.drop.blockWithoutId': 'Dieser Baustein hat noch keine ID und lässt sich nicht als Ziel ansprechen.',\n 'tree.drop.editorClosed': 'Der Editor ist nicht mehr geöffnet.',\n} as const\n"],"mappings":";AAAA,MAAa,KAAK;CAChB,aAAa;CACb,gBAAgB;CAChB,mBAAmB;CACnB,cAAc;CACd,qBAAqB;CACrB,iBAAiB;CACjB,gBAAgB;CAChB,oBAAoB;CACpB,qBAAqB;CACrB,qBAAqB;CACrB,YAAY;CACZ,eAAe;CACf,yBAAyB;CACzB,uBAAuB;CACvB,0BAA0B;CAC1B,gCAAgC;CAChC,wBAAwB;CACxB,oBAAoB;CACpB,oBAAoB;CACpB,2BAA2B;CAC3B,6BAA6B;CAC7B,4BAA4B;CAC5B,gBAAgB;CAChB,aAAa;CACb,+BAA+B;CAC/B,yBAAyB;CACzB,kBAAkB;CAClB,2BAA2B;CAC3B,2BAA2B;CAC3B,mBAAmB;CACnB,oBAAoB;CACpB,oBAAoB;CACpB,qBAAqB;CACrB,kBAAkB;CAClB,yBAAyB;CAGzB,qBAAqB;CACrB,4BAA4B;CAC5B,yBAAyB;CACzB,8BAA8B;CAC9B,4BAA4B;CAC5B,4BAA4B;CAC5B,kCAAkC;CAClC,0BAA0B;CAC1B,wBAAwB;CACxB,4BAA4B;CAC5B,0BAA0B;AAC5B"}
1
+ {"version":3,"file":"tree.js","names":[],"sources":["../../../src/i18n/de/tree.ts"],"sourcesContent":["export const de = {\n 'tree.aria': 'Dokumente',\n 'tree.loading': 'Lädt…',\n 'tree.loadFailed': 'Dokumente konnten nicht geladen werden',\n 'tree.empty': 'Noch keine Dokumente',\n 'tree.rootFallback': 'Dokument',\n 'tree.untitled': '(ohne Titel)',\n 'tree.summary': 'Zusammenfassung vorhanden',\n 'tree.filter.show': 'Anzeigen',\n 'tree.filter.title': 'Anzeige filtern',\n 'tree.filter.reset': 'Filter zurücksetzen',\n 'tree.add': 'Hinzufügen',\n 'tree.delete': 'Löschen',\n 'tree.menu.newDocument': 'Neues Dokument',\n 'tree.menu.newFolder': 'Neuer Ordner',\n 'tree.menu.newSubfolder': 'Neuer Unterordner',\n 'tree.menu.newCompositeFolder': 'Neuer Ordner-Baustein',\n 'tree.menu.importFile': 'Datei importieren…',\n 'tree.menu.rename': 'Umbenennen',\n 'tree.folder.name': 'Ordnername',\n 'tree.folder.placeholder': 'Neuer Ordner',\n 'tree.folder.placeholderIn': 'Neuer Ordner in {parent}',\n 'tree.folder.renameFailed': 'Ordner nicht umbenannt',\n 'tree.removed': 'Dokument gelöscht',\n 'tree.undo': 'Rückgängig',\n 'tree.filterText.placeholder': 'Titel filtern',\n 'tree.filterText.clear': 'Titelfilter löschen',\n 'tree.noMatches': 'Keine Treffer',\n 'tree.basketFilter.label': 'Nach Korb filtern',\n 'tree.basketFilter.reset': 'Korbfilter zurücksetzen',\n 'tree.focus.root': 'Dokument',\n 'tree.focus.enter': 'Fokussieren',\n 'tree.focus.leave': 'Fokus aufheben',\n 'tree.merge': 'Mit nächstem zusammenführen',\n 'tree.root.folders': 'Ordner',\n 'tree.root.file': 'Datei als Wurzel',\n 'tree.root.unavailable': 'Nur mit einer geöffneten Baustein-Datei (Einstellung „Gliederung: Bausteine“).',\n\n // Why a drop on a row is refused (`dropVerdict`).\n 'tree.drop.nothing': 'Es wird nichts gezogen.',\n 'tree.drop.noDocumentMove': 'Im geöffneten Dokument lassen sich Dokumente und Ordner nicht verschieben.',\n 'tree.drop.foldersOnly': 'Nur Ordner nehmen Einträge auf.',\n 'tree.drop.documentInFolder': 'Das Dokument liegt schon in diesem Ordner.',\n 'tree.drop.folderIntoSelf': 'Ein Ordner lässt sich nicht in sich selbst oder einen seiner Unterordner verschieben.',\n 'tree.drop.folderInFolder': 'Der Ordner liegt schon in diesem Ordner.',\n 'tree.drop.blocksOnlyInDocument': 'Bausteine lassen sich nur im geöffneten Dokument verschieben.',\n 'tree.drop.noBlocksHere': 'Hier lassen sich keine Bausteine ablegen.',\n 'tree.drop.noTransfer': 'Dieser Editor nimmt keine Bausteine von außen an.',\n 'tree.drop.blockWithoutId': 'Dieser Baustein hat noch keine ID und lässt sich nicht als Ziel ansprechen.',\n 'tree.drop.editorClosed': 'Der Editor ist nicht mehr geöffnet.',\n} as const\n"],"mappings":";AAAA,MAAa,KAAK;CAChB,aAAa;CACb,gBAAgB;CAChB,mBAAmB;CACnB,cAAc;CACd,qBAAqB;CACrB,iBAAiB;CACjB,gBAAgB;CAChB,oBAAoB;CACpB,qBAAqB;CACrB,qBAAqB;CACrB,YAAY;CACZ,eAAe;CACf,yBAAyB;CACzB,uBAAuB;CACvB,0BAA0B;CAC1B,gCAAgC;CAChC,wBAAwB;CACxB,oBAAoB;CACpB,oBAAoB;CACpB,2BAA2B;CAC3B,6BAA6B;CAC7B,4BAA4B;CAC5B,gBAAgB;CAChB,aAAa;CACb,+BAA+B;CAC/B,yBAAyB;CACzB,kBAAkB;CAClB,2BAA2B;CAC3B,2BAA2B;CAC3B,mBAAmB;CACnB,oBAAoB;CACpB,oBAAoB;CACpB,cAAc;CACd,qBAAqB;CACrB,kBAAkB;CAClB,yBAAyB;CAGzB,qBAAqB;CACrB,4BAA4B;CAC5B,yBAAyB;CACzB,8BAA8B;CAC9B,4BAA4B;CAC5B,4BAA4B;CAC5B,kCAAkC;CAClC,0BAA0B;CAC1B,wBAAwB;CACxB,4BAA4B;CAC5B,0BAA0B;AAC5B"}
package/dist/i18n/de.d.ts CHANGED
@@ -175,6 +175,7 @@ export declare const de: {
175
175
  readonly 'tree.focus.root': "Dokument";
176
176
  readonly 'tree.focus.enter': "Fokussieren";
177
177
  readonly 'tree.focus.leave': "Fokus aufheben";
178
+ readonly 'tree.merge': "Mit nächstem zusammenführen";
178
179
  readonly 'tree.root.folders': "Ordner";
179
180
  readonly 'tree.root.file': "Datei als Wurzel";
180
181
  readonly 'tree.root.unavailable': "Nur mit einer geöffneten Baustein-Datei (Einstellung „Gliederung: Bausteine“).";
@@ -334,6 +335,7 @@ export declare const de: {
334
335
  readonly 'composites.split.children': "In Unter-Bausteine teilen";
335
336
  readonly 'composites.split.lengthChildren': "Nach Länge in Unter-Bausteine teilen";
336
337
  readonly 'composites.split.lengthSiblings': "Nach Länge in Bausteine teilen";
338
+ readonly 'composites.merge.next': "Mit nächstem zusammenführen";
337
339
  readonly 'settings.editing.splitTargetChars': "Zielgröße beim Teilen (Zeichen)";
338
340
  readonly 'composites.toolbar.toKind': "In Baustein umwandeln";
339
341
  readonly 'composites.toolbar.structure': "Gliederung umwandeln";
@@ -107,6 +107,7 @@ const en = {
107
107
  "composites.split.children": "Split into sub-building blocks",
108
108
  "composites.split.lengthChildren": "Split by length into sub-building blocks",
109
109
  "composites.split.lengthSiblings": "Split by length into building blocks",
110
+ "composites.merge.next": "Merge with next",
110
111
  "settings.editing.splitTargetChars": "Target size when splitting (characters)",
111
112
  "composites.toolbar.toKind": "Convert to building block",
112
113
  "composites.toolbar.structure": "Convert structure",