@almadar/std 3.4.2 → 3.4.4
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/behaviors/exports/atoms/std-autoregressive.orb +419 -0
- package/behaviors/exports/atoms/std-browse.orb +72 -0
- package/behaviors/exports/atoms/std-circuit-breaker.orb +12 -0
- package/behaviors/exports/atoms/std-combat-log.orb +112 -0
- package/behaviors/exports/atoms/std-game-audio.orb +232 -6
- package/behaviors/exports/atoms/std-game-canvas3d.orb +172 -15
- package/behaviors/exports/atoms/std-sprite.orb +165 -17
- package/behaviors/exports/organisms/std-api-gateway.orb +12 -0
- package/behaviors/exports/organisms/std-devops-dashboard.orb +12 -0
- package/behaviors/exports/organisms/std-iot-dashboard.orb +12 -0
- package/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/exports/atoms/std-autoregressive.orb +419 -0
- package/dist/behaviors/exports/atoms/std-browse.orb +72 -0
- package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +12 -0
- package/dist/behaviors/exports/atoms/std-combat-log.orb +112 -0
- package/dist/behaviors/exports/atoms/std-game-audio.orb +232 -6
- package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +172 -15
- package/dist/behaviors/exports/atoms/std-sprite.orb +165 -17
- package/dist/behaviors/exports/organisms/std-api-gateway.orb +12 -0
- package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +12 -0
- package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +12 -0
- package/dist/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/functions/index.js +179 -19
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.js +179 -19
- package/dist/behaviors/index.js.map +1 -1
- package/dist/exports/atoms/std-autoregressive.orb +419 -0
- package/dist/exports/atoms/std-browse.orb +72 -0
- package/dist/exports/atoms/std-circuit-breaker.orb +12 -0
- package/dist/exports/atoms/std-combat-log.orb +112 -0
- package/dist/exports/atoms/std-game-audio.orb +232 -6
- package/dist/exports/atoms/std-game-canvas3d.orb +172 -15
- package/dist/exports/atoms/std-sprite.orb +165 -17
- package/dist/exports/organisms/std-api-gateway.orb +12 -0
- package/dist/exports/organisms/std-devops-dashboard.orb +12 -0
- package/dist/exports/organisms/std-iot-dashboard.orb +12 -0
- package/dist/exports/validation-report.json +2 -2
- package/dist/index.js +179 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
{
|
|
52
52
|
"name": "spritesheet",
|
|
53
53
|
"type": "string",
|
|
54
|
-
"default": ""
|
|
54
|
+
"default": "https://almadar-kflow-assets.web.app/shared/sprite-sheets/amir-sprite-sheet-se.png"
|
|
55
55
|
}
|
|
56
56
|
]
|
|
57
57
|
},
|
|
@@ -102,14 +102,88 @@
|
|
|
102
102
|
"render-ui",
|
|
103
103
|
"main",
|
|
104
104
|
{
|
|
105
|
-
"type": "
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
"type": "stack",
|
|
106
|
+
"direction": "vertical",
|
|
107
|
+
"gap": "md",
|
|
108
|
+
"children": [
|
|
109
|
+
{
|
|
110
|
+
"type": "stack",
|
|
111
|
+
"direction": "horizontal",
|
|
112
|
+
"gap": "sm",
|
|
113
|
+
"align": "center",
|
|
114
|
+
"children": [
|
|
115
|
+
{
|
|
116
|
+
"type": "icon",
|
|
117
|
+
"name": "image",
|
|
118
|
+
"size": "lg"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "typography",
|
|
122
|
+
"content": "SpriteEntity Sprite",
|
|
123
|
+
"variant": "h2"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "divider"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "box",
|
|
132
|
+
"className": "relative bg-gray-900 rounded-lg overflow-hidden",
|
|
133
|
+
"style": {
|
|
134
|
+
"width": "256px",
|
|
135
|
+
"height": "256px",
|
|
136
|
+
"margin": "0 auto"
|
|
137
|
+
},
|
|
138
|
+
"children": [
|
|
139
|
+
{
|
|
140
|
+
"type": "sprite",
|
|
141
|
+
"spritesheet": "@SpriteEntity.spritesheet",
|
|
142
|
+
"frameWidth": 64,
|
|
143
|
+
"frameHeight": 64,
|
|
144
|
+
"frame": "@SpriteEntity.frame",
|
|
145
|
+
"x": 64,
|
|
146
|
+
"y": 64,
|
|
147
|
+
"scale": 1
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "stack",
|
|
153
|
+
"direction": "horizontal",
|
|
154
|
+
"gap": "md",
|
|
155
|
+
"justify": "center",
|
|
156
|
+
"children": [
|
|
157
|
+
{
|
|
158
|
+
"type": "typography",
|
|
159
|
+
"content": "Frame: ",
|
|
160
|
+
"variant": "caption",
|
|
161
|
+
"color": "muted"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "badge",
|
|
165
|
+
"content": "@SpriteEntity.frame",
|
|
166
|
+
"variant": "default"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "typography",
|
|
170
|
+
"content": "Position: ",
|
|
171
|
+
"variant": "caption",
|
|
172
|
+
"color": "muted"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "badge",
|
|
176
|
+
"content": [
|
|
177
|
+
"concat",
|
|
178
|
+
"@SpriteEntity.x",
|
|
179
|
+
",",
|
|
180
|
+
"@SpriteEntity.y"
|
|
181
|
+
],
|
|
182
|
+
"variant": "default"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
]
|
|
113
187
|
}
|
|
114
188
|
]
|
|
115
189
|
]
|
|
@@ -123,14 +197,88 @@
|
|
|
123
197
|
"render-ui",
|
|
124
198
|
"main",
|
|
125
199
|
{
|
|
126
|
-
"type": "
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
200
|
+
"type": "stack",
|
|
201
|
+
"direction": "vertical",
|
|
202
|
+
"gap": "md",
|
|
203
|
+
"children": [
|
|
204
|
+
{
|
|
205
|
+
"type": "stack",
|
|
206
|
+
"direction": "horizontal",
|
|
207
|
+
"gap": "sm",
|
|
208
|
+
"align": "center",
|
|
209
|
+
"children": [
|
|
210
|
+
{
|
|
211
|
+
"type": "icon",
|
|
212
|
+
"name": "image",
|
|
213
|
+
"size": "lg"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "typography",
|
|
217
|
+
"content": "SpriteEntity Sprite",
|
|
218
|
+
"variant": "h2"
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"type": "divider"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"type": "box",
|
|
227
|
+
"className": "relative bg-gray-900 rounded-lg overflow-hidden",
|
|
228
|
+
"style": {
|
|
229
|
+
"width": "256px",
|
|
230
|
+
"height": "256px",
|
|
231
|
+
"margin": "0 auto"
|
|
232
|
+
},
|
|
233
|
+
"children": [
|
|
234
|
+
{
|
|
235
|
+
"type": "sprite",
|
|
236
|
+
"spritesheet": "@SpriteEntity.spritesheet",
|
|
237
|
+
"frameWidth": 64,
|
|
238
|
+
"frameHeight": 64,
|
|
239
|
+
"frame": "@SpriteEntity.frame",
|
|
240
|
+
"x": 64,
|
|
241
|
+
"y": 64,
|
|
242
|
+
"scale": 1
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "stack",
|
|
248
|
+
"direction": "horizontal",
|
|
249
|
+
"gap": "md",
|
|
250
|
+
"justify": "center",
|
|
251
|
+
"children": [
|
|
252
|
+
{
|
|
253
|
+
"type": "typography",
|
|
254
|
+
"content": "Frame: ",
|
|
255
|
+
"variant": "caption",
|
|
256
|
+
"color": "muted"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "badge",
|
|
260
|
+
"content": "@SpriteEntity.frame",
|
|
261
|
+
"variant": "default"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"type": "typography",
|
|
265
|
+
"content": "Position: ",
|
|
266
|
+
"variant": "caption",
|
|
267
|
+
"color": "muted"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"type": "badge",
|
|
271
|
+
"content": [
|
|
272
|
+
"concat",
|
|
273
|
+
"@SpriteEntity.x",
|
|
274
|
+
",",
|
|
275
|
+
"@SpriteEntity.y"
|
|
276
|
+
],
|
|
277
|
+
"variant": "default"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
134
282
|
}
|
|
135
283
|
]
|
|
136
284
|
]
|
|
@@ -1425,6 +1425,18 @@
|
|
|
1425
1425
|
"type": "number",
|
|
1426
1426
|
"default": 5
|
|
1427
1427
|
}
|
|
1428
|
+
],
|
|
1429
|
+
"instances": [
|
|
1430
|
+
{
|
|
1431
|
+
"id": "sn-1",
|
|
1432
|
+
"name": "ServiceNode",
|
|
1433
|
+
"description": "Primary API gateway",
|
|
1434
|
+
"status": "active",
|
|
1435
|
+
"createdAt": "2026-01-10",
|
|
1436
|
+
"failureCount": 783,
|
|
1437
|
+
"successCount": 603,
|
|
1438
|
+
"threshold": 5
|
|
1439
|
+
}
|
|
1428
1440
|
]
|
|
1429
1441
|
},
|
|
1430
1442
|
"traits": [
|
|
@@ -51,6 +51,18 @@
|
|
|
51
51
|
"type": "number",
|
|
52
52
|
"default": 5
|
|
53
53
|
}
|
|
54
|
+
],
|
|
55
|
+
"instances": [
|
|
56
|
+
{
|
|
57
|
+
"id": "sn-1",
|
|
58
|
+
"name": "ServiceNode",
|
|
59
|
+
"description": "Primary API gateway",
|
|
60
|
+
"status": "active",
|
|
61
|
+
"createdAt": "2026-01-10",
|
|
62
|
+
"failureCount": 783,
|
|
63
|
+
"successCount": 603,
|
|
64
|
+
"threshold": 5
|
|
65
|
+
}
|
|
54
66
|
]
|
|
55
67
|
},
|
|
56
68
|
"traits": [
|
|
@@ -3098,6 +3098,18 @@
|
|
|
3098
3098
|
"type": "number",
|
|
3099
3099
|
"default": 5
|
|
3100
3100
|
}
|
|
3101
|
+
],
|
|
3102
|
+
"instances": [
|
|
3103
|
+
{
|
|
3104
|
+
"id": "sn-1",
|
|
3105
|
+
"name": "ServiceNode",
|
|
3106
|
+
"description": "Primary API gateway",
|
|
3107
|
+
"status": "active",
|
|
3108
|
+
"createdAt": "2026-01-10",
|
|
3109
|
+
"failureCount": 783,
|
|
3110
|
+
"successCount": 603,
|
|
3111
|
+
"threshold": 5
|
|
3112
|
+
}
|
|
3101
3113
|
]
|
|
3102
3114
|
},
|
|
3103
3115
|
"traits": [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "std-
|
|
3
|
+
"name": "std-combat-log",
|
|
4
4
|
"errors": 0,
|
|
5
5
|
"warnings": 0,
|
|
6
6
|
"output": [
|
|
7
7
|
"Loaded 22 services from packages/almadar-patterns/src/services-registry.json",
|
|
8
|
-
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/atoms/std-
|
|
8
|
+
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/atoms/std-combat-log.orb"
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
]
|
package/dist/index.js
CHANGED
|
@@ -3824,7 +3824,19 @@ function buildDisplayPattern(c, entityName, emptyTitle, emptyDescription, defaul
|
|
|
3824
3824
|
return { ...base, ...c.displayProps };
|
|
3825
3825
|
}
|
|
3826
3826
|
function buildEntity(c) {
|
|
3827
|
-
|
|
3827
|
+
const instances = [
|
|
3828
|
+
{ id: "bi-1", name: "Terry Schultz", description: "Senior product designer with 8 years of experience", status: "active", createdAt: "2026-01-15" },
|
|
3829
|
+
{ id: "bi-2", name: "Dale Franey", description: "Full-stack developer specializing in React and Node.js", status: "active", createdAt: "2026-01-18" },
|
|
3830
|
+
{ id: "bi-3", name: "Lorena Mayer", description: "Data analyst focused on business intelligence", status: "pending", createdAt: "2026-01-20" },
|
|
3831
|
+
{ id: "bi-4", name: "Andrea Paucek", description: "Project manager with PMP certification", status: "active", createdAt: "2026-02-01" },
|
|
3832
|
+
{ id: "bi-5", name: "Geneva Durgan", description: "UX researcher conducting user interviews", status: "inactive", createdAt: "2026-02-05" },
|
|
3833
|
+
{ id: "bi-6", name: "Samantha Okuneva", description: "DevOps engineer managing cloud infrastructure", status: "active", createdAt: "2026-02-10" },
|
|
3834
|
+
{ id: "bi-7", name: "Nelson Halby", description: "Technical writer documenting APIs", status: "active", createdAt: "2026-02-15" },
|
|
3835
|
+
{ id: "bi-8", name: "Tanya Hand", description: "QA lead overseeing test automation", status: "pending", createdAt: "2026-02-20" },
|
|
3836
|
+
{ id: "bi-9", name: "Rosemary Lind", description: "Marketing analyst tracking campaign performance", status: "active", createdAt: "2026-03-01" },
|
|
3837
|
+
{ id: "bi-10", name: "Bernadette Anderson", description: "Security engineer conducting penetration tests", status: "active", createdAt: "2026-03-05" }
|
|
3838
|
+
];
|
|
3839
|
+
return makeEntity({ name: c.entityName, fields: c.fields, persistence: c.persistence, collection: c.collection, instances });
|
|
3828
3840
|
}
|
|
3829
3841
|
function buildTrait(c) {
|
|
3830
3842
|
const { entityName, listFields, headerIcon, pageTitle, emptyTitle, emptyDescription } = c;
|
|
@@ -8452,7 +8464,10 @@ function buildEntity23(c) {
|
|
|
8452
8464
|
{ name: "successCount", type: "number", default: 0 },
|
|
8453
8465
|
{ name: "threshold", type: "number", default: 5 }
|
|
8454
8466
|
];
|
|
8455
|
-
|
|
8467
|
+
const instances = [
|
|
8468
|
+
{ id: "sn-1", name: "ServiceNode", description: "Primary API gateway", status: "active", createdAt: "2026-01-10", failureCount: 783, successCount: 603, threshold: 5 }
|
|
8469
|
+
];
|
|
8470
|
+
return makeEntity({ name: c.entityName, fields, persistence: c.persistence, collection: c.collection, instances });
|
|
8456
8471
|
}
|
|
8457
8472
|
var ef9 = (field) => ["object/get", ["array/first", "@entity"], field];
|
|
8458
8473
|
function buildTrait24(c) {
|
|
@@ -11247,7 +11262,24 @@ function resolve44(params) {
|
|
|
11247
11262
|
};
|
|
11248
11263
|
}
|
|
11249
11264
|
function buildEntity42(c) {
|
|
11250
|
-
|
|
11265
|
+
const fields = [
|
|
11266
|
+
...c.fields.filter((f) => !["type", "message", "timestamp", "actorName", "targetName", "value", "turn"].includes(f.name)),
|
|
11267
|
+
{ name: "type", type: "string", default: "attack", values: ["attack", "defend", "heal", "move", "special", "death", "spawn"] },
|
|
11268
|
+
{ name: "message", type: "string" },
|
|
11269
|
+
{ name: "timestamp", type: "number", default: 0 },
|
|
11270
|
+
{ name: "actorName", type: "string" },
|
|
11271
|
+
{ name: "targetName", type: "string" },
|
|
11272
|
+
{ name: "value", type: "number", default: 0 },
|
|
11273
|
+
{ name: "turn", type: "number", default: 1 }
|
|
11274
|
+
];
|
|
11275
|
+
const instances = [
|
|
11276
|
+
{ id: "cl-1", name: "Attack log", description: "Warrior attacks Goblin", status: "active", createdAt: "2026-01-01", type: "attack", message: "Warrior strikes Goblin for 25 damage", timestamp: 1e3, actorName: "Warrior", targetName: "Goblin", value: 25, turn: 1 },
|
|
11277
|
+
{ id: "cl-2", name: "Defend log", description: "Paladin raises shield", status: "active", createdAt: "2026-01-01", type: "defend", message: "Paladin raises shield, blocking 15 damage", timestamp: 2e3, actorName: "Paladin", targetName: "Paladin", value: 15, turn: 1 },
|
|
11278
|
+
{ id: "cl-3", name: "Heal log", description: "Cleric heals Warrior", status: "active", createdAt: "2026-01-01", type: "heal", message: "Cleric heals Warrior for 30 HP", timestamp: 3e3, actorName: "Cleric", targetName: "Warrior", value: 30, turn: 2 },
|
|
11279
|
+
{ id: "cl-4", name: "Special log", description: "Mage casts fireball", status: "active", createdAt: "2026-01-01", type: "special", message: "Mage casts Fireball dealing 40 AoE damage", timestamp: 4e3, actorName: "Mage", targetName: "Goblin", value: 40, turn: 2 },
|
|
11280
|
+
{ id: "cl-5", name: "Move log", description: "Rogue moves to flank", status: "active", createdAt: "2026-01-01", type: "move", message: "Rogue moves to flanking position", timestamp: 5e3, actorName: "Rogue", value: 0, turn: 3 }
|
|
11281
|
+
];
|
|
11282
|
+
return makeEntity({ name: c.entityName, fields, persistence: c.persistence, instances });
|
|
11251
11283
|
}
|
|
11252
11284
|
function buildTrait43(c) {
|
|
11253
11285
|
const { entityName, title, maxVisible, autoScroll, showTimestamps } = c;
|
|
@@ -11302,7 +11334,7 @@ function resolve45(params) {
|
|
|
11302
11334
|
{ name: "x", type: "number", default: 0 },
|
|
11303
11335
|
{ name: "y", type: "number", default: 0 },
|
|
11304
11336
|
{ name: "frame", type: "number", default: 0 },
|
|
11305
|
-
{ name: "spritesheet", type: "string", default: "" }
|
|
11337
|
+
{ name: "spritesheet", type: "string", default: "https://almadar-kflow-assets.web.app/shared/sprite-sheets/amir-sprite-sheet-se.png" }
|
|
11306
11338
|
];
|
|
11307
11339
|
const userFieldNames = new Set(baseFields.map((f) => f.name));
|
|
11308
11340
|
const fields = [...baseFields, ...domainFields.filter((f) => !userFieldNames.has(f.name))];
|
|
@@ -11325,14 +11357,51 @@ function buildEntity43(c) {
|
|
|
11325
11357
|
function buildTrait44(c) {
|
|
11326
11358
|
const { entityName, frameWidth, frameHeight, scale } = c;
|
|
11327
11359
|
const spriteView = {
|
|
11328
|
-
type: "
|
|
11329
|
-
|
|
11330
|
-
|
|
11331
|
-
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11360
|
+
type: "stack",
|
|
11361
|
+
direction: "vertical",
|
|
11362
|
+
gap: "md",
|
|
11363
|
+
children: [
|
|
11364
|
+
{
|
|
11365
|
+
type: "stack",
|
|
11366
|
+
direction: "horizontal",
|
|
11367
|
+
gap: "sm",
|
|
11368
|
+
align: "center",
|
|
11369
|
+
children: [
|
|
11370
|
+
{ type: "icon", name: "image", size: "lg" },
|
|
11371
|
+
{ type: "typography", content: `${entityName} Sprite`, variant: "h2" }
|
|
11372
|
+
]
|
|
11373
|
+
},
|
|
11374
|
+
{ type: "divider" },
|
|
11375
|
+
{
|
|
11376
|
+
type: "box",
|
|
11377
|
+
className: "relative bg-gray-900 rounded-lg overflow-hidden",
|
|
11378
|
+
style: { width: `${frameWidth * scale * 4}px`, height: `${frameHeight * scale * 4}px`, margin: "0 auto" },
|
|
11379
|
+
children: [
|
|
11380
|
+
{
|
|
11381
|
+
type: "sprite",
|
|
11382
|
+
spritesheet: `@${entityName}.spritesheet`,
|
|
11383
|
+
frameWidth,
|
|
11384
|
+
frameHeight,
|
|
11385
|
+
frame: `@${entityName}.frame`,
|
|
11386
|
+
x: frameWidth * scale,
|
|
11387
|
+
y: frameHeight * scale,
|
|
11388
|
+
scale
|
|
11389
|
+
}
|
|
11390
|
+
]
|
|
11391
|
+
},
|
|
11392
|
+
{
|
|
11393
|
+
type: "stack",
|
|
11394
|
+
direction: "horizontal",
|
|
11395
|
+
gap: "md",
|
|
11396
|
+
justify: "center",
|
|
11397
|
+
children: [
|
|
11398
|
+
{ type: "typography", content: `Frame: `, variant: "caption", color: "muted" },
|
|
11399
|
+
{ type: "badge", content: `@${entityName}.frame`, variant: "default" },
|
|
11400
|
+
{ type: "typography", content: `Position: `, variant: "caption", color: "muted" },
|
|
11401
|
+
{ type: "badge", content: ["concat", `@${entityName}.x`, ",", `@${entityName}.y`], variant: "default" }
|
|
11402
|
+
]
|
|
11403
|
+
}
|
|
11404
|
+
]
|
|
11336
11405
|
};
|
|
11337
11406
|
return {
|
|
11338
11407
|
name: c.traitName,
|
|
@@ -11391,12 +11460,80 @@ function buildEntity44(c) {
|
|
|
11391
11460
|
}
|
|
11392
11461
|
function buildTrait45(c) {
|
|
11393
11462
|
const { entityName, initialMuted } = c;
|
|
11463
|
+
const audioControls = {
|
|
11464
|
+
type: "stack",
|
|
11465
|
+
direction: "vertical",
|
|
11466
|
+
gap: "lg",
|
|
11467
|
+
className: "max-w-md mx-auto",
|
|
11468
|
+
children: [
|
|
11469
|
+
{
|
|
11470
|
+
type: "stack",
|
|
11471
|
+
direction: "horizontal",
|
|
11472
|
+
gap: "sm",
|
|
11473
|
+
align: "center",
|
|
11474
|
+
children: [
|
|
11475
|
+
{ type: "icon", name: "volume-2", size: "lg" },
|
|
11476
|
+
{ type: "typography", content: "Audio Controls", variant: "h2" }
|
|
11477
|
+
]
|
|
11478
|
+
},
|
|
11479
|
+
{ type: "divider" },
|
|
11480
|
+
{
|
|
11481
|
+
type: "card",
|
|
11482
|
+
children: [
|
|
11483
|
+
{
|
|
11484
|
+
type: "stack",
|
|
11485
|
+
direction: "vertical",
|
|
11486
|
+
gap: "md",
|
|
11487
|
+
children: [
|
|
11488
|
+
{ type: "typography", content: initialMuted ? "Audio Muted" : "Audio Active", variant: "h4" },
|
|
11489
|
+
{ type: "typography", content: "Toggle mute to control game audio playback.", variant: "body", color: "muted" },
|
|
11490
|
+
{
|
|
11491
|
+
type: "stack",
|
|
11492
|
+
direction: "horizontal",
|
|
11493
|
+
gap: "sm",
|
|
11494
|
+
children: [
|
|
11495
|
+
{ type: "button", label: "Toggle Mute", icon: initialMuted ? "volume-x" : "volume-2", event: "TOGGLE_MUTE", variant: "primary" }
|
|
11496
|
+
]
|
|
11497
|
+
}
|
|
11498
|
+
]
|
|
11499
|
+
}
|
|
11500
|
+
]
|
|
11501
|
+
},
|
|
11502
|
+
{
|
|
11503
|
+
type: "card",
|
|
11504
|
+
children: [
|
|
11505
|
+
{
|
|
11506
|
+
type: "stack",
|
|
11507
|
+
direction: "vertical",
|
|
11508
|
+
gap: "sm",
|
|
11509
|
+
children: [
|
|
11510
|
+
{ type: "typography", content: "Sound Effects", variant: "h4" },
|
|
11511
|
+
{
|
|
11512
|
+
type: "stack",
|
|
11513
|
+
direction: "horizontal",
|
|
11514
|
+
gap: "sm",
|
|
11515
|
+
children: [
|
|
11516
|
+
{ type: "button", label: "Play Click", icon: "play", variant: "outline" },
|
|
11517
|
+
{ type: "button", label: "Play Confirm", icon: "play", variant: "outline" },
|
|
11518
|
+
{ type: "button", label: "Play Drop", icon: "play", variant: "outline" }
|
|
11519
|
+
]
|
|
11520
|
+
}
|
|
11521
|
+
]
|
|
11522
|
+
}
|
|
11523
|
+
]
|
|
11524
|
+
}
|
|
11525
|
+
]
|
|
11526
|
+
};
|
|
11394
11527
|
const audioView = {
|
|
11395
11528
|
type: "game-audio-provider",
|
|
11396
|
-
manifest: {
|
|
11397
|
-
|
|
11529
|
+
manifest: {
|
|
11530
|
+
click: "https://almadar-kflow-assets.web.app/shared/audio/sfx/close_001.ogg",
|
|
11531
|
+
confirm: "https://almadar-kflow-assets.web.app/shared/audio/sfx/confirmation_001.ogg",
|
|
11532
|
+
drop: "https://almadar-kflow-assets.web.app/shared/audio/sfx/drop_001.ogg"
|
|
11533
|
+
},
|
|
11534
|
+
baseUrl: "https://almadar-kflow-assets.web.app/shared/audio",
|
|
11398
11535
|
initialMuted,
|
|
11399
|
-
children: []
|
|
11536
|
+
children: [audioControls]
|
|
11400
11537
|
};
|
|
11401
11538
|
return {
|
|
11402
11539
|
name: c.traitName,
|
|
@@ -11849,15 +11986,38 @@ function resolve51(params) {
|
|
|
11849
11986
|
};
|
|
11850
11987
|
}
|
|
11851
11988
|
function buildEntity49(c) {
|
|
11852
|
-
|
|
11989
|
+
const fields = [
|
|
11990
|
+
...c.fields.filter((f) => !["tiles", "units", "features"].includes(f.name)),
|
|
11991
|
+
{ name: "tiles", type: "array", default: [] },
|
|
11992
|
+
{ name: "units", type: "array", default: [] },
|
|
11993
|
+
{ name: "features", type: "array", default: [] }
|
|
11994
|
+
];
|
|
11995
|
+
const instances = [
|
|
11996
|
+
{
|
|
11997
|
+
id: "scene-1",
|
|
11998
|
+
name: "Battle Arena",
|
|
11999
|
+
description: "A 3D battle arena",
|
|
12000
|
+
status: "active",
|
|
12001
|
+
createdAt: "2026-01-01",
|
|
12002
|
+
tiles: [
|
|
12003
|
+
{ x: 0, y: 0, z: 0, type: "grass" },
|
|
12004
|
+
{ x: 1, y: 0, z: 0, type: "grass" },
|
|
12005
|
+
{ x: 0, y: 0, z: 1, type: "stone" },
|
|
12006
|
+
{ x: 1, y: 0, z: 1, type: "water" }
|
|
12007
|
+
],
|
|
12008
|
+
units: [],
|
|
12009
|
+
features: []
|
|
12010
|
+
}
|
|
12011
|
+
];
|
|
12012
|
+
return makeEntity({ name: c.entityName, fields, persistence: c.persistence, instances });
|
|
11853
12013
|
}
|
|
11854
12014
|
function buildTrait50(c) {
|
|
11855
12015
|
const { entityName, orientation, cameraMode, showGrid, shadows, backgroundColor } = c;
|
|
11856
12016
|
const canvasView = {
|
|
11857
12017
|
type: "game-canvas3-d",
|
|
11858
|
-
tiles: `@${entityName}
|
|
11859
|
-
units: `@${entityName}
|
|
11860
|
-
features: `@${entityName}
|
|
12018
|
+
tiles: ["object/get", ["array/first", `@${entityName}`], "tiles"],
|
|
12019
|
+
units: ["object/get", ["array/first", `@${entityName}`], "units"],
|
|
12020
|
+
features: ["object/get", ["array/first", `@${entityName}`], "features"],
|
|
11861
12021
|
orientation,
|
|
11862
12022
|
cameraMode,
|
|
11863
12023
|
showGrid,
|