vlite3 1.5.50 → 1.5.52
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/components/CategoryManager/CategoryManager2.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent2.vue.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem2.vue.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Form/Form.vue.d.ts +3 -0
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form2.vue.js +292 -276
- package/components/Form/composables/useCustomFieldRows.d.ts +3 -0
- package/components/Form/composables/useCustomFieldRows.js +109 -58
- package/components/Form/composables/useForm.d.ts +4 -1
- package/components/Form/composables/useForm.js +249 -187
- package/components/Form/index.vue.d.ts +2 -0
- package/components/Form/index.vue.js +2 -2
- package/components/Form/index2.vue.js +12 -8
- package/components/Form/types.d.ts +2 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.d.ts +58 -0
- package/components/RichTextEditor/RichTextEditor.vue.js +309 -180
- package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +3 -8
- package/components/RichTextEditor/RichTextLinkPopover3.vue.js +2 -2
- package/components/RichTextEditor/RichTextToolbar3.vue.js +2 -2
- package/components/RichTextEditor/index.d.ts +1 -1
- package/components/RichTextEditor/types.d.ts +22 -0
- package/components/Screen/ScreenFilter.vue.js +2 -2
- package/components/Screen/components/ScreenToolbar.vue.d.ts +2 -2
- package/directives/ScrollReveal/ScrollRevealPager.js +76 -76
- package/docs/components/rich-text-editor.md +33 -2
- package/docs-manifest.json +3 -3
- package/package.json +1 -1
- package/style.css +1 -1
- /package/components/RichTextEditor/{RichTextLinkPopover2.vue.js → RichTextLinkPopover.vue.js} +0 -0
- /package/components/RichTextEditor/{RichTextToolbar2.vue.js → RichTextToolbar.vue.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as RichTextEditor } from './RichTextEditor.vue';
|
|
2
2
|
export { default as RichTextReader } from './RichTextReader.vue';
|
|
3
|
-
export type { RichTextToolId, RichTextToolsPreset, RichTextTools } from './types';
|
|
3
|
+
export type { RichTextToolId, RichTextToolsPreset, RichTextTools, RichTextEditorProps } from './types';
|
|
4
4
|
export { resolveRichTextTools, RICH_TEXT_TOOL_GROUPS } from './types';
|
|
@@ -23,6 +23,28 @@ export type RichTextToolsPreset = 'all' | 'standard' | 'basic' | 'minimal';
|
|
|
23
23
|
* - `RichTextToolsPreset` — apply a curated preset.
|
|
24
24
|
*/
|
|
25
25
|
export type RichTextTools = RichTextToolId[] | RichTextToolsPreset;
|
|
26
|
+
export interface RichTextEditorProps {
|
|
27
|
+
/** Authoritative HTML. Parents must not feed obsolete save acknowledgements back as model values. */
|
|
28
|
+
modelValue?: string;
|
|
29
|
+
/** Change for a document switch or reset, even when HTML is unchanged. */
|
|
30
|
+
documentKey?: string | number;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
minHeight?: string;
|
|
34
|
+
maxHeight?: string;
|
|
35
|
+
label?: string;
|
|
36
|
+
error?: string;
|
|
37
|
+
id?: string;
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
/** Toolbar configuration; omitted renders the full toolbar. */
|
|
40
|
+
tools?: RichTextTools;
|
|
41
|
+
}
|
|
42
|
+
export interface RichTextLinkPopoverProps {
|
|
43
|
+
visible: boolean;
|
|
44
|
+
isEditing: boolean;
|
|
45
|
+
url: string;
|
|
46
|
+
popoverStyle?: Record<string, string | number>;
|
|
47
|
+
}
|
|
26
48
|
/**
|
|
27
49
|
* Logical toolbar groups, in the order they appear in the rendered toolbar.
|
|
28
50
|
* Used internally to decide which separator to render between groups.
|
|
@@ -48,18 +48,18 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
48
48
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
49
49
|
delete: (items: any[]) => any;
|
|
50
50
|
add: () => any;
|
|
51
|
+
refresh: () => any;
|
|
51
52
|
"update:activeView": (val: string) => any;
|
|
52
53
|
"update:activeFilters": (val: any) => any;
|
|
53
54
|
"update:searchQuery": (val: string) => any;
|
|
54
|
-
refresh: () => any;
|
|
55
55
|
"select-dropdown": (opt: any) => any;
|
|
56
56
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
57
57
|
onDelete?: (items: any[]) => any;
|
|
58
58
|
onAdd?: () => any;
|
|
59
|
+
onRefresh?: () => any;
|
|
59
60
|
"onUpdate:activeView"?: (val: string) => any;
|
|
60
61
|
"onUpdate:activeFilters"?: (val: any) => any;
|
|
61
62
|
"onUpdate:searchQuery"?: (val: string) => any;
|
|
62
|
-
onRefresh?: () => any;
|
|
63
63
|
"onSelect-dropdown"?: (opt: any) => any;
|
|
64
64
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
65
65
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const v = "(min-width: 1024px) and (hover: hover) and (pointer: fine)",
|
|
1
|
+
const v = "(min-width: 1024px) and (hover: hover) and (pointer: fine)", M = [
|
|
2
2
|
"input",
|
|
3
3
|
"textarea",
|
|
4
4
|
"select",
|
|
@@ -39,8 +39,8 @@ const v = "(min-width: 1024px) and (hover: hover) and (pointer: fine)", E = [
|
|
|
39
39
|
"scrollbar",
|
|
40
40
|
"application"
|
|
41
41
|
].map((p) => `[role~="${p}"]`)
|
|
42
|
-
].join(", "), r = 2, w = 12,
|
|
43
|
-
class
|
|
42
|
+
].join(", "), r = 2, w = 12, E = 220, y = 320, k = 560, A = 60;
|
|
43
|
+
class S {
|
|
44
44
|
sections = /* @__PURE__ */ new Set();
|
|
45
45
|
desktop = window.matchMedia(v);
|
|
46
46
|
listeners;
|
|
@@ -64,8 +64,8 @@ class y {
|
|
|
64
64
|
const t = this.sections.size >= 2 && this.desktop.matches;
|
|
65
65
|
if (!!this.listeners === t || (this.listeners?.abort(), this.listeners = void 0, !t)) return;
|
|
66
66
|
this.listeners = new AbortController();
|
|
67
|
-
const i = this.context.documentRoot ? window : this.context.container,
|
|
68
|
-
i.addEventListener("wheel", this.onWheel, { ...
|
|
67
|
+
const i = this.context.documentRoot ? window : this.context.container, n = { capture: !0, signal: this.listeners.signal };
|
|
68
|
+
i.addEventListener("wheel", this.onWheel, { ...n, passive: !1 }), i.addEventListener("keydown", this.onKeydown, n);
|
|
69
69
|
};
|
|
70
70
|
reset = () => {
|
|
71
71
|
this.cancel(), this.wheel = void 0, this.distance = 0, this.readingElement = void 0, this.readingEdge = void 0;
|
|
@@ -73,26 +73,26 @@ class y {
|
|
|
73
73
|
cancel() {
|
|
74
74
|
this.movement && (cancelAnimationFrame(this.movement.frame), this.movement = void 0);
|
|
75
75
|
}
|
|
76
|
-
animate(t, i,
|
|
77
|
-
const
|
|
76
|
+
animate(t, i, n) {
|
|
77
|
+
const s = window.location.href, e = (h) => {
|
|
78
78
|
if (this.movement === t) {
|
|
79
|
-
if (document.hidden || window.location.href !==
|
|
79
|
+
if (document.hidden || window.location.href !== s || i && !i.isConnected) {
|
|
80
80
|
this.reset();
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
n(h) && (t.frame = requestAnimationFrame(e));
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
t.frame = requestAnimationFrame(e);
|
|
87
87
|
}
|
|
88
88
|
wheelGesture(t, i) {
|
|
89
|
-
const
|
|
90
|
-
let h = 0,
|
|
91
|
-
return e && !
|
|
89
|
+
const n = Math.sign(t), s = Math.abs(t), e = this.wheel;
|
|
90
|
+
let h = 0, d = !e || n !== e.direction || i - e.lastAt >= E;
|
|
91
|
+
return e && !d && (e.decayTicks = s <= e.magnitude && s < e.peak ? e.decayTicks + 1 : 0, e.decayTicks >= 3 && s <= e.peak / 2 && (e.floor = Math.min(e.floor ?? s, s)), e.floor !== void 0 && (e.floor = Math.min(e.floor, s), e.renewed = s > e.magnitude && s >= e.floor * 2 ? e.renewed + s - e.floor : 0, d = e.renewed >= w, d && (h = n * Math.max(0, e.renewed - s))), e.lastAt = i, e.magnitude = s, e.peak = Math.max(e.peak, s)), !e || d ? (this.distance = h, this.readingEdge = void 0, this.wheel = {
|
|
92
92
|
lastAt: i,
|
|
93
|
-
direction:
|
|
94
|
-
magnitude:
|
|
95
|
-
peak:
|
|
93
|
+
direction: n,
|
|
94
|
+
magnitude: s,
|
|
95
|
+
peak: s,
|
|
96
96
|
decayTicks: 0,
|
|
97
97
|
renewed: 0,
|
|
98
98
|
consumed: !1
|
|
@@ -110,93 +110,93 @@ class y {
|
|
|
110
110
|
}
|
|
111
111
|
measureSection(t, i = this.geometry()) {
|
|
112
112
|
if (!t.isConnected) return;
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
115
|
-
const
|
|
116
|
-
return { element: t, start: e, end:
|
|
113
|
+
const n = t.getBoundingClientRect();
|
|
114
|
+
if (!n.height || !n.width) return;
|
|
115
|
+
const s = (h) => Math.max(0, Math.min(h, i.limit)), e = s(n.top - i.top + i.from - i.padding);
|
|
116
|
+
return { element: t, start: e, end: s(Math.max(e, n.bottom - i.bottom + i.from)) };
|
|
117
117
|
}
|
|
118
118
|
measure() {
|
|
119
119
|
const t = this.geometry();
|
|
120
|
-
return Array.from(this.sections).map((i) => this.measureSection(i, t)).filter((i) => !!i).sort((i,
|
|
120
|
+
return Array.from(this.sections).map((i) => this.measureSection(i, t)).filter((i) => !!i).sort((i, n) => i.start - n.start);
|
|
121
121
|
}
|
|
122
122
|
hasPagingStops() {
|
|
123
123
|
const t = this.geometry();
|
|
124
124
|
if (t.limit <= r) return !1;
|
|
125
125
|
let i = 0;
|
|
126
|
-
for (const
|
|
127
|
-
if (this.measureSection(
|
|
126
|
+
for (const n of this.sections)
|
|
127
|
+
if (this.measureSection(n, t) && ++i === 2) return !0;
|
|
128
128
|
return !1;
|
|
129
129
|
}
|
|
130
|
-
readWheel(t, i,
|
|
130
|
+
readWheel(t, i, n, s) {
|
|
131
131
|
const e = this.context.position();
|
|
132
132
|
if (e < t.start - r || e > t.end + r || (i > 0 ? e >= t.end - r : e <= t.start + r)) return !1;
|
|
133
133
|
this.readingElement = t.element, this.distance = 0;
|
|
134
|
-
const h = this.readingStep(),
|
|
135
|
-
|
|
136
|
-
const c = Math.max(t.start, Math.min(
|
|
134
|
+
const h = this.readingStep(), d = this.movement?.reading, a = (d && this.movement?.direction === i ? d.position : e) + Math.max(-h, Math.min(n, h)), m = a >= t.end || a <= t.start;
|
|
135
|
+
s.preventDefault();
|
|
136
|
+
const c = Math.max(t.start, Math.min(a, t.end));
|
|
137
137
|
if (this.context.reducedMotion.matches)
|
|
138
138
|
this.cancel(), this.context.write(c);
|
|
139
|
-
else if (
|
|
140
|
-
|
|
139
|
+
else if (d && this.movement)
|
|
140
|
+
d.position = c, this.movement.direction = i;
|
|
141
141
|
else {
|
|
142
142
|
this.cancel();
|
|
143
143
|
const l = { position: c }, g = { frame: 0, direction: i, reading: l };
|
|
144
144
|
this.movement = g;
|
|
145
145
|
let x = performance.now(), u = e;
|
|
146
146
|
this.animate(g, t.element, (b) => {
|
|
147
|
-
u += (l.position - u) * (1 - Math.exp(-(b - x) /
|
|
147
|
+
u += (l.position - u) * (1 - Math.exp(-(b - x) / A)), x = b;
|
|
148
148
|
const f = Math.abs(l.position - u) < 0.1;
|
|
149
149
|
return this.context.write(f ? l.position : u), f && (this.movement = void 0), !f;
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return m && (this.readingEdge = { element: t.element, direction: i }, this.wheel && (this.wheel.consumed = !0)), !0;
|
|
153
153
|
}
|
|
154
154
|
/** Child scroll owners win, including at a contained overscroll boundary. */
|
|
155
155
|
nestedOwns(t, i) {
|
|
156
|
-
for (const
|
|
157
|
-
if (
|
|
158
|
-
if (!(
|
|
159
|
-
if (t.type === "wheel" &&
|
|
160
|
-
const
|
|
161
|
-
if (!/^(auto|scroll|overlay)$/.test(
|
|
162
|
-
const e = i > 0 ?
|
|
163
|
-
if (
|
|
156
|
+
for (const n of t.composedPath()) {
|
|
157
|
+
if (n === this.context.container || n === document.body || n === document.documentElement) break;
|
|
158
|
+
if (!(n instanceof HTMLElement)) continue;
|
|
159
|
+
if (t.type === "wheel" && n.getAttribute("data-vlite-wheel-directions")?.split(" ").includes(i > 0 ? "down" : "up")) return !0;
|
|
160
|
+
const s = getComputedStyle(n);
|
|
161
|
+
if (!/^(auto|scroll|overlay)$/.test(s.overflowY)) continue;
|
|
162
|
+
const e = i > 0 ? n.scrollTop + n.clientHeight < n.scrollHeight - 1 : n.scrollTop > 0;
|
|
163
|
+
if (n.scrollHeight > n.clientHeight && e || /^(contain|none)$/.test(s.overscrollBehaviorY)) return !0;
|
|
164
164
|
}
|
|
165
165
|
return !1;
|
|
166
166
|
}
|
|
167
167
|
enabled() {
|
|
168
168
|
if (document.hidden || !this.desktop.matches) return !1;
|
|
169
169
|
const { container: t, documentRoot: i } = this.context;
|
|
170
|
-
return ![t, ...i ? [document.body] : []].some((
|
|
170
|
+
return ![t, ...i ? [document.body] : []].some((n) => /^(hidden|clip)$/.test(getComputedStyle(n).overflowY));
|
|
171
171
|
}
|
|
172
172
|
readingStep() {
|
|
173
173
|
const t = this.context.viewport();
|
|
174
174
|
return Math.max(48, t.bottom - t.top - this.context.padding() - 48);
|
|
175
175
|
}
|
|
176
|
-
destination(t, i,
|
|
177
|
-
const
|
|
178
|
-
let e, h,
|
|
179
|
-
for (const l of
|
|
180
|
-
if (l.start <=
|
|
181
|
-
|
|
176
|
+
destination(t, i, n) {
|
|
177
|
+
const s = this.context.position();
|
|
178
|
+
let e, h, d;
|
|
179
|
+
for (const l of n)
|
|
180
|
+
if (l.start <= s + r && (e = l), l.start < s - r && (h = l), l.start > s + r) {
|
|
181
|
+
d = l;
|
|
182
182
|
break;
|
|
183
183
|
}
|
|
184
|
-
const
|
|
185
|
-
let
|
|
186
|
-
if (i &&
|
|
184
|
+
const o = e && e.end > e.start + r && s <= e.end + r, a = this.readingStep();
|
|
185
|
+
let m, c;
|
|
186
|
+
if (i && o && (t > 0 ? s < e.end - r : s > e.start + r) ? (c = e, m = Math.min(e.end, Math.max(e.start, s + t * a))) : (c = t > 0 ? d : h, m = c ? t > 0 ? c.start : c.end : t > 0 ? this.context.limit() : 0), !(Math.abs(m - s) <= r))
|
|
187
187
|
return {
|
|
188
|
-
position:
|
|
188
|
+
position: m,
|
|
189
189
|
element: c?.element,
|
|
190
|
-
progress: c && c.end > c.start ? (
|
|
190
|
+
progress: c && c.end > c.start ? (m - c.start) / (c.end - c.start) : 0,
|
|
191
191
|
atEnd: !c && t > 0
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
move(t, i) {
|
|
195
195
|
this.cancel(), this.readingElement = void 0;
|
|
196
|
-
const
|
|
197
|
-
this.movement =
|
|
196
|
+
const n = this.context.position(), s = { frame: 0, direction: i };
|
|
197
|
+
this.movement = s;
|
|
198
198
|
const e = () => {
|
|
199
|
-
if (this.movement !==
|
|
199
|
+
if (this.movement !== s) return;
|
|
200
200
|
const o = t.element && this.sections.has(t.element) ? this.measureSection(t.element) : void 0, a = o ? o.start + (o.end - o.start) * t.progress : t.atEnd ? this.context.limit() : Math.min(t.position, this.context.limit());
|
|
201
201
|
(!t.element || o) && Math.abs(a - this.context.position()) > r && this.context.write(a), this.movement = void 0, this.distance = 0, o && o.end > o.start + r && (this.readingElement = o.element);
|
|
202
202
|
};
|
|
@@ -204,10 +204,10 @@ class y {
|
|
|
204
204
|
this.context.write(t.position), e();
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
|
-
const h = performance.now();
|
|
208
|
-
this.animate(
|
|
209
|
-
const a = Math.min(1, (o - h) /
|
|
210
|
-
return this.context.write(
|
|
207
|
+
const h = performance.now(), d = Math.min(k, y + Math.abs(t.position - n) * 0.2);
|
|
208
|
+
this.animate(s, t.element, (o) => {
|
|
209
|
+
const a = Math.min(1, (o - h) / d);
|
|
210
|
+
return this.context.write(n + (t.position - n) * (1 - (1 - a) ** 3)), a === 1 && e(), a < 1;
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
onWheel = (t) => {
|
|
@@ -215,9 +215,9 @@ class y {
|
|
|
215
215
|
this.movement && this.reset();
|
|
216
216
|
return;
|
|
217
217
|
}
|
|
218
|
-
const i = Math.sign(t.deltaY),
|
|
219
|
-
if (!Number.isFinite(
|
|
220
|
-
const e = this.wheelGesture(
|
|
218
|
+
const i = Math.sign(t.deltaY), n = t.deltaMode === 1 ? 16 : t.deltaMode === 2 ? Math.max(1, this.context.viewport().bottom - this.context.viewport().top - this.context.padding()) : 1, s = t.deltaY * n;
|
|
219
|
+
if (!Number.isFinite(s)) return;
|
|
220
|
+
const e = this.wheelGesture(s, performance.now());
|
|
221
221
|
if (this.nestedOwns(t, i)) {
|
|
222
222
|
this.cancel(), e.consumed = !0, this.distance = 0;
|
|
223
223
|
return;
|
|
@@ -227,8 +227,8 @@ class y {
|
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
229
|
if (this.readingEdge) {
|
|
230
|
-
const
|
|
231
|
-
|
|
230
|
+
const o = this.readingEdge, a = this.measureSection(o.element), m = this.movement?.reading?.position ?? this.context.position();
|
|
231
|
+
a && (o.direction > 0 ? Math.abs(m - a.end) <= r : Math.abs(m - a.start) <= r) || (e.consumed = !1, this.readingEdge = void 0);
|
|
232
232
|
}
|
|
233
233
|
if (e.consumed) {
|
|
234
234
|
t.preventDefault();
|
|
@@ -239,26 +239,26 @@ class y {
|
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
241
|
if ((!this.movement || this.movement.reading) && this.readingElement) {
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
242
|
+
const o = this.measureSection(this.readingElement);
|
|
243
|
+
if (o && this.readWheel(o, i, s, t)) return;
|
|
244
244
|
this.readingElement = void 0;
|
|
245
245
|
}
|
|
246
|
-
if (Math.sign(this.distance) !== i && (this.distance = 0), this.distance +=
|
|
246
|
+
if (Math.sign(this.distance) !== i && (this.distance = 0), this.distance += s, Math.abs(this.distance) < w) {
|
|
247
247
|
t.preventDefault();
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
const h = this.measure();
|
|
251
251
|
if (h.length < 2) return;
|
|
252
252
|
if (!this.movement) {
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
253
|
+
const o = this.context.position(), a = h.find((m) => o >= m.start - r && o <= m.end + r && (i > 0 ? o < m.end - r : o > m.start + r));
|
|
254
|
+
if (a && this.readWheel(a, i, this.distance, t)) return;
|
|
255
255
|
}
|
|
256
|
-
const
|
|
257
|
-
if (!
|
|
256
|
+
const d = this.destination(i, !1, h);
|
|
257
|
+
if (!d) {
|
|
258
258
|
this.distance = 0;
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
|
-
t.preventDefault(), this.distance = 0, e.consumed = !0, this.move(
|
|
261
|
+
t.preventDefault(), this.distance = 0, e.consumed = !0, this.move(d, i);
|
|
262
262
|
};
|
|
263
263
|
onKeydown = (t) => {
|
|
264
264
|
if (this.context.syncNavigation(), !this.enabled() || t.defaultPrevented || t.ctrlKey || t.metaKey || t.altKey) return;
|
|
@@ -269,18 +269,18 @@ class y {
|
|
|
269
269
|
}
|
|
270
270
|
for (const e of t.composedPath()) {
|
|
271
271
|
if (e === this.context.container) break;
|
|
272
|
-
if (e instanceof Element && (e.matches(
|
|
272
|
+
if (e instanceof Element && (e.matches(M) || e.hasAttribute("tabindex") && Number(e.getAttribute("tabindex")) >= 0)) return;
|
|
273
273
|
}
|
|
274
274
|
if (this.nestedOwns(t, i) || this.context.limit() <= r) return;
|
|
275
|
-
const
|
|
276
|
-
if (
|
|
277
|
-
const
|
|
278
|
-
|
|
275
|
+
const n = this.measure();
|
|
276
|
+
if (n.length < 2) return;
|
|
277
|
+
const s = this.destination(i, !0, n);
|
|
278
|
+
s && (t.preventDefault(), !(t.repeat || this.movement?.direction === i && !this.movement.reading) && (this.reset(), this.move(s, i)));
|
|
279
279
|
};
|
|
280
280
|
destroy() {
|
|
281
281
|
this.reset(), this.listeners?.abort(), this.desktop.removeEventListener("change", this.configure), this.sections.clear();
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
export {
|
|
285
|
-
|
|
285
|
+
S as ScrollRevealPager
|
|
286
286
|
};
|
|
@@ -17,6 +17,7 @@ Pair with `RichTextReader` to render saved HTML with the same typography as the
|
|
|
17
17
|
| Prop | Type | Default | Description |
|
|
18
18
|
| :------------ | :------------- | :----------------- | :-------------------------------------------------------------------------- |
|
|
19
19
|
| `modelValue` | `string` | `''` | Binding (`v-model`) — HTML content |
|
|
20
|
+
| `documentKey` | `string \| number` | — | Change for a document switch or explicit reset, including unchanged HTML. |
|
|
20
21
|
| `placeholder` | `string` | `'Start typing…'` | Placeholder shown when the editor is empty |
|
|
21
22
|
| `label` | `string` | — | Optional label above the editor |
|
|
22
23
|
| `error` | `string` | — | Error message shown below the editor (also sets invalid styles) |
|
|
@@ -33,10 +34,40 @@ Pair with `RichTextReader` to render saved HTML with the same typography as the
|
|
|
33
34
|
|
|
34
35
|
| Event | Payload | Description |
|
|
35
36
|
| :------------------ | :------------ | :------------------------------------------------------- |
|
|
36
|
-
| `update:modelValue` | `string` | Emitted
|
|
37
|
+
| `update:modelValue` | `string` | Emitted for changed HTML; native IME publishes its completed composition. |
|
|
37
38
|
| `focus` | `FocusEvent` | Emitted when the editor gains focus |
|
|
38
39
|
| `blur` | `FocusEvent` | Emitted when the editor loses focus |
|
|
39
|
-
| `image-removed` | `string` | Emitted
|
|
40
|
+
| `image-removed` | `string` | Emitted when the last occurrence of a non-blob image URL is removed, including same-document external updates. Document switches do not signal deletion. |
|
|
41
|
+
|
|
42
|
+
### Autosave and external document ownership
|
|
43
|
+
|
|
44
|
+
Keep the current editing draft in the parent. A save request captures a revision;
|
|
45
|
+
only acknowledge it into the model if it is still the latest revision. Do not
|
|
46
|
+
bind asynchronous query results directly to the editor while a local draft is
|
|
47
|
+
dirty. The editor treats different external HTML as authoritative, not as an
|
|
48
|
+
implicitly stale acknowledgement. Use `documentKey` (or a Vue component key) for
|
|
49
|
+
an intentional document replacement or reset.
|
|
50
|
+
|
|
51
|
+
Identical or equivalent HTML does not replace the editable DOM. Same-document
|
|
52
|
+
image metadata acknowledgements can update image attributes in place. Genuine
|
|
53
|
+
external replacements may reset native history; selections are restored on a
|
|
54
|
+
best-effort structural basis. A replacement received during IME is applied
|
|
55
|
+
after the composition event sequence, without publishing the old composition.
|
|
56
|
+
|
|
57
|
+
### Browser regression and performance verification
|
|
58
|
+
|
|
59
|
+
Run `npm run test:rte:browser` from the library root with Chrome/Chromium installed
|
|
60
|
+
(`CHROME_PATH` overrides its executable). Compare the synthetic input workload
|
|
61
|
+
against a pinned source revision with `npm run test:rte:browser -- --baseline
|
|
62
|
+
bcab529e`. Add `--require-10x` to enforce the explicit synthetic-workload target.
|
|
63
|
+
This does not measure end-to-end application input-to-paint latency.
|
|
64
|
+
|
|
65
|
+
For local Website Builder integration, first run `npm run prepare:dist` and then
|
|
66
|
+
`npm run test:rte:browser -- --website-builder /path/to/builto-webBuilder`.
|
|
67
|
+
The separate fixture mounts the actual forms and store with a local simulated
|
|
68
|
+
GraphQL mutation transport. It does not send production mutations or require
|
|
69
|
+
credentials. It does not prove production backend, Apollo cache, or real-device
|
|
70
|
+
IME behavior.
|
|
40
71
|
|
|
41
72
|
---
|
|
42
73
|
|
package/docs-manifest.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"managedBy": "vlite3",
|
|
3
3
|
"manifestVersion": 1,
|
|
4
4
|
"packageName": "vlite3",
|
|
5
|
-
"packageVersion": "1.5.
|
|
6
|
-
"generatedAt": "2026-11-
|
|
5
|
+
"packageVersion": "1.5.52",
|
|
6
|
+
"generatedAt": "2026-11-30T21:57:13.899Z",
|
|
7
7
|
"files": {
|
|
8
8
|
"component-index.md": {
|
|
9
9
|
"sha256": "2a8a3c18e4b9158ff62eaf23c3aae82b2aee7e10fca9b78f9a6d573ff9b13c61"
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"sha256": "ffee88baff10c80f98a481a92a5fc76b8448c12e27c16f35db5a2011955affb4"
|
|
235
235
|
},
|
|
236
236
|
"components/rich-text-editor.md": {
|
|
237
|
-
"sha256": "
|
|
237
|
+
"sha256": "d8dd6e6b828572b1db41ef73a011dc91d2fba3776bdf76303bc389159a9de40c"
|
|
238
238
|
},
|
|
239
239
|
"components/scale-generator.md": {
|
|
240
240
|
"sha256": "6f7520262f3e543cf3e23d6d70b62fde82f077216c7b709ce3ff64bf35a50aa0"
|