zxq-com 0.0.17 → 0.0.19
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/dist/A2UIAudio-CjRHo_tK.cjs +1 -0
- package/dist/A2UIAudio-Dn4ur7h-.js +31 -0
- package/dist/A2UIButton-CnppLi7b.cjs +1 -0
- package/dist/A2UIButton-nOO3LOth.js +35 -0
- package/dist/A2UICard-BgjH40z6.js +34 -0
- package/dist/A2UICard-BhGyY9Gx.cjs +1 -0
- package/dist/A2UICheckbox-B5uHUsbP.cjs +1 -0
- package/dist/A2UICheckbox-DrC1_5iC.js +41 -0
- package/dist/A2UIDateTimeInput-BYdDpBR-.js +58 -0
- package/dist/A2UIDateTimeInput-D-aG6mZk.cjs +1 -0
- package/dist/A2UIDivider-Bzpy-f-q.js +24 -0
- package/dist/A2UIDivider-CvM6sA_R.cjs +1 -0
- package/dist/A2UIIcon-7d6g1X7l.cjs +1 -0
- package/dist/A2UIIcon-D0PvsBr4.js +30 -0
- package/dist/A2UIImage-BeT7cRh7.cjs +1 -0
- package/dist/A2UIImage-DvRMKAMK.js +39 -0
- package/dist/A2UIList-CVESfWJr.js +32 -0
- package/dist/A2UIList-DcLtvZb0.cjs +1 -0
- package/dist/A2UIModal-BNDMZHNM.cjs +1 -0
- package/dist/A2UIModal-B_MoIZYE.js +47 -0
- package/dist/A2UIMultipleChoice-DtMcPyuU.js +41 -0
- package/dist/A2UIMultipleChoice-n7GyQjXd.cjs +1 -0
- package/dist/A2UIRenderer-DqVIH5p7.cjs +1 -0
- package/dist/A2UIRenderer-lZ0ms8c-.js +44 -0
- package/dist/A2UISlider-Dd9OIXwb.js +54 -0
- package/dist/A2UISlider-NnRbh48d.cjs +1 -0
- package/dist/A2UITabs-CvuzauYt.cjs +1 -0
- package/dist/A2UITabs-DU1t9s1D.js +39 -0
- package/dist/A2UITextField-CC5S1AW9.js +46 -0
- package/dist/A2UITextField-D652Ge6_.cjs +1 -0
- package/dist/A2UIVideo-CNBhUnoP.js +30 -0
- package/dist/A2UIVideo-CRBBhgyW.cjs +1 -0
- package/dist/a2ui/catalog/A2UIAudio.vue.d.ts +10 -0
- package/dist/a2ui/catalog/A2UIButton.vue.d.ts +9 -0
- package/dist/a2ui/catalog/A2UICard.vue.d.ts +8 -0
- package/dist/a2ui/catalog/A2UICheckbox.vue.d.ts +11 -0
- package/dist/a2ui/catalog/A2UIColumn.vue.d.ts +10 -0
- package/dist/a2ui/catalog/A2UIDateTimeInput.vue.d.ts +12 -0
- package/dist/a2ui/catalog/A2UIDivider.vue.d.ts +8 -0
- package/dist/a2ui/catalog/A2UIIcon.vue.d.ts +10 -0
- package/dist/a2ui/catalog/A2UIImage.vue.d.ts +12 -0
- package/dist/a2ui/catalog/A2UIList.vue.d.ts +9 -0
- package/dist/a2ui/catalog/A2UIModal.vue.d.ts +10 -0
- package/dist/a2ui/catalog/A2UIMultipleChoice.vue.d.ts +15 -0
- package/dist/a2ui/catalog/A2UIRow.vue.d.ts +10 -0
- package/dist/a2ui/catalog/A2UISlider.vue.d.ts +13 -0
- package/dist/a2ui/catalog/A2UISurface.vue.d.ts +7 -0
- package/dist/a2ui/catalog/A2UITabs.vue.d.ts +9 -0
- package/dist/a2ui/catalog/A2UIText.vue.d.ts +11 -0
- package/dist/a2ui/catalog/A2UITextField.vue.d.ts +12 -0
- package/dist/a2ui/catalog/A2UIVideo.vue.d.ts +10 -0
- package/dist/a2ui/catalog/default.d.ts +2 -0
- package/dist/a2ui/config.d.ts +10 -0
- package/dist/a2ui/data/markdown.d.ts +9 -0
- package/dist/a2ui/data/processor.d.ts +17 -0
- package/dist/a2ui/data/types.d.ts +12 -0
- package/dist/a2ui/index.d.ts +11 -0
- package/dist/a2ui/rendering/A2UIRenderer.vue.d.ts +7 -0
- package/dist/a2ui/rendering/catalog.d.ts +10 -0
- package/dist/a2ui/rendering/useDynamicComponent.d.ts +18 -0
- package/dist/a2ui/theme.d.ts +2 -0
- package/dist/button/Button.vue.d.ts +17 -0
- package/dist/config.d.ts +9 -0
- package/dist/icon/Icon.vue.d.ts +6 -0
- package/dist/icon/IconInput.vue.d.ts +9 -0
- package/dist/icon/IconPicker.vue.d.ts +11 -0
- package/dist/icon/index.d.ts +10 -0
- package/dist/icon/loadIcon.d.ts +7 -0
- package/dist/index.d.ts +11 -0
- package/dist/regCom.d.ts +5 -0
- package/dist/styles-BYpMnn-p.js +442 -0
- package/dist/styles-BZV65AUo.cjs +453 -0
- package/dist/useDynamicComponent-MEzwhjNJ.js +470 -0
- package/dist/useDynamicComponent-YT-u9Rpv.cjs +1 -0
- package/dist/utils/color.d.ts +2 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/useTheme.d.ts +3 -0
- package/dist/{zxq-ws.d.ts → ws/zxqWs.d.ts} +36 -46
- package/dist/zxq-com.cjs +322 -321
- package/dist/zxq-com.css +1 -1
- package/dist/zxq-com.js +4255 -2945
- package/dist/zxq-ws.cjs +1 -1
- package/dist/zxq-ws.js +1 -1
- package/dist/{zxqWs-C022zpUT.js → zxqWs-4JH5RjsE.js} +10 -16
- package/dist/zxqWs-5Aa3WYS2.cjs +1 -0
- package/package.json +6 -2
- package/dist/zxq-com.d.ts +0 -122
- package/dist/zxqWs-cSNAJKbM.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r=[`src`],i=(0,n.defineComponent)({__name:`A2UIAudio`,props:{surfaceId:{},component:{},weight:{},url:{}},setup(t){(0,n.useCssVars)(e=>({v1b192928:e.weight}));let i=t,{theme:a,resolvePrimitive:o}=e.t(i),s=(0,n.computed)(()=>o(i.url));return(e,t)=>{let i=(0,n.resolveComponent)(`a2ui-audio`);return(0,n.openBlock)(),(0,n.createBlock)(i,null,{default:(0,n.withCtx)(()=>[s.value?((0,n.openBlock)(),(0,n.createElementBlock)(`section`,{key:0,class:(0,n.normalizeClass)((0,n.unref)(a).components.AudioPlayer),style:(0,n.normalizeStyle)((0,n.unref)(a).additionalStyles?.AudioPlayer)},[(0,n.createElementVNode)(`audio`,{is:`audio`,controls:``,src:s.value},null,8,r)],6)):(0,n.createCommentVNode)(``,!0)]),_:1})}}}),a=e.o(i,[[`__scopeId`,`data-v-54034b6d`]]);exports.default=a;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, unref, useCssVars, withCtx } from "vue";
|
|
3
|
+
var _hoisted_1 = ["src"], A2UIAudio_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "A2UIAudio",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
url: {}
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
useCssVars((e) => ({ v1b192928: e.weight }));
|
|
13
|
+
let h = e, { theme: g, resolvePrimitive: _ } = useDynamicComponent(h), v = computed(() => _(h.url));
|
|
14
|
+
return (e, p) => {
|
|
15
|
+
let m = resolveComponent("a2ui-audio");
|
|
16
|
+
return openBlock(), createBlock(m, null, {
|
|
17
|
+
default: withCtx(() => [v.value ? (openBlock(), createElementBlock("section", {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: normalizeClass(unref(g).components.AudioPlayer),
|
|
20
|
+
style: normalizeStyle(unref(g).additionalStyles?.AudioPlayer)
|
|
21
|
+
}, [createElementVNode("audio", {
|
|
22
|
+
is: "audio",
|
|
23
|
+
controls: "",
|
|
24
|
+
src: v.value
|
|
25
|
+
}, null, 8, _hoisted_1)], 6)) : createCommentVNode("", !0)]),
|
|
26
|
+
_: 1
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}), [["__scopeId", "data-v-54034b6d"]]);
|
|
31
|
+
export { A2UIAudio_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`);require(`./styles-BZV65AUo.cjs`);const t=require(`./A2UIRenderer-DqVIH5p7.cjs`),n=require(`./zxq-com.cjs`);let r=require(`vue`);var i=(0,r.defineComponent)({__name:`A2UIButton`,props:{surfaceId:{},component:{},weight:{},action:{}},setup(n){(0,r.useCssVars)(e=>({v6027b3e6:e.weight}));let i=n,{theme:a,sendAction:o}=e.t(i);function s(){i.action&&o(i.action)}return(e,i)=>{let o=(0,r.resolveComponent)(`a2ui-button`);return(0,r.openBlock)(),(0,r.createBlock)(o,null,{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`button`,{class:(0,r.normalizeClass)((0,r.unref)(a).components.Button),style:(0,r.normalizeStyle)((0,r.unref)(a).additionalStyles?.Button),onClick:s},[(0,r.createVNode)(t.t,{"surface-id":n.surfaceId,component:n.component.properties.child},null,8,[`surface-id`,`component`])],6)]),_:1})}}}),a=e.o(i,[[`__scopeId`,`data-v-d29fe44b`]]);exports.default=a;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import "./styles-BYpMnn-p.js";
|
|
3
|
+
import { t as A2UIRenderer_default } from "./A2UIRenderer-lZ0ms8c-.js";
|
|
4
|
+
import { createBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, unref, useCssVars, withCtx } from "vue";
|
|
5
|
+
var A2UIButton_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "A2UIButton",
|
|
7
|
+
props: {
|
|
8
|
+
surfaceId: {},
|
|
9
|
+
component: {},
|
|
10
|
+
weight: {},
|
|
11
|
+
action: {}
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
useCssVars((e) => ({ v6027b3e6: e.weight }));
|
|
15
|
+
let f = e, { theme: m, sendAction: h } = useDynamicComponent(f);
|
|
16
|
+
function g() {
|
|
17
|
+
f.action && h(f.action);
|
|
18
|
+
}
|
|
19
|
+
return (d, f) => {
|
|
20
|
+
let p = resolveComponent("a2ui-button");
|
|
21
|
+
return openBlock(), createBlock(p, null, {
|
|
22
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
23
|
+
class: normalizeClass(unref(m).components.Button),
|
|
24
|
+
style: normalizeStyle(unref(m).additionalStyles?.Button),
|
|
25
|
+
onClick: g
|
|
26
|
+
}, [createVNode(A2UIRenderer_default, {
|
|
27
|
+
"surface-id": e.surfaceId,
|
|
28
|
+
component: e.component.properties.child
|
|
29
|
+
}, null, 8, ["surface-id", "component"])], 6)]),
|
|
30
|
+
_: 1
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}), [["__scopeId", "data-v-d29fe44b"]]);
|
|
35
|
+
export { A2UIButton_default as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import "./styles-BYpMnn-p.js";
|
|
3
|
+
import { t as A2UIRenderer_default } from "./A2UIRenderer-lZ0ms8c-.js";
|
|
4
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, resolveComponent, unref, useCssVars, withCtx } from "vue";
|
|
5
|
+
var A2UICard_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "A2UICard",
|
|
7
|
+
props: {
|
|
8
|
+
surfaceId: {},
|
|
9
|
+
component: {},
|
|
10
|
+
weight: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
useCssVars((e) => ({ e640a04e: e.weight }));
|
|
14
|
+
let g = e, { theme: _ } = useDynamicComponent(g), v = computed(() => {
|
|
15
|
+
let e = g.component.properties;
|
|
16
|
+
return e.children || [e.child];
|
|
17
|
+
});
|
|
18
|
+
return (p, h) => {
|
|
19
|
+
let g = resolveComponent("a2ui-card");
|
|
20
|
+
return openBlock(), createBlock(g, null, {
|
|
21
|
+
default: withCtx(() => [createElementVNode("section", {
|
|
22
|
+
class: normalizeClass(unref(_).components.Card),
|
|
23
|
+
style: normalizeStyle(unref(_).additionalStyles?.Card)
|
|
24
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(v.value, (p, m) => (openBlock(), createBlock(A2UIRenderer_default, {
|
|
25
|
+
key: p.id || p.type + "-" + m,
|
|
26
|
+
"surface-id": e.surfaceId,
|
|
27
|
+
component: p
|
|
28
|
+
}, null, 8, ["surface-id", "component"]))), 128))], 6)]),
|
|
29
|
+
_: 1
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}), [["__scopeId", "data-v-ab1b8c3a"]]);
|
|
34
|
+
export { A2UICard_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`);require(`./styles-BZV65AUo.cjs`);const t=require(`./A2UIRenderer-DqVIH5p7.cjs`),n=require(`./zxq-com.cjs`);let r=require(`vue`);var i=(0,r.defineComponent)({__name:`A2UICard`,props:{surfaceId:{},component:{},weight:{}},setup(n){(0,r.useCssVars)(e=>({e640a04e:e.weight}));let i=n,{theme:a}=e.t(i),o=(0,r.computed)(()=>{let e=i.component.properties;return e.children||[e.child]});return(e,i)=>{let s=(0,r.resolveComponent)(`a2ui-card`);return(0,r.openBlock)(),(0,r.createBlock)(s,null,{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`section`,{class:(0,r.normalizeClass)((0,r.unref)(a).components.Card),style:(0,r.normalizeStyle)((0,r.unref)(a).additionalStyles?.Card)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.value,(e,i)=>((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:e.id||e.type+`-`+i,"surface-id":n.surfaceId,component:e},null,8,[`surface-id`,`component`]))),128))],6)]),_:1})}}}),a=e.o(i,[[`__scopeId`,`data-v-ab1b8c3a`]]);exports.default=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r=[`id`,`checked`],i=[`for`],a=(0,n.defineComponent)({__name:`A2UICheckbox`,props:{surfaceId:{},component:{},weight:{},value:{},label:{}},setup(t){(0,n.useCssVars)(e=>({v4a6c1003:e.weight}));let a=t,{theme:o,resolvePrimitive:s,getUniqueId:c,setData:l}=e.t(a),u=(0,n.computed)(()=>s(a.value)??!1),d=(0,n.computed)(()=>s(a.label)),f=c(`a2ui-checkbox`);function p(e){let t=a.value?.path;!(e.target instanceof HTMLInputElement)||!t||l(a.component,t,e.target.checked,a.surfaceId)}return(e,t)=>{let a=(0,n.resolveComponent)(`a2ui-checkbox`);return(0,n.openBlock)(),(0,n.createBlock)(a,null,{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`section`,{class:(0,n.normalizeClass)((0,n.unref)(o).components.CheckBox.container),style:(0,n.normalizeStyle)((0,n.unref)(o).additionalStyles?.CheckBox)},[(0,n.createElementVNode)(`input`,{autocomplete:`off`,type:`checkbox`,id:(0,n.unref)(f),checked:u.value,class:(0,n.normalizeClass)((0,n.unref)(o).components.CheckBox.element),onChange:p},null,42,r),(0,n.createElementVNode)(`label`,{for:(0,n.unref)(f),class:(0,n.normalizeClass)((0,n.unref)(o).components.CheckBox.label)},(0,n.toDisplayString)(d.value),11,i)],6)]),_:1})}}}),o=e.o(a,[[`__scopeId`,`data-v-1eb79e55`]]);exports.default=o;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, toDisplayString, unref, useCssVars, withCtx } from "vue";
|
|
3
|
+
var _hoisted_1 = ["id", "checked"], _hoisted_2 = ["for"], A2UICheckbox_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "A2UICheckbox",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
value: {},
|
|
10
|
+
label: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
useCssVars((e) => ({ v4a6c1003: e.weight }));
|
|
14
|
+
let h = e, { theme: g, resolvePrimitive: _, getUniqueId: v, setData: y } = useDynamicComponent(h), b = computed(() => _(h.value) ?? !1), x = computed(() => _(h.label)), S = v("a2ui-checkbox");
|
|
15
|
+
function C(e) {
|
|
16
|
+
let p = h.value?.path;
|
|
17
|
+
!(e.target instanceof HTMLInputElement) || !p || y(h.component, p, e.target.checked, h.surfaceId);
|
|
18
|
+
}
|
|
19
|
+
return (e, p) => {
|
|
20
|
+
let m = resolveComponent("a2ui-checkbox");
|
|
21
|
+
return openBlock(), createBlock(m, null, {
|
|
22
|
+
default: withCtx(() => [createElementVNode("section", {
|
|
23
|
+
class: normalizeClass(unref(g).components.CheckBox.container),
|
|
24
|
+
style: normalizeStyle(unref(g).additionalStyles?.CheckBox)
|
|
25
|
+
}, [createElementVNode("input", {
|
|
26
|
+
autocomplete: "off",
|
|
27
|
+
type: "checkbox",
|
|
28
|
+
id: unref(S),
|
|
29
|
+
checked: b.value,
|
|
30
|
+
class: normalizeClass(unref(g).components.CheckBox.element),
|
|
31
|
+
onChange: C
|
|
32
|
+
}, null, 42, _hoisted_1), createElementVNode("label", {
|
|
33
|
+
for: unref(S),
|
|
34
|
+
class: normalizeClass(unref(g).components.CheckBox.label)
|
|
35
|
+
}, toDisplayString(x.value), 11, _hoisted_2)], 6)]),
|
|
36
|
+
_: 1
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}), [["__scopeId", "data-v-1eb79e55"]]);
|
|
41
|
+
export { A2UICheckbox_default as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, toDisplayString, unref, useCssVars, withCtx } from "vue";
|
|
3
|
+
var _hoisted_1 = ["for"], _hoisted_2 = [
|
|
4
|
+
"type",
|
|
5
|
+
"id",
|
|
6
|
+
"value"
|
|
7
|
+
], A2UIDateTimeInput_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "A2UIDateTimeInput",
|
|
9
|
+
props: {
|
|
10
|
+
surfaceId: {},
|
|
11
|
+
component: {},
|
|
12
|
+
weight: {},
|
|
13
|
+
value: {},
|
|
14
|
+
enableDate: { type: Boolean },
|
|
15
|
+
enableTime: { type: Boolean }
|
|
16
|
+
},
|
|
17
|
+
setup(e) {
|
|
18
|
+
useCssVars((e) => ({ v0c0a5b2a: e.weight }));
|
|
19
|
+
let f = e, { theme: g, resolvePrimitive: _, getUniqueId: v, setData: y } = useDynamicComponent(f), b = v("a2ui-datetime-input"), x = computed(() => {
|
|
20
|
+
let e = f.enableDate, c = f.enableTime;
|
|
21
|
+
return e && c ? "datetime-local" : e ? "date" : c ? "time" : "datetime-local";
|
|
22
|
+
}), S = computed(() => {
|
|
23
|
+
let e = x.value;
|
|
24
|
+
return e === "date" ? "Date" : e === "time" ? "Time" : "Date & Time";
|
|
25
|
+
}), C = computed(() => {
|
|
26
|
+
let e = x.value, c = _(f.value) || "", l = c ? new Date(c) : null;
|
|
27
|
+
if (!l || isNaN(l.getTime())) return "";
|
|
28
|
+
let u = w(l.getFullYear()), d = w(l.getMonth() + 1), p = w(l.getDate()), m = w(l.getHours()), h = w(l.getMinutes());
|
|
29
|
+
return e === "date" ? `${u}-${d}-${p}` : e === "time" ? `${m}:${h}` : `${u}-${d}-${p}T${m}:${h}`;
|
|
30
|
+
});
|
|
31
|
+
function w(e) {
|
|
32
|
+
return e.toString().padStart(2, "0");
|
|
33
|
+
}
|
|
34
|
+
function T(e) {
|
|
35
|
+
let c = f.value?.path;
|
|
36
|
+
!(e.target instanceof HTMLInputElement) || !c || y(f.component, c, e.target.value, f.surfaceId);
|
|
37
|
+
}
|
|
38
|
+
return (e, c) => {
|
|
39
|
+
let l = resolveComponent("a2ui-datetime-input");
|
|
40
|
+
return openBlock(), createBlock(l, null, {
|
|
41
|
+
default: withCtx(() => [createElementVNode("section", { class: normalizeClass(unref(g).components.DateTimeInput.container) }, [createElementVNode("label", {
|
|
42
|
+
for: unref(b),
|
|
43
|
+
class: normalizeClass(unref(g).components.DateTimeInput.label)
|
|
44
|
+
}, toDisplayString(S.value), 11, _hoisted_1), createElementVNode("input", {
|
|
45
|
+
autocomplete: "off",
|
|
46
|
+
type: x.value,
|
|
47
|
+
id: unref(b),
|
|
48
|
+
class: normalizeClass(unref(g).components.DateTimeInput.element),
|
|
49
|
+
style: normalizeStyle(unref(g).additionalStyles?.DateTimeInput),
|
|
50
|
+
value: C.value,
|
|
51
|
+
onInput: T
|
|
52
|
+
}, null, 46, _hoisted_2)], 2)]),
|
|
53
|
+
_: 1
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}), [["__scopeId", "data-v-a50faaa3"]]);
|
|
58
|
+
export { A2UIDateTimeInput_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r=[`for`],i=[`type`,`id`,`value`],a=(0,n.defineComponent)({__name:`A2UIDateTimeInput`,props:{surfaceId:{},component:{},weight:{},value:{},enableDate:{type:Boolean},enableTime:{type:Boolean}},setup(t){(0,n.useCssVars)(e=>({v0c0a5b2a:e.weight}));let a=t,{theme:o,resolvePrimitive:s,getUniqueId:c,setData:l}=e.t(a),u=c(`a2ui-datetime-input`),d=(0,n.computed)(()=>{let e=a.enableDate,t=a.enableTime;return e&&t?`datetime-local`:e?`date`:t?`time`:`datetime-local`}),f=(0,n.computed)(()=>{let e=d.value;return e===`date`?`Date`:e===`time`?`Time`:`Date & Time`}),p=(0,n.computed)(()=>{let e=d.value,t=s(a.value)||``,n=t?new Date(t):null;if(!n||isNaN(n.getTime()))return``;let r=m(n.getFullYear()),i=m(n.getMonth()+1),o=m(n.getDate()),c=m(n.getHours()),l=m(n.getMinutes());return e===`date`?`${r}-${i}-${o}`:e===`time`?`${c}:${l}`:`${r}-${i}-${o}T${c}:${l}`});function m(e){return e.toString().padStart(2,`0`)}function h(e){let t=a.value?.path;!(e.target instanceof HTMLInputElement)||!t||l(a.component,t,e.target.value,a.surfaceId)}return(e,t)=>{let a=(0,n.resolveComponent)(`a2ui-datetime-input`);return(0,n.openBlock)(),(0,n.createBlock)(a,null,{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`section`,{class:(0,n.normalizeClass)((0,n.unref)(o).components.DateTimeInput.container)},[(0,n.createElementVNode)(`label`,{for:(0,n.unref)(u),class:(0,n.normalizeClass)((0,n.unref)(o).components.DateTimeInput.label)},(0,n.toDisplayString)(f.value),11,r),(0,n.createElementVNode)(`input`,{autocomplete:`off`,type:d.value,id:(0,n.unref)(u),class:(0,n.normalizeClass)((0,n.unref)(o).components.DateTimeInput.element),style:(0,n.normalizeStyle)((0,n.unref)(o).additionalStyles?.DateTimeInput),value:p.value,onInput:h},null,46,i)],2)]),_:1})}}}),o=e.o(a,[[`__scopeId`,`data-v-a50faaa3`]]);exports.default=o;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { createBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, unref, withCtx } from "vue";
|
|
3
|
+
var A2UIDivider_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "A2UIDivider",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {}
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
let { theme: u } = useDynamicComponent(e);
|
|
12
|
+
return (e, l) => {
|
|
13
|
+
let d = resolveComponent("a2ui-divider");
|
|
14
|
+
return openBlock(), createBlock(d, null, {
|
|
15
|
+
default: withCtx(() => [createElementVNode("hr", {
|
|
16
|
+
class: normalizeClass(unref(u).components.Divider),
|
|
17
|
+
style: normalizeStyle(unref(u).additionalStyles?.Divider)
|
|
18
|
+
}, null, 6)]),
|
|
19
|
+
_: 1
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}), [["__scopeId", "data-v-a051e002"]]);
|
|
24
|
+
export { A2UIDivider_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r=(0,n.defineComponent)({__name:`A2UIDivider`,props:{surfaceId:{},component:{},weight:{}},setup(t){let{theme:r}=e.t(t);return(e,t)=>{let i=(0,n.resolveComponent)(`a2ui-divider`);return(0,n.openBlock)(),(0,n.createBlock)(i,null,{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`hr`,{class:(0,n.normalizeClass)((0,n.unref)(r).components.Divider),style:(0,n.normalizeStyle)((0,n.unref)(r).additionalStyles?.Divider)},null,6)]),_:1})}}}),i=e.o(r,[[`__scopeId`,`data-v-a051e002`]]);exports.default=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r={class:`g-icon`},i=(0,n.defineComponent)({__name:`A2UIIcon`,props:{surfaceId:{},component:{},weight:{},name:{}},setup(t){(0,n.useCssVars)(e=>({v3566c56c:e.weight}));let i=t,{theme:a,resolvePrimitive:o}=e.t(i),s=(0,n.computed)(()=>o(i.name));return(e,t)=>{let i=(0,n.resolveComponent)(`a2ui-icon`);return(0,n.openBlock)(),(0,n.createBlock)(i,{"aria-hidden":`true`,tabindex:`-1`},{default:(0,n.withCtx)(()=>[s.value?((0,n.openBlock)(),(0,n.createElementBlock)(`section`,{key:0,class:(0,n.normalizeClass)((0,n.unref)(a).components.Icon),style:(0,n.normalizeStyle)((0,n.unref)(a).additionalStyles?.Icon)},[(0,n.createElementVNode)(`span`,r,(0,n.toDisplayString)(s.value),1)],6)):(0,n.createCommentVNode)(``,!0)]),_:1})}}}),a=e.o(i,[[`__scopeId`,`data-v-9d3eae50`]]);exports.default=a;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, toDisplayString, unref, useCssVars, withCtx } from "vue";
|
|
3
|
+
var _hoisted_1 = { class: "g-icon" }, A2UIIcon_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "A2UIIcon",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
name: {}
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
useCssVars((e) => ({ v3566c56c: e.weight }));
|
|
13
|
+
let g = e, { theme: _, resolvePrimitive: v } = useDynamicComponent(g), y = computed(() => v(g.name));
|
|
14
|
+
return (e, m) => {
|
|
15
|
+
let h = resolveComponent("a2ui-icon");
|
|
16
|
+
return openBlock(), createBlock(h, {
|
|
17
|
+
"aria-hidden": "true",
|
|
18
|
+
tabindex: "-1"
|
|
19
|
+
}, {
|
|
20
|
+
default: withCtx(() => [y.value ? (openBlock(), createElementBlock("section", {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: normalizeClass(unref(_).components.Icon),
|
|
23
|
+
style: normalizeStyle(unref(_).additionalStyles?.Icon)
|
|
24
|
+
}, [createElementVNode("span", _hoisted_1, toDisplayString(y.value), 1)], 6)) : createCommentVNode("", !0)]),
|
|
25
|
+
_: 1
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}), [["__scopeId", "data-v-9d3eae50"]]);
|
|
30
|
+
export { A2UIIcon_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./styles-BZV65AUo.cjs`),n=require(`./zxq-com.cjs`);let r=require(`vue`);var i=[`src`,`alt`],a=(0,r.defineComponent)({__name:`A2UIImage`,props:{surfaceId:{},component:{},weight:{},url:{},altText:{},usageHint:{}},setup(n){(0,r.useCssVars)(e=>({v1e650054:e.weight}));let a=n,{theme:o,resolvePrimitive:s}=e.t(a),c=(0,r.computed)(()=>s(a.url)),l=(0,r.computed)(()=>{let e=a.altText;return e?s(e):``}),u=(0,r.computed)(()=>{let e=a.usageHint;return t.r(o.components.Image.all,e?o.components.Image[e]:{})});return(e,t)=>{let n=(0,r.resolveComponent)(`a2ui-image`);return(0,r.openBlock)(),(0,r.createBlock)(n,null,{default:(0,r.withCtx)(()=>[c.value?((0,r.openBlock)(),(0,r.createElementBlock)(`section`,{key:0,class:(0,r.normalizeClass)(u.value),style:(0,r.normalizeStyle)((0,r.unref)(o).additionalStyles?.Image)},[(0,r.createElementVNode)(`img`,{src:c.value,alt:l.value??``},null,8,i)],6)):(0,r.createCommentVNode)(``,!0)]),_:1})}}}),o=e.o(a,[[`__scopeId`,`data-v-83981816`]]);exports.default=o;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { r as merge } from "./styles-BYpMnn-p.js";
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, unref, useCssVars, withCtx } from "vue";
|
|
4
|
+
var _hoisted_1 = ["src", "alt"], A2UIImage_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "A2UIImage",
|
|
6
|
+
props: {
|
|
7
|
+
surfaceId: {},
|
|
8
|
+
component: {},
|
|
9
|
+
weight: {},
|
|
10
|
+
url: {},
|
|
11
|
+
altText: {},
|
|
12
|
+
usageHint: {}
|
|
13
|
+
},
|
|
14
|
+
setup(e) {
|
|
15
|
+
useCssVars((e) => ({ v1e650054: e.weight }));
|
|
16
|
+
let g = e, { theme: _, resolvePrimitive: v } = useDynamicComponent(g), y = computed(() => v(g.url)), b = computed(() => {
|
|
17
|
+
let e = g.altText;
|
|
18
|
+
return e ? v(e) : "";
|
|
19
|
+
}), x = computed(() => {
|
|
20
|
+
let e = g.usageHint;
|
|
21
|
+
return merge(_.components.Image.all, e ? _.components.Image[e] : {});
|
|
22
|
+
});
|
|
23
|
+
return (e, m) => {
|
|
24
|
+
let h = resolveComponent("a2ui-image");
|
|
25
|
+
return openBlock(), createBlock(h, null, {
|
|
26
|
+
default: withCtx(() => [y.value ? (openBlock(), createElementBlock("section", {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: normalizeClass(x.value),
|
|
29
|
+
style: normalizeStyle(unref(_).additionalStyles?.Image)
|
|
30
|
+
}, [createElementVNode("img", {
|
|
31
|
+
src: y.value,
|
|
32
|
+
alt: b.value ?? ""
|
|
33
|
+
}, null, 8, _hoisted_1)], 6)) : createCommentVNode("", !0)]),
|
|
34
|
+
_: 1
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}), [["__scopeId", "data-v-83981816"]]);
|
|
39
|
+
export { A2UIImage_default as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import "./styles-BYpMnn-p.js";
|
|
3
|
+
import { t as A2UIRenderer_default } from "./A2UIRenderer-lZ0ms8c-.js";
|
|
4
|
+
import { Fragment, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, resolveComponent, unref, useCssVars, withCtx } from "vue";
|
|
5
|
+
var _hoisted_1 = { class: "a2ui-list-item" }, A2UIList_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "A2UIList",
|
|
7
|
+
props: {
|
|
8
|
+
surfaceId: {},
|
|
9
|
+
component: {},
|
|
10
|
+
weight: {},
|
|
11
|
+
direction: {}
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
useCssVars((e) => ({ v3f4216d3: e.weight }));
|
|
15
|
+
let { theme: h } = useDynamicComponent(e);
|
|
16
|
+
return (p, g) => {
|
|
17
|
+
let _ = resolveComponent("a2ui-list");
|
|
18
|
+
return openBlock(), createBlock(_, { "data-direction": e.direction ?? "vertical" }, {
|
|
19
|
+
default: withCtx(() => [createElementVNode("section", {
|
|
20
|
+
class: normalizeClass(unref(h).components.List),
|
|
21
|
+
style: normalizeStyle(unref(h).additionalStyles?.List)
|
|
22
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.component.properties.children, (p, m) => (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(), createBlock(A2UIRenderer_default, {
|
|
23
|
+
key: p.id || m,
|
|
24
|
+
"surface-id": e.surfaceId,
|
|
25
|
+
component: p
|
|
26
|
+
}, null, 8, ["surface-id", "component"]))]))), 256))], 6)]),
|
|
27
|
+
_: 1
|
|
28
|
+
}, 8, ["data-direction"]);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}), [["__scopeId", "data-v-4d492f40"]]);
|
|
32
|
+
export { A2UIList_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`);require(`./styles-BZV65AUo.cjs`);const t=require(`./A2UIRenderer-DqVIH5p7.cjs`),n=require(`./zxq-com.cjs`);let r=require(`vue`);var i={class:`a2ui-list-item`},a=(0,r.defineComponent)({__name:`A2UIList`,props:{surfaceId:{},component:{},weight:{},direction:{}},setup(n){(0,r.useCssVars)(e=>({v3f4216d3:e.weight}));let{theme:a}=e.t(n);return(e,o)=>{let s=(0,r.resolveComponent)(`a2ui-list`);return(0,r.openBlock)(),(0,r.createBlock)(s,{"data-direction":n.direction??`vertical`},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`section`,{class:(0,r.normalizeClass)((0,r.unref)(a).components.List),style:(0,r.normalizeStyle)((0,r.unref)(a).additionalStyles?.List)},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n.component.properties.children,(e,a)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,i,[((0,r.openBlock)(),(0,r.createBlock)(t.t,{key:e.id||a,"surface-id":n.surfaceId,component:e},null,8,[`surface-id`,`component`]))]))),256))],6)]),_:1},8,[`data-direction`])}}}),o=e.o(a,[[`__scopeId`,`data-v-4d492f40`]]);exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`);require(`./styles-BZV65AUo.cjs`);const t=require(`./A2UIRenderer-DqVIH5p7.cjs`),n=require(`./zxq-com.cjs`);let r=require(`vue`);var i=(0,r.defineComponent)({__name:`A2UIModal`,props:{surfaceId:{},component:{},weight:{}},setup(n){let{theme:i}=e.t(n),a=(0,r.ref)(!1),o=(0,r.ref)(null);(0,r.watch)(a,async e=>{e&&(await(0,r.nextTick)(),o.value?.showModal())});function s(e){e.target instanceof HTMLDialogElement&&c()}function c(){o.value?.open&&o.value.close(),a.value=!1}return(e,l)=>{let u=(0,r.resolveComponent)(`a2ui-modal`);return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[a.value?((0,r.openBlock)(),(0,r.createElementBlock)(`dialog`,{key:0,ref_key:`dialogRef`,ref:o,class:(0,r.normalizeClass)((0,r.unref)(i).components.Modal.backdrop),onClick:s},[(0,r.createElementVNode)(`section`,{class:(0,r.normalizeClass)((0,r.unref)(i).components.Modal.element),style:(0,r.normalizeStyle)((0,r.unref)(i).additionalStyles?.Modal)},[(0,r.createElementVNode)(`div`,{class:`controls`},[(0,r.createElementVNode)(`button`,{onClick:c},[...l[1]||=[(0,r.createElementVNode)(`span`,{class:`g-icon`},`close`,-1)]])]),(0,r.createVNode)(t.t,{"surface-id":n.surfaceId,component:n.component.properties.contentChild},null,8,[`surface-id`,`component`])],6)],2)):(0,r.createCommentVNode)(``,!0),(0,r.createVNode)(u,null,{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`section`,{onClick:l[0]||=e=>a.value=!0},[(0,r.createVNode)(t.t,{"surface-id":n.surfaceId,component:n.component.properties.entryPointChild},null,8,[`surface-id`,`component`])])]),_:1})],64)}}}),a=e.o(i,[[`__scopeId`,`data-v-3fe73b77`]]);exports.default=a;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import "./styles-BYpMnn-p.js";
|
|
3
|
+
import { t as A2UIRenderer_default } from "./A2UIRenderer-lZ0ms8c-.js";
|
|
4
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, resolveComponent, unref, watch, withCtx } from "vue";
|
|
5
|
+
var A2UIModal_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "A2UIModal",
|
|
7
|
+
props: {
|
|
8
|
+
surfaceId: {},
|
|
9
|
+
component: {},
|
|
10
|
+
weight: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
let { theme: h } = useDynamicComponent(e), v = ref(!1), y = ref(null);
|
|
14
|
+
watch(v, async (e) => {
|
|
15
|
+
e && (await nextTick(), y.value?.showModal());
|
|
16
|
+
});
|
|
17
|
+
function b(e) {
|
|
18
|
+
e.target instanceof HTMLDialogElement && x();
|
|
19
|
+
}
|
|
20
|
+
function x() {
|
|
21
|
+
y.value?.open && y.value.close(), v.value = !1;
|
|
22
|
+
}
|
|
23
|
+
return (m, g) => {
|
|
24
|
+
let _ = resolveComponent("a2ui-modal");
|
|
25
|
+
return openBlock(), createElementBlock(Fragment, null, [v.value ? (openBlock(), createElementBlock("dialog", {
|
|
26
|
+
key: 0,
|
|
27
|
+
ref_key: "dialogRef",
|
|
28
|
+
ref: y,
|
|
29
|
+
class: normalizeClass(unref(h).components.Modal.backdrop),
|
|
30
|
+
onClick: b
|
|
31
|
+
}, [createElementVNode("section", {
|
|
32
|
+
class: normalizeClass(unref(h).components.Modal.element),
|
|
33
|
+
style: normalizeStyle(unref(h).additionalStyles?.Modal)
|
|
34
|
+
}, [createElementVNode("div", { class: "controls" }, [createElementVNode("button", { onClick: x }, [...g[1] ||= [createElementVNode("span", { class: "g-icon" }, "close", -1)]])]), createVNode(A2UIRenderer_default, {
|
|
35
|
+
"surface-id": e.surfaceId,
|
|
36
|
+
component: e.component.properties.contentChild
|
|
37
|
+
}, null, 8, ["surface-id", "component"])], 6)], 2)) : createCommentVNode("", !0), createVNode(_, null, {
|
|
38
|
+
default: withCtx(() => [createElementVNode("section", { onClick: g[0] ||= (e) => v.value = !0 }, [createVNode(A2UIRenderer_default, {
|
|
39
|
+
"surface-id": e.surfaceId,
|
|
40
|
+
component: e.component.properties.entryPointChild
|
|
41
|
+
}, null, 8, ["surface-id", "component"])])]),
|
|
42
|
+
_: 1
|
|
43
|
+
})], 64);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}), [["__scopeId", "data-v-3fe73b77"]]);
|
|
47
|
+
export { A2UIModal_default as default };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, resolveComponent, toDisplayString, unref, useCssVars, withCtx } from "vue";
|
|
3
|
+
var _hoisted_1 = ["for"], _hoisted_2 = ["id", "value"], _hoisted_3 = ["value"], A2UIMultipleChoice_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "A2UIMultipleChoice",
|
|
5
|
+
props: {
|
|
6
|
+
surfaceId: {},
|
|
7
|
+
component: {},
|
|
8
|
+
weight: {},
|
|
9
|
+
options: {},
|
|
10
|
+
value: {},
|
|
11
|
+
description: {}
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
useCssVars((e) => ({ v592a7670: e.weight }));
|
|
15
|
+
let y = e, { theme: b, resolvePrimitive: x, getUniqueId: S, processor: C } = useDynamicComponent(y), w = S("a2ui-multiple-choice"), T = computed(() => x(y.value));
|
|
16
|
+
function E(e) {
|
|
17
|
+
let _ = y.value?.path;
|
|
18
|
+
!(e.target instanceof HTMLSelectElement) || !e.target.value || !_ || C.setData(y.component, C.resolvePath(_, y.component.dataContextPath), e.target.value);
|
|
19
|
+
}
|
|
20
|
+
return (_, v) => {
|
|
21
|
+
let y = resolveComponent("a2ui-multiple-choice");
|
|
22
|
+
return openBlock(), createBlock(y, null, {
|
|
23
|
+
default: withCtx(() => [createElementVNode("section", { class: normalizeClass(unref(b).components.MultipleChoice.container) }, [createElementVNode("label", {
|
|
24
|
+
class: normalizeClass(unref(b).components.MultipleChoice.label),
|
|
25
|
+
for: unref(w)
|
|
26
|
+
}, toDisplayString(e.description), 11, _hoisted_1), createElementVNode("select", {
|
|
27
|
+
onChange: E,
|
|
28
|
+
id: unref(w),
|
|
29
|
+
value: T.value,
|
|
30
|
+
class: normalizeClass(unref(b).components.MultipleChoice.element),
|
|
31
|
+
style: normalizeStyle(unref(b).additionalStyles?.MultipleChoice)
|
|
32
|
+
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.options, (e) => (openBlock(), createElementBlock("option", {
|
|
33
|
+
key: e.value,
|
|
34
|
+
value: e.value
|
|
35
|
+
}, toDisplayString(unref(x)(e.label)), 9, _hoisted_3))), 128))], 46, _hoisted_2)], 2)]),
|
|
36
|
+
_: 1
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}), [["__scopeId", "data-v-d578fcf9"]]);
|
|
41
|
+
export { A2UIMultipleChoice_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r=[`for`],i=[`id`,`value`],a=[`value`],o=(0,n.defineComponent)({__name:`A2UIMultipleChoice`,props:{surfaceId:{},component:{},weight:{},options:{},value:{},description:{}},setup(t){(0,n.useCssVars)(e=>({v592a7670:e.weight}));let o=t,{theme:s,resolvePrimitive:c,getUniqueId:l,processor:u}=e.t(o),d=l(`a2ui-multiple-choice`),f=(0,n.computed)(()=>c(o.value));function p(e){let t=o.value?.path;!(e.target instanceof HTMLSelectElement)||!e.target.value||!t||u.setData(o.component,u.resolvePath(t,o.component.dataContextPath),e.target.value)}return(e,o)=>{let l=(0,n.resolveComponent)(`a2ui-multiple-choice`);return(0,n.openBlock)(),(0,n.createBlock)(l,null,{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`section`,{class:(0,n.normalizeClass)((0,n.unref)(s).components.MultipleChoice.container)},[(0,n.createElementVNode)(`label`,{class:(0,n.normalizeClass)((0,n.unref)(s).components.MultipleChoice.label),for:(0,n.unref)(d)},(0,n.toDisplayString)(t.description),11,r),(0,n.createElementVNode)(`select`,{onChange:p,id:(0,n.unref)(d),value:f.value,class:(0,n.normalizeClass)((0,n.unref)(s).components.MultipleChoice.element),style:(0,n.normalizeStyle)((0,n.unref)(s).additionalStyles?.MultipleChoice)},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(t.options,e=>((0,n.openBlock)(),(0,n.createElementBlock)(`option`,{key:e.value,value:e.value},(0,n.toDisplayString)((0,n.unref)(c)(e.label)),9,a))),128))],46,i)],2)]),_:1})}}}),s=e.o(o,[[`__scopeId`,`data-v-d578fcf9`]]);exports.default=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./styles-BZV65AUo.cjs`),n=require(`./zxq-com.cjs`);let r=require(`vue`);var i=(0,r.defineComponent)({__name:`A2UIRenderer`,props:{surfaceId:{},component:{}},setup(n){let i=n,{catalog:a}=e.a(),o=(0,r.shallowRef)(null),s=(0,r.ref)({}),c=!1;async function l(){let e=a[i.component.type];if(!e){console.warn(`No component registered for type: ${i.component.type}`),o.value=null;return}let t,n={};if(typeof e==`function`){let n=await e();t=n.default??n}else{let r=await e.type();t=r.default??r,n=e.props(i.component)}s.value={surfaceId:i.surfaceId,component:i.component,weight:i.component.weight??`initial`,...n},o.value=t}return(0,r.watch)(()=>[i.surfaceId,i.component],()=>l(),{immediate:!0,deep:!0}),(0,r.onMounted)(()=>{if(!c&&typeof document<`u`){let e=document.createElement(`style`);e.textContent=t.t,document.head.appendChild(e),c=!0}}),(e,t)=>o.value?((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(o.value),(0,r.normalizeProps)((0,r.mergeProps)({key:0},s.value)),null,16)):(0,r.createCommentVNode)(``,!0)}}),a=i;Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { a as useA2UIConfig } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { t as structuralStyles } from "./styles-BYpMnn-p.js";
|
|
3
|
+
import { createBlock, createCommentVNode, defineComponent, mergeProps, normalizeProps, onMounted, openBlock, ref, resolveDynamicComponent, shallowRef, watch } from "vue";
|
|
4
|
+
var A2UIRenderer_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "A2UIRenderer",
|
|
6
|
+
props: {
|
|
7
|
+
surfaceId: {},
|
|
8
|
+
component: {}
|
|
9
|
+
},
|
|
10
|
+
setup(f) {
|
|
11
|
+
let p = f, { catalog: m } = useA2UIConfig(), h = shallowRef(null), g = ref({}), _ = !1;
|
|
12
|
+
async function v() {
|
|
13
|
+
let e = m[p.component.type];
|
|
14
|
+
if (!e) {
|
|
15
|
+
console.warn(`No component registered for type: ${p.component.type}`), h.value = null;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let l, u = {};
|
|
19
|
+
if (typeof e == "function") {
|
|
20
|
+
let u = await e();
|
|
21
|
+
l = u.default ?? u;
|
|
22
|
+
} else {
|
|
23
|
+
let d = await e.type();
|
|
24
|
+
l = d.default ?? d, u = e.props(p.component);
|
|
25
|
+
}
|
|
26
|
+
g.value = {
|
|
27
|
+
surfaceId: p.surfaceId,
|
|
28
|
+
component: p.component,
|
|
29
|
+
weight: p.component.weight ?? "initial",
|
|
30
|
+
...u
|
|
31
|
+
}, h.value = l;
|
|
32
|
+
}
|
|
33
|
+
return watch(() => [p.surfaceId, p.component], () => v(), {
|
|
34
|
+
immediate: !0,
|
|
35
|
+
deep: !0
|
|
36
|
+
}), onMounted(() => {
|
|
37
|
+
if (!_ && typeof document < "u") {
|
|
38
|
+
let e = document.createElement("style");
|
|
39
|
+
e.textContent = structuralStyles, document.head.appendChild(e), _ = !0;
|
|
40
|
+
}
|
|
41
|
+
}), (e, l) => h.value ? (openBlock(), createBlock(resolveDynamicComponent(h.value), normalizeProps(mergeProps({ key: 0 }, g.value)), null, 16)) : createCommentVNode("", !0);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export { A2UIRenderer_default as t };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, resolveComponent, toDisplayString, unref, useCssVars, withCtx } from "vue";
|
|
3
|
+
var _hoisted_1 = ["for"], _hoisted_2 = [
|
|
4
|
+
"value",
|
|
5
|
+
"min",
|
|
6
|
+
"max",
|
|
7
|
+
"id"
|
|
8
|
+
], A2UISlider_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "A2UISlider",
|
|
10
|
+
props: {
|
|
11
|
+
surfaceId: {},
|
|
12
|
+
component: {},
|
|
13
|
+
weight: {},
|
|
14
|
+
value: {},
|
|
15
|
+
label: {},
|
|
16
|
+
minValue: {},
|
|
17
|
+
maxValue: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
useCssVars((e) => ({ v7438330c: e.weight }));
|
|
21
|
+
let h = e, { theme: g, resolvePrimitive: _, getUniqueId: v, setData: y } = useDynamicComponent(h), b = v("a2ui-slider"), x = computed(() => _(h.value) ?? 0), S = computed(() => C(x.value));
|
|
22
|
+
function C(e) {
|
|
23
|
+
let f = h.minValue ?? 0, p = (h.maxValue ?? 100) - f;
|
|
24
|
+
return p > 0 ? Math.max(0, Math.min(100, (e - f) / p * 100)) : 0;
|
|
25
|
+
}
|
|
26
|
+
function w(e) {
|
|
27
|
+
let f = h.value?.path;
|
|
28
|
+
if (!(e.target instanceof HTMLInputElement)) return;
|
|
29
|
+
let p = e.target.valueAsNumber, m = C(p);
|
|
30
|
+
e.target.style.setProperty("--slider-percent", m + "%"), f && y(h.component, f, p, h.surfaceId);
|
|
31
|
+
}
|
|
32
|
+
return (f, p) => {
|
|
33
|
+
let h = resolveComponent("a2ui-slider");
|
|
34
|
+
return openBlock(), createBlock(h, null, {
|
|
35
|
+
default: withCtx(() => [createElementVNode("section", { class: normalizeClass(unref(g).components.Slider.container) }, [createElementVNode("label", {
|
|
36
|
+
class: normalizeClass(unref(g).components.Slider.label),
|
|
37
|
+
for: unref(b)
|
|
38
|
+
}, toDisplayString(e.label), 11, _hoisted_1), createElementVNode("input", {
|
|
39
|
+
autocomplete: "off",
|
|
40
|
+
type: "range",
|
|
41
|
+
value: x.value,
|
|
42
|
+
min: e.minValue,
|
|
43
|
+
max: e.maxValue,
|
|
44
|
+
id: unref(b),
|
|
45
|
+
onInput: w,
|
|
46
|
+
class: normalizeClass(unref(g).components.Slider.element),
|
|
47
|
+
style: normalizeStyle([unref(g).additionalStyles?.Slider, { "--slider-percent": S.value + "%" }])
|
|
48
|
+
}, null, 46, _hoisted_2)], 2)]),
|
|
49
|
+
_: 1
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}), [["__scopeId", "data-v-9af75714"]]);
|
|
54
|
+
export { A2UISlider_default as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./zxq-com.cjs`);let n=require(`vue`);var r=[`for`],i=[`value`,`min`,`max`,`id`],a=(0,n.defineComponent)({__name:`A2UISlider`,props:{surfaceId:{},component:{},weight:{},value:{},label:{},minValue:{},maxValue:{}},setup(t){(0,n.useCssVars)(e=>({v7438330c:e.weight}));let a=t,{theme:o,resolvePrimitive:s,getUniqueId:c,setData:l}=e.t(a),u=c(`a2ui-slider`),d=(0,n.computed)(()=>s(a.value)??0),f=(0,n.computed)(()=>p(d.value));function p(e){let t=a.minValue??0,n=(a.maxValue??100)-t;return n>0?Math.max(0,Math.min(100,(e-t)/n*100)):0}function m(e){let t=a.value?.path;if(!(e.target instanceof HTMLInputElement))return;let n=e.target.valueAsNumber,r=p(n);e.target.style.setProperty(`--slider-percent`,r+`%`),t&&l(a.component,t,n,a.surfaceId)}return(e,a)=>{let s=(0,n.resolveComponent)(`a2ui-slider`);return(0,n.openBlock)(),(0,n.createBlock)(s,null,{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`section`,{class:(0,n.normalizeClass)((0,n.unref)(o).components.Slider.container)},[(0,n.createElementVNode)(`label`,{class:(0,n.normalizeClass)((0,n.unref)(o).components.Slider.label),for:(0,n.unref)(u)},(0,n.toDisplayString)(t.label),11,r),(0,n.createElementVNode)(`input`,{autocomplete:`off`,type:`range`,value:d.value,min:t.minValue,max:t.maxValue,id:(0,n.unref)(u),onInput:m,class:(0,n.normalizeClass)((0,n.unref)(o).components.Slider.element),style:(0,n.normalizeStyle)([(0,n.unref)(o).additionalStyles?.Slider,{"--slider-percent":f.value+`%`}])},null,46,i)],2)]),_:1})}}}),o=e.o(a,[[`__scopeId`,`data-v-9af75714`]]);exports.default=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./useDynamicComponent-YT-u9Rpv.cjs`),t=require(`./styles-BZV65AUo.cjs`),n=require(`./A2UIRenderer-DqVIH5p7.cjs`),r=require(`./zxq-com.cjs`);let i=require(`vue`);var a=[`onClick`,`disabled`],o=(0,i.defineComponent)({__name:`A2UITabs`,props:{surfaceId:{},component:{},weight:{},tabs:{}},setup(r){(0,i.useCssVars)(e=>({v7245b45c:e.weight}));let o=r,{theme:s,resolvePrimitive:c}=e.t(o),l=(0,i.ref)(0),u=(0,i.computed)(()=>{let e=l.value;return o.tabs.map((n,r)=>r===e?t.r(s.components.Tabs.controls.all,s.components.Tabs.controls.selected):s.components.Tabs.controls.all)});return(e,t)=>{let o=(0,i.resolveComponent)(`a2ui-tabs`);return(0,i.openBlock)(),(0,i.createBlock)(o,null,{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`section`,{class:(0,i.normalizeClass)((0,i.unref)(s).components.Tabs.container),style:(0,i.normalizeStyle)((0,i.unref)(s).additionalStyles?.Tabs)},[(0,i.createElementVNode)(`div`,{class:(0,i.normalizeClass)((0,i.unref)(s).components.Tabs.element)},[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(r.tabs,(e,t)=>((0,i.openBlock)(),(0,i.createElementBlock)(`button`,{key:t,onClick:e=>l.value=t,disabled:l.value===t,class:(0,i.normalizeClass)(u.value[t])},(0,i.toDisplayString)((0,i.unref)(c)(e.title)),11,a))),128))],2),(0,i.createVNode)(n.t,{"surface-id":r.surfaceId,component:r.tabs[l.value].child},null,8,[`surface-id`,`component`])],6)]),_:1})}}}),s=e.o(o,[[`__scopeId`,`data-v-02f92b76`]]);exports.default=s;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { o as __plugin_vue_export_helper_default, t as useDynamicComponent } from "./useDynamicComponent-MEzwhjNJ.js";
|
|
2
|
+
import { r as merge } from "./styles-BYpMnn-p.js";
|
|
3
|
+
import { t as A2UIRenderer_default } from "./A2UIRenderer-lZ0ms8c-.js";
|
|
4
|
+
import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, useCssVars, withCtx } from "vue";
|
|
5
|
+
var _hoisted_1 = ["onClick", "disabled"], A2UITabs_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "A2UITabs",
|
|
7
|
+
props: {
|
|
8
|
+
surfaceId: {},
|
|
9
|
+
component: {},
|
|
10
|
+
weight: {},
|
|
11
|
+
tabs: {}
|
|
12
|
+
},
|
|
13
|
+
setup(e) {
|
|
14
|
+
useCssVars((e) => ({ v7245b45c: e.weight }));
|
|
15
|
+
let x = e, { theme: S, resolvePrimitive: C } = useDynamicComponent(x), w = ref(0), T = computed(() => {
|
|
16
|
+
let e = w.value;
|
|
17
|
+
return x.tabs.map((_, y) => y === e ? merge(S.components.Tabs.controls.all, S.components.Tabs.controls.selected) : S.components.Tabs.controls.all);
|
|
18
|
+
});
|
|
19
|
+
return (_, v) => {
|
|
20
|
+
let b = resolveComponent("a2ui-tabs");
|
|
21
|
+
return openBlock(), createBlock(b, null, {
|
|
22
|
+
default: withCtx(() => [createElementVNode("section", {
|
|
23
|
+
class: normalizeClass(unref(S).components.Tabs.container),
|
|
24
|
+
style: normalizeStyle(unref(S).additionalStyles?.Tabs)
|
|
25
|
+
}, [createElementVNode("div", { class: normalizeClass(unref(S).components.Tabs.element) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(e.tabs, (e, _) => (openBlock(), createElementBlock("button", {
|
|
26
|
+
key: _,
|
|
27
|
+
onClick: (e) => w.value = _,
|
|
28
|
+
disabled: w.value === _,
|
|
29
|
+
class: normalizeClass(T.value[_])
|
|
30
|
+
}, toDisplayString(unref(C)(e.title)), 11, _hoisted_1))), 128))], 2), createVNode(A2UIRenderer_default, {
|
|
31
|
+
"surface-id": e.surfaceId,
|
|
32
|
+
component: e.tabs[w.value].child
|
|
33
|
+
}, null, 8, ["surface-id", "component"])], 6)]),
|
|
34
|
+
_: 1
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}), [["__scopeId", "data-v-02f92b76"]]);
|
|
39
|
+
export { A2UITabs_default as default };
|