@ecsplico/editor 3.1.0 → 3.1.1
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.
- package/CHANGELOG.md +6 -0
- package/dist/features/composites/components/CompositeFieldEditor.js +1 -0
- package/dist/features/composites/components/CompositeFieldEditor.js.map +1 -1
- package/dist/features/media/index.js +1 -1
- package/dist/features/media/react/AudioRecorderModal.js +1 -1
- package/dist/features/media/react.js +1 -1
- package/dist/react/compose.js +1 -1
- package/dist/tree/tree-host.js +1 -1
- package/dist/vue/compose.js +1 -1
- package/dist/vue/kit/types.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Composites: picking an option of a `multiselect` field in the Vue meta panel stores it. The Nuxt UI `InputMenu` emitted the whole option objects, which the field dropped, so nothing could be chosen; it now picks by `value` (`value-key="value"`). The kit's `InputMenuProps` gains `valueKey`. React was not affected.
|
|
8
|
+
|
|
3
9
|
## 3.1.0
|
|
4
10
|
|
|
5
11
|
### Added
|
|
@@ -84,6 +84,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
84
84
|
])) : __props.field.type === "multiselect" ? (openBlock(), createBlock(unref(UInputMenu), {
|
|
85
85
|
key: 1,
|
|
86
86
|
multiple: "",
|
|
87
|
+
"value-key": "value",
|
|
87
88
|
"model-value": chosen.value,
|
|
88
89
|
items: __props.field.options ?? [],
|
|
89
90
|
placeholder: unref(t)("composites.field.choose", { field: __props.field.label }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompositeFieldEditor.js","names":["_openBlock","_createBlock","_unref","ReferenceFieldSelect","BibliographyEditor","_createElementBlock","_Fragment","DerivationBadge","_createCommentVNode","_withKeys"],"sources":["../../../../src/features/composites/components/CompositeFieldEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport type { CompositeMetaField } from '../kinds'\nimport { metaText } from '../meta-display'\nimport { compositeOfRow, type CompositeRow, setCompositeMetaField } from '../rows'\nimport BibliographyEditor from './BibliographyEditor.vue'\nimport DerivationBadge from './DerivationBadge.vue'\nimport ReferenceFieldSelect from './ReferenceFieldSelect.vue'\n\n/**\n * One meta field of a Baustein as an input that writes through `setCompositeMetaField`. Text-like inputs keep a local\n * draft and commit after typing pauses, on blur and on unmount, so the one-frame-late re-read of the rows never\n * overwrites what is being typed.\n */\nconst props = withDefaults(defineProps<{\n editor: Editor\n row: CompositeRow\n field: CompositeMetaField\n disabled?: boolean\n size?: 'xs' | 'sm' | 'md'\n}>(), { size: 'sm' })\n\nconst { Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\n/** The Baustein a `derivation` field belongs to; the read-only provenance display needs the node, not the field text. */\nconst derived = computed(() => props.field.type === 'derivation' ? compositeOfRow(props.editor.state.doc, props.row)?.node ?? null : null)\n\nconst stored = computed(() => metaText(props.row, props.field))\n/** The chosen values of a `multiselect` field (`meta[key]` is a `string[]`). */\nconst chosen = computed(() => {\n const value = props.row.meta[props.field.key]\n return Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : []\n})\nconst draft = ref(stored.value)\nconst typing = ref(false)\nlet dirty = false\nlet timer: ReturnType<typeof setTimeout> | undefined\n\nwatch(stored, (value) => {\n if (!typing.value && !dirty) draft.value = value\n})\n\nfunction commit() {\n clearTimeout(timer)\n if (!dirty) return\n dirty = false\n if (!props.editor.isDestroyed) setCompositeMetaField(props.editor, props.row, props.field.key, draft.value)\n}\n\nfunction onInput(value: unknown) {\n draft.value = typeof value === 'string' ? value : ''\n dirty = true\n clearTimeout(timer)\n timer = setTimeout(commit, 400)\n}\n\nfunction onBlur() {\n typing.value = false\n commit()\n}\n\nonBeforeUnmount(commit)\n\nfunction onChoice(value: unknown) {\n setCompositeMetaField(props.editor, props.row, props.field.key, typeof value === 'string' ? value : '')\n}\n\nfunction onChoices(value: unknown) {\n setCompositeMetaField(props.editor, props.row, props.field.key, Array.isArray(value) ? value : [])\n}\n</script>\n\n<template>\n <USelect\n v-if=\"field.type === 'select'\"\n :model-value=\"stored || undefined\"\n :items=\"field.options ?? []\"\n :placeholder=\"t('composites.field.choose', { field: field.label })\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n class=\"w-full\"\n @update:model-value=\"onChoice\"\n />\n <UInputMenu\n v-else-if=\"field.type === 'multiselect'\"\n multiple\n :model-value=\"chosen\"\n :items=\"field.options ?? []\"\n :placeholder=\"t('composites.field.choose', { field: field.label })\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n class=\"w-full\"\n @update:model-value=\"onChoices\"\n />\n <ReferenceFieldSelect\n v-else-if=\"field.type === 'reference'\"\n :editor=\"editor\"\n :row=\"row\"\n :field=\"field\"\n :disabled=\"disabled\"\n :size=\"size\"\n />\n <BibliographyEditor\n v-else-if=\"field.type === 'bibliography'\"\n :editor=\"editor\"\n :row=\"row\"\n :field=\"field\"\n :disabled=\"disabled\"\n />\n <template v-else-if=\"field.type === 'derivation'\">\n <DerivationBadge v-if=\"derived\" :editor=\"editor\" :node=\"derived\" />\n </template>\n <UTextarea\n v-else-if=\"field.type === 'textarea'\"\n :model-value=\"draft\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n autoresize\n :rows=\"2\"\n :maxrows=\"6\"\n class=\"w-full\"\n @focus=\"typing = true\"\n @blur=\"onBlur\"\n @update:model-value=\"onInput\"\n />\n <UInput\n v-else\n :model-value=\"draft\"\n :type=\"field.type\"\n :aria-label=\"field.label\"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AAM;EAEtB,SAAS,SAAS,OAAgB;GAChC,sBAAsB,MAAM,QAAQ,MAAM,KAAK,MAAM,MAAM,KAAK,OAAO,UAAU,WAAW,QAAQ,EAAE;EACxG;EAEA,SAAS,UAAU,OAAgB;GACjC,sBAAsB,MAAM,QAAQ,MAAM,KAAK,MAAM,MAAM,KAAK,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,CAAC;EACnG;;GAKU,OAAA,QAAA,MAAM,SAAI,YADlBA,UAAA,GAAAC,YAUEC,MAAA,OAAA,GAAA;;IARC,eAAa,OAAA,SAAU,KAAA;IACvB,OAAO,QAAA,MAAM,WAAO,CAAA;IACpB,aAAaA,MAAA,CAAA,CAAC,CAAA,2BAAA,EAAA,OAAqC,QAAA,MAAM,MAAK,CAAA;IAC9D,cAAY,QAAA,MAAM;IAClB,UAAU,QAAA;IACV,MAAM,QAAA;IACP,OAAM;IACL,uBAAoB;;;;;;;;GAGV,CAAA,KAAA,QAAA,MAAM,SAAI,iBADvBF,UAAA,GAAAC,
|
|
1
|
+
{"version":3,"file":"CompositeFieldEditor.js","names":["_openBlock","_createBlock","_unref","ReferenceFieldSelect","BibliographyEditor","_createElementBlock","_Fragment","DerivationBadge","_createCommentVNode","_withKeys"],"sources":["../../../../src/features/composites/components/CompositeFieldEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { Editor } from '@tiptap/core'\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport { useUiKit } from '../../../vue/kit/use-ui-kit'\nimport { useEditorI18n } from '../../../vue/use-editor-i18n'\nimport type { CompositeMetaField } from '../kinds'\nimport { metaText } from '../meta-display'\nimport { compositeOfRow, type CompositeRow, setCompositeMetaField } from '../rows'\nimport BibliographyEditor from './BibliographyEditor.vue'\nimport DerivationBadge from './DerivationBadge.vue'\nimport ReferenceFieldSelect from './ReferenceFieldSelect.vue'\n\n/**\n * One meta field of a Baustein as an input that writes through `setCompositeMetaField`. Text-like inputs keep a local\n * draft and commit after typing pauses, on blur and on unmount, so the one-frame-late re-read of the rows never\n * overwrites what is being typed.\n */\nconst props = withDefaults(defineProps<{\n editor: Editor\n row: CompositeRow\n field: CompositeMetaField\n disabled?: boolean\n size?: 'xs' | 'sm' | 'md'\n}>(), { size: 'sm' })\n\nconst { Input: UInput, InputMenu: UInputMenu, Select: USelect, Textarea: UTextarea } = useUiKit()\nconst { t } = useEditorI18n()\n\n/** The Baustein a `derivation` field belongs to; the read-only provenance display needs the node, not the field text. */\nconst derived = computed(() => props.field.type === 'derivation' ? compositeOfRow(props.editor.state.doc, props.row)?.node ?? null : null)\n\nconst stored = computed(() => metaText(props.row, props.field))\n/** The chosen values of a `multiselect` field (`meta[key]` is a `string[]`). */\nconst chosen = computed(() => {\n const value = props.row.meta[props.field.key]\n return Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : []\n})\nconst draft = ref(stored.value)\nconst typing = ref(false)\nlet dirty = false\nlet timer: ReturnType<typeof setTimeout> | undefined\n\nwatch(stored, (value) => {\n if (!typing.value && !dirty) draft.value = value\n})\n\nfunction commit() {\n clearTimeout(timer)\n if (!dirty) return\n dirty = false\n if (!props.editor.isDestroyed) setCompositeMetaField(props.editor, props.row, props.field.key, draft.value)\n}\n\nfunction onInput(value: unknown) {\n draft.value = typeof value === 'string' ? value : ''\n dirty = true\n clearTimeout(timer)\n timer = setTimeout(commit, 400)\n}\n\nfunction onBlur() {\n typing.value = false\n commit()\n}\n\nonBeforeUnmount(commit)\n\nfunction onChoice(value: unknown) {\n setCompositeMetaField(props.editor, props.row, props.field.key, typeof value === 'string' ? value : '')\n}\n\nfunction onChoices(value: unknown) {\n setCompositeMetaField(props.editor, props.row, props.field.key, Array.isArray(value) ? value : [])\n}\n</script>\n\n<template>\n <USelect\n v-if=\"field.type === 'select'\"\n :model-value=\"stored || undefined\"\n :items=\"field.options ?? []\"\n :placeholder=\"t('composites.field.choose', { field: field.label })\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n class=\"w-full\"\n @update:model-value=\"onChoice\"\n />\n <UInputMenu\n v-else-if=\"field.type === 'multiselect'\"\n multiple\n value-key=\"value\"\n :model-value=\"chosen\"\n :items=\"field.options ?? []\"\n :placeholder=\"t('composites.field.choose', { field: field.label })\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n class=\"w-full\"\n @update:model-value=\"onChoices\"\n />\n <ReferenceFieldSelect\n v-else-if=\"field.type === 'reference'\"\n :editor=\"editor\"\n :row=\"row\"\n :field=\"field\"\n :disabled=\"disabled\"\n :size=\"size\"\n />\n <BibliographyEditor\n v-else-if=\"field.type === 'bibliography'\"\n :editor=\"editor\"\n :row=\"row\"\n :field=\"field\"\n :disabled=\"disabled\"\n />\n <template v-else-if=\"field.type === 'derivation'\">\n <DerivationBadge v-if=\"derived\" :editor=\"editor\" :node=\"derived\" />\n </template>\n <UTextarea\n v-else-if=\"field.type === 'textarea'\"\n :model-value=\"draft\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n autoresize\n :rows=\"2\"\n :maxrows=\"6\"\n class=\"w-full\"\n @focus=\"typing = true\"\n @blur=\"onBlur\"\n @update:model-value=\"onInput\"\n />\n <UInput\n v-else\n :model-value=\"draft\"\n :type=\"field.type\"\n :aria-label=\"field.label\"\n :disabled=\"disabled\"\n :size=\"size\"\n class=\"w-full\"\n @focus=\"typing = true\"\n @blur=\"onBlur\"\n @keydown.enter=\"commit\"\n @update:model-value=\"onInput\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAiBA,MAAM,QAAQ;EAQd,MAAM,EAAE,OAAO,QAAQ,WAAW,YAAY,QAAQ,SAAS,UAAU,cAAc,SAAS;EAChG,MAAM,EAAE,MAAM,cAAc;;EAG5B,MAAM,UAAU,eAAe,MAAM,MAAM,SAAS,eAAe,eAAe,MAAM,OAAO,MAAM,KAAK,MAAM,GAAG,CAAC,EAAE,QAAQ,OAAO,IAAI;EAEzI,MAAM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A;IACC,MAAM;IACN,SAAS;IACV,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,QAAM;IACP;IACN,uBAAoB;;;;;;GAEvB,CAAA,MAAAF,UAAA,GAAAC,YAYEC,MAAA,MAAA,GAAA;;IAVC,eAAa,MAAA;IACb,MAAM,QAAA,MAAM;IACZ,cAAY,QAAA,MAAM;IAClB,UAAU,QAAA;IACV,MAAM,QAAA;IACP,OAAM;IACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,OAAA,QAAM;IACP;IACN,WAAOO,SAAQ,QAAM,CAAA,OAAA,CAAA;IACrB,uBAAoB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MAX_MEDIA_BYTES, MEDIA_TYPES, acceptFor, mediaKindOf, mediaMime } from "./schema.js";
|
|
2
|
+
import { createAudioRecorder } from "./audio-recorder.js";
|
|
2
3
|
import { AUDIO_RECORDER_OPEN, Media, fileNodeFor, formatBytes, mediaNodeFor, openAudioRecorder, pickFiles, uploadOf } from "./upload.js";
|
|
3
4
|
import { MAX_TEXT_BYTES, fileImport, isTextFile } from "./file-import.js";
|
|
4
5
|
import { mediaBlocks, playerOptions } from "./node-views.js";
|
|
5
6
|
import { mediaFeatureCore } from "./feature.js";
|
|
6
|
-
import { createAudioRecorder } from "./audio-recorder.js";
|
|
7
7
|
export { AUDIO_RECORDER_OPEN, MAX_MEDIA_BYTES, MAX_TEXT_BYTES, MEDIA_TYPES, Media, acceptFor, createAudioRecorder, fileImport, fileNodeFor, formatBytes, isTextFile, mediaBlocks, mediaFeatureCore, mediaKindOf, mediaMime, mediaNodeFor, openAudioRecorder, pickFiles, playerOptions, uploadOf };
|
|
@@ -5,8 +5,8 @@ import { cn } from "../../../react/ui/utils.js";
|
|
|
5
5
|
import { Icon } from "../../../react/Icon.js";
|
|
6
6
|
import { Button } from "../../../react/ui/button.js";
|
|
7
7
|
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "../../../react/ui/dialog.js";
|
|
8
|
-
import { useNotifier } from "../../../react/use-notifier.js";
|
|
9
8
|
import "../upload.js";
|
|
9
|
+
import { useNotifier } from "../../../react/use-notifier.js";
|
|
10
10
|
import { useAudioRecorder } from "./use-audio-recorder.js";
|
|
11
11
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEditorI18n } from "../../react/use-editor-i18n.js";
|
|
2
|
-
import { useNotifier } from "../../react/use-notifier.js";
|
|
3
2
|
import { fileImport } from "./file-import.js";
|
|
4
3
|
import { playerOptions } from "./node-views.js";
|
|
5
4
|
import { mediaFeatureCore } from "./feature.js";
|
|
5
|
+
import { useNotifier } from "../../react/use-notifier.js";
|
|
6
6
|
import { useAudioRecorder } from "./react/use-audio-recorder.js";
|
|
7
7
|
import { AudioRecorderModal } from "./react/AudioRecorderModal.js";
|
|
8
8
|
import { AudioView } from "./react/AudioView.js";
|
package/dist/react/compose.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { coreUiFeature } from "../core/core-feature.js";
|
|
2
|
+
import { composeEditor as composeEditor$1 } from "../presets/compose.js";
|
|
2
3
|
import { EditorCommandPalette } from "./EditorCommandPalette.js";
|
|
3
4
|
import { aiFeature } from "../features/ai/react.js";
|
|
4
5
|
import { authorsFeature } from "../features/authors/react.js";
|
|
@@ -11,7 +12,6 @@ import { themesFeature } from "../features/themes/react.js";
|
|
|
11
12
|
import { transcriptFeature } from "../features/transcript/react.js";
|
|
12
13
|
import { compositeAiFeature } from "../integrations/composite-ai/index.js";
|
|
13
14
|
import { transcriptAiFeature } from "../integrations/transcript-ai/index.js";
|
|
14
|
-
import { composeEditor as composeEditor$1 } from "../presets/compose.js";
|
|
15
15
|
//#region src/react/compose.ts
|
|
16
16
|
/** The React bindings of every UI-bound catalog feature. */
|
|
17
17
|
const REACT_BINDINGS = {
|
package/dist/tree/tree-host.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { findBlockById } from "../core/schema/block-ids.js";
|
|
2
2
|
import { compositeJSON, compositeKindsOf } from "../features/composites/nodes.js";
|
|
3
|
-
import { revealBlockInEditor } from "../outline/heading-outline.js";
|
|
4
3
|
import { pickFiles } from "../features/media/upload.js";
|
|
4
|
+
import { revealBlockInEditor } from "../outline/heading-outline.js";
|
|
5
5
|
import { moveBlockInto, moveIntoVerdict } from "../features/composites/outline.js";
|
|
6
6
|
import { readOutline } from "./tree-items.js";
|
|
7
7
|
//#region src/tree/tree-host.ts
|
package/dist/vue/compose.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { coreUiFeature } from "../core/core-feature.js";
|
|
2
|
+
import { composeEditor as composeEditor$1 } from "../presets/compose.js";
|
|
2
3
|
import { compositeAiFeature } from "../integrations/composite-ai/index.js";
|
|
3
4
|
import { transcriptAiFeature } from "../integrations/transcript-ai/index.js";
|
|
4
|
-
import { composeEditor as composeEditor$1 } from "../presets/compose.js";
|
|
5
5
|
import { mediaFeature } from "../features/media/vue.js";
|
|
6
6
|
import _sfc_main from "./components/EditorCommandPalette.js";
|
|
7
7
|
import { aiFeature } from "../features/ai/vue.js";
|
package/dist/vue/kit/types.d.ts
CHANGED
|
@@ -208,6 +208,8 @@ export interface InputMenuProps {
|
|
|
208
208
|
/** The picked values (`multiple`) or the picked value. */
|
|
209
209
|
modelValue?: string[] | string;
|
|
210
210
|
items?: InputMenuItem[];
|
|
211
|
+
/** Key of an item that carries the value (`'value'`); without it an object item is picked as the whole object. */
|
|
212
|
+
valueKey?: string;
|
|
211
213
|
multiple?: boolean;
|
|
212
214
|
searchTerm?: string;
|
|
213
215
|
/** Do not filter `items` by the search term (the host searches). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecsplico/editor",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue and React editor library on TipTap v3 (Vue: Nuxt UI; React: shadcn/ui): framework-free features with Vue and React bindings, simple and advanced presets, tree-shakeable entries. Built ESM with type declarations.",
|
|
6
6
|
"license": "MIT",
|