@threadlabs/looma 0.31.0 → 0.31.2

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 (36) hide show
  1. package/components/shared/icons.js +1 -0
  2. package/components/shared/tooltip.js +7 -0
  3. package/components/ui-editor-footnote-editor/ui-editor-footnote-editor.html +57 -0
  4. package/components/ui-editor-footnote-editor/ui-editor-footnote-editor.js +38 -0
  5. package/components/ui-icon/ui-icon.html +1 -0
  6. package/components/ui-tooltip/ui-tooltip.js +4 -1
  7. package/dist/index.js +37 -36
  8. package/editor/chunks/extensions.js +363 -20
  9. package/editor/expressmark.js +1 -1
  10. package/editor/extensions/footnote.d.ts +40 -7
  11. package/editor/extensions/index.d.ts +1 -1
  12. package/editor/extensions/index.js +2 -2
  13. package/editor/footnote-editing.d.ts +46 -0
  14. package/editor/icons.d.ts +1 -0
  15. package/editor/index.js +4 -3
  16. package/editor/table-ui.d.ts +2 -11
  17. package/editor/toolbar-tooltip.d.ts +1 -1
  18. package/package.json +1 -1
  19. package/styles/ui-editor-footnote-editor.css +1 -0
  20. package/vanilla/UiEditorFootnoteEditor.d.ts +30 -0
  21. package/vanilla/UiEditorFootnoteEditor.js +101 -0
  22. package/vanilla/UiIcon.js +1 -1
  23. package/vanilla/index.js +1 -0
  24. package/vue/UiEditorFootnoteEditor.d.ts +57 -0
  25. package/vue/UiEditorFootnoteEditor.js +2 -0
  26. package/vue/UiEditorFootnoteEditor.vue +304 -0
  27. package/vue/UiIcon.vue +4 -0
  28. package/vue/chunks/UiEditorFootnoteEditor.js +306 -0
  29. package/vue/chunks/UiEditorImageToolbar.js +1 -1
  30. package/vue/chunks/UiEditorLinkForm.js +1 -1
  31. package/vue/chunks/UiIcon.js +15 -1
  32. package/vue/components.css +590 -575
  33. package/vue/editor/index.js +643 -45
  34. package/vue/editor/primitives.d.ts +3 -1
  35. package/vue/index.d.ts +1 -0
  36. package/vue/index.js +5 -4
@@ -0,0 +1,304 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.67 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed, getCurrentInstance, provide, ref, watchSyncEffect } from 'vue'
4
+ import type { PropType } from 'vue'
5
+ import {
6
+ checkHydratedRoot,
7
+ concat,
8
+ createDispatch,
9
+ nativeAttrs,
10
+ useComponentHost,
11
+ useReflectedProp,
12
+ } from './host'
13
+ import { acceptsControllerWrite } from './props'
14
+ import {
15
+ BINDING_INPUTS_PROP,
16
+ checkedProp,
17
+ checkPropInput,
18
+ evaluateInput,
19
+ type InputBindings,
20
+ inputDefault,
21
+ inputRead,
22
+ propValidityState,
23
+ READY_INPUT,
24
+ requireInputStatus,
25
+ UNRESOLVED_INPUT,
26
+ vPropValidity,
27
+ vuePropInputs,
28
+ } from './props'
29
+ import UiButton from './UiButton.vue'
30
+ import UiFormField from './UiFormField.vue'
31
+ import UiInput from './UiInput.vue'
32
+ import UiInputGroup from './UiInputGroup.vue'
33
+ import UiStack from './UiStack.vue'
34
+ import UiTextarea from './UiTextarea.vue'
35
+
36
+ defineOptions({ inheritAttrs: false })
37
+
38
+ const propValidityContract = {
39
+ props: {
40
+ editable: {
41
+ type: { kind: 'terminal', name: 'boolean' },
42
+ required: false,
43
+ target: { attribute: 'editable' },
44
+ description:
45
+ 'Whether the note\'s text can be edited here. A note with formatting or more than one block shows its text read-only; Go to note edits it in the\n document.',
46
+ default: false,
47
+ },
48
+ error: {
49
+ type: { kind: 'terminal', name: 'string' },
50
+ required: false,
51
+ target: { attribute: 'error' },
52
+ description:
53
+ 'Why the label field\'s label was not used. While set, the field is invalid and shows it.',
54
+ default: '',
55
+ },
56
+ label: {
57
+ type: { kind: 'terminal', name: 'string' },
58
+ required: false,
59
+ target: { attribute: 'value' },
60
+ description:
61
+ 'The footnote\'s label, which its references and its note share, shown between [^ and ].',
62
+ default: '',
63
+ },
64
+ note: {
65
+ type: { kind: 'terminal', name: 'string' },
66
+ required: false,
67
+ target: { attribute: 'value' },
68
+ description:
69
+ 'The note\'s text, shown in the note field, with each block of a longer note on its own line.',
70
+ default: '',
71
+ },
72
+ },
73
+ } as const
74
+ const props = defineProps({
75
+ editable: { type: null as unknown as PropType<boolean | null> },
76
+ error: { type: null as unknown as PropType<string | null> },
77
+ label: { type: null as unknown as PropType<string | null> },
78
+ note: { type: null as unknown as PropType<string | null> },
79
+ [BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
80
+ })
81
+ const acceptedProps: Record<string, unknown> = { editable: false, error: '', label: '', note: '' }
82
+ const inputTracking = vuePropInputs(acceptedProps, {
83
+ editable: false,
84
+ error: '',
85
+ label: '',
86
+ note: '',
87
+ }, (name, value, source, values) => {
88
+ switch (name) {
89
+ case 'editable':
90
+ return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
91
+ case 'error':
92
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
93
+ case 'label':
94
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
95
+ case 'note':
96
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
97
+ default:
98
+ return { ok: false }
99
+ }
100
+ }, () => {
101
+ void checkedProps.value
102
+ })
103
+ const propInputs = inputTracking.inputs
104
+ const checkedProps = computed(() => {
105
+ void inputTracking.version.value
106
+ return ({
107
+ editable: propInputs.value<boolean | null>(
108
+ 'editable',
109
+ props['editable'],
110
+ props[BINDING_INPUTS_PROP],
111
+ ) as boolean,
112
+ error: propInputs.value<string | null>(
113
+ 'error',
114
+ props['error'],
115
+ props[BINDING_INPUTS_PROP],
116
+ ) as string,
117
+ label: propInputs.value<string | null>(
118
+ 'label',
119
+ props['label'],
120
+ props[BINDING_INPUTS_PROP],
121
+ ) as string,
122
+ note: propInputs.value<string | null>(
123
+ 'note',
124
+ props['note'],
125
+ props[BINDING_INPUTS_PROP],
126
+ ) as string,
127
+ })
128
+ })
129
+ const inputStatus = (name: string, handlesError: boolean) => {
130
+ void checkedProps.value
131
+ void inputTracking.version.value
132
+ return requireInputStatus(propInputs.status(name), handlesError)
133
+ }
134
+ void checkedProps.value
135
+ watchSyncEffect(() => {
136
+ void checkedProps.value
137
+ })
138
+ const reflectedProp = useReflectedProp()
139
+ const hydrationInstance = getCurrentInstance()
140
+ const emit = defineEmits<{
141
+ 'update:label': [value: string]
142
+ text: [event: CustomEvent<{ readonly text: string }>]
143
+ label: [event: CustomEvent<{ readonly label: string }>]
144
+ go: [event: CustomEvent<Readonly<Record<string, unknown>>>]
145
+ done: [event: CustomEvent<Readonly<Record<string, unknown>>>]
146
+ }>()
147
+
148
+ const root = ref<HTMLElement | null>(null)
149
+ const base = ref('ui-editor-footnote-editor')
150
+ let guardedPrevious: any = null
151
+ const guarded = computed(() => {
152
+ const candidate: any = concat(base.value, '-label')
153
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedPrevious
154
+ return guardedPrevious = candidate
155
+ })
156
+ let guardedBindingPrevious: any = null
157
+ const guardedBinding = computed(() => {
158
+ const candidate: any = concat(base.value, '-label')
159
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedBindingPrevious
160
+ return guardedBindingPrevious = candidate
161
+ })
162
+ let guardedBinding2Previous: any = null
163
+ const guardedBinding2 = computed(() => {
164
+ const candidate: any = concat(base.value, '-note')
165
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedBinding2Previous
166
+ return guardedBinding2Previous = candidate
167
+ })
168
+ let guardedBinding3Previous: any = null
169
+ const guardedBinding3 = computed(() => {
170
+ const candidate: any = concat(base.value, '-note')
171
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedBinding3Previous
172
+ return guardedBinding3Previous = candidate
173
+ })
174
+ provide('html-next:ui-editor-footnote-editor:base', base)
175
+ checkHydratedRoot('div', 'ui-editor-footnote-editor')
176
+
177
+ const isTextDetail = (
178
+ detail: unknown,
179
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
180
+ && typeof (detail as Record<string, unknown>)['text'] === 'string'
181
+ && Object.keys(detail as object).every((key) => ['text'].includes(key)))
182
+ const isLabelDetail = (
183
+ detail: unknown,
184
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
185
+ && typeof (detail as Record<string, unknown>)['label'] === 'string'
186
+ && Object.keys(detail as object).every((key) => ['label'].includes(key)))
187
+ const isGoDetail = (
188
+ detail: unknown,
189
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
190
+ && Object.values(detail as object).every((item: unknown) => true))
191
+ const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
192
+ checks: {
193
+ text: isTextDetail,
194
+ label: isLabelDetail,
195
+ go: isGoDetail,
196
+ done: isGoDetail,
197
+ },
198
+ modeled: ['label'],
199
+ })
200
+
201
+ useComponentHost(
202
+ () => import('../components/ui-editor-footnote-editor/ui-editor-footnote-editor.js'),
203
+ {
204
+ root,
205
+ module: true,
206
+ dispatch,
207
+ acceptsState: (name: string, keys: readonly string[], value: unknown) =>
208
+ acceptsControllerWrite(
209
+ value,
210
+ ({ base: { kind: 'terminal', name: 'string' } } as Record<string, any>)[name],
211
+ keys,
212
+ ),
213
+ initials: { base: 'ui-editor-footnote-editor' },
214
+ controllerSource: {
215
+ specifier: '../components/ui-editor-footnote-editor/ui-editor-footnote-editor.js',
216
+ definition: './components/ui-editor-footnote-editor/ui-editor-footnote-editor.html',
217
+ },
218
+ props: checkedProps,
219
+ inputs: propInputs,
220
+ inputTracking,
221
+ propInputs: (name: string) => {
222
+ const incoming = hydrationInstance?.vnode.props
223
+ const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
224
+ return incoming !== null && incoming !== undefined
225
+ ? (incoming[name] ?? incoming[kebab] ?? null)
226
+ : null
227
+ },
228
+ propNames: ['editable', 'error', 'label', 'note'],
229
+ propValidity: (name: string) =>
230
+ propValidityState({ contract: propValidityContract, values: { ...props } }, name),
231
+ state: { base },
232
+ },
233
+ )
234
+ </script>
235
+
236
+ <template>
237
+ <div
238
+ role="dialog"
239
+ aria-label="Edit footnote"
240
+ v-bind="nativeAttrs($attrs)"
241
+ data-hn
242
+ v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
243
+ :data-ui-editor-footnote-editor-prop-editable="reflectedProp('editable', 'editable', checkedProps.editable, undefined, false)"
244
+ :data-ui-editor-footnote-editor-prop-error="reflectedProp('error', 'error', checkedProps.error, undefined, false)"
245
+ :data-ui-editor-footnote-editor-prop-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
246
+ :data-ui-editor-footnote-editor-prop-note="reflectedProp('note', 'note', checkedProps.note, undefined, false)"
247
+ ref="root"
248
+ >
249
+ <UiStack gap="s"><template
250
+ v-for="boundInput in [evaluateInput(
251
+ () => (inputRead(checkedProps.error, inputStatus('error', true)) !== '') as any,
252
+ READY_INPUT,
253
+ )]"
254
+ ><UiFormField
255
+ :invalid="boundInput.value"
256
+ v-bind="{ [BINDING_INPUTS_PROP]: { invalid: () => boundInput } }"
257
+ ><UiInputGroup><UiInput
258
+ data-footnote-label=""
259
+ size="sm"
260
+ autocomplete="off"
261
+ :id="guardedBinding"
262
+ :value="checkedProps.label"
263
+ v-bind="{
264
+ [BINDING_INPUTS_PROP]: {
265
+ value: () => ({ value: checkedProps.label, status: inputStatus('label', true) }),
266
+ },
267
+ }"
268
+ />
269
+ <template #prefix><span slot="prefix">[^</span></template>
270
+ <template #suffix><span slot="suffix">]</span></template></UiInputGroup>
271
+ <template #label><label slot="label" :for="guarded">Label</label></template>
272
+ <template #error><span slot="error">{{
273
+ checkedProps.error
274
+ }}</span></template></UiFormField></template>{{ ' ' }}<UiFormField><UiInputGroup
275
+ :multiline="true"
276
+ ><template
277
+ v-for="boundInputSnapshot in [evaluateInput(
278
+ () => (!inputRead(checkedProps.editable, inputStatus('editable', true))) as any,
279
+ READY_INPUT,
280
+ )]"
281
+ ><UiTextarea
282
+ data-footnote-note=""
283
+ size="sm"
284
+ :rows="2"
285
+ :autosize="true"
286
+ placeholder="Write the note"
287
+ :id="guardedBinding3"
288
+ :readonly="boundInputSnapshot.value"
289
+ :value="checkedProps.note"
290
+ v-bind="{
291
+ [BINDING_INPUTS_PROP]: {
292
+ readonly: () => boundInputSnapshot,
293
+ value: () => ({ value: checkedProps.note, status: inputStatus('note', true) }),
294
+ },
295
+ }"
296
+ /></template>
297
+ <template #action><UiButton slot="action" size="sm" data-footnote-go=""
298
+ >Go to note</UiButton></template></UiInputGroup>
299
+ <template #label><label slot="label" :for="guardedBinding2">Note</label></template>
300
+ <template #help><span v-if="!checkedProps.editable" slot="help"
301
+ >This note has formatting, so it is edited in the
302
+ document.</span></template></UiFormField></UiStack>
303
+ </div>
304
+ </template>
package/vue/UiIcon.vue CHANGED
@@ -409,6 +409,10 @@ const shapes: ReturnType<typeof inputComputed<any>> = inputComputed<any>(
409
409
  tag: 'path',
410
410
  d: 'M14 12a4 4 0 0 1 0 8H6',
411
411
  }, { tag: 'line', x1: '4', x2: '20', y1: '12', y2: '12' }],
412
+ superscript: [{ tag: 'path', d: 'm4 19 8-8' }, { tag: 'path', d: 'm12 19-8-8' }, {
413
+ tag: 'path',
414
+ d: 'M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06',
415
+ }],
412
416
  table: [{
413
417
  tag: 'path',
414
418
  d: 'M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18',
@@ -0,0 +1,306 @@
1
+ import { a as concat, i as checkHydratedRoot, o as createDispatch, p as nativeAttrs, v as useComponentHost, y as useReflectedProp } from "./_plugin-vue_export-helper.js";
2
+ import { c as inputRead, f as vPropValidity, i as checkPropInput, l as propValidityState, n as READY_INPUT, o as evaluateInput, p as vuePropInputs, r as acceptsControllerWrite, t as BINDING_INPUTS_PROP, u as requireInputStatus } from "./props.js";
3
+ import { t as UiButton_default } from "./UiButton.js";
4
+ import { t as UiInput_default } from "./UiInput.js";
5
+ import { t as UiStack_default } from "./UiStack.js";
6
+ import { t as UiFormField_default } from "./UiFormField.js";
7
+ import { t as UiInputGroup_default } from "./UiInputGroup.js";
8
+ import { t as UiTextarea_default } from "./UiTextarea.js";
9
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderList, toDisplayString, unref, watchSyncEffect, withCtx, withDirectives } from "vue";
10
+ //#region .build/vue/UiEditorFootnoteEditor.vue?vue&type=script&setup=true&lang.ts
11
+ var _hoisted_1 = [
12
+ "data-ui-editor-footnote-editor-prop-editable",
13
+ "data-ui-editor-footnote-editor-prop-error",
14
+ "data-ui-editor-footnote-editor-prop-label",
15
+ "data-ui-editor-footnote-editor-prop-note"
16
+ ];
17
+ var _hoisted_2 = ["for"];
18
+ var _hoisted_3 = { slot: "error" };
19
+ var _hoisted_4 = ["for"];
20
+ var _hoisted_5 = {
21
+ key: 0,
22
+ slot: "help"
23
+ };
24
+ //#endregion
25
+ //#region .build/vue/UiEditorFootnoteEditor.vue
26
+ var UiEditorFootnoteEditor_default = /* @__PURE__ */ defineComponent({
27
+ inheritAttrs: false,
28
+ __name: "UiEditorFootnoteEditor",
29
+ props: {
30
+ editable: { type: null },
31
+ error: { type: null },
32
+ label: { type: null },
33
+ note: { type: null },
34
+ [BINDING_INPUTS_PROP]: { type: null }
35
+ },
36
+ emits: [
37
+ "update:label",
38
+ "text",
39
+ "label",
40
+ "go",
41
+ "done"
42
+ ],
43
+ setup(__props, { emit: __emit }) {
44
+ const propValidityContract = { props: {
45
+ editable: {
46
+ type: {
47
+ kind: "terminal",
48
+ name: "boolean"
49
+ },
50
+ required: false,
51
+ target: { attribute: "editable" },
52
+ description: "Whether the note's text can be edited here. A note with formatting or more than one block shows its text read-only; Go to note edits it in the\n document.",
53
+ default: false
54
+ },
55
+ error: {
56
+ type: {
57
+ kind: "terminal",
58
+ name: "string"
59
+ },
60
+ required: false,
61
+ target: { attribute: "error" },
62
+ description: "Why the label field's label was not used. While set, the field is invalid and shows it.",
63
+ default: ""
64
+ },
65
+ label: {
66
+ type: {
67
+ kind: "terminal",
68
+ name: "string"
69
+ },
70
+ required: false,
71
+ target: { attribute: "value" },
72
+ description: "The footnote's label, which its references and its note share, shown between [^ and ].",
73
+ default: ""
74
+ },
75
+ note: {
76
+ type: {
77
+ kind: "terminal",
78
+ name: "string"
79
+ },
80
+ required: false,
81
+ target: { attribute: "value" },
82
+ description: "The note's text, shown in the note field, with each block of a longer note on its own line.",
83
+ default: ""
84
+ }
85
+ } };
86
+ const props = __props;
87
+ const inputTracking = vuePropInputs({
88
+ editable: false,
89
+ error: "",
90
+ label: "",
91
+ note: ""
92
+ }, {
93
+ editable: false,
94
+ error: "",
95
+ label: "",
96
+ note: ""
97
+ }, (name, value, source, values) => {
98
+ switch (name) {
99
+ case "editable": return checkPropInput(value, {
100
+ kind: "terminal",
101
+ name: "boolean"
102
+ }, true, true);
103
+ case "error": return checkPropInput(value, {
104
+ kind: "terminal",
105
+ name: "string"
106
+ }, true, true);
107
+ case "label": return checkPropInput(value, {
108
+ kind: "terminal",
109
+ name: "string"
110
+ }, true, true);
111
+ case "note": return checkPropInput(value, {
112
+ kind: "terminal",
113
+ name: "string"
114
+ }, true, true);
115
+ default: return { ok: false };
116
+ }
117
+ }, () => {
118
+ checkedProps.value;
119
+ });
120
+ const propInputs = inputTracking.inputs;
121
+ const checkedProps = computed(() => {
122
+ inputTracking.version.value;
123
+ return {
124
+ editable: propInputs.value("editable", props["editable"], props[BINDING_INPUTS_PROP]),
125
+ error: propInputs.value("error", props["error"], props[BINDING_INPUTS_PROP]),
126
+ label: propInputs.value("label", props["label"], props[BINDING_INPUTS_PROP]),
127
+ note: propInputs.value("note", props["note"], props[BINDING_INPUTS_PROP])
128
+ };
129
+ });
130
+ const inputStatus = (name, handlesError) => {
131
+ checkedProps.value;
132
+ inputTracking.version.value;
133
+ return requireInputStatus(propInputs.status(name), handlesError);
134
+ };
135
+ checkedProps.value;
136
+ watchSyncEffect(() => {
137
+ checkedProps.value;
138
+ });
139
+ const reflectedProp = useReflectedProp();
140
+ const hydrationInstance = getCurrentInstance();
141
+ const emit = __emit;
142
+ const root = ref(null);
143
+ const base = ref("ui-editor-footnote-editor");
144
+ let guardedPrevious = null;
145
+ const guarded = computed(() => {
146
+ const candidate = concat(base.value, "-label");
147
+ if (candidate === Symbol.for("html-next.invalid-result")) return guardedPrevious;
148
+ return guardedPrevious = candidate;
149
+ });
150
+ let guardedBindingPrevious = null;
151
+ const guardedBinding = computed(() => {
152
+ const candidate = concat(base.value, "-label");
153
+ if (candidate === Symbol.for("html-next.invalid-result")) return guardedBindingPrevious;
154
+ return guardedBindingPrevious = candidate;
155
+ });
156
+ let guardedBinding2Previous = null;
157
+ const guardedBinding2 = computed(() => {
158
+ const candidate = concat(base.value, "-note");
159
+ if (candidate === Symbol.for("html-next.invalid-result")) return guardedBinding2Previous;
160
+ return guardedBinding2Previous = candidate;
161
+ });
162
+ let guardedBinding3Previous = null;
163
+ const guardedBinding3 = computed(() => {
164
+ const candidate = concat(base.value, "-note");
165
+ if (candidate === Symbol.for("html-next.invalid-result")) return guardedBinding3Previous;
166
+ return guardedBinding3Previous = candidate;
167
+ });
168
+ provide("html-next:ui-editor-footnote-editor:base", base);
169
+ checkHydratedRoot("div", "ui-editor-footnote-editor");
170
+ const isTextDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["text"] === "string" && Object.keys(detail).every((key) => ["text"].includes(key));
171
+ const isLabelDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["label"] === "string" && Object.keys(detail).every((key) => ["label"].includes(key));
172
+ const isGoDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && Object.values(detail).every((item) => true);
173
+ const dispatch = createDispatch(root, emit, {
174
+ checks: {
175
+ text: isTextDetail,
176
+ label: isLabelDetail,
177
+ go: isGoDetail,
178
+ done: isGoDetail
179
+ },
180
+ modeled: ["label"]
181
+ });
182
+ useComponentHost(() => import("@threadlabs/looma/components/ui-editor-footnote-editor/ui-editor-footnote-editor.js"), {
183
+ root,
184
+ module: true,
185
+ dispatch,
186
+ acceptsState: (name, keys, value) => acceptsControllerWrite(value, { base: {
187
+ kind: "terminal",
188
+ name: "string"
189
+ } }[name], keys),
190
+ initials: { base: "ui-editor-footnote-editor" },
191
+ controllerSource: {
192
+ specifier: "../components/ui-editor-footnote-editor/ui-editor-footnote-editor.js",
193
+ definition: "./components/ui-editor-footnote-editor/ui-editor-footnote-editor.html"
194
+ },
195
+ props: checkedProps,
196
+ inputs: propInputs,
197
+ inputTracking,
198
+ propInputs: (name) => {
199
+ const incoming = hydrationInstance?.vnode.props;
200
+ const kebab = name.replace(/[A-Z]/g, (letter) => "-" + letter.toLowerCase());
201
+ return incoming !== null && incoming !== void 0 ? incoming[name] ?? incoming[kebab] ?? null : null;
202
+ },
203
+ propNames: [
204
+ "editable",
205
+ "error",
206
+ "label",
207
+ "note"
208
+ ],
209
+ propValidity: (name) => propValidityState({
210
+ contract: propValidityContract,
211
+ values: { ...props }
212
+ }, name),
213
+ state: { base }
214
+ });
215
+ return (_ctx, _cache) => {
216
+ return withDirectives((openBlock(), createElementBlock("div", mergeProps({
217
+ role: "dialog",
218
+ "aria-label": "Edit footnote"
219
+ }, unref(nativeAttrs)(_ctx.$attrs), {
220
+ "data-hn": "",
221
+ "data-ui-editor-footnote-editor-prop-editable": unref(reflectedProp)("editable", "editable", checkedProps.value.editable, void 0, false),
222
+ "data-ui-editor-footnote-editor-prop-error": unref(reflectedProp)("error", "error", checkedProps.value.error, void 0, false),
223
+ "data-ui-editor-footnote-editor-prop-label": unref(reflectedProp)("label", "label", checkedProps.value.label, void 0, false),
224
+ "data-ui-editor-footnote-editor-prop-note": unref(reflectedProp)("note", "note", checkedProps.value.note, void 0, false),
225
+ ref_key: "root",
226
+ ref: root
227
+ }), [createVNode(UiStack_default, { gap: "s" }, {
228
+ default: withCtx(() => [
229
+ (openBlock(true), createElementBlock(Fragment, null, renderList([unref(evaluateInput)(() => unref(inputRead)(checkedProps.value.error, inputStatus("error", true)) !== "", unref(READY_INPUT))], (boundInput) => {
230
+ return openBlock(), createBlock(UiFormField_default, mergeProps({ invalid: boundInput.value }, { ref_for: true }, { [unref(BINDING_INPUTS_PROP)]: { invalid: () => boundInput } }), {
231
+ label: withCtx(() => [createElementVNode("label", {
232
+ slot: "label",
233
+ for: guarded.value
234
+ }, "Label", 8, _hoisted_2)]),
235
+ error: withCtx(() => [createElementVNode("span", _hoisted_3, toDisplayString(checkedProps.value.error), 1)]),
236
+ default: withCtx(() => [createVNode(UiInputGroup_default, null, {
237
+ prefix: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("span", { slot: "prefix" }, "[^", -1)])]),
238
+ suffix: withCtx(() => [..._cache[1] || (_cache[1] = [createElementVNode("span", { slot: "suffix" }, "]", -1)])]),
239
+ default: withCtx(() => [createVNode(UiInput_default, mergeProps({
240
+ "data-footnote-label": "",
241
+ size: "sm",
242
+ autocomplete: "off",
243
+ id: guardedBinding.value,
244
+ value: checkedProps.value.label
245
+ }, { ref_for: true }, { [unref(BINDING_INPUTS_PROP)]: { value: () => ({
246
+ value: checkedProps.value.label,
247
+ status: inputStatus("label", true)
248
+ }) } }), null, 16, ["id", "value"])]),
249
+ _: 1
250
+ })]),
251
+ _: 1
252
+ }, 16, ["invalid"]);
253
+ }), 256)),
254
+ _cache[3] || (_cache[3] = createTextVNode(toDisplayString(" "), -1)),
255
+ createVNode(UiFormField_default, null, {
256
+ label: withCtx(() => [createElementVNode("label", {
257
+ slot: "label",
258
+ for: guardedBinding2.value
259
+ }, "Note", 8, _hoisted_4)]),
260
+ help: withCtx(() => [!checkedProps.value.editable ? (openBlock(), createElementBlock("span", _hoisted_5, "This note has formatting, so it is edited in the document.")) : createCommentVNode("v-if", true)]),
261
+ default: withCtx(() => [createVNode(UiInputGroup_default, { multiline: true }, {
262
+ action: withCtx(() => [createVNode(UiButton_default, {
263
+ slot: "action",
264
+ size: "sm",
265
+ "data-footnote-go": ""
266
+ }, {
267
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode("Go to note", -1)])]),
268
+ _: 1
269
+ })]),
270
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList([unref(evaluateInput)(() => !unref(inputRead)(checkedProps.value.editable, inputStatus("editable", true)), unref(READY_INPUT))], (boundInputSnapshot) => {
271
+ return openBlock(), createBlock(UiTextarea_default, mergeProps({
272
+ "data-footnote-note": "",
273
+ size: "sm",
274
+ rows: 2,
275
+ autosize: true,
276
+ placeholder: "Write the note",
277
+ id: guardedBinding3.value,
278
+ readonly: boundInputSnapshot.value,
279
+ value: checkedProps.value.note
280
+ }, { ref_for: true }, { [unref(BINDING_INPUTS_PROP)]: {
281
+ readonly: () => boundInputSnapshot,
282
+ value: () => ({
283
+ value: checkedProps.value.note,
284
+ status: inputStatus("note", true)
285
+ })
286
+ } }), null, 16, [
287
+ "id",
288
+ "readonly",
289
+ "value"
290
+ ]);
291
+ }), 256))]),
292
+ _: 1
293
+ })]),
294
+ _: 1
295
+ })
296
+ ]),
297
+ _: 1
298
+ })], 16, _hoisted_1)), [[unref(vPropValidity), {
299
+ contract: propValidityContract,
300
+ values: { ...props }
301
+ }]]);
302
+ };
303
+ }
304
+ });
305
+ //#endregion
306
+ export { UiEditorFootnoteEditor_default as t };
@@ -6,8 +6,8 @@ import { t as UiCluster_default } from "./UiCluster.js";
6
6
  import { t as UiTooltip_default } from "./UiTooltip.js";
7
7
  import { t as UiInput_default } from "./UiInput.js";
8
8
  import { t as UiStack_default } from "./UiStack.js";
9
- import { t as UiEditorToolbar_default } from "./UiEditorToolbar.js";
10
9
  import { t as UiFormField_default } from "./UiFormField.js";
10
+ import { t as UiEditorToolbar_default } from "./UiEditorToolbar.js";
11
11
  import { t as UiIconButton_default } from "./UiIconButton.js";
12
12
  import { t as UiPopover_default } from "./UiPopover.js";
13
13
  import { t as UiText_default } from "./UiText.js";
@@ -6,9 +6,9 @@ import { t as UiScrollArea_default } from "./UiScrollArea.js";
6
6
  import { t as UiInput_default } from "./UiInput.js";
7
7
  import { t as UiStack_default } from "./UiStack.js";
8
8
  import { t as UiFormField_default } from "./UiFormField.js";
9
+ import { t as UiInputGroup_default } from "./UiInputGroup.js";
9
10
  import { t as UiIconButton_default } from "./UiIconButton.js";
10
11
  import { t as UiText_default } from "./UiText.js";
11
- import { t as UiInputGroup_default } from "./UiInputGroup.js";
12
12
  import { t as UiSearchResultRow_default } from "./UiSearchResultRow.js";
13
13
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderList, toDisplayString, unref, watchSyncEffect, withCtx, withDirectives } from "vue";
14
14
  //#region .build/vue/UiEditorLinkForm.vue?vue&type=script&setup=true&lang.ts
@@ -1034,6 +1034,20 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
1034
1034
  y2: "12"
1035
1035
  }
1036
1036
  ],
1037
+ superscript: [
1038
+ {
1039
+ tag: "path",
1040
+ d: "m4 19 8-8"
1041
+ },
1042
+ {
1043
+ tag: "path",
1044
+ d: "m12 19-8-8"
1045
+ },
1046
+ {
1047
+ tag: "path",
1048
+ d: "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06"
1049
+ }
1050
+ ],
1037
1051
  table: [{
1038
1052
  tag: "path",
1039
1053
  d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"
@@ -1252,6 +1266,6 @@ var UiIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
1252
1266
  }]]);
1253
1267
  };
1254
1268
  }
1255
- }), [["__scopeId", "data-v-37fb8577"]]);
1269
+ }), [["__scopeId", "data-v-efb2c459"]]);
1256
1270
  //#endregion
1257
1271
  export { UiIcon_default as t };