zxq-com 0.0.31 → 0.0.32

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 (78) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/utils/index.d.ts +1 -0
  3. package/dist/ws/zxqWs.d.ts +1 -1
  4. package/dist/zxq-com.cjs +321 -322
  5. package/dist/zxq-com.css +1 -1
  6. package/dist/zxq-com.js +2890 -4179
  7. package/dist/zxq-ws.cjs +1 -1
  8. package/dist/zxq-ws.js +1 -1
  9. package/dist/zxqWs-C8PKp6xW.cjs +1 -0
  10. package/dist/zxqWs-wYl2lV3c.js +127 -0
  11. package/package.json +1 -1
  12. package/dist/A2UIAudio-CjRHo_tK.cjs +0 -1
  13. package/dist/A2UIAudio-Dn4ur7h-.js +0 -31
  14. package/dist/A2UIButton-CnppLi7b.cjs +0 -1
  15. package/dist/A2UIButton-nOO3LOth.js +0 -35
  16. package/dist/A2UICard-BgjH40z6.js +0 -34
  17. package/dist/A2UICard-BhGyY9Gx.cjs +0 -1
  18. package/dist/A2UICheckbox-B5uHUsbP.cjs +0 -1
  19. package/dist/A2UICheckbox-DrC1_5iC.js +0 -41
  20. package/dist/A2UIDateTimeInput-BYdDpBR-.js +0 -58
  21. package/dist/A2UIDateTimeInput-D-aG6mZk.cjs +0 -1
  22. package/dist/A2UIDivider-Bzpy-f-q.js +0 -24
  23. package/dist/A2UIDivider-CvM6sA_R.cjs +0 -1
  24. package/dist/A2UIIcon-7d6g1X7l.cjs +0 -1
  25. package/dist/A2UIIcon-D0PvsBr4.js +0 -30
  26. package/dist/A2UIImage-BeT7cRh7.cjs +0 -1
  27. package/dist/A2UIImage-DvRMKAMK.js +0 -39
  28. package/dist/A2UIList-CVESfWJr.js +0 -32
  29. package/dist/A2UIList-DcLtvZb0.cjs +0 -1
  30. package/dist/A2UIModal-BNDMZHNM.cjs +0 -1
  31. package/dist/A2UIModal-B_MoIZYE.js +0 -47
  32. package/dist/A2UIMultipleChoice-DtMcPyuU.js +0 -41
  33. package/dist/A2UIMultipleChoice-n7GyQjXd.cjs +0 -1
  34. package/dist/A2UIRenderer-DqVIH5p7.cjs +0 -1
  35. package/dist/A2UIRenderer-lZ0ms8c-.js +0 -44
  36. package/dist/A2UISlider-Dd9OIXwb.js +0 -54
  37. package/dist/A2UISlider-NnRbh48d.cjs +0 -1
  38. package/dist/A2UITabs-CvuzauYt.cjs +0 -1
  39. package/dist/A2UITabs-DU1t9s1D.js +0 -39
  40. package/dist/A2UITextField-CC5S1AW9.js +0 -46
  41. package/dist/A2UITextField-D652Ge6_.cjs +0 -1
  42. package/dist/A2UIVideo-CNBhUnoP.js +0 -30
  43. package/dist/A2UIVideo-CRBBhgyW.cjs +0 -1
  44. package/dist/a2ui/catalog/A2UIAudio.vue.d.ts +0 -10
  45. package/dist/a2ui/catalog/A2UIButton.vue.d.ts +0 -9
  46. package/dist/a2ui/catalog/A2UICard.vue.d.ts +0 -8
  47. package/dist/a2ui/catalog/A2UICheckbox.vue.d.ts +0 -11
  48. package/dist/a2ui/catalog/A2UIColumn.vue.d.ts +0 -10
  49. package/dist/a2ui/catalog/A2UIDateTimeInput.vue.d.ts +0 -12
  50. package/dist/a2ui/catalog/A2UIDivider.vue.d.ts +0 -8
  51. package/dist/a2ui/catalog/A2UIIcon.vue.d.ts +0 -10
  52. package/dist/a2ui/catalog/A2UIImage.vue.d.ts +0 -12
  53. package/dist/a2ui/catalog/A2UIList.vue.d.ts +0 -9
  54. package/dist/a2ui/catalog/A2UIModal.vue.d.ts +0 -10
  55. package/dist/a2ui/catalog/A2UIMultipleChoice.vue.d.ts +0 -15
  56. package/dist/a2ui/catalog/A2UIRow.vue.d.ts +0 -10
  57. package/dist/a2ui/catalog/A2UISlider.vue.d.ts +0 -13
  58. package/dist/a2ui/catalog/A2UISurface.vue.d.ts +0 -7
  59. package/dist/a2ui/catalog/A2UITabs.vue.d.ts +0 -9
  60. package/dist/a2ui/catalog/A2UIText.vue.d.ts +0 -11
  61. package/dist/a2ui/catalog/A2UITextField.vue.d.ts +0 -12
  62. package/dist/a2ui/catalog/A2UIVideo.vue.d.ts +0 -10
  63. package/dist/a2ui/catalog/default.d.ts +0 -2
  64. package/dist/a2ui/config.d.ts +0 -10
  65. package/dist/a2ui/data/markdown.d.ts +0 -9
  66. package/dist/a2ui/data/processor.d.ts +0 -17
  67. package/dist/a2ui/data/types.d.ts +0 -12
  68. package/dist/a2ui/index.d.ts +0 -11
  69. package/dist/a2ui/rendering/A2UIRenderer.vue.d.ts +0 -7
  70. package/dist/a2ui/rendering/catalog.d.ts +0 -10
  71. package/dist/a2ui/rendering/useDynamicComponent.d.ts +0 -18
  72. package/dist/a2ui/theme.d.ts +0 -2
  73. package/dist/styles-BYpMnn-p.js +0 -442
  74. package/dist/styles-BZV65AUo.cjs +0 -453
  75. package/dist/useDynamicComponent-MEzwhjNJ.js +0 -470
  76. package/dist/useDynamicComponent-YT-u9Rpv.cjs +0 -1
  77. package/dist/zxqWs-B5VT5Q1P.js +0 -109
  78. package/dist/zxqWs-Dv99B0MJ.cjs +0 -1
@@ -1,442 +0,0 @@
1
- const shades = [
2
- 0,
3
- 5,
4
- 10,
5
- 15,
6
- 20,
7
- 25,
8
- 30,
9
- 35,
10
- 40,
11
- 50,
12
- 60,
13
- 70,
14
- 80,
15
- 90,
16
- 95,
17
- 98,
18
- 99,
19
- 100
20
- ];
21
- var opacityBehavior = "\n &:not([disabled]) {\n cursor: pointer;\n opacity: var(--opacity, 0);\n transition: opacity var(--speed, 0.2s) cubic-bezier(0, 0, 0.3, 1);\n\n &:hover,\n &:focus {\n opacity: 1;\n }\n }";
22
- const behavior = `
23
- ${Array(21).fill(0).map((e, s) => `.behavior-ho-${s * 5} {
24
- --opacity: ${s / 20};
25
- ${opacityBehavior}
26
- }`).join("\n")}
27
-
28
- .behavior-o-s {
29
- overflow: scroll;
30
- }
31
-
32
- .behavior-o-a {
33
- overflow: auto;
34
- }
35
-
36
- .behavior-o-h {
37
- overflow: hidden;
38
- }
39
-
40
- .behavior-sw-n {
41
- scrollbar-width: none;
42
- }
43
- `, border = `
44
- ${Array(25).fill(0).map((e, o) => `
45
- .border-bw-${o} { border-width: ${o}px; }
46
- .border-btw-${o} { border-top-width: ${o}px; }
47
- .border-bbw-${o} { border-bottom-width: ${o}px; }
48
- .border-blw-${o} { border-left-width: ${o}px; }
49
- .border-brw-${o} { border-right-width: ${o}px; }
50
-
51
- .border-ow-${o} { outline-width: ${o}px; }
52
- .border-br-${o} { border-radius: ${o * 4}px; overflow: hidden;}`).join("\n")}
53
-
54
- .border-br-50pc {
55
- border-radius: 50%;
56
- }
57
-
58
- .border-bs-s {
59
- border-style: solid;
60
- }
61
- `;
62
- function merge(...e) {
63
- let o = {};
64
- for (let s of e) for (let [e, c] of Object.entries(s)) {
65
- let s = e.split("-").with(-1, "").join("-"), l = Object.keys(o).filter((e) => e.startsWith(s));
66
- for (let e of l) delete o[e];
67
- o[e] = c;
68
- }
69
- return o;
70
- }
71
- function appendToAll(e, o, ...s) {
72
- let c = structuredClone(e);
73
- for (let e of s) for (let s of Object.keys(e)) {
74
- let e = s.split("-").with(-1, "").join("-");
75
- for (let [l, u] of Object.entries(c)) {
76
- if (o.includes(l)) continue;
77
- let c = !1;
78
- for (let o = 0; o < u.length; o++) u[o].startsWith(e) && (c = !0, u[o] = s);
79
- c || u.push(s);
80
- }
81
- }
82
- return c;
83
- }
84
- function toProp(e) {
85
- return e.startsWith("nv") ? `--nv-${e.slice(2)}` : `--${e[0]}-${e.slice(1)}`;
86
- }
87
- var color = (e) => `
88
- ${e.map((e) => {
89
- let o = getInverseKey(e);
90
- return `.color-bc-${e} { border-color: light-dark(var(${toProp(e)}), var(${toProp(o)})); }`;
91
- }).join("\n")}
92
-
93
- ${e.map((e) => {
94
- let o = getInverseKey(e), s = [`.color-bgc-${e} { background-color: light-dark(var(${toProp(e)}), var(${toProp(o)})); }`, `.color-bbgc-${e}::backdrop { background-color: light-dark(var(${toProp(e)}), var(${toProp(o)})); }`];
95
- for (let c = .1; c < 1; c += .1) s.push(`.color-bbgc-${e}_${(c * 100).toFixed(0)}::backdrop {
96
- background-color: light-dark(oklch(from var(${toProp(e)}) l c h / calc(alpha * ${c.toFixed(1)})), oklch(from var(${toProp(o)}) l c h / calc(alpha * ${c.toFixed(1)})) );
97
- }
98
- `);
99
- return s.join("\n");
100
- }).join("\n")}
101
-
102
- ${e.map((e) => {
103
- let o = getInverseKey(e);
104
- return `.color-c-${e} { color: light-dark(var(${toProp(e)}), var(${toProp(o)})); }`;
105
- }).join("\n")}
106
- `, getInverseKey = (o) => {
107
- let s = o.match(/^([a-z]+)(\d+)$/);
108
- if (!s) return o;
109
- let [, c, l] = s, u = 100 - parseInt(l, 10);
110
- return `${c}${shades.reduce((e, o) => Math.abs(o - u) < Math.abs(e - u) ? o : e)}`;
111
- }, keyFactory = (o) => shades.map((e) => `${o}${e}`);
112
- const structuralStyles = [
113
- behavior,
114
- border,
115
- [
116
- color(keyFactory("p")),
117
- color(keyFactory("s")),
118
- color(keyFactory("t")),
119
- color(keyFactory("n")),
120
- color(keyFactory("nv")),
121
- color(keyFactory("e")),
122
- "\n .color-bgc-transparent {\n background-color: transparent;\n }\n\n :host {\n color-scheme: var(--color-scheme);\n }\n "
123
- ],
124
- "\n .g-icon {\n font-family: \"Material Symbols Outlined\", \"Google Symbols\";\n font-weight: normal;\n font-style: normal;\n font-display: optional;\n font-size: 20px;\n width: 1em;\n height: 1em;\n user-select: none;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-feature-settings: \"liga\";\n -webkit-font-smoothing: antialiased;\n overflow: hidden;\n\n font-variation-settings: \"FILL\" 0, \"wght\" 300, \"GRAD\" 0, \"opsz\" 48,\n \"ROND\" 100;\n\n &.filled {\n font-variation-settings: \"FILL\" 1, \"wght\" 300, \"GRAD\" 0, \"opsz\" 48,\n \"ROND\" 100;\n }\n\n &.filled-heavy {\n font-variation-settings: \"FILL\" 1, \"wght\" 700, \"GRAD\" 0, \"opsz\" 48,\n \"ROND\" 100;\n }\n }\n",
125
- `
126
- :host {
127
- ${Array(16).fill(0).map((e, o) => `--g-${o + 1}: ${(o + 1) * 4}px;`).join("\n")}
128
- }
129
-
130
- ${Array(49).fill(0).map((e, o) => {
131
- let s = o - 24, c = s < 0 ? `n${Math.abs(s)}` : s.toString();
132
- return `
133
- .layout-p-${c} { --padding: ${s * 4}px; padding: var(--padding); }
134
- .layout-pt-${c} { padding-top: ${s * 4}px; }
135
- .layout-pr-${c} { padding-right: ${s * 4}px; }
136
- .layout-pb-${c} { padding-bottom: ${s * 4}px; }
137
- .layout-pl-${c} { padding-left: ${s * 4}px; }
138
-
139
- .layout-m-${c} { --margin: ${s * 4}px; margin: var(--margin); }
140
- .layout-mt-${c} { margin-top: ${s * 4}px; }
141
- .layout-mr-${c} { margin-right: ${s * 4}px; }
142
- .layout-mb-${c} { margin-bottom: ${s * 4}px; }
143
- .layout-ml-${c} { margin-left: ${s * 4}px; }
144
-
145
- .layout-t-${c} { top: ${s * 4}px; }
146
- .layout-r-${c} { right: ${s * 4}px; }
147
- .layout-b-${c} { bottom: ${s * 4}px; }
148
- .layout-l-${c} { left: ${s * 4}px; }`;
149
- }).join("\n")}
150
-
151
- ${Array(25).fill(0).map((e, o) => `
152
- .layout-g-${o} { gap: ${o * 4}px; }`).join("\n")}
153
-
154
- ${Array(8).fill(0).map((e, o) => `
155
- .layout-grd-col${o + 1} { grid-template-columns: ${"1fr ".repeat(o + 1).trim()}; }`).join("\n")}
156
-
157
- .layout-pos-a {
158
- position: absolute;
159
- }
160
-
161
- .layout-pos-rel {
162
- position: relative;
163
- }
164
-
165
- .layout-dsp-none {
166
- display: none;
167
- }
168
-
169
- .layout-dsp-block {
170
- display: block;
171
- }
172
-
173
- .layout-dsp-grid {
174
- display: grid;
175
- }
176
-
177
- .layout-dsp-iflex {
178
- display: inline-flex;
179
- }
180
-
181
- .layout-dsp-flexvert {
182
- display: flex;
183
- flex-direction: column;
184
- }
185
-
186
- .layout-dsp-flexhor {
187
- display: flex;
188
- flex-direction: row;
189
- }
190
-
191
- .layout-fw-w {
192
- flex-wrap: wrap;
193
- }
194
-
195
- .layout-al-fs {
196
- align-items: start;
197
- }
198
-
199
- .layout-al-fe {
200
- align-items: end;
201
- }
202
-
203
- .layout-al-c {
204
- align-items: center;
205
- }
206
-
207
- .layout-as-n {
208
- align-self: normal;
209
- }
210
-
211
- .layout-js-c {
212
- justify-self: center;
213
- }
214
-
215
- .layout-sp-c {
216
- justify-content: center;
217
- }
218
-
219
- .layout-sp-ev {
220
- justify-content: space-evenly;
221
- }
222
-
223
- .layout-sp-bt {
224
- justify-content: space-between;
225
- }
226
-
227
- .layout-sp-s {
228
- justify-content: start;
229
- }
230
-
231
- .layout-sp-e {
232
- justify-content: end;
233
- }
234
-
235
- .layout-ji-e {
236
- justify-items: end;
237
- }
238
-
239
- .layout-r-none {
240
- resize: none;
241
- }
242
-
243
- .layout-fs-c {
244
- field-sizing: content;
245
- }
246
-
247
- .layout-fs-n {
248
- field-sizing: none;
249
- }
250
-
251
- .layout-flx-0 {
252
- flex: 0 0 auto;
253
- }
254
-
255
- .layout-flx-1 {
256
- flex: 1 0 auto;
257
- }
258
-
259
- .layout-c-s {
260
- contain: strict;
261
- }
262
-
263
- /** Widths **/
264
-
265
- ${Array(10).fill(0).map((e, o) => {
266
- let s = (o + 1) * 10;
267
- return `.layout-w-${s} { width: ${s}%; max-width: ${s}%; }`;
268
- }).join("\n")}
269
-
270
- ${Array(16).fill(0).map((e, o) => `.layout-wp-${o} { width: ${o * 4}px; }`).join("\n")}
271
-
272
- /** Heights **/
273
-
274
- ${Array(10).fill(0).map((e, o) => {
275
- let s = (o + 1) * 10;
276
- return `.layout-h-${s} { height: ${s}%; }`;
277
- }).join("\n")}
278
-
279
- ${Array(16).fill(0).map((e, o) => `.layout-hp-${o} { height: ${o * 4}px; }`).join("\n")}
280
-
281
- .layout-el-cv {
282
- & img,
283
- & video {
284
- width: 100%;
285
- height: 100%;
286
- object-fit: cover;
287
- margin: 0;
288
- }
289
- }
290
-
291
- .layout-ar-sq {
292
- aspect-ratio: 1 / 1;
293
- }
294
-
295
- .layout-ex-fb {
296
- margin: calc(var(--padding) * -1) 0 0 calc(var(--padding) * -1);
297
- width: calc(100% + var(--padding) * 2);
298
- height: calc(100% + var(--padding) * 2);
299
- }
300
- `,
301
- `
302
- ${Array(21).fill(0).map((e, o) => `.opacity-el-${o * 5} { opacity: ${o / 20}; }`).join("\n")}
303
- `,
304
- `
305
- :host {
306
- --default-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
307
- --default-font-family-mono: "Courier New", Courier, monospace;
308
- }
309
-
310
- .typography-f-s {
311
- font-family: var(--font-family, var(--default-font-family));
312
- font-optical-sizing: auto;
313
- font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0;
314
- }
315
-
316
- .typography-f-sf {
317
- font-family: var(--font-family-flex, var(--default-font-family));
318
- font-optical-sizing: auto;
319
- }
320
-
321
- .typography-f-c {
322
- font-family: var(--font-family-mono, var(--default-font-family));
323
- font-optical-sizing: auto;
324
- font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0;
325
- }
326
-
327
- .typography-v-r {
328
- font-variation-settings: "slnt" 0, "wdth" 100, "GRAD" 0, "ROND" 100;
329
- }
330
-
331
- .typography-ta-s {
332
- text-align: start;
333
- }
334
-
335
- .typography-ta-c {
336
- text-align: center;
337
- }
338
-
339
- .typography-fs-n {
340
- font-style: normal;
341
- }
342
-
343
- .typography-fs-i {
344
- font-style: italic;
345
- }
346
-
347
- .typography-sz-ls {
348
- font-size: 11px;
349
- line-height: 16px;
350
- }
351
-
352
- .typography-sz-lm {
353
- font-size: 12px;
354
- line-height: 16px;
355
- }
356
-
357
- .typography-sz-ll {
358
- font-size: 14px;
359
- line-height: 20px;
360
- }
361
-
362
- .typography-sz-bs {
363
- font-size: 12px;
364
- line-height: 16px;
365
- }
366
-
367
- .typography-sz-bm {
368
- font-size: 14px;
369
- line-height: 20px;
370
- }
371
-
372
- .typography-sz-bl {
373
- font-size: 16px;
374
- line-height: 24px;
375
- }
376
-
377
- .typography-sz-ts {
378
- font-size: 14px;
379
- line-height: 20px;
380
- }
381
-
382
- .typography-sz-tm {
383
- font-size: 16px;
384
- line-height: 24px;
385
- }
386
-
387
- .typography-sz-tl {
388
- font-size: 22px;
389
- line-height: 28px;
390
- }
391
-
392
- .typography-sz-hs {
393
- font-size: 24px;
394
- line-height: 32px;
395
- }
396
-
397
- .typography-sz-hm {
398
- font-size: 28px;
399
- line-height: 36px;
400
- }
401
-
402
- .typography-sz-hl {
403
- font-size: 32px;
404
- line-height: 40px;
405
- }
406
-
407
- .typography-sz-ds {
408
- font-size: 36px;
409
- line-height: 44px;
410
- }
411
-
412
- .typography-sz-dm {
413
- font-size: 45px;
414
- line-height: 52px;
415
- }
416
-
417
- .typography-sz-dl {
418
- font-size: 57px;
419
- line-height: 64px;
420
- }
421
-
422
- .typography-ws-p {
423
- white-space: pre-line;
424
- }
425
-
426
- .typography-ws-nw {
427
- white-space: nowrap;
428
- }
429
-
430
- .typography-td-none {
431
- text-decoration: none;
432
- }
433
-
434
- /** Weights **/
435
-
436
- ${Array(9).fill(0).map((e, o) => {
437
- let s = (o + 1) * 100;
438
- return `.typography-w-${s} { font-weight: ${s}; }`;
439
- }).join("\n")}
440
- `
441
- ].flat(Infinity).join("\n");
442
- export { appendToAll as n, merge as r, structuralStyles as t };