@nuraly/runtime 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +60 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +108 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +1 -1
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.types.ts +1 -0
- package/dist/CodeEditor-BiNku87K.js +808 -0
- package/dist/{CodeEditor-Ch2tv9BE.js → CodeEditor-G6E8PUI7.js} +14593 -14607
- package/dist/{SmartAttributeHandler-hoSLpm1Y.js → SmartAttributeHandler-C9vS-cHW.js} +1 -1
- package/dist/SmartAttributeHandler-u-ZHGueR.js +193 -0
- package/dist/assets/editor.worker-C_S4Avdt.js +11 -0
- package/dist/assets/{html.worker-BSmGlhXp.js → html.worker-DfuQASUV.js} +18 -18
- package/dist/assets/json.worker-Cucz4wxY.js +42 -0
- package/dist/assets/{ts.worker-DyHHPhrh.js → ts.worker-Dme6S0YK.js} +78 -78
- package/dist/cssMode-B7NVlrDV.js +1443 -0
- package/dist/{freemarker2-DNc2IxPf.js → freemarker2-DS_7G9b8.js} +1 -1
- package/dist/{handlebars-CIbFckEw.js → handlebars-BDyyLkzw.js} +1 -1
- package/dist/{html-nRs_fneU.js → html-DphGFjig.js} +1 -1
- package/dist/{htmlMode-BjehA1YF.js → htmlMode-4zNnSWFo.js} +278 -281
- package/dist/index-B4yIOSMd.js +3847 -0
- package/dist/{javascript-Bn0HduZA.js → javascript-CC1jWyQy.js} +1 -1
- package/dist/{jsonMode-CfGfcJRX.js → jsonMode-Bfzb6wZf.js} +369 -372
- package/dist/{liquid-m4D_LCnC.js → liquid-lTBpqagR.js} +1 -1
- package/dist/{mdx-CakMRbCr.js → mdx-DX66Bp07.js} +1 -1
- package/dist/{micro-app-entry-CI1Rupdh.js → micro-app-entry-DDsAWUJh.js} +5138 -5322
- package/dist/micro-app.bundle.js +1 -1
- package/dist/micro-app.js +9775 -0
- package/dist/{python-oJwaiPUY.js → python-BGUhyO4G.js} +1 -1
- package/dist/{razor-u_dd4rqc.js → razor-DEVWQFSa.js} +1 -1
- package/dist/runtime.js +401 -0
- package/dist/style.css +1 -1
- package/dist/tsMode-CYFi80Jf.js +800 -0
- package/dist/{typescript-Bjs2N5Be.js → typescript-B1xIbH_T.js} +1 -1
- package/dist/{wgsl-Bv2xeo60.js → wgsl-C9yjop46.js} +1 -1
- package/dist/{xml-BCveATLl.js → xml-DmdvyqrE.js} +1 -1
- package/dist/{yaml-BfWQPJQi.js → yaml-LGNo48fy.js} +1 -1
- package/package.json +2 -2
- package/vite.config.ts +8 -8
- package/dist/.claude/settings.local.json +0 -9
- package/dist/assets/editor.worker-vBWydyGC.js +0 -11
- package/dist/assets/json.worker-Dqnoedz4.js +0 -42
- package/dist/cssMode-Bt2uK8XM.js +0 -1446
- package/dist/micro-app.bundle.umd.cjs +0 -5051
- package/dist/tsMode-DlZ38d3D.js +0 -813
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as b, n, r as p, h as v, k as h, s as C, t as y, D as m } from "./micro-app-entry-
|
|
1
|
+
import { i as b, n, r as p, h as v, k as h, s as C, t as y, D as m } from "./micro-app-entry-DDsAWUJh.js";
|
|
2
2
|
var g = Object.defineProperty, S = Object.getOwnPropertyDescriptor, l = (e, t, i, a) => {
|
|
3
3
|
for (var o = a > 1 ? void 0 : a ? S(t, i) : t, u = e.length - 1, d; u >= 0; u--)
|
|
4
4
|
(d = e[u]) && (o = (a ? d(t, i, o) : d(o)) || o);
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { css, LitElement, html, nothing } from 'lit';
|
|
2
|
+
import { property, state, customElement } from 'lit/decorators.js';
|
|
3
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
4
|
+
|
|
5
|
+
var __defProp$1 = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
8
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
12
|
+
if (kind && result) __defProp$1(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
15
|
+
let SmartAttributeCodeeditor = class extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.containerStyle = {
|
|
19
|
+
background: "white",
|
|
20
|
+
width: "700px",
|
|
21
|
+
height: "250px"
|
|
22
|
+
};
|
|
23
|
+
this.debounceTimeout = null;
|
|
24
|
+
this.data = "";
|
|
25
|
+
this.isEditorLoaded = true;
|
|
26
|
+
this.handleCodeEditorChange = this.handleCodeEditorChange.bind(this);
|
|
27
|
+
}
|
|
28
|
+
// No dynamic import needed; CodeEditor is statically registered above
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
super.disconnectedCallback();
|
|
31
|
+
if (this.debounceTimeout) {
|
|
32
|
+
clearTimeout(this.debounceTimeout);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
render() {
|
|
36
|
+
return html`
|
|
37
|
+
<div style=${styleMap(this.containerStyle)}>
|
|
38
|
+
${this.isEditorLoaded ? html`
|
|
39
|
+
<code-editor
|
|
40
|
+
theme="vs"
|
|
41
|
+
@change=${(event) => {
|
|
42
|
+
const {
|
|
43
|
+
detail: { value }
|
|
44
|
+
} = event;
|
|
45
|
+
this.debounce(() => this.handleCodeEditorChange(value), 1e3);
|
|
46
|
+
}}
|
|
47
|
+
.code=${this.value}
|
|
48
|
+
language="javascript"
|
|
49
|
+
></code-editor>
|
|
50
|
+
` : html`<p>Loading editor...</p>`}
|
|
51
|
+
<markdown-renderer markdown=${this.data}></markdown-renderer>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
handleCodeEditorChange(value) {
|
|
56
|
+
const submitEvent = new CustomEvent("change", {
|
|
57
|
+
detail: { value },
|
|
58
|
+
bubbles: true,
|
|
59
|
+
composed: true
|
|
60
|
+
});
|
|
61
|
+
this.dispatchEvent(submitEvent);
|
|
62
|
+
}
|
|
63
|
+
debounce(callback, delay) {
|
|
64
|
+
if (this.debounceTimeout) {
|
|
65
|
+
clearTimeout(this.debounceTimeout);
|
|
66
|
+
}
|
|
67
|
+
this.debounceTimeout = setTimeout(() => {
|
|
68
|
+
this.debounceTimeout = null;
|
|
69
|
+
callback();
|
|
70
|
+
}, delay);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
SmartAttributeCodeeditor.styles = [
|
|
74
|
+
css`
|
|
75
|
+
:host {
|
|
76
|
+
display: block;
|
|
77
|
+
}
|
|
78
|
+
`
|
|
79
|
+
];
|
|
80
|
+
__decorateClass$1([
|
|
81
|
+
property()
|
|
82
|
+
], SmartAttributeCodeeditor.prototype, "value", 2);
|
|
83
|
+
__decorateClass$1([
|
|
84
|
+
property({ type: Object })
|
|
85
|
+
], SmartAttributeCodeeditor.prototype, "containerStyle", 2);
|
|
86
|
+
__decorateClass$1([
|
|
87
|
+
state()
|
|
88
|
+
], SmartAttributeCodeeditor.prototype, "data", 2);
|
|
89
|
+
__decorateClass$1([
|
|
90
|
+
state()
|
|
91
|
+
], SmartAttributeCodeeditor.prototype, "isEditorLoaded", 2);
|
|
92
|
+
SmartAttributeCodeeditor = __decorateClass$1([
|
|
93
|
+
customElement("smart-attribute-codeeditor")
|
|
94
|
+
], SmartAttributeCodeeditor);
|
|
95
|
+
|
|
96
|
+
var __defProp = Object.defineProperty;
|
|
97
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
98
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
99
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
100
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
101
|
+
if (decorator = decorators[i])
|
|
102
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
103
|
+
if (kind && result) __defProp(target, key, result);
|
|
104
|
+
return result;
|
|
105
|
+
};
|
|
106
|
+
let SmartAttributeHandler = class extends LitElement {
|
|
107
|
+
constructor() {
|
|
108
|
+
super(...arguments);
|
|
109
|
+
this.attributeScope = "style";
|
|
110
|
+
this.view = true;
|
|
111
|
+
}
|
|
112
|
+
codeChangeHandler(event) {
|
|
113
|
+
const {
|
|
114
|
+
detail: { value }
|
|
115
|
+
} = event;
|
|
116
|
+
this.dispatchEvent(new CustomEvent("code-change", { bubbles: true, composed: true, detail: { value } }));
|
|
117
|
+
}
|
|
118
|
+
connectedCallback() {
|
|
119
|
+
super.connectedCallback();
|
|
120
|
+
this.smartValue = this.getAttributeValue();
|
|
121
|
+
}
|
|
122
|
+
getAttributeValue() {
|
|
123
|
+
let attributes = this.attributeScope && this.component ? this.component[this.attributeScope] : "";
|
|
124
|
+
let attributeValue;
|
|
125
|
+
if (this.attributeScope === "style") {
|
|
126
|
+
attributeValue = `"${attributes[this.attributeName]}"`;
|
|
127
|
+
} else {
|
|
128
|
+
attributeValue = this.attributeName ? attributes[this.attributeName] : "";
|
|
129
|
+
}
|
|
130
|
+
if (this.handlerScope && !this.component[this.handlerScope]) {
|
|
131
|
+
this.component[this.handlerScope] = {};
|
|
132
|
+
}
|
|
133
|
+
const smartAttributeValue = this.component && this.handlerScope && this.attributeName ? this.component[this.handlerScope][this.attributeName] : "";
|
|
134
|
+
return smartAttributeValue && smartAttributeValue !== "" ? smartAttributeValue : attributeValue;
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
return html`
|
|
138
|
+
${this.component.errors && this.component.errors[this.attributeName] ? html`<div class="error-message-text">
|
|
139
|
+
${this.component.errors[this.attributeName]}
|
|
140
|
+
</div>` : nothing}
|
|
141
|
+
${this.view ? html`<smart-attribute-codeeditor
|
|
142
|
+
.containerStyle=${this.containerStyle ?? nothing}
|
|
143
|
+
.value=${this.attributeValue}
|
|
144
|
+
@change=${this.codeChangeHandler}
|
|
145
|
+
></smart-attribute-codeeditor>` : nothing}`;
|
|
146
|
+
}
|
|
147
|
+
updated(_changedProperties) {
|
|
148
|
+
super.updated(_changedProperties);
|
|
149
|
+
if (_changedProperties.has("component") && this.component.uuid !== this.previousComponentId) {
|
|
150
|
+
this.previousComponentId = this.component.uuid;
|
|
151
|
+
}
|
|
152
|
+
this.smartValue = this.getAttributeValue();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
SmartAttributeHandler.styles = [
|
|
156
|
+
css`
|
|
157
|
+
.error-message-text {
|
|
158
|
+
color: red;
|
|
159
|
+
}
|
|
160
|
+
`
|
|
161
|
+
];
|
|
162
|
+
__decorateClass([
|
|
163
|
+
property({ type: Object })
|
|
164
|
+
], SmartAttributeHandler.prototype, "component", 2);
|
|
165
|
+
__decorateClass([
|
|
166
|
+
property()
|
|
167
|
+
], SmartAttributeHandler.prototype, "attributeName", 2);
|
|
168
|
+
__decorateClass([
|
|
169
|
+
property()
|
|
170
|
+
], SmartAttributeHandler.prototype, "attributeValue", 2);
|
|
171
|
+
__decorateClass([
|
|
172
|
+
property({ type: Object })
|
|
173
|
+
], SmartAttributeHandler.prototype, "containerStyle", 2);
|
|
174
|
+
__decorateClass([
|
|
175
|
+
property()
|
|
176
|
+
], SmartAttributeHandler.prototype, "attributeScope", 2);
|
|
177
|
+
__decorateClass([
|
|
178
|
+
property()
|
|
179
|
+
], SmartAttributeHandler.prototype, "handlerScope", 2);
|
|
180
|
+
__decorateClass([
|
|
181
|
+
state()
|
|
182
|
+
], SmartAttributeHandler.prototype, "smartValue", 2);
|
|
183
|
+
__decorateClass([
|
|
184
|
+
state()
|
|
185
|
+
], SmartAttributeHandler.prototype, "view", 2);
|
|
186
|
+
__decorateClass([
|
|
187
|
+
state()
|
|
188
|
+
], SmartAttributeHandler.prototype, "previousComponentId", 2);
|
|
189
|
+
SmartAttributeHandler = __decorateClass([
|
|
190
|
+
customElement("smart-attribute-handler")
|
|
191
|
+
], SmartAttributeHandler);
|
|
192
|
+
|
|
193
|
+
export { SmartAttributeHandler };
|