@opengis/form 0.1.39 → 0.1.40

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 (40) hide show
  1. package/README.md +61 -61
  2. package/dist/api/suggest/suggestions_list.json +7 -7
  3. package/dist/{index-Bh8_Wx51.js → index-B1zV9Aax.js} +477 -434
  4. package/dist/{index-DQur75TQ.js → index-B3op5uFx.js} +28 -29
  5. package/dist/index-BABsOLAW.js +3085 -0
  6. package/dist/index-CkUvn8lm.js +153 -0
  7. package/dist/index-D49VHc9h.js +237 -0
  8. package/dist/{index-DbbMAhst.js → index-DFpbBRKj.js} +4534 -4527
  9. package/dist/index-DZ7xh8lh.js +50 -0
  10. package/dist/index-MfTTOwHR.js +89 -0
  11. package/dist/{index-CQZi4RyF.js → index-RwV1hx3A.js} +19 -21
  12. package/dist/{index-CMmJu2Ql.js → index-W4UOw8lU.js} +505 -428
  13. package/dist/index-pYkcVgEL.js +12134 -0
  14. package/dist/{index-DspmCbXc.js → index-qhd_7MCX.js} +20 -16
  15. package/dist/{index-DsT4tZvp.js → index-sFkGqyu8.js} +20 -16
  16. package/dist/index.css +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/index.umd.cjs +85 -85
  19. package/dist/src/components/inputs/array-select/vs-input-array-select.vue.d.ts.map +1 -1
  20. package/dist/src/components/inputs/date/datepicker/Datepicker.vue.d.ts.map +1 -1
  21. package/dist/src/components/inputs/index.d.ts +8 -8
  22. package/dist/src/components/inputs/options/radio/vs-input-radio-buttons.vue.d.ts.map +1 -1
  23. package/dist/src/components/inputs/options/radio/vs-input-radio-default.vue.d.ts.map +1 -1
  24. package/dist/src/components/inputs/options/radio/vs-input-radio.vue.d.ts +4 -3
  25. package/dist/src/components/inputs/options/radio/vs-input-radio.vue.d.ts.map +1 -1
  26. package/dist/src/components/inputs/table/vs-input-datatable.vue.d.ts.map +1 -1
  27. package/dist/src/composables/useInputOptions.d.ts +2 -2
  28. package/dist/src/composables/useInputOptions.d.ts.map +1 -1
  29. package/dist/{vs-richtext-BPE0jDe4.js → vs-richtext-Baw0o5M4.js} +22 -22
  30. package/locales/en.json +39 -39
  31. package/locales/uk.json +39 -39
  32. package/package.json +96 -96
  33. package/dist/index-B9CEJ-PZ.js +0 -187
  34. package/dist/index-CHHagWDa.js +0 -2794
  35. package/dist/index-C_6bjz0U.js +0 -138
  36. package/dist/index-D3gVZYzr.js +0 -78
  37. package/dist/index-DJVijc0x.js +0 -47
  38. package/dist/index-z-RdtcIQ.js +0 -11862
  39. package/dist/src/utils/appendQueryParams.d.ts +0 -2
  40. package/dist/src/utils/appendQueryParams.d.ts.map +0 -1
@@ -0,0 +1,153 @@
1
+ import { N as M, n as R, m as v, R as x, c as $ } from "./index-pYkcVgEL.js";
2
+ var z = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, _ = M.create({
3
+ name: "image",
4
+ addOptions() {
5
+ return {
6
+ inline: !1,
7
+ allowBase64: !1,
8
+ HTMLAttributes: {},
9
+ resize: !1
10
+ };
11
+ },
12
+ inline() {
13
+ return this.options.inline;
14
+ },
15
+ group() {
16
+ return this.options.inline ? "inline" : "block";
17
+ },
18
+ draggable: !0,
19
+ addAttributes() {
20
+ return {
21
+ src: {
22
+ default: null
23
+ },
24
+ alt: {
25
+ default: null
26
+ },
27
+ title: {
28
+ default: null
29
+ },
30
+ width: {
31
+ default: null
32
+ },
33
+ height: {
34
+ default: null
35
+ }
36
+ };
37
+ },
38
+ parseHTML() {
39
+ return [
40
+ {
41
+ tag: this.options.allowBase64 ? "img[src]" : 'img[src]:not([src^="data:"])'
42
+ }
43
+ ];
44
+ },
45
+ renderHTML({ HTMLAttributes: e }) {
46
+ return ["img", v(this.options.HTMLAttributes, e)];
47
+ },
48
+ parseMarkdown: (e, i) => i.createNode("image", {
49
+ src: e.href,
50
+ title: e.title,
51
+ alt: e.text
52
+ }),
53
+ renderMarkdown: (e) => {
54
+ var i, l, o, c, d, h;
55
+ const u = (l = (i = e.attrs) == null ? void 0 : i.src) != null ? l : "", f = (c = (o = e.attrs) == null ? void 0 : o.alt) != null ? c : "", t = (h = (d = e.attrs) == null ? void 0 : d.title) != null ? h : "";
56
+ return t ? `![${f}](${u} "${t}")` : `![${f}](${u})`;
57
+ },
58
+ addNodeView() {
59
+ if (!this.options.resize || !this.options.resize.enabled || typeof document > "u")
60
+ return null;
61
+ const { directions: e, minWidth: i, minHeight: l, alwaysPreserveAspectRatio: o } = this.options.resize, c = /* @__PURE__ */ new Set(["src", "width", "height"]);
62
+ return ({ node: d, getPos: h, HTMLAttributes: u, editor: f }) => {
63
+ const t = document.createElement("img");
64
+ t.draggable = !1;
65
+ const m = v(this.options.HTMLAttributes, u);
66
+ Object.entries(m).forEach(([r, n]) => {
67
+ if (n != null)
68
+ switch (r) {
69
+ case "src":
70
+ case "width":
71
+ case "height":
72
+ break;
73
+ default:
74
+ t.setAttribute(r, n);
75
+ break;
76
+ }
77
+ }), m.src !== null && (t.src = m.src);
78
+ let b = { ...u };
79
+ const g = (r) => {
80
+ if (typeof r == "string" && r !== "") {
81
+ t.getAttribute("src") !== r && (t.src = r);
82
+ return;
83
+ }
84
+ t.hasAttribute("src") && t.removeAttribute("src"), t.src !== "" && (t.src = "");
85
+ };
86
+ g(u.src);
87
+ const y = (r) => {
88
+ if (r.type !== d.type)
89
+ return !1;
90
+ const n = f.extensionManager.attributes.filter(
91
+ (s) => s.type === r.type.name
92
+ ), a = $(r, n);
93
+ return Object.keys(b).forEach((s) => {
94
+ !c.has(s) && !(s in a) && t.removeAttribute(s);
95
+ }), Object.entries(a).forEach(([s, w]) => {
96
+ c.has(s) || (w != null ? t.setAttribute(s, w) : t.removeAttribute(s));
97
+ }), g(a.src), b = a, !0;
98
+ }, A = new x({
99
+ element: t,
100
+ editor: f,
101
+ node: d,
102
+ getPos: h,
103
+ onResize: (r, n) => {
104
+ t.style.width = `${r}px`, t.style.height = `${n}px`;
105
+ },
106
+ onCommit: (r, n) => {
107
+ const a = h();
108
+ a !== void 0 && this.editor.chain().setNodeSelection(a).updateAttributes(this.name, {
109
+ width: r,
110
+ height: n
111
+ }).run();
112
+ },
113
+ onUpdate: y,
114
+ options: {
115
+ directions: e,
116
+ min: {
117
+ width: i,
118
+ height: l
119
+ },
120
+ preserveAspectRatio: o === !0
121
+ }
122
+ }), p = A.dom;
123
+ return p.style.visibility = "hidden", p.style.pointerEvents = "none", t.onload = () => {
124
+ p.style.visibility = "", p.style.pointerEvents = "";
125
+ }, A;
126
+ };
127
+ },
128
+ addCommands() {
129
+ return {
130
+ setImage: (e) => ({ commands: i }) => i.insertContent({
131
+ type: this.name,
132
+ attrs: e
133
+ })
134
+ };
135
+ },
136
+ addInputRules() {
137
+ return [
138
+ R({
139
+ find: z,
140
+ type: this.type,
141
+ getAttributes: (e) => {
142
+ const [, , i, l, o] = e;
143
+ return { src: l, alt: i, title: o };
144
+ }
145
+ })
146
+ ];
147
+ }
148
+ }), H = _;
149
+ export {
150
+ _ as Image,
151
+ H as default,
152
+ z as inputRegex
153
+ };
@@ -0,0 +1,237 @@
1
+ import { E as s, M as y, g as l, m as d } from "./index-pYkcVgEL.js";
2
+ var p = 20, a = (t, e = 0) => {
3
+ const r = [];
4
+ return !t.children.length || e > p || Array.from(t.children).forEach((n) => {
5
+ n.tagName === "SPAN" ? r.push(n) : n.children.length && r.push(...a(n, e + 1));
6
+ }), r;
7
+ }, f = (t) => {
8
+ if (!t.children.length)
9
+ return;
10
+ const e = a(t);
11
+ e && e.forEach((r) => {
12
+ var n, o;
13
+ const i = r.getAttribute("style"), u = (o = (n = r.parentElement) == null ? void 0 : n.closest("span")) == null ? void 0 : o.getAttribute("style");
14
+ r.setAttribute("style", `${u};${i}`);
15
+ });
16
+ }, c = y.create({
17
+ name: "textStyle",
18
+ priority: 101,
19
+ addOptions() {
20
+ return {
21
+ HTMLAttributes: {},
22
+ mergeNestedSpanStyles: !0
23
+ };
24
+ },
25
+ parseHTML() {
26
+ return [
27
+ {
28
+ tag: "span",
29
+ consuming: !1,
30
+ getAttrs: (t) => t.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && f(t), {}) : !1
31
+ }
32
+ ];
33
+ },
34
+ renderHTML({ HTMLAttributes: t }) {
35
+ return ["span", d(this.options.HTMLAttributes, t), 0];
36
+ },
37
+ addCommands() {
38
+ return {
39
+ toggleTextStyle: (t) => ({ commands: e }) => e.toggleMark(this.name, t),
40
+ removeEmptyTextStyle: () => ({ tr: t }) => {
41
+ const { selection: e } = t;
42
+ return t.doc.nodesBetween(e.from, e.to, (r, n) => {
43
+ if (r.isTextblock)
44
+ return !0;
45
+ r.marks.filter((o) => o.type === this.type).some((o) => Object.values(o.attrs).some((i) => !!i)) || t.removeMark(n, n + r.nodeSize, this.type);
46
+ }), !0;
47
+ }
48
+ };
49
+ }
50
+ }), h = s.create({
51
+ name: "backgroundColor",
52
+ addOptions() {
53
+ return {
54
+ types: ["textStyle"]
55
+ };
56
+ },
57
+ addGlobalAttributes() {
58
+ return [
59
+ {
60
+ types: this.options.types,
61
+ attributes: {
62
+ backgroundColor: {
63
+ default: null,
64
+ parseHTML: (t) => {
65
+ var e;
66
+ const r = (e = l(t, "background-color")) != null ? e : t.style.backgroundColor;
67
+ return r?.replace(/['"]+/g, "");
68
+ },
69
+ renderHTML: (t) => t.backgroundColor ? {
70
+ style: `background-color: ${t.backgroundColor}`
71
+ } : {}
72
+ }
73
+ }
74
+ }
75
+ ];
76
+ },
77
+ addCommands() {
78
+ return {
79
+ setBackgroundColor: (t) => ({ chain: e }) => e().setMark("textStyle", { backgroundColor: t }).run(),
80
+ unsetBackgroundColor: () => ({ chain: t }) => t().setMark("textStyle", { backgroundColor: null }).removeEmptyTextStyle().run()
81
+ };
82
+ }
83
+ }), S = s.create({
84
+ name: "color",
85
+ addOptions() {
86
+ return {
87
+ types: ["textStyle"]
88
+ };
89
+ },
90
+ addGlobalAttributes() {
91
+ return [
92
+ {
93
+ types: this.options.types,
94
+ attributes: {
95
+ color: {
96
+ default: null,
97
+ parseHTML: (t) => {
98
+ var e;
99
+ const r = (e = l(t, "color")) != null ? e : t.style.color;
100
+ return r?.replace(/['"]+/g, "");
101
+ },
102
+ renderHTML: (t) => t.color ? {
103
+ style: `color: ${t.color}`
104
+ } : {}
105
+ }
106
+ }
107
+ }
108
+ ];
109
+ },
110
+ addCommands() {
111
+ return {
112
+ setColor: (t) => ({ chain: e }) => e().setMark("textStyle", { color: t }).run(),
113
+ unsetColor: () => ({ chain: t }) => t().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
114
+ };
115
+ }
116
+ }), g = s.create({
117
+ name: "fontFamily",
118
+ addOptions() {
119
+ return {
120
+ types: ["textStyle"]
121
+ };
122
+ },
123
+ addGlobalAttributes() {
124
+ return [
125
+ {
126
+ types: this.options.types,
127
+ attributes: {
128
+ fontFamily: {
129
+ default: null,
130
+ // Prefer the raw inline `style` attribute so unquoted or
131
+ // single-quoted multi-word names are preserved instead of being
132
+ // canonicalized by `element.style.fontFamily`, which forces double
133
+ // quotes that then get HTML-encoded to `"` on serialization.
134
+ parseHTML: (t) => {
135
+ var e;
136
+ return (e = l(t, "font-family")) != null ? e : t.style.fontFamily;
137
+ },
138
+ renderHTML: (t) => t.fontFamily ? {
139
+ style: `font-family: ${t.fontFamily}`
140
+ } : {}
141
+ }
142
+ }
143
+ }
144
+ ];
145
+ },
146
+ addCommands() {
147
+ return {
148
+ setFontFamily: (t) => ({ chain: e }) => e().setMark("textStyle", { fontFamily: t }).run(),
149
+ unsetFontFamily: () => ({ chain: t }) => t().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
150
+ };
151
+ }
152
+ }), m = s.create({
153
+ name: "fontSize",
154
+ addOptions() {
155
+ return {
156
+ types: ["textStyle"]
157
+ };
158
+ },
159
+ addGlobalAttributes() {
160
+ return [
161
+ {
162
+ types: this.options.types,
163
+ attributes: {
164
+ fontSize: {
165
+ default: null,
166
+ // Prefer the raw inline `style` attribute so the original format
167
+ // is preserved instead of the canonicalized value returned by
168
+ // `element.style.fontSize`.
169
+ parseHTML: (t) => {
170
+ var e;
171
+ return (e = l(t, "font-size")) != null ? e : t.style.fontSize;
172
+ },
173
+ renderHTML: (t) => t.fontSize ? {
174
+ style: `font-size: ${t.fontSize}`
175
+ } : {}
176
+ }
177
+ }
178
+ }
179
+ ];
180
+ },
181
+ addCommands() {
182
+ return {
183
+ setFontSize: (t) => ({ chain: e }) => e().setMark("textStyle", { fontSize: t }).run(),
184
+ unsetFontSize: () => ({ chain: t }) => t().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
185
+ };
186
+ }
187
+ }), x = s.create({
188
+ name: "lineHeight",
189
+ addOptions() {
190
+ return {
191
+ types: ["textStyle"]
192
+ };
193
+ },
194
+ addGlobalAttributes() {
195
+ return [
196
+ {
197
+ types: this.options.types,
198
+ attributes: {
199
+ lineHeight: {
200
+ default: null,
201
+ // Prefer the raw inline `style` attribute so the original format
202
+ // is preserved instead of the canonicalized value returned by
203
+ // `element.style.lineHeight`.
204
+ parseHTML: (t) => {
205
+ var e;
206
+ return (e = l(t, "line-height")) != null ? e : t.style.lineHeight;
207
+ },
208
+ renderHTML: (t) => t.lineHeight ? {
209
+ style: `line-height: ${t.lineHeight}`
210
+ } : {}
211
+ }
212
+ }
213
+ }
214
+ ];
215
+ },
216
+ addCommands() {
217
+ return {
218
+ setLineHeight: (t) => ({ chain: e }) => e().setMark("textStyle", { lineHeight: t }).run(),
219
+ unsetLineHeight: () => ({ chain: t }) => t().setMark("textStyle", { lineHeight: null }).removeEmptyTextStyle().run()
220
+ };
221
+ }
222
+ }), v = s.create({
223
+ name: "textStyleKit",
224
+ addExtensions() {
225
+ const t = [];
226
+ return this.options.backgroundColor !== !1 && t.push(h.configure(this.options.backgroundColor)), this.options.color !== !1 && t.push(S.configure(this.options.color)), this.options.fontFamily !== !1 && t.push(g.configure(this.options.fontFamily)), this.options.fontSize !== !1 && t.push(m.configure(this.options.fontSize)), this.options.lineHeight !== !1 && t.push(x.configure(this.options.lineHeight)), this.options.textStyle !== !1 && t.push(c.configure(this.options.textStyle)), t;
227
+ }
228
+ });
229
+ export {
230
+ h as BackgroundColor,
231
+ S as Color,
232
+ g as FontFamily,
233
+ m as FontSize,
234
+ x as LineHeight,
235
+ c as TextStyle,
236
+ v as TextStyleKit
237
+ };