@almadar/std 16.231.0 → 16.233.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.
- package/behaviors/behaviors-registry.json +4054 -771
- package/behaviors/lolo/ui/core/atoms/std-board.lolo +6 -1
- package/behaviors/lolo/ui/core/atoms/std-event-log.lolo +12 -2
- package/behaviors/lolo/ui/core/atoms/std-form-advanced.lolo +36 -3
- package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +38 -65
- package/behaviors/lolo/ui/core/atoms/ui-box.lolo +2 -2
- package/behaviors/lolo/ui/core/atoms/ui-button.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-breadcrumb.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-change-list.lolo +57 -0
- package/behaviors/lolo/ui/core/molecules/ui-commit-row.lolo +143 -0
- package/behaviors/lolo/ui/core/molecules/ui-file-tree.lolo +1 -0
- package/behaviors/lolo/ui/core/molecules/ui-version-diff.lolo +19 -3
- package/behaviors/lolo/ui/game/atoms/ui-canvas.lolo +1 -0
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/ui/core/atoms/std-board.orb +9 -1
- package/behaviors/registry/ui/core/atoms/std-event-log.orb +19 -3
- package/behaviors/registry/ui/core/atoms/std-form-advanced.orb +52 -3
- package/behaviors/registry/ui/core/atoms/std-version-history.orb +470 -346
- package/behaviors/registry/ui/core/atoms/ui-box.orb +2 -2
- package/behaviors/registry/ui/core/atoms/ui-button.orb +1 -0
- package/behaviors/registry/ui/core/molecules/ui-breadcrumb.orb +9 -1
- package/behaviors/registry/ui/core/molecules/ui-change-list.orb +290 -0
- package/behaviors/registry/ui/core/molecules/ui-commit-row.orb +441 -0
- package/behaviors/registry/ui/core/molecules/ui-file-tree.orb +13 -0
- package/behaviors/registry/ui/core/molecules/ui-header.orb +43 -0
- package/behaviors/registry/ui/core/molecules/ui-icon-button.orb +418 -0
- package/behaviors/registry/ui/core/molecules/ui-menu.orb +13 -0
- package/behaviors/registry/ui/core/molecules/ui-top-nav-item.orb +277 -0
- package/behaviors/registry/ui/core/molecules/ui-version-diff.orb +109 -18
- package/behaviors/registry/ui/core/organisms/ui-dock-layout.orb +43 -5
- package/behaviors/registry/ui/game/atoms/ui-canvas.orb +8 -0
- package/dist/behaviors/exports-reader.js +1466 -1043
- package/dist/behaviors/functions/index.d.ts +365 -34
- package/dist/behaviors/functions/index.js +1455 -1044
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +1467 -1044
- package/dist/behaviors/query.js +1466 -1043
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +33 -5
- package/dist/behaviors-registry.json +4054 -771
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1467 -1044
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +201 -13
- package/dist/registry/factory-signatures.json +1 -1
- package/package.json +2 -2
|
@@ -241,7 +241,7 @@ orbital BoardOrbital {
|
|
|
241
241
|
REFETCH_QUERY -> viewing_board
|
|
242
242
|
(fetch BoardView {
|
|
243
243
|
emit: { failure: BoardItemsLoadFailed, success: BoardItemsLoaded }
|
|
244
|
-
filter: (or ["=", ?searchTerm, ""] (str/includes (object/get @entity
|
|
244
|
+
filter: (or ["=", ?searchTerm, ""] (str/includes (object/get @entity @config.searchField) ?searchTerm))
|
|
245
245
|
})
|
|
246
246
|
REFETCH_FILTER -> viewing_board
|
|
247
247
|
(fetch BoardView {
|
|
@@ -535,6 +535,11 @@ orbital BoardOrbital {
|
|
|
535
535
|
@label "Board title"
|
|
536
536
|
@description "Heading shown above the column board"
|
|
537
537
|
@tier "presentation"
|
|
538
|
+
searchField : string = "title"
|
|
539
|
+
@label "Which column does the search box match against?"
|
|
540
|
+
@description "Name the field on this entity the search box's str/includes filter matches against. Declared, never inferred: an entity with no `title` column must set this to a real field (e.g. name, summary) or the search box can never match a card."
|
|
541
|
+
@synonyms "search column, search on field, match field, search key"
|
|
542
|
+
@tier "policy"
|
|
538
543
|
columns : [ColumnSpec] = [{
|
|
539
544
|
icon: circle
|
|
540
545
|
key: todo
|
|
@@ -241,12 +241,12 @@ orbital EventLogOrbital {
|
|
|
241
241
|
REFETCH_QUERY -> viewing
|
|
242
242
|
(fetch EventLogView {
|
|
243
243
|
emit: { failure: EventLogLoadFailed, success: EventLogLoaded }
|
|
244
|
-
filter: (and (or ["=", @entity.filterKind, ""] ["=", (object/get @entity
|
|
244
|
+
filter: (and (or ["=", @entity.filterKind, ""] ["=", (object/get @entity @config.kindField), @entity.filterKind]) (or ["=", ?searchTerm, ""] (str/includes (object/get @entity @config.searchField) ?searchTerm)))
|
|
245
245
|
})
|
|
246
246
|
REFETCH_FILTER -> viewing
|
|
247
247
|
(fetch EventLogView {
|
|
248
248
|
emit: { failure: EventLogLoadFailed, success: EventLogLoaded }
|
|
249
|
-
filter: (and (or ["=", @entity.filterKind, ""] ["=", (object/get @entity
|
|
249
|
+
filter: (and (or ["=", @entity.filterKind, ""] ["=", (object/get @entity @config.kindField), @entity.filterKind]) (or ["=", ?value, ""] ["=", (object/get @entity ?field), ?value]))
|
|
250
250
|
})
|
|
251
251
|
;; No filter carried over on REFETCH_PAGE, mirroring std-browse exactly —
|
|
252
252
|
;; the reference page arm does not preserve query/filter either.
|
|
@@ -588,6 +588,16 @@ orbital EventLogOrbital {
|
|
|
588
588
|
@label "Section title"
|
|
589
589
|
@description "Heading shown above the activity timeline"
|
|
590
590
|
@tier "presentation"
|
|
591
|
+
searchField : string = "title"
|
|
592
|
+
@label "Which column does the search box match against?"
|
|
593
|
+
@description "Name the field on this entity the search box's str/includes filter matches against. Declared, never inferred: an entity with no `title` column must set this to a real field or the search box can never match an entry."
|
|
594
|
+
@synonyms "search column, search on field, match field, search key"
|
|
595
|
+
@tier "policy"
|
|
596
|
+
kindField : string = "kind"
|
|
597
|
+
@label "Which column holds each entry's kind?"
|
|
598
|
+
@description "Name the field on this entity the kind filter compares against (the values of kindOptions). An entity whose kind lives under another column (e.g. status) sets it here, or the kind filter can never match an entry."
|
|
599
|
+
@synonyms "kind column, type field, category column, filter by kind"
|
|
600
|
+
@tier "policy"
|
|
591
601
|
kindOptions : [KindOption] = [{
|
|
592
602
|
icon: plus-circle
|
|
593
603
|
key: created
|
|
@@ -49,9 +49,12 @@ orbital FormEntryOrbital {
|
|
|
49
49
|
type: stack
|
|
50
50
|
}, { type: divider }, {
|
|
51
51
|
cancelEvent: CANCEL
|
|
52
|
+
cancelLabel: @config.cancelLabel
|
|
52
53
|
fields: @config.fields
|
|
53
54
|
mode: create
|
|
55
|
+
showCancel: @config.showCancel
|
|
54
56
|
submitEvent: SUBMIT
|
|
57
|
+
submitLabel: @config.submitLabel
|
|
55
58
|
type: form-section
|
|
56
59
|
}]
|
|
57
60
|
direction: vertical
|
|
@@ -75,9 +78,12 @@ orbital FormEntryOrbital {
|
|
|
75
78
|
type: stack
|
|
76
79
|
}, { type: divider }, {
|
|
77
80
|
cancelEvent: CANCEL
|
|
81
|
+
cancelLabel: @config.cancelLabel
|
|
78
82
|
fields: @config.fields
|
|
79
83
|
mode: create
|
|
84
|
+
showCancel: @config.showCancel
|
|
80
85
|
submitEvent: SUBMIT
|
|
86
|
+
submitLabel: @config.submitLabel
|
|
81
87
|
type: form-section
|
|
82
88
|
}]
|
|
83
89
|
direction: vertical
|
|
@@ -91,17 +97,17 @@ orbital FormEntryOrbital {
|
|
|
91
97
|
(render-ui main {
|
|
92
98
|
align: center
|
|
93
99
|
children: [{ name: check-circle, size: xl, type: icon }, {
|
|
94
|
-
content:
|
|
100
|
+
content: @config.successTitle
|
|
95
101
|
type: typography
|
|
96
102
|
variant: h2
|
|
97
103
|
}, {
|
|
98
|
-
message:
|
|
104
|
+
message: @config.successMessage
|
|
99
105
|
type: alert
|
|
100
106
|
variant: success
|
|
101
107
|
}, {
|
|
102
108
|
action: RESET
|
|
103
109
|
icon: plus
|
|
104
|
-
label:
|
|
110
|
+
label: @config.newEntryLabel
|
|
105
111
|
type: button
|
|
106
112
|
variant: primary
|
|
107
113
|
}]
|
|
@@ -137,9 +143,12 @@ orbital FormEntryOrbital {
|
|
|
137
143
|
type: stack
|
|
138
144
|
}, { type: divider }, {
|
|
139
145
|
cancelEvent: CANCEL
|
|
146
|
+
cancelLabel: @config.cancelLabel
|
|
140
147
|
fields: @config.fields
|
|
141
148
|
mode: create
|
|
149
|
+
showCancel: @config.showCancel
|
|
142
150
|
submitEvent: SUBMIT
|
|
151
|
+
submitLabel: @config.submitLabel
|
|
143
152
|
type: form-section
|
|
144
153
|
}]
|
|
145
154
|
direction: vertical
|
|
@@ -246,6 +255,30 @@ orbital FormEntryOrbital {
|
|
|
246
255
|
@label "Field validation"
|
|
247
256
|
@description "Per-field rules (format, regex, length) shown inline on submit"
|
|
248
257
|
@tier "domain"
|
|
258
|
+
submitLabel : string
|
|
259
|
+
@label "Submit button"
|
|
260
|
+
@description "Label on the submit button; unset keeps the translated Save"
|
|
261
|
+
@tier "presentation"
|
|
262
|
+
cancelLabel : string
|
|
263
|
+
@label "Cancel button"
|
|
264
|
+
@description "Label on the cancel button; unset keeps the translated Cancel"
|
|
265
|
+
@tier "presentation"
|
|
266
|
+
showCancel : boolean = true
|
|
267
|
+
@label "Show cancel"
|
|
268
|
+
@description "Whether the form shows a cancel button"
|
|
269
|
+
@tier "presentation"
|
|
270
|
+
successTitle : string = "Form Submitted"
|
|
271
|
+
@label "Confirmation title"
|
|
272
|
+
@description "Heading shown after a successful submit"
|
|
273
|
+
@tier "presentation"
|
|
274
|
+
successMessage : string = "Your form has been submitted successfully."
|
|
275
|
+
@label "Confirmation message"
|
|
276
|
+
@description "Message shown after a successful submit"
|
|
277
|
+
@tier "presentation"
|
|
278
|
+
newEntryLabel : string = "New Entry"
|
|
279
|
+
@label "New entry button"
|
|
280
|
+
@description "Label on the button that starts another entry after a submit"
|
|
281
|
+
@tier "presentation"
|
|
249
282
|
}
|
|
250
283
|
}
|
|
251
284
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
app std-version-history "1.0.0"
|
|
2
|
-
"std-version-history — wiki/CMS revision history with diff + rollback. Browses revisions; opens detail in `viewing_single`; compares
|
|
2
|
+
"std-version-history — wiki/CMS revision history with diff + rollback. Browses revisions; opens detail in `viewing_single`; compares the opened revision with the newest in `comparing`; Rollback emits RevisionRolledBack { row } for the consumer to restore onto its source document. `RevisionManage` is a rebindable single-entity trait: a consumer rebinds it to its own entity via `linkedEntity`. `config.scopeField` names the Revision field holding the parent document id; a page-mounted `{id}` route param scopes INIT's own fetch, and a consumer forwards SHOW_HISTORY { key } (via a `listens` override) to rescope the feed to one document — empty scopeField (default) or no id keeps today's unfiltered global feed. Rollback and retry refetches stay scoped."
|
|
3
3
|
orbital RevisionOrbital {
|
|
4
4
|
type RevisionLoaded = Event { data : [Revision] } "Fired when the revision collection finishes loading"
|
|
5
5
|
|
|
6
6
|
type RevisionLoadFailed = Event { error : string, code : string } "Fired when the revision collection fails to load"
|
|
7
7
|
|
|
8
|
-
type RevisionRolledBack = Event Revision "
|
|
9
|
-
|
|
10
|
-
type RevisionRollbackFailed = Event { error : string, code : string } "Fired when a rollback fails to persist"
|
|
8
|
+
type RevisionRolledBack = Event { row : Revision! } "The revision to roll back to: the consumer restores row.content onto its source document (listen for it)"
|
|
11
9
|
|
|
12
10
|
entity Revision [persistent: revisions] {
|
|
13
11
|
id : string!
|
|
@@ -16,11 +14,12 @@ orbital RevisionOrbital {
|
|
|
16
14
|
versionNumber : number! @description "A sequential identifier representing the revision's order." @synonyms "sequence, order, iteration"
|
|
17
15
|
authorId : string @description "Unique identifier for the user who made the change." @synonyms "user identifier, creator, contributor"
|
|
18
16
|
authorName : string @description "The name of the user who made the change." @synonyms "user, contributor, owner"
|
|
19
|
-
content : string @description "The snapshotted body of the revision — plain text or the rich-text HTML a document-look record carries. Rollback
|
|
17
|
+
content : string @description "The snapshotted body of the revision — plain text or the rich-text HTML a document-look record carries. Rollback emits RevisionRolledBack { row }; the consumer restores row.content onto its source document." @synonyms "text, body, data, value"
|
|
20
18
|
summary : string @description "A brief explanation of the revision's changes." @synonyms "description, note, comment, explanation"
|
|
21
19
|
searchTerm : string @intrinsic @description "The current search query the user submitted." @synonyms "query, term, q" = ""
|
|
22
20
|
createdAt : string
|
|
23
21
|
scopeKey : string @intrinsic @description "The parent document id the feed is currently scoped to, set by SHOW_HISTORY. Empty when browsing the unfiltered global feed." @synonyms "scope, filter key, document scope" = ""
|
|
22
|
+
revisions : [Revision] @intrinsic @description "The loaded revisions, newest first — what Compare diffs against." @synonyms "versions, history" = []
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
trait RevisionManage -> @rebindable Revision [interaction, collection] {
|
|
@@ -47,6 +46,7 @@ orbital RevisionOrbital {
|
|
|
47
46
|
type: stack
|
|
48
47
|
})
|
|
49
48
|
RevisionLoaded -> browsing
|
|
49
|
+
(set @entity.revisions (array/sort ?data "versionNumber" "desc"))
|
|
50
50
|
(render-ui main {
|
|
51
51
|
children: [{
|
|
52
52
|
align: center
|
|
@@ -97,18 +97,6 @@ orbital RevisionOrbital {
|
|
|
97
97
|
gap: md
|
|
98
98
|
type: stack
|
|
99
99
|
})
|
|
100
|
-
RevisionRolledBack -> loading
|
|
101
|
-
(set @entity.scopeKey (object/get @payload @config.scopeField ""))
|
|
102
|
-
(fetch Revision {
|
|
103
|
-
filter: (or ["=", @config.scopeField, ""] ["=", (object/get @payload @config.scopeField ""), ""] ["=", (object/get @entity @config.scopeField), (object/get @payload @config.scopeField "")])
|
|
104
|
-
emit: { failure: RevisionLoadFailed, success: RevisionLoaded }
|
|
105
|
-
})
|
|
106
|
-
RevisionRollbackFailed -> error
|
|
107
|
-
(render-ui main {
|
|
108
|
-
message: ?error
|
|
109
|
-
type: alert
|
|
110
|
-
variant: error
|
|
111
|
-
})
|
|
112
100
|
RevisionLoadFailed -> error
|
|
113
101
|
(render-ui main {
|
|
114
102
|
message: ?error
|
|
@@ -267,7 +255,7 @@ orbital RevisionOrbital {
|
|
|
267
255
|
variant: secondary
|
|
268
256
|
}, {
|
|
269
257
|
action: ROLLBACK
|
|
270
|
-
actionPayload: {
|
|
258
|
+
actionPayload: { row: @entity }
|
|
271
259
|
label: Rollback
|
|
272
260
|
type: button
|
|
273
261
|
variant: danger
|
|
@@ -281,9 +269,11 @@ orbital RevisionOrbital {
|
|
|
281
269
|
type: stack
|
|
282
270
|
})
|
|
283
271
|
ROLLBACK -> loading
|
|
284
|
-
(
|
|
285
|
-
(
|
|
286
|
-
|
|
272
|
+
(emit RevisionRolledBack { row: ?row })
|
|
273
|
+
(set @entity.scopeKey (object/get ?row @config.scopeField ""))
|
|
274
|
+
(fetch Revision {
|
|
275
|
+
filter: (or ["=", @config.scopeField, ""] ["=", (object/get ?row @config.scopeField ""), ""] ["=", (object/get @entity @config.scopeField), (object/get ?row @config.scopeField "")])
|
|
276
|
+
emit: { failure: RevisionLoadFailed, success: RevisionLoaded }
|
|
287
277
|
})
|
|
288
278
|
(render-ui main {
|
|
289
279
|
align: center
|
|
@@ -322,6 +312,7 @@ orbital RevisionOrbital {
|
|
|
322
312
|
state viewing_single {
|
|
323
313
|
CLOSE_VIEW -> loading
|
|
324
314
|
(fetch Revision {
|
|
315
|
+
filter: (or ["=", @config.scopeField, ""] ["=", @entity.scopeKey, ""] ["=", (object/get @entity @config.scopeField), @entity.scopeKey])
|
|
325
316
|
emit: { failure: RevisionLoadFailed, success: RevisionLoaded }
|
|
326
317
|
})
|
|
327
318
|
(render-ui main {
|
|
@@ -356,17 +347,16 @@ orbital RevisionOrbital {
|
|
|
356
347
|
gap: sm
|
|
357
348
|
type: stack
|
|
358
349
|
}, { type: divider }, {
|
|
359
|
-
afterId:
|
|
360
|
-
beforeId:
|
|
361
|
-
|
|
362
|
-
revisions: ?revisions
|
|
350
|
+
afterId: (object/get (array/first @entity.revisions) "id" "")
|
|
351
|
+
beforeId: @entity.id
|
|
352
|
+
revisions: (array/map @entity.revisions (fn r { id: @r.id, label: (str/concat "v" (str/default @r.versionNumber "")), author: @r.authorName, timestamp: @r.createdAt, content: @r.content }))
|
|
363
353
|
type: version-diff
|
|
364
354
|
view: side-by-side
|
|
365
355
|
}, {
|
|
366
356
|
align: center
|
|
367
357
|
children: [{
|
|
368
358
|
action: ROLLBACK
|
|
369
|
-
actionPayload: {
|
|
359
|
+
actionPayload: { row: @entity }
|
|
370
360
|
label: Rollback
|
|
371
361
|
type: button
|
|
372
362
|
variant: danger
|
|
@@ -380,9 +370,11 @@ orbital RevisionOrbital {
|
|
|
380
370
|
type: stack
|
|
381
371
|
})
|
|
382
372
|
ROLLBACK -> loading
|
|
383
|
-
(
|
|
384
|
-
(
|
|
385
|
-
|
|
373
|
+
(emit RevisionRolledBack { row: ?row })
|
|
374
|
+
(set @entity.scopeKey (object/get ?row @config.scopeField ""))
|
|
375
|
+
(fetch Revision {
|
|
376
|
+
filter: (or ["=", @config.scopeField, ""] ["=", (object/get ?row @config.scopeField ""), ""] ["=", (object/get @entity @config.scopeField), (object/get ?row @config.scopeField "")])
|
|
377
|
+
emit: { failure: RevisionLoadFailed, success: RevisionLoaded }
|
|
386
378
|
})
|
|
387
379
|
(render-ui main {
|
|
388
380
|
align: center
|
|
@@ -421,6 +413,7 @@ orbital RevisionOrbital {
|
|
|
421
413
|
state comparing {
|
|
422
414
|
CLOSE_VIEW -> loading
|
|
423
415
|
(fetch Revision {
|
|
416
|
+
filter: (or ["=", @config.scopeField, ""] ["=", @entity.scopeKey, ""] ["=", (object/get @entity @config.scopeField), @entity.scopeKey])
|
|
424
417
|
emit: { failure: RevisionLoadFailed, success: RevisionLoaded }
|
|
425
418
|
})
|
|
426
419
|
(render-ui main {
|
|
@@ -437,9 +430,11 @@ orbital RevisionOrbital {
|
|
|
437
430
|
type: stack
|
|
438
431
|
})
|
|
439
432
|
ROLLBACK -> loading
|
|
440
|
-
(
|
|
441
|
-
(
|
|
442
|
-
|
|
433
|
+
(emit RevisionRolledBack { row: ?row })
|
|
434
|
+
(set @entity.scopeKey (object/get ?row @config.scopeField ""))
|
|
435
|
+
(fetch Revision {
|
|
436
|
+
filter: (or ["=", @config.scopeField, ""] ["=", (object/get ?row @config.scopeField ""), ""] ["=", (object/get @entity @config.scopeField), (object/get ?row @config.scopeField "")])
|
|
437
|
+
emit: { failure: RevisionLoadFailed, success: RevisionLoaded }
|
|
443
438
|
})
|
|
444
439
|
(render-ui main {
|
|
445
440
|
align: center
|
|
@@ -506,17 +501,14 @@ orbital RevisionOrbital {
|
|
|
506
501
|
@tier "domain"
|
|
507
502
|
COMPARE {
|
|
508
503
|
id : string!
|
|
509
|
-
beforeId : string!
|
|
510
|
-
afterId : string!
|
|
511
|
-
revisions : [Revision]
|
|
512
504
|
}
|
|
513
|
-
@description "Signals a request to compare
|
|
505
|
+
@description "Signals a request to compare the opened revision with the newest one."
|
|
514
506
|
@synonyms "compare, diff, contrast"
|
|
515
507
|
@tier "presentation"
|
|
516
508
|
ROLLBACK {
|
|
517
|
-
|
|
509
|
+
row : Revision!
|
|
518
510
|
}
|
|
519
|
-
@description "
|
|
511
|
+
@description "Requests a rollback to this revision."
|
|
520
512
|
@synonyms "reverted, undone, restored"
|
|
521
513
|
@tier "domain"
|
|
522
514
|
RevisionLoaded {
|
|
@@ -532,17 +524,12 @@ orbital RevisionOrbital {
|
|
|
532
524
|
@description "Indicates a failure to load revision data."
|
|
533
525
|
@synonyms "error, fail, problem, unsuccessful"
|
|
534
526
|
@tier "internal"
|
|
535
|
-
RevisionRolledBack
|
|
536
|
-
|
|
537
|
-
@synonyms "restored, reverted, undone"
|
|
538
|
-
@tier "presentation"
|
|
539
|
-
RevisionRollbackFailed {
|
|
540
|
-
error : string
|
|
541
|
-
code : string
|
|
527
|
+
RevisionRolledBack -> external {
|
|
528
|
+
row : Revision!
|
|
542
529
|
}
|
|
543
|
-
@description "
|
|
544
|
-
@synonyms "
|
|
545
|
-
@tier "
|
|
530
|
+
@description "The revision to roll back to; the consumer restores row.content onto its source document."
|
|
531
|
+
@synonyms "restored, reverted, undone"
|
|
532
|
+
@tier "domain"
|
|
546
533
|
}
|
|
547
534
|
|
|
548
535
|
listens {
|
|
@@ -565,17 +552,14 @@ orbital RevisionOrbital {
|
|
|
565
552
|
@tier "domain"
|
|
566
553
|
COMPARE {
|
|
567
554
|
id : string!
|
|
568
|
-
beforeId : string!
|
|
569
|
-
afterId : string!
|
|
570
|
-
revisions : [Revision]
|
|
571
555
|
}
|
|
572
|
-
@description "Indicates a request to compare
|
|
556
|
+
@description "Indicates a request to compare the opened revision with the newest one."
|
|
573
557
|
@synonyms "diff, compare, contrast"
|
|
574
558
|
@tier "presentation"
|
|
575
559
|
ROLLBACK {
|
|
576
|
-
|
|
560
|
+
row : Revision!
|
|
577
561
|
}
|
|
578
|
-
@description "A
|
|
562
|
+
@description "A rollback to this revision was requested."
|
|
579
563
|
@synonyms "reverted, undone, restored"
|
|
580
564
|
@tier "domain"
|
|
581
565
|
RevisionLoaded {
|
|
@@ -591,17 +575,6 @@ orbital RevisionOrbital {
|
|
|
591
575
|
@description "Indicates a failure to retrieve revision data."
|
|
592
576
|
@synonyms "error, failure, problem, fetch failed"
|
|
593
577
|
@tier "internal"
|
|
594
|
-
RevisionRolledBack
|
|
595
|
-
@description "Indicates a revision has been successfully reverted."
|
|
596
|
-
@synonyms "reverted, undone, restored"
|
|
597
|
-
@tier "internal"
|
|
598
|
-
RevisionRollbackFailed {
|
|
599
|
-
error : string
|
|
600
|
-
code : string
|
|
601
|
-
}
|
|
602
|
-
@description "Indicates that a revision rollback operation has failed."
|
|
603
|
-
@synonyms "rollback error, revert failure, undo failed"
|
|
604
|
-
@tier "internal"
|
|
605
578
|
SHOW_HISTORY {
|
|
606
579
|
key : string!
|
|
607
580
|
}
|
|
@@ -59,7 +59,7 @@ orbital BoxOrbital {
|
|
|
59
59
|
@label "Dir"
|
|
60
60
|
@description "Text direction for this subtree: 'ltr', 'rtl' (Arabic/Hebrew content) or 'auto'"
|
|
61
61
|
@tier "presentation"
|
|
62
|
-
padding : "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" =
|
|
62
|
+
padding : "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" = md
|
|
63
63
|
@label "Padding"
|
|
64
64
|
@description "Padding on all sides"
|
|
65
65
|
@tier "presentation"
|
|
@@ -87,7 +87,7 @@ orbital BoxOrbital {
|
|
|
87
87
|
@label "Bg"
|
|
88
88
|
@description "Background color"
|
|
89
89
|
@tier "presentation"
|
|
90
|
-
border : boolean =
|
|
90
|
+
border : boolean = true
|
|
91
91
|
@label "Border"
|
|
92
92
|
@description "Show border"
|
|
93
93
|
@tier "presentation"
|
|
@@ -96,7 +96,7 @@ orbital ButtonOrbital {
|
|
|
96
96
|
@label "Action Payload"
|
|
97
97
|
@description "Payload to include with the action event"
|
|
98
98
|
@tier "presentation"
|
|
99
|
-
label : string
|
|
99
|
+
label : string = Button
|
|
100
100
|
@label "Label"
|
|
101
101
|
@description "Button label text (alternative to children for schema-driven rendering)"
|
|
102
102
|
@tier "presentation"
|
|
@@ -42,7 +42,7 @@ orbital BreadcrumbOrbital {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
config {
|
|
45
|
-
items : [BreadcrumbItemsItem] = []
|
|
45
|
+
items : [BreadcrumbItemsItem] = [{ label: "Home", href: "/" } { label: "Page" }]
|
|
46
46
|
@label "Items"
|
|
47
47
|
@description "Breadcrumb items. Omit together with `fromNavStack` to render the orbital-scoped navigation stack instead of an authored trail."
|
|
48
48
|
@tier "presentation"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
app ui-change-list "1.0.0"
|
|
2
|
+
"The plain-language changes in one version (added / modified / removed). — UI factory (1:1 with the @almadar/ui change-list pattern)."
|
|
3
|
+
;; @capabilities "change summary, what changed, version changes, diff summary, release notes list, modification list"
|
|
4
|
+
;; @pattern "change-list"
|
|
5
|
+
orbital ChangeListOrbital {
|
|
6
|
+
type ChangeListChangesItem = {
|
|
7
|
+
type : "added" | "modified" | "removed"!
|
|
8
|
+
title : string!
|
|
9
|
+
description : string
|
|
10
|
+
before : string
|
|
11
|
+
after : string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
entity ChangeListItem [runtime] {
|
|
15
|
+
id : string!
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
trait ChangeListRender -> @rebindable ChangeListItem [interaction, instance] {
|
|
19
|
+
initial: idle
|
|
20
|
+
|
|
21
|
+
state idle {
|
|
22
|
+
INIT -> idle
|
|
23
|
+
(render-ui main {
|
|
24
|
+
changes: @config.changes
|
|
25
|
+
inspectEvent: @config.inspectEvent
|
|
26
|
+
className: @config.className
|
|
27
|
+
type: change-list
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
emits {
|
|
32
|
+
@config.inspectEvent -> external {
|
|
33
|
+
title : string!
|
|
34
|
+
type : "added" | "modified" | "removed"!
|
|
35
|
+
}
|
|
36
|
+
@description "Emitted by a change's Inspect button. Payload: { title, type }."
|
|
37
|
+
@tier "essential"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
config {
|
|
41
|
+
changes : [ChangeListChangesItem] = [{ type: added, title: "Title", description: "Description", before: "Before", after: "After" }, { type: modified, title: "Title 2", description: "Description 2", before: "Before 2", after: "After 2" }]
|
|
42
|
+
@label "Changes"
|
|
43
|
+
@description "The changes. Accepts a typed list or a render-ui payload binding."
|
|
44
|
+
@tier "presentation"
|
|
45
|
+
inspectEvent : event = "INSPECT"
|
|
46
|
+
@label "Inspect Event"
|
|
47
|
+
@description "Emitted by a change's Inspect button. Payload: { title, type }."
|
|
48
|
+
@tier "presentation"
|
|
49
|
+
className : string
|
|
50
|
+
@label "Class Name"
|
|
51
|
+
@description "className prop"
|
|
52
|
+
@tier "presentation"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
page "/change-list" as ChangeListPage -> ChangeListRender
|
|
57
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
app ui-commit-row "1.0.0"
|
|
2
|
+
"One version in a history list — a commit row with select and restore. — UI factory (1:1 with the @almadar/ui commit-row pattern)."
|
|
3
|
+
;; @capabilities "version history row, commit entry, revision list item, change log entry, restore point, undo history item"
|
|
4
|
+
;; @pattern "commit-row"
|
|
5
|
+
orbital CommitRowOrbital {
|
|
6
|
+
entity CommitRowItem [runtime] {
|
|
7
|
+
id : string!
|
|
8
|
+
sha : string @intrinsic = ""
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
trait CommitRowRender -> @rebindable CommitRowItem [interaction, instance] {
|
|
12
|
+
initial: idle
|
|
13
|
+
|
|
14
|
+
state idle {
|
|
15
|
+
INIT -> idle
|
|
16
|
+
(set @entity.sha @config.sha)
|
|
17
|
+
(render-ui main {
|
|
18
|
+
sha: @entity.sha
|
|
19
|
+
message: @config.message
|
|
20
|
+
author: @config.author
|
|
21
|
+
timestamp: @config.timestamp
|
|
22
|
+
kind: @config.kind
|
|
23
|
+
additions: @config.additions
|
|
24
|
+
deletions: @config.deletions
|
|
25
|
+
selected: @config.selected
|
|
26
|
+
current: @config.current
|
|
27
|
+
selectEvent: @config.selectEvent
|
|
28
|
+
restoreEvent: @config.restoreEvent
|
|
29
|
+
className: @config.className
|
|
30
|
+
type: commit-row
|
|
31
|
+
})
|
|
32
|
+
SELECT -> idle
|
|
33
|
+
(set @entity.sha ?sha)
|
|
34
|
+
(render-ui main {
|
|
35
|
+
sha: @entity.sha
|
|
36
|
+
message: @config.message
|
|
37
|
+
author: @config.author
|
|
38
|
+
timestamp: @config.timestamp
|
|
39
|
+
kind: @config.kind
|
|
40
|
+
additions: @config.additions
|
|
41
|
+
deletions: @config.deletions
|
|
42
|
+
selected: @config.selected
|
|
43
|
+
current: @config.current
|
|
44
|
+
selectEvent: @config.selectEvent
|
|
45
|
+
restoreEvent: @config.restoreEvent
|
|
46
|
+
className: @config.className
|
|
47
|
+
type: commit-row
|
|
48
|
+
})
|
|
49
|
+
RESTORE -> idle
|
|
50
|
+
(set @entity.sha ?sha)
|
|
51
|
+
(render-ui main {
|
|
52
|
+
sha: @entity.sha
|
|
53
|
+
message: @config.message
|
|
54
|
+
author: @config.author
|
|
55
|
+
timestamp: @config.timestamp
|
|
56
|
+
kind: @config.kind
|
|
57
|
+
additions: @config.additions
|
|
58
|
+
deletions: @config.deletions
|
|
59
|
+
selected: @config.selected
|
|
60
|
+
current: @config.current
|
|
61
|
+
selectEvent: @config.selectEvent
|
|
62
|
+
restoreEvent: @config.restoreEvent
|
|
63
|
+
className: @config.className
|
|
64
|
+
type: commit-row
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
emits {
|
|
69
|
+
@config.selectEvent -> external {
|
|
70
|
+
sha : string!
|
|
71
|
+
}
|
|
72
|
+
@description "Emitted when the row is picked. Payload: { sha }."
|
|
73
|
+
@tier "essential"
|
|
74
|
+
@config.restoreEvent -> external {
|
|
75
|
+
sha : string!
|
|
76
|
+
}
|
|
77
|
+
@description "Emitted by the Restore button. Payload: { sha }."
|
|
78
|
+
@tier "essential"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
listens {
|
|
82
|
+
SELECT {
|
|
83
|
+
sha : string!
|
|
84
|
+
}
|
|
85
|
+
RESTORE {
|
|
86
|
+
sha : string!
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
config {
|
|
91
|
+
sha : string = ""
|
|
92
|
+
@label "Sha"
|
|
93
|
+
@description "Commit id; the first 7 characters are shown, the whole id on hover."
|
|
94
|
+
@tier "presentation"
|
|
95
|
+
message : string = ""
|
|
96
|
+
@label "Message"
|
|
97
|
+
@description "Commit message."
|
|
98
|
+
@tier "presentation"
|
|
99
|
+
author : string
|
|
100
|
+
@label "Author"
|
|
101
|
+
@description "author prop"
|
|
102
|
+
@tier "presentation"
|
|
103
|
+
timestamp : string
|
|
104
|
+
@label "Timestamp"
|
|
105
|
+
@description "Display time (already formatted, e.g. '2 min ago')."
|
|
106
|
+
@tier "presentation"
|
|
107
|
+
kind : "user" | "agent" | "restore" | "undo" | "redo" | "snapshot" = user
|
|
108
|
+
@label "Kind"
|
|
109
|
+
@description "What made this version (a user save, an agent turn, a restore, an undo/redo, a snapshot)."
|
|
110
|
+
@tier "presentation"
|
|
111
|
+
additions : number
|
|
112
|
+
@label "Additions"
|
|
113
|
+
@description "additions prop"
|
|
114
|
+
@tier "presentation"
|
|
115
|
+
deletions : number
|
|
116
|
+
@label "Deletions"
|
|
117
|
+
@description "deletions prop"
|
|
118
|
+
@tier "presentation"
|
|
119
|
+
selected : boolean = false
|
|
120
|
+
@label "Selected"
|
|
121
|
+
@description "The row the user picked (shows its detail)."
|
|
122
|
+
@tier "presentation"
|
|
123
|
+
current : boolean = false
|
|
124
|
+
@label "Current"
|
|
125
|
+
@description "The version the app is at now — it cannot be restored to."
|
|
126
|
+
@tier "presentation"
|
|
127
|
+
selectEvent : event = "SELECT"
|
|
128
|
+
@label "Select Event"
|
|
129
|
+
@description "Emitted when the row is picked. Payload: { sha }."
|
|
130
|
+
@tier "presentation"
|
|
131
|
+
restoreEvent : event = "RESTORE"
|
|
132
|
+
@label "Restore Event"
|
|
133
|
+
@description "Emitted by the Restore button. Payload: { sha }."
|
|
134
|
+
@tier "presentation"
|
|
135
|
+
className : string
|
|
136
|
+
@label "Class Name"
|
|
137
|
+
@description "className prop"
|
|
138
|
+
@tier "presentation"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
page "/commit-row" as CommitRowPage -> CommitRowRender
|
|
143
|
+
}
|