zxq-com 0.0.30 → 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.
- package/dist/index.d.ts +0 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/ws/zxqWs.d.ts +1 -1
- package/dist/zxq-com.cjs +321 -322
- package/dist/zxq-com.css +1 -1
- package/dist/zxq-com.js +2890 -4179
- package/dist/zxq-ws.cjs +1 -1
- package/dist/zxq-ws.js +1 -1
- package/dist/zxqWs-C8PKp6xW.cjs +1 -0
- package/dist/zxqWs-wYl2lV3c.js +127 -0
- package/package.json +1 -1
- package/dist/A2UIAudio-CjRHo_tK.cjs +0 -1
- package/dist/A2UIAudio-Dn4ur7h-.js +0 -31
- package/dist/A2UIButton-CnppLi7b.cjs +0 -1
- package/dist/A2UIButton-nOO3LOth.js +0 -35
- package/dist/A2UICard-BgjH40z6.js +0 -34
- package/dist/A2UICard-BhGyY9Gx.cjs +0 -1
- package/dist/A2UICheckbox-B5uHUsbP.cjs +0 -1
- package/dist/A2UICheckbox-DrC1_5iC.js +0 -41
- package/dist/A2UIDateTimeInput-BYdDpBR-.js +0 -58
- package/dist/A2UIDateTimeInput-D-aG6mZk.cjs +0 -1
- package/dist/A2UIDivider-Bzpy-f-q.js +0 -24
- package/dist/A2UIDivider-CvM6sA_R.cjs +0 -1
- package/dist/A2UIIcon-7d6g1X7l.cjs +0 -1
- package/dist/A2UIIcon-D0PvsBr4.js +0 -30
- package/dist/A2UIImage-BeT7cRh7.cjs +0 -1
- package/dist/A2UIImage-DvRMKAMK.js +0 -39
- package/dist/A2UIList-CVESfWJr.js +0 -32
- package/dist/A2UIList-DcLtvZb0.cjs +0 -1
- package/dist/A2UIModal-BNDMZHNM.cjs +0 -1
- package/dist/A2UIModal-B_MoIZYE.js +0 -47
- package/dist/A2UIMultipleChoice-DtMcPyuU.js +0 -41
- package/dist/A2UIMultipleChoice-n7GyQjXd.cjs +0 -1
- package/dist/A2UIRenderer-DqVIH5p7.cjs +0 -1
- package/dist/A2UIRenderer-lZ0ms8c-.js +0 -44
- package/dist/A2UISlider-Dd9OIXwb.js +0 -54
- package/dist/A2UISlider-NnRbh48d.cjs +0 -1
- package/dist/A2UITabs-CvuzauYt.cjs +0 -1
- package/dist/A2UITabs-DU1t9s1D.js +0 -39
- package/dist/A2UITextField-CC5S1AW9.js +0 -46
- package/dist/A2UITextField-D652Ge6_.cjs +0 -1
- package/dist/A2UIVideo-CNBhUnoP.js +0 -30
- package/dist/A2UIVideo-CRBBhgyW.cjs +0 -1
- package/dist/a2ui/catalog/A2UIAudio.vue.d.ts +0 -10
- package/dist/a2ui/catalog/A2UIButton.vue.d.ts +0 -9
- package/dist/a2ui/catalog/A2UICard.vue.d.ts +0 -8
- package/dist/a2ui/catalog/A2UICheckbox.vue.d.ts +0 -11
- package/dist/a2ui/catalog/A2UIColumn.vue.d.ts +0 -10
- package/dist/a2ui/catalog/A2UIDateTimeInput.vue.d.ts +0 -12
- package/dist/a2ui/catalog/A2UIDivider.vue.d.ts +0 -8
- package/dist/a2ui/catalog/A2UIIcon.vue.d.ts +0 -10
- package/dist/a2ui/catalog/A2UIImage.vue.d.ts +0 -12
- package/dist/a2ui/catalog/A2UIList.vue.d.ts +0 -9
- package/dist/a2ui/catalog/A2UIModal.vue.d.ts +0 -10
- package/dist/a2ui/catalog/A2UIMultipleChoice.vue.d.ts +0 -15
- package/dist/a2ui/catalog/A2UIRow.vue.d.ts +0 -10
- package/dist/a2ui/catalog/A2UISlider.vue.d.ts +0 -13
- package/dist/a2ui/catalog/A2UISurface.vue.d.ts +0 -7
- package/dist/a2ui/catalog/A2UITabs.vue.d.ts +0 -9
- package/dist/a2ui/catalog/A2UIText.vue.d.ts +0 -11
- package/dist/a2ui/catalog/A2UITextField.vue.d.ts +0 -12
- package/dist/a2ui/catalog/A2UIVideo.vue.d.ts +0 -10
- package/dist/a2ui/catalog/default.d.ts +0 -2
- package/dist/a2ui/config.d.ts +0 -10
- package/dist/a2ui/data/markdown.d.ts +0 -9
- package/dist/a2ui/data/processor.d.ts +0 -17
- package/dist/a2ui/data/types.d.ts +0 -12
- package/dist/a2ui/index.d.ts +0 -11
- package/dist/a2ui/rendering/A2UIRenderer.vue.d.ts +0 -7
- package/dist/a2ui/rendering/catalog.d.ts +0 -10
- package/dist/a2ui/rendering/useDynamicComponent.d.ts +0 -18
- package/dist/a2ui/theme.d.ts +0 -2
- package/dist/styles-BYpMnn-p.js +0 -442
- package/dist/styles-BZV65AUo.cjs +0 -453
- package/dist/useDynamicComponent-MEzwhjNJ.js +0 -470
- package/dist/useDynamicComponent-YT-u9Rpv.cjs +0 -1
- package/dist/zxqWs-C-4EvBgn.cjs +0 -1
- package/dist/zxqWs-dpmEPt3d.js +0 -109
package/dist/zxq-ws.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./zxqWs-
|
|
1
|
+
const e=require(`./zxqWs-C8PKp6xW.cjs`);exports.EVENT_TYPE=e.t,exports.log=e.n,exports.useWs=e.r,exports.ws=e.i,exports.zwqWs=e.a;
|
package/dist/zxq-ws.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as zwqWs, i as ws, n as log, r as useWs, t as EVENT_TYPE } from "./zxqWs-
|
|
1
|
+
import { a as zwqWs, i as ws, n as log, r as useWs, t as EVENT_TYPE } from "./zxqWs-wYl2lV3c.js";
|
|
2
2
|
export { EVENT_TYPE, log, useWs, ws, zwqWs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require(`vue`),t=require(`@vueuse/core`);function n(e=``){return e+(crypto?.randomUUID?.()||`${Date.now()}_${Math.random().toString(16).slice(2)}`)}function r(){return typeof process<`u`&&process?.env&&typeof process.env.NODE_ENV==`string`?process.env.NODE_ENV===`development`:typeof __DEV__<`u`?typeof __DEV__==`boolean`?__DEV__:!1:!!(typeof window<`u`&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__)}var i=`ZXQ_SYNC_MESSAGE`;function a(e,t=5e3){let r=n();e.messageId=r;let a=new AbortController,o=!1;return new Promise(n=>{window.addEventListener(`message`,e=>{let{type:t,payload:a}=e.data;t===i&&a.messageId===r&&(c(),n(a))},{signal:a.signal});let s=setTimeout(()=>{o||(c(),n({}))},t);function c(){o||(o=!0,a.abort(),clearTimeout(s))}window.parent.postMessage({type:i,payload:e},`*`)})}var o={};function s(...e){(r()||o.debug)&&console.log(`【zxqWs】`,...e)}const c={CLIENT_NAME:`__client-name`,DEV1:`dev-1`,DEV2:`dev-2`};var l=!1,u=(0,e.ref)(),{status:d,data:f,send:p,close:m,open:h}=(0,t.useWebSocket)(u,{immediate:!1,autoConnect:!1,heartbeat:{message:`ping`,interval:5e3,pongTimeout:15e3},autoReconnect:{retries:3,delay:1e4,onFailed(){console.error(`超过重连次数`)}}}),g=``;async function _(e){g||=(await a({action:`getClientId`})).clientId||``,e.clientId=g,p(JSON.stringify(e))}const v={sendMsg:_,close:m,status:d};var y=new Map;function b(t,n){l||(l=!0,Object.assign(o,n),u.value=n.url,h(),(0,e.watch)(d,e=>{s(`ws status`,e),e===`OPEN`&&_({event:c.CLIENT_NAME,payload:{name:n.name}})}),(0,e.watch)(f,e=>{if(e!==`pong`)try{let{sourceIp:t,event:r,payload:i}=JSON.parse(e);if(n?.trustIp&&t!==n.trustIp)return;let a=y.get(r);a&&a.forEach(({fn:e,off:t})=>{e(i),t&&t()})}catch(e){console.error(`ws 数据格式有误`,e)}}))}function x(t,r){r&&b(null,r),d.value===`CLOSED`&&u.value&&!l&&h();let i=n();function a(e){let n=y.get(t);if(n)n.set(i,{fn:e});else{let n=new Map().set(i,{fn:e});y.set(t,n)}}function o(){let e=y.get(t);e&&e.has(i)&&(e.delete(i),e.size===0&&y.delete(t))}function c(e){s(`ws once`);let n=y.get(t);if(n)n.set(i,{fn:e,off:o});else{let n=new Map().set(i,{fn:e,off:o});y.set(t,n)}}(0,e.onBeforeUnmount)(()=>{o()});function f(e){_(e)}return{on:a,off:o,once:c,emit:f}}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { onBeforeUnmount, ref, watch } from "vue";
|
|
2
|
+
import { useWebSocket } from "@vueuse/core";
|
|
3
|
+
function getUUID(e = "") {
|
|
4
|
+
return e + (crypto?.randomUUID?.() || `${Date.now()}_${Math.random().toString(16).slice(2)}`);
|
|
5
|
+
}
|
|
6
|
+
function isDevelopment() {
|
|
7
|
+
return typeof process < "u" && process?.env && typeof process.env.NODE_ENV == "string" ? process.env.NODE_ENV === "development" : typeof __DEV__ < "u" ? typeof __DEV__ == "boolean" ? __DEV__ : !1 : !!(typeof window < "u" && window.__VUE_DEVTOOLS_GLOBAL_HOOK__);
|
|
8
|
+
}
|
|
9
|
+
var eventType = "ZXQ_SYNC_MESSAGE";
|
|
10
|
+
function askParent(e, g = 5e3) {
|
|
11
|
+
let _ = getUUID();
|
|
12
|
+
e.messageId = _;
|
|
13
|
+
let v = new AbortController(), b = !1;
|
|
14
|
+
return new Promise((y) => {
|
|
15
|
+
window.addEventListener("message", (e) => {
|
|
16
|
+
let { type: g, payload: v } = e.data;
|
|
17
|
+
g === eventType && v.messageId === _ && (C(), y(v));
|
|
18
|
+
}, { signal: v.signal });
|
|
19
|
+
let S = setTimeout(() => {
|
|
20
|
+
b || (C(), y({}));
|
|
21
|
+
}, g);
|
|
22
|
+
function C() {
|
|
23
|
+
b || (b = !0, v.abort(), clearTimeout(S));
|
|
24
|
+
}
|
|
25
|
+
window.parent.postMessage({
|
|
26
|
+
type: eventType,
|
|
27
|
+
payload: e
|
|
28
|
+
}, "*");
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
var wsConfig = {};
|
|
32
|
+
function log(...e) {
|
|
33
|
+
(isDevelopment() || wsConfig.debug) && console.log("【zxqWs】", ...e);
|
|
34
|
+
}
|
|
35
|
+
const EVENT_TYPE = {
|
|
36
|
+
CLIENT_NAME: "__client-name",
|
|
37
|
+
DEV1: "dev-1",
|
|
38
|
+
DEV2: "dev-2"
|
|
39
|
+
};
|
|
40
|
+
var initialized = !1, urlRef = ref(), { status, data, send, close, open } = useWebSocket(urlRef, {
|
|
41
|
+
immediate: !1,
|
|
42
|
+
autoConnect: !1,
|
|
43
|
+
heartbeat: {
|
|
44
|
+
message: "ping",
|
|
45
|
+
interval: 5e3,
|
|
46
|
+
pongTimeout: 15e3
|
|
47
|
+
},
|
|
48
|
+
autoReconnect: {
|
|
49
|
+
retries: 3,
|
|
50
|
+
delay: 1e4,
|
|
51
|
+
onFailed() {
|
|
52
|
+
console.error("超过重连次数");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}), clientId = "";
|
|
56
|
+
async function sendMsg(e) {
|
|
57
|
+
clientId ||= (await askParent({ action: "getClientId" })).clientId || "", e.clientId = clientId, send(JSON.stringify(e));
|
|
58
|
+
}
|
|
59
|
+
const ws = {
|
|
60
|
+
sendMsg,
|
|
61
|
+
close,
|
|
62
|
+
status
|
|
63
|
+
};
|
|
64
|
+
var subscribeMap = /* @__PURE__ */ new Map();
|
|
65
|
+
function zwqWs(e, g) {
|
|
66
|
+
initialized || (initialized = !0, Object.assign(wsConfig, g), urlRef.value = g.url, open(), watch(status, (e) => {
|
|
67
|
+
log("ws status", e), e === "OPEN" && sendMsg({
|
|
68
|
+
event: EVENT_TYPE.CLIENT_NAME,
|
|
69
|
+
payload: { name: g.name }
|
|
70
|
+
});
|
|
71
|
+
}), watch(data, (e) => {
|
|
72
|
+
if (e !== "pong") try {
|
|
73
|
+
let { sourceIp: _, event: v, payload: y } = JSON.parse(e);
|
|
74
|
+
if (g?.trustIp && _ !== g.trustIp) return;
|
|
75
|
+
let b = subscribeMap.get(v);
|
|
76
|
+
b && b.forEach(({ fn: e, off: g }) => {
|
|
77
|
+
e(y), g && g();
|
|
78
|
+
});
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.error("ws 数据格式有误", e);
|
|
81
|
+
}
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
function useWs(g, _) {
|
|
85
|
+
_ && zwqWs(null, _), status.value === "CLOSED" && urlRef.value && !initialized && open();
|
|
86
|
+
let v = getUUID();
|
|
87
|
+
function b(e) {
|
|
88
|
+
let _ = subscribeMap.get(g);
|
|
89
|
+
if (_) _.set(v, { fn: e });
|
|
90
|
+
else {
|
|
91
|
+
let _ = (/* @__PURE__ */ new Map()).set(v, { fn: e });
|
|
92
|
+
subscribeMap.set(g, _);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function x() {
|
|
96
|
+
let e = subscribeMap.get(g);
|
|
97
|
+
e && e.has(v) && (e.delete(v), e.size === 0 && subscribeMap.delete(g));
|
|
98
|
+
}
|
|
99
|
+
function S(e) {
|
|
100
|
+
log("ws once");
|
|
101
|
+
let _ = subscribeMap.get(g);
|
|
102
|
+
if (_) _.set(v, {
|
|
103
|
+
fn: e,
|
|
104
|
+
off: x
|
|
105
|
+
});
|
|
106
|
+
else {
|
|
107
|
+
let _ = (/* @__PURE__ */ new Map()).set(v, {
|
|
108
|
+
fn: e,
|
|
109
|
+
off: x
|
|
110
|
+
});
|
|
111
|
+
subscribeMap.set(g, _);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
onBeforeUnmount(() => {
|
|
115
|
+
x();
|
|
116
|
+
});
|
|
117
|
+
function C(e) {
|
|
118
|
+
sendMsg(e);
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
on: b,
|
|
122
|
+
off: x,
|
|
123
|
+
once: S,
|
|
124
|
+
emit: C
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
export { zwqWs as a, ws as i, log as n, useWs as r, EVENT_TYPE as t };
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,31 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,35 +0,0 @@
|
|
|
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 };
|
|
@@ -1,34 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,41 +0,0 @@
|
|
|
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 };
|
|
@@ -1,58 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,24 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,30 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,39 +0,0 @@
|
|
|
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 };
|
|
@@ -1,32 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1,47 +0,0 @@
|
|
|
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 };
|
|
@@ -1,41 +0,0 @@
|
|
|
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 };
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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}});
|