@almadar/std 16.239.0 → 16.242.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 +4814 -553
- package/behaviors/lolo/agent/atoms/std-agent-memory.lolo +38 -1
- package/behaviors/lolo/agent/atoms/std-agent-session.lolo +1074 -47
- package/behaviors/lolo/agent/atoms/std-agent-tool-loop.lolo +8 -7
- package/behaviors/lolo/agent/organisms/std-agent-assistant.lolo +56 -37
- package/behaviors/lolo/infra/atoms/std-page-open.lolo +59 -0
- package/behaviors/lolo/infra/atoms/std-page-search.lolo +134 -0
- package/behaviors/lolo/infra/atoms/std-page-treat.lolo +59 -0
- package/behaviors/lolo/infra/atoms/std-page-watch.lolo +86 -0
- package/behaviors/lolo/ui/core/atoms/std-board.lolo +53 -6
- package/behaviors/lolo/ui/core/atoms/std-book-reader.lolo +25 -1
- package/behaviors/lolo/ui/core/atoms/std-card-grid.lolo +9 -0
- package/behaviors/lolo/ui/core/atoms/std-doc-page.lolo +153 -0
- package/behaviors/lolo/ui/core/atoms/std-site-header.lolo +15 -3
- package/behaviors/lolo/ui/core/atoms/std-tag-strip.lolo +2 -2
- package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +7 -7
- package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-header.lolo +5 -0
- package/behaviors/lolo/ui/learning/atoms/std-learn-arrangement.lolo +124 -92
- package/behaviors/lolo/ui/learning/atoms/std-learn-classify.lolo +114 -55
- package/behaviors/lolo/ui/learning/atoms/std-learn-compare.lolo +40 -14
- package/behaviors/lolo/ui/learning/atoms/std-learn-coupled-sim.lolo +363 -123
- package/behaviors/lolo/ui/learning/atoms/std-learn-derivation.lolo +93 -48
- package/behaviors/lolo/ui/learning/atoms/std-learn-diagram.lolo +60 -28
- package/behaviors/lolo/ui/learning/atoms/std-learn-doser.lolo +193 -96
- package/behaviors/lolo/ui/learning/atoms/std-learn-estimate.lolo +75 -32
- package/behaviors/lolo/ui/learning/atoms/std-learn-goal-seek.lolo +142 -86
- package/behaviors/lolo/ui/learning/atoms/std-learn-grid-sim.lolo +266 -98
- package/behaviors/lolo/ui/learning/atoms/std-learn-hotspot.lolo +103 -65
- package/behaviors/lolo/ui/learning/atoms/std-learn-live-sim.lolo +223 -109
- package/behaviors/lolo/ui/learning/atoms/std-learn-measure.lolo +232 -64
- package/behaviors/lolo/ui/learning/atoms/std-learn-param-explorer.lolo +69 -29
- package/behaviors/lolo/ui/learning/atoms/std-learn-perturb.lolo +363 -123
- package/behaviors/lolo/ui/learning/atoms/std-learn-predict.lolo +73 -41
- package/behaviors/lolo/ui/learning/atoms/std-learn-sample-accumulator.lolo +96 -38
- package/behaviors/lolo/ui/learning/atoms/std-learn-sandbox.lolo +65 -45
- package/behaviors/lolo/ui/learning/atoms/std-learn-scatter-fit.lolo +243 -117
- package/behaviors/lolo/ui/learning/atoms/std-learn-scenario.lolo +76 -28
- package/behaviors/lolo/ui/learning/atoms/std-learn-sim-3d.lolo +228 -109
- package/behaviors/lolo/ui/learning/atoms/std-learn-speed-drill.lolo +95 -44
- package/behaviors/lolo/ui/learning/atoms/std-learn-stepper.lolo +199 -125
- package/behaviors/lolo/ui/learning/atoms/std-learn-tour-3d.lolo +92 -48
- package/behaviors/lolo/ui/learning/atoms/std-learn-trace-player.lolo +239 -78
- package/behaviors/lolo/ui/learning/atoms/std-learn-transport.lolo +147 -38
- package/behaviors/lolo/ui/learning/atoms/std-learn-tree.lolo +123 -58
- package/behaviors/lolo/ui/learning/atoms/ui-algo-graph-canvas.lolo +22 -0
- package/behaviors/lolo/ui/learning/atoms/ui-algorithm-canvas.lolo +26 -0
- package/behaviors/lolo/ui/learning/atoms/ui-biology-canvas.lolo +26 -0
- package/behaviors/lolo/ui/learning/atoms/ui-chemistry-canvas.lolo +27 -1
- package/behaviors/lolo/ui/learning/atoms/ui-learning-canvas.lolo +27 -1
- package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +29 -9
- package/behaviors/lolo/ui/learning/atoms/ui-physics-canvas.lolo +26 -0
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/agent/atoms/std-agent-memory.orb +372 -2
- package/behaviors/registry/agent/atoms/std-agent-session.orb +4752 -348
- package/behaviors/registry/agent/atoms/std-agent-tool-loop.orb +54 -42
- package/behaviors/registry/agent/organisms/std-agent-assistant.orb +356 -122
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/infra/atoms/std-page-open.orb +435 -0
- package/behaviors/registry/infra/atoms/std-page-search.orb +867 -0
- package/behaviors/registry/infra/atoms/std-page-treat.orb +494 -0
- package/behaviors/registry/infra/atoms/std-page-watch.orb +554 -0
- package/behaviors/registry/ui/core/atoms/std-board.orb +110 -14
- package/behaviors/registry/ui/core/atoms/std-book-reader.orb +119 -0
- package/behaviors/registry/ui/core/atoms/std-card-grid.orb +61 -0
- package/behaviors/registry/ui/core/atoms/std-doc-page.orb +594 -0
- package/behaviors/registry/ui/core/atoms/std-site-header.orb +40 -2
- package/behaviors/registry/ui/core/atoms/std-tag-strip.orb +2 -0
- package/behaviors/registry/ui/core/atoms/std-tag-taxonomy.orb +24 -0
- package/behaviors/registry/ui/core/atoms/std-version-history.orb +8 -1
- package/behaviors/registry/ui/core/molecules/ui-header.orb +7 -0
- package/behaviors/registry/ui/learning/atoms/std-learn-arrangement.orb +903 -369
- package/behaviors/registry/ui/learning/atoms/std-learn-classify.orb +1002 -232
- package/behaviors/registry/ui/learning/atoms/std-learn-compare.orb +253 -74
- package/behaviors/registry/ui/learning/atoms/std-learn-coupled-sim.orb +3624 -921
- package/behaviors/registry/ui/learning/atoms/std-learn-derivation.orb +685 -144
- package/behaviors/registry/ui/learning/atoms/std-learn-diagram.orb +404 -52
- package/behaviors/registry/ui/learning/atoms/std-learn-doser.orb +1787 -210
- package/behaviors/registry/ui/learning/atoms/std-learn-estimate.orb +699 -71
- package/behaviors/registry/ui/learning/atoms/std-learn-goal-seek.orb +1102 -578
- package/behaviors/registry/ui/learning/atoms/std-learn-grid-sim.orb +2760 -872
- package/behaviors/registry/ui/learning/atoms/std-learn-hotspot.orb +689 -152
- package/behaviors/registry/ui/learning/atoms/std-learn-live-sim.orb +1431 -633
- package/behaviors/registry/ui/learning/atoms/std-learn-measure.orb +2485 -512
- package/behaviors/registry/ui/learning/atoms/std-learn-param-explorer.orb +501 -197
- package/behaviors/registry/ui/learning/atoms/std-learn-perturb.orb +3642 -928
- package/behaviors/registry/ui/learning/atoms/std-learn-predict.orb +705 -125
- package/behaviors/registry/ui/learning/atoms/std-learn-sample-accumulator.orb +624 -114
- package/behaviors/registry/ui/learning/atoms/std-learn-sandbox.orb +405 -153
- package/behaviors/registry/ui/learning/atoms/std-learn-scatter-fit.orb +1911 -611
- package/behaviors/registry/ui/learning/atoms/std-learn-scenario.orb +436 -128
- package/behaviors/registry/ui/learning/atoms/std-learn-sim-3d.orb +2482 -485
- package/behaviors/registry/ui/learning/atoms/std-learn-speed-drill.orb +896 -192
- package/behaviors/registry/ui/learning/atoms/std-learn-stepper.orb +2001 -759
- package/behaviors/registry/ui/learning/atoms/std-learn-tour-3d.orb +734 -228
- package/behaviors/registry/ui/learning/atoms/std-learn-trace-player.orb +2501 -764
- package/behaviors/registry/ui/learning/atoms/std-learn-transport.orb +1591 -173
- package/behaviors/registry/ui/learning/atoms/std-learn-tree.orb +883 -122
- package/behaviors/registry/ui/learning/atoms/ui-algo-graph-canvas.orb +176 -0
- package/behaviors/registry/ui/learning/atoms/ui-algorithm-canvas.orb +211 -0
- package/behaviors/registry/ui/learning/atoms/ui-biology-canvas.orb +211 -0
- package/behaviors/registry/ui/learning/atoms/ui-chemistry-canvas.orb +212 -1
- package/behaviors/registry/ui/learning/atoms/ui-learning-canvas.orb +212 -1
- package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +203 -9
- package/behaviors/registry/ui/learning/atoms/ui-physics-canvas.orb +211 -0
- package/behaviors/signatures.lolo +325 -655
- package/canonical-operators.json +35 -1
- package/dist/behaviors/exports-reader.js +41980 -35508
- package/dist/behaviors/functions/index.d.ts +1063 -140
- package/dist/behaviors/functions/index.js +41951 -35506
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +41981 -35509
- package/dist/behaviors/query.js +41980 -35508
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +47 -27
- package/dist/behaviors-registry.json +4814 -553
- package/dist/index.d.ts +4 -4
- package/dist/index.js +42019 -35509
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +623 -263
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/behavior.d.ts +1 -1
- package/dist/modules/browser.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/core.js +2 -0
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/i18n.d.ts +17 -0
- package/dist/modules/i18n.js +22 -0
- package/dist/modules/index.d.ts +2 -1
- package/dist/modules/index.js +24 -1
- package/dist/modules/integration.d.ts +1 -1
- package/dist/modules/json.d.ts +1 -1
- package/dist/modules/llm.d.ts +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/memory.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/session.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/trace.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/modules/workspace.d.ts +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/dist/registry.d.ts +10 -3
- package/dist/registry.js +31 -1
- package/dist/{types-DLx38UFZ.d.ts → types-Cdb321uM.d.ts} +9 -3
- package/i18n/ar.json +1 -0
- package/i18n/en.json +1 -0
- package/i18n/sl.json +1 -0
- package/package.json +3 -3
|
@@ -587,6 +587,11 @@ orbital BoardOrbital {
|
|
|
587
587
|
@label "Group-by field"
|
|
588
588
|
@description "Entity field whose value matches a column key — items are filtered into columns by it. Default 'stage'; set to 'status' (or any field) for entities that track state under a different name."
|
|
589
589
|
@tier "presentation"
|
|
590
|
+
addPlacement : "floating" | "inline" = floating
|
|
591
|
+
@label "Add button placement"
|
|
592
|
+
@description "Where the add-item button sits: 'floating' (default) pins a floating action button to the screen corner; 'inline' renders an ordinary Add button above the columns, for a board embedded in a card or panel."
|
|
593
|
+
@synonyms "add button position, floating add, inline add, add item button placement. user phrases: 'put the add button inside the board' / 'no floating button' -> inline"
|
|
594
|
+
@tier "presentation"
|
|
590
595
|
boardLook : "columns" | "kanban-classic" = columns
|
|
591
596
|
@label "Board look"
|
|
592
597
|
@description "Layer 3 body layout: default N-column data-grid ('columns'), or a Trello-style wide-column kanban with sticky column headers ('kanban-classic')."
|
|
@@ -647,7 +652,24 @@ orbital BoardOrbital {
|
|
|
647
652
|
@description "Actions row of the open-card panel. Default is the Delete button only. Override to add consumer-wired actions — e.g. an Edit button with action: EDIT_CARD and actionPayload: { id: @entity.currentId, row: @entity.currentRow }, listened to by the organism's edit modal. Never leave a button here without a listener."
|
|
648
653
|
@tier "presentation"
|
|
649
654
|
bodyContent : render-ui = {
|
|
650
|
-
children: [(if @config.
|
|
655
|
+
children: [(if ["=", @config.addPlacement, "inline"] {
|
|
656
|
+
children: [{
|
|
657
|
+
action: ADD_CARD
|
|
658
|
+
icon: plus
|
|
659
|
+
label: "Add item"
|
|
660
|
+
size: sm
|
|
661
|
+
type: button
|
|
662
|
+
variant: secondary
|
|
663
|
+
}]
|
|
664
|
+
direction: horizontal
|
|
665
|
+
gap: sm
|
|
666
|
+
justify: end
|
|
667
|
+
type: stack
|
|
668
|
+
} {
|
|
669
|
+
children: []
|
|
670
|
+
gap: none
|
|
671
|
+
type: stack
|
|
672
|
+
}), (if @config.showHeader {
|
|
651
673
|
children: [{
|
|
652
674
|
align: center
|
|
653
675
|
children: [{ name: kanban-square, size: lg, type: icon }, {
|
|
@@ -770,13 +792,17 @@ orbital BoardOrbital {
|
|
|
770
792
|
type: card
|
|
771
793
|
})
|
|
772
794
|
type: data-grid
|
|
773
|
-
}, {
|
|
795
|
+
}, (if ["=", @config.addPlacement, "floating"] {
|
|
774
796
|
action: ADD_CARD
|
|
775
797
|
icon: plus
|
|
776
798
|
label: "Add item"
|
|
777
799
|
type: floating-action-button
|
|
778
800
|
variant: primary
|
|
779
|
-
}
|
|
801
|
+
} {
|
|
802
|
+
children: []
|
|
803
|
+
gap: none
|
|
804
|
+
type: stack
|
|
805
|
+
})]
|
|
780
806
|
direction: vertical
|
|
781
807
|
gap: md
|
|
782
808
|
type: stack
|
|
@@ -785,7 +811,24 @@ orbital BoardOrbital {
|
|
|
785
811
|
@description "Render-ui SExpr rendered after the board loads for boardLook='columns' — the canonical column data-grid with nested per-column data-lists. boardLook='kanban-classic' renders kanbanClassicBodyContent instead; both share this trait's state machine, emits, and listens."
|
|
786
812
|
@tier "internal"
|
|
787
813
|
kanbanClassicBodyContent : render-ui = {
|
|
788
|
-
children: [(if @config.
|
|
814
|
+
children: [(if ["=", @config.addPlacement, "inline"] {
|
|
815
|
+
children: [{
|
|
816
|
+
action: ADD_CARD
|
|
817
|
+
icon: plus
|
|
818
|
+
label: "Add card"
|
|
819
|
+
size: sm
|
|
820
|
+
type: button
|
|
821
|
+
variant: secondary
|
|
822
|
+
}]
|
|
823
|
+
direction: horizontal
|
|
824
|
+
gap: sm
|
|
825
|
+
justify: end
|
|
826
|
+
type: stack
|
|
827
|
+
} {
|
|
828
|
+
children: []
|
|
829
|
+
gap: none
|
|
830
|
+
type: stack
|
|
831
|
+
}), (if @config.showHeader {
|
|
789
832
|
children: [{
|
|
790
833
|
align: center
|
|
791
834
|
children: [{ name: kanban-square, size: xl, type: icon }, {
|
|
@@ -931,13 +974,17 @@ orbital BoardOrbital {
|
|
|
931
974
|
})
|
|
932
975
|
scrollX: true
|
|
933
976
|
type: data-grid
|
|
934
|
-
}, {
|
|
977
|
+
}, (if ["=", @config.addPlacement, "floating"] {
|
|
935
978
|
action: ADD_CARD
|
|
936
979
|
icon: plus
|
|
937
980
|
label: "Add card"
|
|
938
981
|
type: floating-action-button
|
|
939
982
|
variant: primary
|
|
940
|
-
}
|
|
983
|
+
} {
|
|
984
|
+
children: []
|
|
985
|
+
gap: none
|
|
986
|
+
type: stack
|
|
987
|
+
})]
|
|
941
988
|
className: h-full
|
|
942
989
|
direction: vertical
|
|
943
990
|
gap: md
|
|
@@ -17,8 +17,16 @@ orbital BookReaderOrbital {
|
|
|
17
17
|
initial: cover
|
|
18
18
|
|
|
19
19
|
state cover {
|
|
20
|
-
INIT -> cover
|
|
20
|
+
INIT -> cover when (== @config.opensAt "cover")
|
|
21
21
|
(render-ui main @config.coverContent)
|
|
22
|
+
INIT -> reading when (== @config.opensAt "reading")
|
|
23
|
+
(set @entity.chapterIndex 0)
|
|
24
|
+
(set @entity.chapterTitle (object/get (array/nth @config.chapters 0) title ""))
|
|
25
|
+
(set @entity.chapterContent (object/get (array/nth @config.chapters 0) content ""))
|
|
26
|
+
(set @entity.isFirst true)
|
|
27
|
+
(set @entity.isLast (<= (array/len @config.chapters) 1))
|
|
28
|
+
(set @entity.progressLabel (str/concat "1 / " (array/len @config.chapters)))
|
|
29
|
+
(render-ui main @config.readingContent)
|
|
22
30
|
START_READING -> reading
|
|
23
31
|
(set @entity.chapterIndex 0)
|
|
24
32
|
(set @entity.chapterTitle (object/get (array/nth @config.chapters 0) title ""))
|
|
@@ -92,6 +100,10 @@ orbital BookReaderOrbital {
|
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
config {
|
|
103
|
+
opensAt : "cover" | "reading" = "cover"
|
|
104
|
+
@label "Opens at"
|
|
105
|
+
@description "Where the reader opens: the cover, or straight into the first chapter (an article read in place)"
|
|
106
|
+
@tier "presentation"
|
|
95
107
|
title : string = "Untitled book"
|
|
96
108
|
@label "Title"
|
|
97
109
|
@tier "presentation"
|
|
@@ -236,6 +248,18 @@ orbital BookReaderOrbital {
|
|
|
236
248
|
align: start
|
|
237
249
|
className: "lg:sticky lg:top-6 self-start"
|
|
238
250
|
children: [{
|
|
251
|
+
type: typography
|
|
252
|
+
content: @config.title
|
|
253
|
+
variant: h5
|
|
254
|
+
weight: semibold
|
|
255
|
+
className: "text-balance"
|
|
256
|
+
}, {
|
|
257
|
+
type: typography
|
|
258
|
+
content: @config.author
|
|
259
|
+
variant: caption
|
|
260
|
+
color: muted
|
|
261
|
+
className: (if (== @config.author "") hidden "pb-2")
|
|
262
|
+
}, {
|
|
239
263
|
type: button
|
|
240
264
|
variant: link
|
|
241
265
|
label: @config.coverLabel
|
|
@@ -85,6 +85,15 @@ orbital CardGridOrbital {
|
|
|
85
85
|
variant: h4
|
|
86
86
|
weight: semibold
|
|
87
87
|
align: (if (== @config.look profile) center left)
|
|
88
|
+
className: (if (== (object/get @item href "") "") "" hidden)
|
|
89
|
+
}, {
|
|
90
|
+
type: button
|
|
91
|
+
label: (object/get @item title "")
|
|
92
|
+
href: (object/get @item href "")
|
|
93
|
+
variant: link
|
|
94
|
+
action: CARD_OPEN
|
|
95
|
+
actionPayload: { href: (object/get @item href ""), title: (object/get @item title "") }
|
|
96
|
+
className: (if (== (object/get @item href "") "") hidden "text-lg font-semibold text-foreground whitespace-normal text-start")
|
|
88
97
|
}, {
|
|
89
98
|
type: typography
|
|
90
99
|
content: (object/get @item meta "")
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
app std-doc-page "1.0.0"
|
|
2
|
+
"std-doc-page — one page of a documentation site: a section sidebar with the current page marked, a breadcrumb, the page title and lede, an \"on this page\" contents list, the page's own content (a render slot the call site fills, live behaviors included) and previous/next links. Supports right-to-left pages. Pick for docs sites, handbooks, reference manuals and knowledge bases."
|
|
3
|
+
type DocNavItem = { label : string!, href : string, items : [DocNavItem], active : boolean }
|
|
4
|
+
type DocCrumb = { label : string!, href : string }
|
|
5
|
+
type DocTocEntry = { id : string!, label : string!, level : number! }
|
|
6
|
+
type DocLink = { label : string!, href : string!, category : string }
|
|
7
|
+
orbital DocPageOrbital {
|
|
8
|
+
|
|
9
|
+
entity DocPageView [runtime] {
|
|
10
|
+
id : string!
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
trait DocPageRender -> @rebindable DocPageView [interaction, instance] {
|
|
14
|
+
initial: idle
|
|
15
|
+
|
|
16
|
+
state idle {
|
|
17
|
+
INIT -> idle
|
|
18
|
+
(render-ui main {
|
|
19
|
+
type: box
|
|
20
|
+
paddingY: lg
|
|
21
|
+
fullWidth: true
|
|
22
|
+
dir: @config.direction
|
|
23
|
+
children: [{
|
|
24
|
+
type: container
|
|
25
|
+
size: xl
|
|
26
|
+
maxWidth: xl
|
|
27
|
+
padding: lg
|
|
28
|
+
children: [{
|
|
29
|
+
type: split
|
|
30
|
+
ratio: "1:4"
|
|
31
|
+
gap: xl
|
|
32
|
+
children: [{
|
|
33
|
+
type: stack
|
|
34
|
+
direction: vertical
|
|
35
|
+
gap: sm
|
|
36
|
+
className: "lg:sticky lg:top-6 self-start"
|
|
37
|
+
children: [{
|
|
38
|
+
type: typography
|
|
39
|
+
content: @config.sidebarLabel
|
|
40
|
+
variant: label
|
|
41
|
+
weight: semibold
|
|
42
|
+
className: (if (== @config.sidebarLabel "") hidden "px-3")
|
|
43
|
+
}, {
|
|
44
|
+
type: doc-sidebar
|
|
45
|
+
items: @config.navItems
|
|
46
|
+
aria-label: @config.sidebarLabel
|
|
47
|
+
}]
|
|
48
|
+
}, {
|
|
49
|
+
type: stack
|
|
50
|
+
direction: vertical
|
|
51
|
+
gap: lg
|
|
52
|
+
className: "min-w-0"
|
|
53
|
+
children: [{
|
|
54
|
+
type: doc-breadcrumb
|
|
55
|
+
items: @config.crumbs
|
|
56
|
+
className: (if (== (array/len @config.crumbs) 0) hidden "")
|
|
57
|
+
}, {
|
|
58
|
+
type: stack
|
|
59
|
+
direction: vertical
|
|
60
|
+
gap: sm
|
|
61
|
+
children: [{
|
|
62
|
+
type: typography
|
|
63
|
+
content: @config.title
|
|
64
|
+
variant: h1
|
|
65
|
+
weight: bold
|
|
66
|
+
className: "tracking-tight text-balance"
|
|
67
|
+
}, {
|
|
68
|
+
type: typography
|
|
69
|
+
content: @config.lede
|
|
70
|
+
variant: large
|
|
71
|
+
color: muted
|
|
72
|
+
className: (if (== @config.lede "") hidden "max-w-3xl text-pretty")
|
|
73
|
+
}]
|
|
74
|
+
}, {
|
|
75
|
+
type: box
|
|
76
|
+
bg: muted
|
|
77
|
+
padding: md
|
|
78
|
+
rounded: lg
|
|
79
|
+
className: (if (== (array/len @config.toc) 0) hidden "")
|
|
80
|
+
children: [{
|
|
81
|
+
type: stack
|
|
82
|
+
direction: vertical
|
|
83
|
+
gap: xs
|
|
84
|
+
children: [{
|
|
85
|
+
type: typography
|
|
86
|
+
content: @config.tocLabel
|
|
87
|
+
variant: label
|
|
88
|
+
weight: semibold
|
|
89
|
+
}, {
|
|
90
|
+
type: doc-toc
|
|
91
|
+
items: @config.toc
|
|
92
|
+
aria-label: @config.tocLabel
|
|
93
|
+
}]
|
|
94
|
+
}]
|
|
95
|
+
}, @config.content, {
|
|
96
|
+
type: divider
|
|
97
|
+
}, {
|
|
98
|
+
type: doc-pagination
|
|
99
|
+
prev: (if (== (object/get @config.prev href "") "") null @config.prev)
|
|
100
|
+
next: (if (== (object/get @config.next href "") "") null @config.next)
|
|
101
|
+
}]
|
|
102
|
+
}]
|
|
103
|
+
}]
|
|
104
|
+
}]
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
config {
|
|
109
|
+
title : string = "Untitled page"
|
|
110
|
+
@label "Title"
|
|
111
|
+
@tier "presentation"
|
|
112
|
+
lede : string = ""
|
|
113
|
+
@label "Lede"
|
|
114
|
+
@description "One or two sentences under the title; empty hides it"
|
|
115
|
+
@tier "presentation"
|
|
116
|
+
content : render-ui = { type: stack, direction: vertical, gap: lg, children: [] }
|
|
117
|
+
@label "Content"
|
|
118
|
+
@description "The page body: markdown, code and live behaviors (trait references) in reading order"
|
|
119
|
+
@tier "presentation"
|
|
120
|
+
navItems : [DocNavItem] = []
|
|
121
|
+
@label "Sidebar"
|
|
122
|
+
@description "The documentation tree; mark the current page active"
|
|
123
|
+
@tier "presentation"
|
|
124
|
+
sidebarLabel : string = "Documentation"
|
|
125
|
+
@label "Sidebar label"
|
|
126
|
+
@tier "presentation"
|
|
127
|
+
crumbs : [DocCrumb] = []
|
|
128
|
+
@label "Breadcrumb"
|
|
129
|
+
@description "Ancestors first, the current page last without a link; empty hides it"
|
|
130
|
+
@tier "presentation"
|
|
131
|
+
toc : [DocTocEntry] = []
|
|
132
|
+
@label "On this page"
|
|
133
|
+
@description "Anchors of the page's sections (each section declares the same id); empty hides it"
|
|
134
|
+
@tier "presentation"
|
|
135
|
+
tocLabel : string = "On this page"
|
|
136
|
+
@label "Contents label"
|
|
137
|
+
@tier "presentation"
|
|
138
|
+
prev : DocLink = { label: "", href: "" }
|
|
139
|
+
@label "Previous page"
|
|
140
|
+
@description "Empty href hides it"
|
|
141
|
+
@tier "presentation"
|
|
142
|
+
next : DocLink = { label: "", href: "" }
|
|
143
|
+
@label "Next page"
|
|
144
|
+
@description "Empty href hides it"
|
|
145
|
+
@tier "presentation"
|
|
146
|
+
direction : "ltr" | "rtl" = "ltr"
|
|
147
|
+
@label "Direction"
|
|
148
|
+
@tier "presentation"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
page "/doc" as DocPage -> DocPageRender
|
|
153
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
app std-site-header "1.0.0"
|
|
2
|
-
"std-site-header — the sticky top bar of a public website: brand (logo + name), navigation links with the current page marked (a link with children opens a dropdown), an optional language picker (std-language-picker: the same page in each language, default language at the root and the others under /<code>/), and an optional call-to-action button. On small screens the links fold into a menu opened by a toggle, with child links indented under their parent and the call-to-action button at the bottom. Links follow `href` (in-app path, #anchor, or absolute URL); the header action and the small-screen menu links also emit NAV_CLICKED { href, label }. Pick for marketing sites, docs portals and product websites; for signed-in app chrome use std-app-layout."
|
|
2
|
+
"std-site-header — the sticky top bar of a public website: brand (logo + name, linking home when `homeHref` is set), navigation links with the current page marked (a link with children opens a dropdown), an optional light/dark toggle, an optional language picker (std-language-picker: the same page in each language, default language at the root and the others under /<code>/), and an optional call-to-action button. On small screens the links fold into a menu opened by a toggle, with child links indented under their parent and the call-to-action button at the bottom. Links follow `href` (in-app path, #anchor, or absolute URL); the header action and the small-screen menu links also emit NAV_CLICKED { href, label }. Pick for marketing sites, docs portals and product websites; for signed-in app chrome use std-app-layout."
|
|
3
3
|
type SiteNavLink = { label : string!, href : string!, children : [SiteNavLink] }
|
|
4
4
|
type SiteLanguage = { code : string!, label : string!, href : string! }
|
|
5
5
|
orbital SiteHeaderOrbital {
|
|
@@ -54,6 +54,11 @@ orbital SiteHeaderOrbital {
|
|
|
54
54
|
@label "Logo image"
|
|
55
55
|
@description "Logo URL; empty shows the name only"
|
|
56
56
|
@tier "presentation"
|
|
57
|
+
homeHref : string = ""
|
|
58
|
+
@label "Home link"
|
|
59
|
+
@description "Where the brand (logo + name) links to, usually the site's home page; empty leaves the brand unlinked"
|
|
60
|
+
@synonyms "logo link, home page, brand link"
|
|
61
|
+
@tier "presentation"
|
|
57
62
|
links : [SiteNavLink] = [{ label: "Features", href: "/features" }, { label: "Pricing", href: "/pricing" }, { label: "About", href: "/about" }]
|
|
58
63
|
@label "Navigation links"
|
|
59
64
|
@synonyms "menu, nav items, top navigation"
|
|
@@ -67,6 +72,11 @@ orbital SiteHeaderOrbital {
|
|
|
67
72
|
@description "Every language this page exists in, each named in its own language, with the href of THIS page in that language (default language at the root, others under /<code>/). Empty hides the language picker."
|
|
68
73
|
@synonyms "locales, translations, language switcher, i18n"
|
|
69
74
|
@tier "presentation"
|
|
75
|
+
showThemeToggle : boolean = false
|
|
76
|
+
@label "Light/dark toggle"
|
|
77
|
+
@description "Show a button that switches the site between its light and dark mode"
|
|
78
|
+
@synonyms "dark mode, theme switch, color mode"
|
|
79
|
+
@tier "presentation"
|
|
70
80
|
currentLanguage : string = "en"
|
|
71
81
|
@label "Current language"
|
|
72
82
|
@description "The code of the language this page is in"
|
|
@@ -92,6 +102,7 @@ orbital SiteHeaderOrbital {
|
|
|
92
102
|
showMenuToggle: false
|
|
93
103
|
brandName: @config.brandName
|
|
94
104
|
logoSrc: @config.logoSrc
|
|
105
|
+
brandHref: @config.homeHref
|
|
95
106
|
className: "hidden lg:flex"
|
|
96
107
|
navigationItems: (array/map @config.links (fn entry {
|
|
97
108
|
label: (object/get @entry label "")
|
|
@@ -103,7 +114,7 @@ orbital SiteHeaderOrbital {
|
|
|
103
114
|
active: (== (object/get @child href "") @config.currentPath)
|
|
104
115
|
}))
|
|
105
116
|
}))
|
|
106
|
-
actions: [@trait.SiteHeaderLanguages, {
|
|
117
|
+
actions: [@trait.SiteHeaderLanguages, { type: theme-toggle, size: sm, className: (if @config.showThemeToggle "" hidden) }, {
|
|
107
118
|
type: button
|
|
108
119
|
label: @config.actionLabel
|
|
109
120
|
href: @config.actionHref
|
|
@@ -122,8 +133,9 @@ orbital SiteHeaderOrbital {
|
|
|
122
133
|
onMenuToggle: MENU_TOGGLE
|
|
123
134
|
brandName: @config.brandName
|
|
124
135
|
logoSrc: @config.logoSrc
|
|
136
|
+
brandHref: @config.homeHref
|
|
125
137
|
className: "lg:hidden"
|
|
126
|
-
actions: [@trait.SiteHeaderLanguages]
|
|
138
|
+
actions: [@trait.SiteHeaderLanguages, { type: theme-toggle, size: sm, className: (if @config.showThemeToggle "" hidden) }]
|
|
127
139
|
}, {
|
|
128
140
|
type: stack
|
|
129
141
|
direction: vertical
|
|
@@ -19,9 +19,9 @@ orbital TagStripOrbital {
|
|
|
19
19
|
createdAt : string = ""
|
|
20
20
|
pendingId : string = ""
|
|
21
21
|
docId : string @intrinsic @description "The open record's id, stashed at SHOW_TAG_STRIP so commits know which row to update." @synonyms "record id, scope id" = ""
|
|
22
|
-
docTagIds : [string] @intrinsic @description "The open record's current tag ids, stashed at SHOW_TAG_STRIP for membership tests." @synonyms "attached tags, current tags"
|
|
22
|
+
docTagIds : [string] @intrinsic @description "The open record's current tag ids, stashed at SHOW_TAG_STRIP for membership tests." @synonyms "attached tags, current tags" = []
|
|
23
23
|
pendingTagName : string @intrinsic @description "The tag name typed or clicked on add, held across the resolve fetch." @synonyms "typed tag, adding tag" = ""
|
|
24
|
-
pendingNames : [string] @intrinsic @description "The chip names remaining after a remove, held across the resolve fetch." @synonyms "remaining tags, kept names"
|
|
24
|
+
pendingNames : [string] @intrinsic @description "The chip names remaining after a remove, held across the resolve fetch." @synonyms "remaining tags, kept names" = []
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
trait TagStrip -> @rebindable StripTag [interaction, collection] {
|
|
@@ -5,7 +5,7 @@ orbital TagTaxonomyOrbital {
|
|
|
5
5
|
|
|
6
6
|
type TagLoadFailed = Event { error : string, code : string } "Fired when the tag collection fails to load"
|
|
7
7
|
|
|
8
|
-
type TagSelected = Event { tagId :
|
|
8
|
+
type TagSelected = Event { tagId : Tag.id! } "Fired when a tag is selected to drill into its children"
|
|
9
9
|
|
|
10
10
|
type TagCreated = Event Tag "Fired after a new tag row persists — the payload IS the created row (flat: ?id, ?name, ?parentId)"
|
|
11
11
|
|
|
@@ -476,7 +476,7 @@ orbital TagTaxonomyOrbital {
|
|
|
476
476
|
|
|
477
477
|
emits {
|
|
478
478
|
SELECT_TAG {
|
|
479
|
-
tagId :
|
|
479
|
+
tagId : Tag.id!
|
|
480
480
|
}
|
|
481
481
|
@description "Signals a tag has been chosen for navigation."
|
|
482
482
|
@synonyms "choose, pick, activate, navigate"
|
|
@@ -495,7 +495,7 @@ orbital TagTaxonomyOrbital {
|
|
|
495
495
|
@synonyms "error, failed, problem, issue"
|
|
496
496
|
@tier "internal"
|
|
497
497
|
TagSelected {
|
|
498
|
-
tagId :
|
|
498
|
+
tagId : Tag.id!
|
|
499
499
|
}
|
|
500
500
|
@description "Signals a tag has been chosen for further exploration."
|
|
501
501
|
@synonyms "chosen, picked, activated, highlighted"
|
|
@@ -512,7 +512,7 @@ orbital TagTaxonomyOrbital {
|
|
|
512
512
|
@synonyms "cancel, back"
|
|
513
513
|
@tier "internal"
|
|
514
514
|
LEVEL_RELOAD {
|
|
515
|
-
tagId :
|
|
515
|
+
tagId : Tag.id
|
|
516
516
|
}
|
|
517
517
|
@description "Internal hop that refetches the open level after the new-category form closes (a fetch filter cannot read trait state, so the level travels by payload)."
|
|
518
518
|
@synonyms "reload level, refresh"
|
|
@@ -532,7 +532,7 @@ orbital TagTaxonomyOrbital {
|
|
|
532
532
|
|
|
533
533
|
listens {
|
|
534
534
|
SELECT_TAG {
|
|
535
|
-
tagId :
|
|
535
|
+
tagId : Tag.id!
|
|
536
536
|
}
|
|
537
537
|
@description "A tag in the taxonomy was selected for navigation."
|
|
538
538
|
@synonyms "choose, pick, activate, navigate"
|
|
@@ -551,7 +551,7 @@ orbital TagTaxonomyOrbital {
|
|
|
551
551
|
@synonyms "error, failure, load failed"
|
|
552
552
|
@tier "internal"
|
|
553
553
|
TagSelected {
|
|
554
|
-
tagId :
|
|
554
|
+
tagId : Tag.id!
|
|
555
555
|
}
|
|
556
556
|
@description "A tag in the taxonomy has been chosen by the user."
|
|
557
557
|
@synonyms "chosen, picked, activated, selected"
|
|
@@ -571,7 +571,7 @@ orbital TagTaxonomyOrbital {
|
|
|
571
571
|
@synonyms "cancel, back"
|
|
572
572
|
@tier "internal"
|
|
573
573
|
LEVEL_RELOAD {
|
|
574
|
-
tagId :
|
|
574
|
+
tagId : Tag.id
|
|
575
575
|
}
|
|
576
576
|
@description "Refetch the open level."
|
|
577
577
|
@synonyms "reload level, refresh"
|
|
@@ -50,6 +50,7 @@ orbital HeaderOrbital {
|
|
|
50
50
|
variant: @config.variant
|
|
51
51
|
look: @config.look
|
|
52
52
|
onLogoClick: @config.onLogoClick
|
|
53
|
+
brandHref: @config.brandHref
|
|
53
54
|
className: @config.className
|
|
54
55
|
isLoading: @config.isLoading
|
|
55
56
|
error: @config.error
|
|
@@ -164,6 +165,10 @@ orbital HeaderOrbital {
|
|
|
164
165
|
@label "On Logo Click"
|
|
165
166
|
@description "Callback when logo/brand is clicked"
|
|
166
167
|
@tier "presentation"
|
|
168
|
+
brandHref : string
|
|
169
|
+
@label "Brand Href"
|
|
170
|
+
@description "Where the brand (logo + name) links to, usually the home page; empty leaves it unlinked"
|
|
171
|
+
@tier "presentation"
|
|
167
172
|
className : string
|
|
168
173
|
@label "Class Name"
|
|
169
174
|
@description "Additional CSS classes"
|