@almadar/std 3.4.1 → 3.4.3

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.
@@ -72,10 +72,123 @@
72
72
  "main",
73
73
  {
74
74
  "type": "game-audio-provider",
75
- "manifest": {},
76
- "baseUrl": "",
75
+ "manifest": {
76
+ "click": "https://almadar-kflow-assets.web.app/shared/audio/sfx/close_001.ogg",
77
+ "confirm": "https://almadar-kflow-assets.web.app/shared/audio/sfx/confirmation_001.ogg",
78
+ "drop": "https://almadar-kflow-assets.web.app/shared/audio/sfx/drop_001.ogg"
79
+ },
80
+ "baseUrl": "https://almadar-kflow-assets.web.app/shared/audio",
77
81
  "initialMuted": false,
78
- "children": []
82
+ "children": [
83
+ {
84
+ "type": "stack",
85
+ "direction": "vertical",
86
+ "gap": "lg",
87
+ "className": "max-w-md mx-auto",
88
+ "children": [
89
+ {
90
+ "type": "stack",
91
+ "direction": "horizontal",
92
+ "gap": "sm",
93
+ "align": "center",
94
+ "children": [
95
+ {
96
+ "type": "icon",
97
+ "name": "volume-2",
98
+ "size": "lg"
99
+ },
100
+ {
101
+ "type": "typography",
102
+ "content": "Audio Controls",
103
+ "variant": "h2"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "type": "divider"
109
+ },
110
+ {
111
+ "type": "card",
112
+ "children": [
113
+ {
114
+ "type": "stack",
115
+ "direction": "vertical",
116
+ "gap": "md",
117
+ "children": [
118
+ {
119
+ "type": "typography",
120
+ "content": "Audio Active",
121
+ "variant": "h4"
122
+ },
123
+ {
124
+ "type": "typography",
125
+ "content": "Toggle mute to control game audio playback.",
126
+ "variant": "body",
127
+ "color": "muted"
128
+ },
129
+ {
130
+ "type": "stack",
131
+ "direction": "horizontal",
132
+ "gap": "sm",
133
+ "children": [
134
+ {
135
+ "type": "button",
136
+ "label": "Toggle Mute",
137
+ "icon": "volume-2",
138
+ "event": "TOGGLE_MUTE",
139
+ "variant": "primary"
140
+ }
141
+ ]
142
+ }
143
+ ]
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "type": "card",
149
+ "children": [
150
+ {
151
+ "type": "stack",
152
+ "direction": "vertical",
153
+ "gap": "sm",
154
+ "children": [
155
+ {
156
+ "type": "typography",
157
+ "content": "Sound Effects",
158
+ "variant": "h4"
159
+ },
160
+ {
161
+ "type": "stack",
162
+ "direction": "horizontal",
163
+ "gap": "sm",
164
+ "children": [
165
+ {
166
+ "type": "button",
167
+ "label": "Play Click",
168
+ "icon": "play",
169
+ "variant": "outline"
170
+ },
171
+ {
172
+ "type": "button",
173
+ "label": "Play Confirm",
174
+ "icon": "play",
175
+ "variant": "outline"
176
+ },
177
+ {
178
+ "type": "button",
179
+ "label": "Play Drop",
180
+ "icon": "play",
181
+ "variant": "outline"
182
+ }
183
+ ]
184
+ }
185
+ ]
186
+ }
187
+ ]
188
+ }
189
+ ]
190
+ }
191
+ ]
79
192
  }
80
193
  ]
81
194
  ]
@@ -90,10 +203,123 @@
90
203
  "main",
91
204
  {
92
205
  "type": "game-audio-provider",
93
- "manifest": {},
94
- "baseUrl": "",
206
+ "manifest": {
207
+ "click": "https://almadar-kflow-assets.web.app/shared/audio/sfx/close_001.ogg",
208
+ "confirm": "https://almadar-kflow-assets.web.app/shared/audio/sfx/confirmation_001.ogg",
209
+ "drop": "https://almadar-kflow-assets.web.app/shared/audio/sfx/drop_001.ogg"
210
+ },
211
+ "baseUrl": "https://almadar-kflow-assets.web.app/shared/audio",
95
212
  "initialMuted": false,
96
- "children": []
213
+ "children": [
214
+ {
215
+ "type": "stack",
216
+ "direction": "vertical",
217
+ "gap": "lg",
218
+ "className": "max-w-md mx-auto",
219
+ "children": [
220
+ {
221
+ "type": "stack",
222
+ "direction": "horizontal",
223
+ "gap": "sm",
224
+ "align": "center",
225
+ "children": [
226
+ {
227
+ "type": "icon",
228
+ "name": "volume-2",
229
+ "size": "lg"
230
+ },
231
+ {
232
+ "type": "typography",
233
+ "content": "Audio Controls",
234
+ "variant": "h2"
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "type": "divider"
240
+ },
241
+ {
242
+ "type": "card",
243
+ "children": [
244
+ {
245
+ "type": "stack",
246
+ "direction": "vertical",
247
+ "gap": "md",
248
+ "children": [
249
+ {
250
+ "type": "typography",
251
+ "content": "Audio Active",
252
+ "variant": "h4"
253
+ },
254
+ {
255
+ "type": "typography",
256
+ "content": "Toggle mute to control game audio playback.",
257
+ "variant": "body",
258
+ "color": "muted"
259
+ },
260
+ {
261
+ "type": "stack",
262
+ "direction": "horizontal",
263
+ "gap": "sm",
264
+ "children": [
265
+ {
266
+ "type": "button",
267
+ "label": "Toggle Mute",
268
+ "icon": "volume-2",
269
+ "event": "TOGGLE_MUTE",
270
+ "variant": "primary"
271
+ }
272
+ ]
273
+ }
274
+ ]
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "type": "card",
280
+ "children": [
281
+ {
282
+ "type": "stack",
283
+ "direction": "vertical",
284
+ "gap": "sm",
285
+ "children": [
286
+ {
287
+ "type": "typography",
288
+ "content": "Sound Effects",
289
+ "variant": "h4"
290
+ },
291
+ {
292
+ "type": "stack",
293
+ "direction": "horizontal",
294
+ "gap": "sm",
295
+ "children": [
296
+ {
297
+ "type": "button",
298
+ "label": "Play Click",
299
+ "icon": "play",
300
+ "variant": "outline"
301
+ },
302
+ {
303
+ "type": "button",
304
+ "label": "Play Confirm",
305
+ "icon": "play",
306
+ "variant": "outline"
307
+ },
308
+ {
309
+ "type": "button",
310
+ "label": "Play Drop",
311
+ "icon": "play",
312
+ "variant": "outline"
313
+ }
314
+ ]
315
+ }
316
+ ]
317
+ }
318
+ ]
319
+ }
320
+ ]
321
+ }
322
+ ]
97
323
  }
98
324
  ]
99
325
  ]
@@ -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": "sprite",
106
- "spritesheet": "@SpriteEntity.spritesheet",
107
- "frameWidth": 64,
108
- "frameHeight": 64,
109
- "frame": "@SpriteEntity.frame",
110
- "x": "@SpriteEntity.x",
111
- "y": "@SpriteEntity.y",
112
- "scale": 1
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": "sprite",
127
- "spritesheet": "@SpriteEntity.spritesheet",
128
- "frameWidth": 64,
129
- "frameHeight": 64,
130
- "frame": "@SpriteEntity.frame",
131
- "x": "@SpriteEntity.x",
132
- "y": "@SpriteEntity.y",
133
- "scale": 1
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
  ]
@@ -1,11 +1,11 @@
1
1
  [
2
2
  {
3
- "name": "std-selection",
3
+ "name": "std-game-audio",
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-selection.orb"
8
+ "Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/atoms/std-game-audio.orb"
9
9
  ]
10
10
  }
11
11
  ]
package/dist/index.js CHANGED
@@ -11302,7 +11302,7 @@ function resolve45(params) {
11302
11302
  { name: "x", type: "number", default: 0 },
11303
11303
  { name: "y", type: "number", default: 0 },
11304
11304
  { name: "frame", type: "number", default: 0 },
11305
- { name: "spritesheet", type: "string", default: "" }
11305
+ { name: "spritesheet", type: "string", default: "https://almadar-kflow-assets.web.app/shared/sprite-sheets/amir-sprite-sheet-se.png" }
11306
11306
  ];
11307
11307
  const userFieldNames = new Set(baseFields.map((f) => f.name));
11308
11308
  const fields = [...baseFields, ...domainFields.filter((f) => !userFieldNames.has(f.name))];
@@ -11325,14 +11325,51 @@ function buildEntity43(c) {
11325
11325
  function buildTrait44(c) {
11326
11326
  const { entityName, frameWidth, frameHeight, scale } = c;
11327
11327
  const spriteView = {
11328
- type: "sprite",
11329
- spritesheet: `@${entityName}.spritesheet`,
11330
- frameWidth,
11331
- frameHeight,
11332
- frame: `@${entityName}.frame`,
11333
- x: `@${entityName}.x`,
11334
- y: `@${entityName}.y`,
11335
- scale
11328
+ type: "stack",
11329
+ direction: "vertical",
11330
+ gap: "md",
11331
+ children: [
11332
+ {
11333
+ type: "stack",
11334
+ direction: "horizontal",
11335
+ gap: "sm",
11336
+ align: "center",
11337
+ children: [
11338
+ { type: "icon", name: "image", size: "lg" },
11339
+ { type: "typography", content: `${entityName} Sprite`, variant: "h2" }
11340
+ ]
11341
+ },
11342
+ { type: "divider" },
11343
+ {
11344
+ type: "box",
11345
+ className: "relative bg-gray-900 rounded-lg overflow-hidden",
11346
+ style: { width: `${frameWidth * scale * 4}px`, height: `${frameHeight * scale * 4}px`, margin: "0 auto" },
11347
+ children: [
11348
+ {
11349
+ type: "sprite",
11350
+ spritesheet: `@${entityName}.spritesheet`,
11351
+ frameWidth,
11352
+ frameHeight,
11353
+ frame: `@${entityName}.frame`,
11354
+ x: frameWidth * scale,
11355
+ y: frameHeight * scale,
11356
+ scale
11357
+ }
11358
+ ]
11359
+ },
11360
+ {
11361
+ type: "stack",
11362
+ direction: "horizontal",
11363
+ gap: "md",
11364
+ justify: "center",
11365
+ children: [
11366
+ { type: "typography", content: `Frame: `, variant: "caption", color: "muted" },
11367
+ { type: "badge", content: `@${entityName}.frame`, variant: "default" },
11368
+ { type: "typography", content: `Position: `, variant: "caption", color: "muted" },
11369
+ { type: "badge", content: ["concat", `@${entityName}.x`, ",", `@${entityName}.y`], variant: "default" }
11370
+ ]
11371
+ }
11372
+ ]
11336
11373
  };
11337
11374
  return {
11338
11375
  name: c.traitName,
@@ -11391,12 +11428,80 @@ function buildEntity44(c) {
11391
11428
  }
11392
11429
  function buildTrait45(c) {
11393
11430
  const { entityName, initialMuted } = c;
11431
+ const audioControls = {
11432
+ type: "stack",
11433
+ direction: "vertical",
11434
+ gap: "lg",
11435
+ className: "max-w-md mx-auto",
11436
+ children: [
11437
+ {
11438
+ type: "stack",
11439
+ direction: "horizontal",
11440
+ gap: "sm",
11441
+ align: "center",
11442
+ children: [
11443
+ { type: "icon", name: "volume-2", size: "lg" },
11444
+ { type: "typography", content: "Audio Controls", variant: "h2" }
11445
+ ]
11446
+ },
11447
+ { type: "divider" },
11448
+ {
11449
+ type: "card",
11450
+ children: [
11451
+ {
11452
+ type: "stack",
11453
+ direction: "vertical",
11454
+ gap: "md",
11455
+ children: [
11456
+ { type: "typography", content: initialMuted ? "Audio Muted" : "Audio Active", variant: "h4" },
11457
+ { type: "typography", content: "Toggle mute to control game audio playback.", variant: "body", color: "muted" },
11458
+ {
11459
+ type: "stack",
11460
+ direction: "horizontal",
11461
+ gap: "sm",
11462
+ children: [
11463
+ { type: "button", label: "Toggle Mute", icon: initialMuted ? "volume-x" : "volume-2", event: "TOGGLE_MUTE", variant: "primary" }
11464
+ ]
11465
+ }
11466
+ ]
11467
+ }
11468
+ ]
11469
+ },
11470
+ {
11471
+ type: "card",
11472
+ children: [
11473
+ {
11474
+ type: "stack",
11475
+ direction: "vertical",
11476
+ gap: "sm",
11477
+ children: [
11478
+ { type: "typography", content: "Sound Effects", variant: "h4" },
11479
+ {
11480
+ type: "stack",
11481
+ direction: "horizontal",
11482
+ gap: "sm",
11483
+ children: [
11484
+ { type: "button", label: "Play Click", icon: "play", variant: "outline" },
11485
+ { type: "button", label: "Play Confirm", icon: "play", variant: "outline" },
11486
+ { type: "button", label: "Play Drop", icon: "play", variant: "outline" }
11487
+ ]
11488
+ }
11489
+ ]
11490
+ }
11491
+ ]
11492
+ }
11493
+ ]
11494
+ };
11394
11495
  const audioView = {
11395
11496
  type: "game-audio-provider",
11396
- manifest: {},
11397
- baseUrl: "",
11497
+ manifest: {
11498
+ click: "https://almadar-kflow-assets.web.app/shared/audio/sfx/close_001.ogg",
11499
+ confirm: "https://almadar-kflow-assets.web.app/shared/audio/sfx/confirmation_001.ogg",
11500
+ drop: "https://almadar-kflow-assets.web.app/shared/audio/sfx/drop_001.ogg"
11501
+ },
11502
+ baseUrl: "https://almadar-kflow-assets.web.app/shared/audio",
11398
11503
  initialMuted,
11399
- children: []
11504
+ children: [audioControls]
11400
11505
  };
11401
11506
  return {
11402
11507
  name: c.traitName,