@almadar/std 9.0.0 → 10.0.0

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.
@@ -160,8 +160,8 @@
160
160
  "CartItem",
161
161
  {
162
162
  "emit": {
163
- "failure": "CartItemLoadFailed",
164
- "success": "CartItemLoaded"
163
+ "success": "CartItemLoaded",
164
+ "failure": "CartItemLoadFailed"
165
165
  }
166
166
  }
167
167
  ],
@@ -169,22 +169,22 @@
169
169
  "render-ui",
170
170
  "main",
171
171
  {
172
+ "type": "stack",
172
173
  "gap": "md",
173
- "className": "py-12",
174
174
  "children": [
175
175
  {
176
176
  "type": "spinner"
177
177
  },
178
178
  {
179
- "type": "typography",
180
- "color": "muted",
181
179
  "variant": "caption",
180
+ "color": "muted",
181
+ "type": "typography",
182
182
  "content": "Loading cart…"
183
183
  }
184
184
  ],
185
185
  "direction": "vertical",
186
186
  "align": "center",
187
- "type": "stack"
187
+ "className": "py-12"
188
188
  }
189
189
  ]
190
190
  ]
@@ -198,16 +198,18 @@
198
198
  "render-ui",
199
199
  "main",
200
200
  {
201
+ "type": "stack",
202
+ "direction": "vertical",
203
+ "gap": "lg",
201
204
  "children": [
202
205
  {
203
- "type": "stack",
204
206
  "justify": "between",
207
+ "type": "stack",
208
+ "gap": "md",
205
209
  "direction": "horizontal",
206
210
  "children": [
207
211
  {
208
212
  "type": "stack",
209
- "direction": "horizontal",
210
- "gap": "md",
211
213
  "children": [
212
214
  {
213
215
  "name": "shopping-cart",
@@ -215,57 +217,55 @@
215
217
  },
216
218
  {
217
219
  "content": "Shopping Cart",
218
- "variant": "h2",
219
- "type": "typography"
220
+ "type": "typography",
221
+ "variant": "h2"
220
222
  }
221
- ]
223
+ ],
224
+ "direction": "horizontal",
225
+ "gap": "md"
222
226
  },
223
227
  {
228
+ "variant": "primary",
224
229
  "icon": "plus",
225
- "action": "ADD_ITEM",
226
230
  "label": "Add Item",
227
231
  "type": "button",
228
- "variant": "primary"
232
+ "action": "ADD_ITEM"
229
233
  }
230
- ],
231
- "gap": "md"
234
+ ]
232
235
  },
233
236
  {
234
237
  "type": "divider"
235
238
  },
236
239
  {
237
- "entity": "@payload.data",
238
- "type": "data-grid",
239
240
  "itemActions": [
240
241
  {
241
- "variant": "danger",
242
+ "label": "Remove",
242
243
  "event": "REQUEST_REMOVE",
243
- "label": "Remove"
244
+ "variant": "danger"
244
245
  }
245
246
  ],
246
247
  "fields": [
247
248
  {
249
+ "name": "name",
248
250
  "label": "Name",
249
- "variant": "h4",
250
251
  "icon": "shopping-cart",
251
- "name": "name"
252
+ "variant": "h4"
252
253
  },
253
254
  {
254
255
  "label": "Description",
255
- "variant": "caption",
256
- "name": "description"
256
+ "name": "description",
257
+ "variant": "caption"
257
258
  },
258
259
  {
260
+ "label": "Status",
259
261
  "name": "status",
260
- "variant": "badge",
261
- "label": "Status"
262
+ "variant": "badge"
262
263
  }
263
- ]
264
+ ],
265
+ "type": "data-grid",
266
+ "entity": "@payload.data"
264
267
  }
265
- ],
266
- "type": "stack",
267
- "direction": "vertical",
268
- "gap": "lg"
268
+ ]
269
269
  }
270
270
  ]
271
271
  ]
@@ -279,36 +279,36 @@
279
279
  "render-ui",
280
280
  "main",
281
281
  {
282
- "type": "stack",
283
- "className": "py-12",
284
282
  "align": "center",
283
+ "direction": "vertical",
284
+ "className": "py-12",
285
+ "gap": "md",
285
286
  "children": [
286
287
  {
288
+ "name": "alert-triangle",
287
289
  "color": "destructive",
288
- "type": "icon",
289
- "name": "alert-triangle"
290
+ "type": "icon"
290
291
  },
291
292
  {
292
- "content": "Failed to load cart",
293
293
  "type": "typography",
294
+ "content": "Failed to load cart",
294
295
  "variant": "h3"
295
296
  },
296
297
  {
297
- "type": "typography",
298
298
  "color": "muted",
299
- "content": "@payload.error",
300
- "variant": "body"
299
+ "type": "typography",
300
+ "variant": "body",
301
+ "content": "@payload.error"
301
302
  },
302
303
  {
304
+ "action": "INIT",
305
+ "variant": "primary",
303
306
  "label": "Retry",
304
307
  "icon": "rotate-ccw",
305
- "type": "button",
306
- "variant": "primary",
307
- "action": "INIT"
308
+ "type": "button"
308
309
  }
309
310
  ],
310
- "direction": "vertical",
311
- "gap": "md"
311
+ "type": "stack"
312
312
  }
313
313
  ]
314
314
  ]
@@ -370,14 +370,14 @@
370
370
  "name": "CartItemAddItem",
371
371
  "linkedEntity": "CartItem",
372
372
  "config": {
373
- "icon": "plus-circle",
374
373
  "fields": [
375
374
  "name",
376
375
  "description",
377
376
  "status"
378
377
  ],
379
- "title": "Add Item",
378
+ "icon": "plus-circle",
380
379
  "openButtonLabel": "Add Item",
380
+ "title": "Add Item",
381
381
  "mode": "create"
382
382
  },
383
383
  "events": {
@@ -389,14 +389,14 @@
389
389
  "name": "CartItemRemoveConfirm",
390
390
  "linkedEntity": "CartItem",
391
391
  "config": {
392
- "title": "Remove Item",
393
- "alertMessage": "Are you sure you want to remove this item from your cart?",
394
392
  "icon": "alert-triangle",
395
- "confirmLabel": "Remove"
393
+ "confirmLabel": "Remove",
394
+ "alertMessage": "Are you sure you want to remove this item from your cart?",
395
+ "title": "Remove Item"
396
396
  },
397
397
  "events": {
398
- "CONFIRM": "CONFIRM_REMOVE",
399
- "REQUEST": "REQUEST_REMOVE"
398
+ "REQUEST": "REQUEST_REMOVE",
399
+ "CONFIRM": "CONFIRM_REMOVE"
400
400
  }
401
401
  },
402
402
  {
@@ -500,13 +500,11 @@
500
500
  "persist",
501
501
  "create",
502
502
  "CartItem",
503
- "@payload.data"
504
- ],
505
- [
506
- "emit",
507
- "ITEM_CREATED",
503
+ "@payload.data",
508
504
  {
509
- "id": "@payload.data.id"
505
+ "emit": {
506
+ "success": "ITEM_CREATED"
507
+ }
510
508
  }
511
509
  ]
512
510
  ]
@@ -520,13 +518,11 @@
520
518
  "persist",
521
519
  "delete",
522
520
  "CartItem",
523
- "@payload.id"
524
- ],
525
- [
526
- "emit",
527
- "ITEM_DELETED",
521
+ "@payload.id",
528
522
  {
529
- "id": "@payload.id"
523
+ "emit": {
524
+ "success": "ITEM_DELETED"
525
+ }
530
526
  }
531
527
  ]
532
528
  ]
@@ -160,8 +160,8 @@
160
160
  "CartItem",
161
161
  {
162
162
  "emit": {
163
- "failure": "CartItemLoadFailed",
164
- "success": "CartItemLoaded"
163
+ "success": "CartItemLoaded",
164
+ "failure": "CartItemLoadFailed"
165
165
  }
166
166
  }
167
167
  ],
@@ -169,22 +169,22 @@
169
169
  "render-ui",
170
170
  "main",
171
171
  {
172
+ "type": "stack",
172
173
  "gap": "md",
173
- "className": "py-12",
174
174
  "children": [
175
175
  {
176
176
  "type": "spinner"
177
177
  },
178
178
  {
179
- "type": "typography",
180
- "color": "muted",
181
179
  "variant": "caption",
180
+ "color": "muted",
181
+ "type": "typography",
182
182
  "content": "Loading cart…"
183
183
  }
184
184
  ],
185
185
  "direction": "vertical",
186
186
  "align": "center",
187
- "type": "stack"
187
+ "className": "py-12"
188
188
  }
189
189
  ]
190
190
  ]
@@ -198,16 +198,18 @@
198
198
  "render-ui",
199
199
  "main",
200
200
  {
201
+ "type": "stack",
202
+ "direction": "vertical",
203
+ "gap": "lg",
201
204
  "children": [
202
205
  {
203
- "type": "stack",
204
206
  "justify": "between",
207
+ "type": "stack",
208
+ "gap": "md",
205
209
  "direction": "horizontal",
206
210
  "children": [
207
211
  {
208
212
  "type": "stack",
209
- "direction": "horizontal",
210
- "gap": "md",
211
213
  "children": [
212
214
  {
213
215
  "name": "shopping-cart",
@@ -215,57 +217,55 @@
215
217
  },
216
218
  {
217
219
  "content": "Shopping Cart",
218
- "variant": "h2",
219
- "type": "typography"
220
+ "type": "typography",
221
+ "variant": "h2"
220
222
  }
221
- ]
223
+ ],
224
+ "direction": "horizontal",
225
+ "gap": "md"
222
226
  },
223
227
  {
228
+ "variant": "primary",
224
229
  "icon": "plus",
225
- "action": "ADD_ITEM",
226
230
  "label": "Add Item",
227
231
  "type": "button",
228
- "variant": "primary"
232
+ "action": "ADD_ITEM"
229
233
  }
230
- ],
231
- "gap": "md"
234
+ ]
232
235
  },
233
236
  {
234
237
  "type": "divider"
235
238
  },
236
239
  {
237
- "entity": "@payload.data",
238
- "type": "data-grid",
239
240
  "itemActions": [
240
241
  {
241
- "variant": "danger",
242
+ "label": "Remove",
242
243
  "event": "REQUEST_REMOVE",
243
- "label": "Remove"
244
+ "variant": "danger"
244
245
  }
245
246
  ],
246
247
  "fields": [
247
248
  {
249
+ "name": "name",
248
250
  "label": "Name",
249
- "variant": "h4",
250
251
  "icon": "shopping-cart",
251
- "name": "name"
252
+ "variant": "h4"
252
253
  },
253
254
  {
254
255
  "label": "Description",
255
- "variant": "caption",
256
- "name": "description"
256
+ "name": "description",
257
+ "variant": "caption"
257
258
  },
258
259
  {
260
+ "label": "Status",
259
261
  "name": "status",
260
- "variant": "badge",
261
- "label": "Status"
262
+ "variant": "badge"
262
263
  }
263
- ]
264
+ ],
265
+ "type": "data-grid",
266
+ "entity": "@payload.data"
264
267
  }
265
- ],
266
- "type": "stack",
267
- "direction": "vertical",
268
- "gap": "lg"
268
+ ]
269
269
  }
270
270
  ]
271
271
  ]
@@ -279,36 +279,36 @@
279
279
  "render-ui",
280
280
  "main",
281
281
  {
282
- "type": "stack",
283
- "className": "py-12",
284
282
  "align": "center",
283
+ "direction": "vertical",
284
+ "className": "py-12",
285
+ "gap": "md",
285
286
  "children": [
286
287
  {
288
+ "name": "alert-triangle",
287
289
  "color": "destructive",
288
- "type": "icon",
289
- "name": "alert-triangle"
290
+ "type": "icon"
290
291
  },
291
292
  {
292
- "content": "Failed to load cart",
293
293
  "type": "typography",
294
+ "content": "Failed to load cart",
294
295
  "variant": "h3"
295
296
  },
296
297
  {
297
- "type": "typography",
298
298
  "color": "muted",
299
- "content": "@payload.error",
300
- "variant": "body"
299
+ "type": "typography",
300
+ "variant": "body",
301
+ "content": "@payload.error"
301
302
  },
302
303
  {
304
+ "action": "INIT",
305
+ "variant": "primary",
303
306
  "label": "Retry",
304
307
  "icon": "rotate-ccw",
305
- "type": "button",
306
- "variant": "primary",
307
- "action": "INIT"
308
+ "type": "button"
308
309
  }
309
310
  ],
310
- "direction": "vertical",
311
- "gap": "md"
311
+ "type": "stack"
312
312
  }
313
313
  ]
314
314
  ]
@@ -370,14 +370,14 @@
370
370
  "name": "CartItemAddItem",
371
371
  "linkedEntity": "CartItem",
372
372
  "config": {
373
- "icon": "plus-circle",
374
373
  "fields": [
375
374
  "name",
376
375
  "description",
377
376
  "status"
378
377
  ],
379
- "title": "Add Item",
378
+ "icon": "plus-circle",
380
379
  "openButtonLabel": "Add Item",
380
+ "title": "Add Item",
381
381
  "mode": "create"
382
382
  },
383
383
  "events": {
@@ -389,14 +389,14 @@
389
389
  "name": "CartItemRemoveConfirm",
390
390
  "linkedEntity": "CartItem",
391
391
  "config": {
392
- "title": "Remove Item",
393
- "alertMessage": "Are you sure you want to remove this item from your cart?",
394
392
  "icon": "alert-triangle",
395
- "confirmLabel": "Remove"
393
+ "confirmLabel": "Remove",
394
+ "alertMessage": "Are you sure you want to remove this item from your cart?",
395
+ "title": "Remove Item"
396
396
  },
397
397
  "events": {
398
- "CONFIRM": "CONFIRM_REMOVE",
399
- "REQUEST": "REQUEST_REMOVE"
398
+ "REQUEST": "REQUEST_REMOVE",
399
+ "CONFIRM": "CONFIRM_REMOVE"
400
400
  }
401
401
  },
402
402
  {
@@ -500,13 +500,11 @@
500
500
  "persist",
501
501
  "create",
502
502
  "CartItem",
503
- "@payload.data"
504
- ],
505
- [
506
- "emit",
507
- "ITEM_CREATED",
503
+ "@payload.data",
508
504
  {
509
- "id": "@payload.data.id"
505
+ "emit": {
506
+ "success": "ITEM_CREATED"
507
+ }
510
508
  }
511
509
  ]
512
510
  ]
@@ -520,13 +518,11 @@
520
518
  "persist",
521
519
  "delete",
522
520
  "CartItem",
523
- "@payload.id"
524
- ],
525
- [
526
- "emit",
527
- "ITEM_DELETED",
521
+ "@payload.id",
528
522
  {
529
- "id": "@payload.id"
523
+ "emit": {
524
+ "success": "ITEM_DELETED"
525
+ }
530
526
  }
531
527
  ]
532
528
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/std",
3
- "version": "9.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Standard library operators for Almadar (math, string, array, etc.)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",