@cssints/apg-specs 0.0.0-stage → 0.5.1
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/LICENSE +21 -0
- package/README.md +65 -2
- package/dist/apg/accordion.bridge.d.mts +35 -0
- package/dist/apg/accordion.bridge.mjs +326 -0
- package/dist/apg/accordion.model.json +8397 -0
- package/dist/apg/alert.bridge.d.mts +22 -0
- package/dist/apg/alert.bridge.mjs +86 -0
- package/dist/apg/alert.model.json +871 -0
- package/dist/apg/alertdialog.bridge.d.mts +21 -0
- package/dist/apg/alertdialog.bridge.mjs +221 -0
- package/dist/apg/alertdialog.model.json +5232 -0
- package/dist/apg/breadcrumb.bridge.d.mts +26 -0
- package/dist/apg/breadcrumb.bridge.mjs +120 -0
- package/dist/apg/breadcrumb.model.json +574 -0
- package/dist/apg/button.bridge.d.mts +35 -0
- package/dist/apg/button.bridge.mjs +208 -0
- package/dist/apg/button.model.json +5814 -0
- package/dist/apg/carousel.bridge.d.mts +44 -0
- package/dist/apg/carousel.bridge.mjs +262 -0
- package/dist/apg/carousel.model.json +8963 -0
- package/dist/apg/checkbox-group.bridge.d.mts +25 -0
- package/dist/apg/checkbox-group.bridge.mjs +276 -0
- package/dist/apg/checkbox-group.model.json +3863 -0
- package/dist/apg/checkbox.bridge.d.mts +34 -0
- package/dist/apg/checkbox.bridge.mjs +253 -0
- package/dist/apg/checkbox.model.json +3158 -0
- package/dist/apg/combobox-autocomplete.bridge.d.mts +14 -0
- package/dist/apg/combobox-autocomplete.bridge.mjs +326 -0
- package/dist/apg/combobox-autocomplete.model.json +11586 -0
- package/dist/apg/combobox-dialog.bridge.d.mts +17 -0
- package/dist/apg/combobox-dialog.bridge.mjs +250 -0
- package/dist/apg/combobox-dialog.model.json +8981 -0
- package/dist/apg/combobox-grid.bridge.d.mts +17 -0
- package/dist/apg/combobox-grid.bridge.mjs +227 -0
- package/dist/apg/combobox-grid.model.json +8554 -0
- package/dist/apg/combobox-select-only.bridge.d.mts +24 -0
- package/dist/apg/combobox-select-only.bridge.mjs +304 -0
- package/dist/apg/combobox-select-only.model.json +7846 -0
- package/dist/apg/combobox-tree.bridge.d.mts +17 -0
- package/dist/apg/combobox-tree.bridge.mjs +211 -0
- package/dist/apg/combobox-tree.model.json +9345 -0
- package/dist/apg/dialog-modal.bridge.d.mts +35 -0
- package/dist/apg/dialog-modal.bridge.mjs +186 -0
- package/dist/apg/dialog-modal.model.json +7580 -0
- package/dist/apg/disclosure.bridge.d.mts +25 -0
- package/dist/apg/disclosure.bridge.mjs +202 -0
- package/dist/apg/disclosure.model.json +4703 -0
- package/dist/apg/feed.bridge.d.mts +31 -0
- package/dist/apg/feed.bridge.mjs +246 -0
- package/dist/apg/feed.model.json +4523 -0
- package/dist/apg/grid-selection.bridge.d.mts +13 -0
- package/dist/apg/grid-selection.bridge.mjs +160 -0
- package/dist/apg/grid-selection.model.json +6974 -0
- package/dist/apg/grid-sort.bridge.d.mts +12 -0
- package/dist/apg/grid-sort.bridge.mjs +138 -0
- package/dist/apg/grid-sort.model.json +3799 -0
- package/dist/apg/grid.bridge.d.mts +54 -0
- package/dist/apg/grid.bridge.mjs +441 -0
- package/dist/apg/grid.model.json +3802 -0
- package/dist/apg/link.bridge.d.mts +24 -0
- package/dist/apg/link.bridge.mjs +126 -0
- package/dist/apg/link.model.json +694 -0
- package/dist/apg/listbox-multi.bridge.d.mts +10 -0
- package/dist/apg/listbox-multi.bridge.mjs +261 -0
- package/dist/apg/listbox-multi.model.json +10893 -0
- package/dist/apg/listbox-rearrangeable.bridge.d.mts +20 -0
- package/dist/apg/listbox-rearrangeable.bridge.mjs +237 -0
- package/dist/apg/listbox-rearrangeable.model.json +17592 -0
- package/dist/apg/listbox-shared.d.mts +58 -0
- package/dist/apg/listbox-shared.mjs +171 -0
- package/dist/apg/listbox-single.bridge.d.mts +10 -0
- package/dist/apg/listbox-single.bridge.mjs +196 -0
- package/dist/apg/listbox-single.model.json +8024 -0
- package/dist/apg/listbox-typeahead.bridge.d.mts +10 -0
- package/dist/apg/listbox-typeahead.bridge.mjs +153 -0
- package/dist/apg/listbox-typeahead.model.json +5615 -0
- package/dist/apg/menu-button.bridge.d.mts +29 -0
- package/dist/apg/menu-button.bridge.mjs +259 -0
- package/dist/apg/menu-button.model.json +5706 -0
- package/dist/apg/menu-checkable.bridge.d.mts +25 -0
- package/dist/apg/menu-checkable.bridge.mjs +226 -0
- package/dist/apg/menu-checkable.model.json +4277 -0
- package/dist/apg/menu-menubar.bridge.d.mts +27 -0
- package/dist/apg/menu-menubar.bridge.mjs +273 -0
- package/dist/apg/menu-menubar.model.json +9540 -0
- package/dist/apg/meter.bridge.d.mts +28 -0
- package/dist/apg/meter.bridge.mjs +159 -0
- package/dist/apg/meter.model.json +1185 -0
- package/dist/apg/player.bridge.d.mts +24 -0
- package/dist/apg/player.bridge.mjs +342 -0
- package/dist/apg/player.model.json +11013 -0
- package/dist/apg/radio.bridge.d.mts +35 -0
- package/dist/apg/radio.bridge.mjs +371 -0
- package/dist/apg/radio.model.json +5011 -0
- package/dist/apg/slider-multithumb.bridge.d.mts +34 -0
- package/dist/apg/slider-multithumb.bridge.mjs +365 -0
- package/dist/apg/slider-multithumb.model.json +5774 -0
- package/dist/apg/slider.bridge.d.mts +54 -0
- package/dist/apg/slider.bridge.mjs +359 -0
- package/dist/apg/slider.model.json +4881 -0
- package/dist/apg/spinbutton.bridge.d.mts +41 -0
- package/dist/apg/spinbutton.bridge.mjs +327 -0
- package/dist/apg/spinbutton.model.json +7571 -0
- package/dist/apg/switch.bridge.d.mts +30 -0
- package/dist/apg/switch.bridge.mjs +243 -0
- package/dist/apg/switch.model.json +3159 -0
- package/dist/apg/tabs.bridge.d.mts +41 -0
- package/dist/apg/tabs.bridge.mjs +294 -0
- package/dist/apg/tabs.model.json +7659 -0
- package/dist/apg/timeline.bridge.d.mts +36 -0
- package/dist/apg/timeline.bridge.mjs +265 -0
- package/dist/apg/timeline.model.json +6189 -0
- package/dist/apg/toolbar.bridge.d.mts +25 -0
- package/dist/apg/toolbar.bridge.mjs +307 -0
- package/dist/apg/toolbar.model.json +6616 -0
- package/dist/apg/tooltip.bridge.d.mts +36 -0
- package/dist/apg/tooltip.bridge.mjs +208 -0
- package/dist/apg/tooltip.model.json +8295 -0
- package/dist/apg/treegrid.bridge.d.mts +28 -0
- package/dist/apg/treegrid.bridge.mjs +311 -0
- package/dist/apg/treegrid.model.json +17358 -0
- package/dist/apg/treeview.bridge.d.mts +26 -0
- package/dist/apg/treeview.bridge.mjs +396 -0
- package/dist/apg/treeview.model.json +13745 -0
- package/dist/apg/windowsplitter.bridge.d.mts +36 -0
- package/dist/apg/windowsplitter.bridge.mjs +242 -0
- package/dist/apg/windowsplitter.model.json +6253 -0
- package/dist/canvas/camera.model.json +6568 -0
- package/dist/canvas/canvas.bridge.d.mts +190 -0
- package/dist/canvas/canvas.bridge.mjs +729 -0
- package/dist/canvas/pointer.model.json +17095 -0
- package/dist/scenario.d.mts +233 -0
- package/dist/scenario.mjs +313 -0
- package/package.json +57 -4
- package/scenarios/apg/README.md +221 -0
- package/scenarios/apg/accordion.base-ui.json +1005 -0
- package/scenarios/apg/accordion.react-aria.json +929 -0
- package/scenarios/apg/alert.base-ui.json +81 -0
- package/scenarios/apg/alert.react-aria.json +98 -0
- package/scenarios/apg/alertdialog.base-ui.json +331 -0
- package/scenarios/apg/alertdialog.react-aria.json +225 -0
- package/scenarios/apg/breadcrumb.react-aria.json +312 -0
- package/scenarios/apg/button.ariakit.json +136 -0
- package/scenarios/apg/button.base-ui.json +747 -0
- package/scenarios/apg/button.react-aria.json +443 -0
- package/scenarios/apg/carousel.apg.json +909 -0
- package/scenarios/apg/checkbox.ariakit.json +299 -0
- package/scenarios/apg/checkbox.base-ui.json +1126 -0
- package/scenarios/apg/checkbox.react-aria.json +518 -0
- package/scenarios/apg/combobox.ariakit.json +945 -0
- package/scenarios/apg/combobox.base-ui.json +2444 -0
- package/scenarios/apg/combobox.react-aria.json +845 -0
- package/scenarios/apg/dialog-modal.ariakit.json +1102 -0
- package/scenarios/apg/dialog-modal.base-ui.json +775 -0
- package/scenarios/apg/dialog-modal.react-aria.json +638 -0
- package/scenarios/apg/disclosure.apg.json +349 -0
- package/scenarios/apg/disclosure.ariakit.json +163 -0
- package/scenarios/apg/disclosure.base-ui.json +451 -0
- package/scenarios/apg/disclosure.react-aria.json +643 -0
- package/scenarios/apg/feed.apg.json +442 -0
- package/scenarios/apg/grid.ariakit.json +197 -0
- package/scenarios/apg/grid.base-ui.json +720 -0
- package/scenarios/apg/grid.react-aria.json +969 -0
- package/scenarios/apg/landmarks.ariakit.json +93 -0
- package/scenarios/apg/landmarks.react-aria.json +330 -0
- package/scenarios/apg/link.ariakit.json +83 -0
- package/scenarios/apg/link.base-ui.json +88 -0
- package/scenarios/apg/link.react-aria.json +186 -0
- package/scenarios/apg/listbox.ariakit.json +78 -0
- package/scenarios/apg/listbox.base-ui.json +163 -0
- package/scenarios/apg/listbox.react-aria.json +1118 -0
- package/scenarios/apg/menu-button.ariakit.json +924 -0
- package/scenarios/apg/menu-button.base-ui.json +1155 -0
- package/scenarios/apg/menu-button.react-aria.json +1080 -0
- package/scenarios/apg/menubar.ariakit.json +758 -0
- package/scenarios/apg/menubar.base-ui.json +673 -0
- package/scenarios/apg/meter.base-ui.json +243 -0
- package/scenarios/apg/meter.react-aria.json +201 -0
- package/scenarios/apg/radio.ariakit.json +459 -0
- package/scenarios/apg/radio.base-ui.json +581 -0
- package/scenarios/apg/radio.react-aria.json +576 -0
- package/scenarios/apg/slider-multithumb.base-ui.json +316 -0
- package/scenarios/apg/slider-multithumb.react-aria.json +363 -0
- package/scenarios/apg/slider.base-ui.json +544 -0
- package/scenarios/apg/slider.react-aria.json +456 -0
- package/scenarios/apg/spinbutton.base-ui.json +1688 -0
- package/scenarios/apg/spinbutton.react-aria.json +426 -0
- package/scenarios/apg/switch.base-ui.json +456 -0
- package/scenarios/apg/switch.react-aria.json +303 -0
- package/scenarios/apg/table.ariakit.json +65 -0
- package/scenarios/apg/table.react-aria.json +221 -0
- package/scenarios/apg/tabs.ariakit.json +329 -0
- package/scenarios/apg/tabs.base-ui.json +875 -0
- package/scenarios/apg/tabs.react-aria.json +644 -0
- package/scenarios/apg/toolbar.ariakit.json +595 -0
- package/scenarios/apg/toolbar.base-ui.json +1189 -0
- package/scenarios/apg/toolbar.react-aria.json +383 -0
- package/scenarios/apg/tooltip.ariakit.json +441 -0
- package/scenarios/apg/tooltip.base-ui.json +411 -0
- package/scenarios/apg/tooltip.react-aria.json +454 -0
- package/scenarios/apg/treegrid.apg.json +2558 -0
- package/scenarios/apg/treegrid.react-aria.json +5094 -0
- package/scenarios/apg/treeview.apg.json +928 -0
- package/scenarios/apg/windowsplitter.apg.json +557 -0
- package/scenarios/canvas/README.md +69 -0
- package/scenarios/canvas/camera.contract.json +237 -0
- package/scenarios/canvas/camera.excalidraw.json +57 -0
- package/scenarios/canvas/marquee.excalidraw.json +122 -0
- package/scenarios/canvas/pan.excalidraw.json +46 -0
- package/scenarios/canvas/pointer.contract.json +528 -0
- package/scenarios/parts.json +291 -0
- package/shared/aria.qnt +186 -0
- package/shared/details-group.qnt +50 -0
- package/shared/focusgroup.qnt +152 -0
- package/shared/invokers.qnt +81 -0
- package/shared/popover.qnt +71 -0
- package/specs/apg/STATIC.md +103 -0
- package/specs/apg/accordion.qnt +578 -0
- package/specs/apg/alert.qnt +131 -0
- package/specs/apg/alertdialog.qnt +455 -0
- package/specs/apg/breadcrumb.qnt +88 -0
- package/specs/apg/button.qnt +445 -0
- package/specs/apg/carousel.qnt +732 -0
- package/specs/apg/checkbox-group.qnt +388 -0
- package/specs/apg/checkbox.qnt +394 -0
- package/specs/apg/combobox-autocomplete.qnt +764 -0
- package/specs/apg/combobox-dialog.qnt +627 -0
- package/specs/apg/combobox-grid.qnt +632 -0
- package/specs/apg/combobox-select-only.qnt +626 -0
- package/specs/apg/combobox-tree.qnt +633 -0
- package/specs/apg/dialog-modal.qnt +499 -0
- package/specs/apg/disclosure.qnt +309 -0
- package/specs/apg/feed.qnt +485 -0
- package/specs/apg/grid-selection.qnt +512 -0
- package/specs/apg/grid-sort.qnt +330 -0
- package/specs/apg/grid.qnt +360 -0
- package/specs/apg/link.qnt +119 -0
- package/specs/apg/listbox-multi.qnt +799 -0
- package/specs/apg/listbox-rearrangeable.qnt +801 -0
- package/specs/apg/listbox-single.qnt +511 -0
- package/specs/apg/listbox-typeahead.qnt +396 -0
- package/specs/apg/menu-button.qnt +363 -0
- package/specs/apg/menu-checkable.qnt +304 -0
- package/specs/apg/menu-menubar.qnt +531 -0
- package/specs/apg/meter.qnt +129 -0
- package/specs/apg/player.qnt +1081 -0
- package/specs/apg/radio.qnt +394 -0
- package/specs/apg/slider-multithumb.qnt +441 -0
- package/specs/apg/slider.qnt +396 -0
- package/specs/apg/spinbutton.qnt +494 -0
- package/specs/apg/switch.qnt +389 -0
- package/specs/apg/tabs.qnt +412 -0
- package/specs/apg/timeline.qnt +612 -0
- package/specs/apg/toolbar.qnt +364 -0
- package/specs/apg/tooltip.qnt +553 -0
- package/specs/apg/treegrid.qnt +983 -0
- package/specs/apg/treeview.qnt +1004 -0
- package/specs/apg/windowsplitter.qnt +487 -0
- package/specs/canvas/camera.qnt +407 -0
- package/specs/canvas/pointer.qnt +841 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accordion": {
|
|
3
|
+
"specs": ["accordion"],
|
|
4
|
+
"parts": {
|
|
5
|
+
"trigger": "header",
|
|
6
|
+
"panel": "content",
|
|
7
|
+
"heading": "heading"
|
|
8
|
+
},
|
|
9
|
+
"fixture": ["menu", "menuTrigger"]
|
|
10
|
+
},
|
|
11
|
+
"alert": {
|
|
12
|
+
"specs": ["alert"],
|
|
13
|
+
"parts": {
|
|
14
|
+
"alert": "alert",
|
|
15
|
+
"close": "dismiss"
|
|
16
|
+
},
|
|
17
|
+
"fixture": ["add", "add-high", "content", "region", "root", "toast"]
|
|
18
|
+
},
|
|
19
|
+
"alertdialog": {
|
|
20
|
+
"specs": ["alertdialog"],
|
|
21
|
+
"parts": {
|
|
22
|
+
"trigger": "discard",
|
|
23
|
+
"dialog": "alertdialog",
|
|
24
|
+
"cancel": "no",
|
|
25
|
+
"confirm": "yes"
|
|
26
|
+
},
|
|
27
|
+
"fixture": ["backdrop", "dismiss", "secondary"]
|
|
28
|
+
},
|
|
29
|
+
"breadcrumb": {
|
|
30
|
+
"specs": ["breadcrumb"],
|
|
31
|
+
"parts": {
|
|
32
|
+
"item": "item",
|
|
33
|
+
"link": "link",
|
|
34
|
+
"nav": null,
|
|
35
|
+
"breadcrumb": null
|
|
36
|
+
},
|
|
37
|
+
"fixture": []
|
|
38
|
+
},
|
|
39
|
+
"button": {
|
|
40
|
+
"specs": ["button"],
|
|
41
|
+
"parts": {
|
|
42
|
+
"button": "button",
|
|
43
|
+
"group": null,
|
|
44
|
+
"text": null
|
|
45
|
+
},
|
|
46
|
+
"fixture": []
|
|
47
|
+
},
|
|
48
|
+
"carousel": {
|
|
49
|
+
"specs": ["carousel"],
|
|
50
|
+
"parts": {
|
|
51
|
+
"carousel": null,
|
|
52
|
+
"rotation": "rotation",
|
|
53
|
+
"prev": "prev",
|
|
54
|
+
"next": "next",
|
|
55
|
+
"tab": "tab",
|
|
56
|
+
"slide": "slide"
|
|
57
|
+
},
|
|
58
|
+
"fixture": []
|
|
59
|
+
},
|
|
60
|
+
"checkbox": {
|
|
61
|
+
"specs": ["checkbox", "checkbox-group"],
|
|
62
|
+
"parts": {
|
|
63
|
+
"checkbox": "checkbox",
|
|
64
|
+
"group": null
|
|
65
|
+
},
|
|
66
|
+
"fixture": ["button", "input", "label"]
|
|
67
|
+
},
|
|
68
|
+
"combobox": {
|
|
69
|
+
"specs": [
|
|
70
|
+
"combobox-autocomplete",
|
|
71
|
+
"combobox-dialog",
|
|
72
|
+
"combobox-grid",
|
|
73
|
+
"combobox-select-only",
|
|
74
|
+
"combobox-tree"
|
|
75
|
+
],
|
|
76
|
+
"parts": {
|
|
77
|
+
"input": "input",
|
|
78
|
+
"trigger": "button",
|
|
79
|
+
"popup": "popup",
|
|
80
|
+
"option": "option",
|
|
81
|
+
"gridcell": "cell",
|
|
82
|
+
"treeitem": "node"
|
|
83
|
+
},
|
|
84
|
+
"fixture": ["body", "final-focus-button", "label", "next-button"]
|
|
85
|
+
},
|
|
86
|
+
"dialog-modal": {
|
|
87
|
+
"specs": ["dialog-modal"],
|
|
88
|
+
"parts": {
|
|
89
|
+
"trigger": "invoker",
|
|
90
|
+
"dialog": "dialog",
|
|
91
|
+
"backdrop": null
|
|
92
|
+
},
|
|
93
|
+
"fixture": "*"
|
|
94
|
+
},
|
|
95
|
+
"disclosure": {
|
|
96
|
+
"specs": ["disclosure"],
|
|
97
|
+
"parts": {
|
|
98
|
+
"trigger": "trigger",
|
|
99
|
+
"panel": "panel",
|
|
100
|
+
"heading": null
|
|
101
|
+
},
|
|
102
|
+
"fixture": ["disclosure"]
|
|
103
|
+
},
|
|
104
|
+
"feed": {
|
|
105
|
+
"specs": ["feed"],
|
|
106
|
+
"parts": {
|
|
107
|
+
"feed": "feed",
|
|
108
|
+
"article": "article",
|
|
109
|
+
"before-feed": "before",
|
|
110
|
+
"after-feed": "after"
|
|
111
|
+
},
|
|
112
|
+
"fixture": []
|
|
113
|
+
},
|
|
114
|
+
"grid": {
|
|
115
|
+
"specs": ["grid", "grid-selection", "grid-sort"],
|
|
116
|
+
"parts": {
|
|
117
|
+
"cell": "cell",
|
|
118
|
+
"row": "row",
|
|
119
|
+
"rowgroup": null,
|
|
120
|
+
"columnheader": "header"
|
|
121
|
+
},
|
|
122
|
+
"fixture": ["after", "body", "checkbox", "combobox", "dialog", "rowheader"]
|
|
123
|
+
},
|
|
124
|
+
"landmarks": {
|
|
125
|
+
"specs": [],
|
|
126
|
+
"parts": {
|
|
127
|
+
"main": null,
|
|
128
|
+
"navigation": null,
|
|
129
|
+
"region": null,
|
|
130
|
+
"button": null,
|
|
131
|
+
"link": null,
|
|
132
|
+
"listitem": null
|
|
133
|
+
},
|
|
134
|
+
"fixture": []
|
|
135
|
+
},
|
|
136
|
+
"link": {
|
|
137
|
+
"specs": ["link"],
|
|
138
|
+
"parts": {
|
|
139
|
+
"link": "link",
|
|
140
|
+
"button": null
|
|
141
|
+
},
|
|
142
|
+
"fixture": []
|
|
143
|
+
},
|
|
144
|
+
"listbox": {
|
|
145
|
+
"specs": [
|
|
146
|
+
"listbox-single",
|
|
147
|
+
"listbox-multi",
|
|
148
|
+
"listbox-typeahead",
|
|
149
|
+
"listbox-rearrangeable"
|
|
150
|
+
],
|
|
151
|
+
"parts": {
|
|
152
|
+
"listbox": "listbox",
|
|
153
|
+
"option": "option"
|
|
154
|
+
},
|
|
155
|
+
"fixture": ["trigger"]
|
|
156
|
+
},
|
|
157
|
+
"menu-button": {
|
|
158
|
+
"specs": ["menu-button", "menu-checkable"],
|
|
159
|
+
"parts": {
|
|
160
|
+
"trigger": "button",
|
|
161
|
+
"menu": "menu",
|
|
162
|
+
"menuitem": "item",
|
|
163
|
+
"submenu": null
|
|
164
|
+
},
|
|
165
|
+
"fixture": ["after", "body", "dialog", "dismiss", "group", "outside"]
|
|
166
|
+
},
|
|
167
|
+
"menubar": {
|
|
168
|
+
"specs": ["menu-menubar"],
|
|
169
|
+
"parts": {
|
|
170
|
+
"menubar": "menubar",
|
|
171
|
+
"menu": "menu",
|
|
172
|
+
"menuitem": "item",
|
|
173
|
+
"submenu": "submenu"
|
|
174
|
+
},
|
|
175
|
+
"fixture": ["body", "outside"]
|
|
176
|
+
},
|
|
177
|
+
"meter": {
|
|
178
|
+
"specs": ["meter"],
|
|
179
|
+
"parts": {
|
|
180
|
+
"meter": "meter"
|
|
181
|
+
},
|
|
182
|
+
"fixture": []
|
|
183
|
+
},
|
|
184
|
+
"radio": {
|
|
185
|
+
"specs": ["radio"],
|
|
186
|
+
"parts": {
|
|
187
|
+
"radiogroup": "radiogroup",
|
|
188
|
+
"radio": "radio"
|
|
189
|
+
},
|
|
190
|
+
"fixture": []
|
|
191
|
+
},
|
|
192
|
+
"slider": {
|
|
193
|
+
"specs": ["slider"],
|
|
194
|
+
"parts": {
|
|
195
|
+
"thumb": "thumb",
|
|
196
|
+
"track": "rail"
|
|
197
|
+
},
|
|
198
|
+
"fixture": ["body"]
|
|
199
|
+
},
|
|
200
|
+
"slider-multithumb": {
|
|
201
|
+
"specs": ["slider-multithumb"],
|
|
202
|
+
"parts": {
|
|
203
|
+
"thumb": "thumb",
|
|
204
|
+
"track": "rail"
|
|
205
|
+
},
|
|
206
|
+
"fixture": ["body"]
|
|
207
|
+
},
|
|
208
|
+
"spinbutton": {
|
|
209
|
+
"specs": ["spinbutton"],
|
|
210
|
+
"parts": {
|
|
211
|
+
"input": "input",
|
|
212
|
+
"increment": "increment",
|
|
213
|
+
"decrement": "decrement"
|
|
214
|
+
},
|
|
215
|
+
"fixture": ["description", "error", "group", "label"]
|
|
216
|
+
},
|
|
217
|
+
"switch": {
|
|
218
|
+
"specs": ["switch"],
|
|
219
|
+
"parts": {
|
|
220
|
+
"switch": "switch"
|
|
221
|
+
},
|
|
222
|
+
"fixture": ["button", "input", "label"]
|
|
223
|
+
},
|
|
224
|
+
"table": {
|
|
225
|
+
"specs": [],
|
|
226
|
+
"parts": {
|
|
227
|
+
"table": null,
|
|
228
|
+
"rowgroup": null,
|
|
229
|
+
"row": null,
|
|
230
|
+
"columnheader": null,
|
|
231
|
+
"rowheader": null,
|
|
232
|
+
"gridcell": null,
|
|
233
|
+
"caption": null,
|
|
234
|
+
"colindex-cell": null,
|
|
235
|
+
"colspan-cell": null
|
|
236
|
+
},
|
|
237
|
+
"fixture": []
|
|
238
|
+
},
|
|
239
|
+
"tabs": {
|
|
240
|
+
"specs": ["tabs"],
|
|
241
|
+
"parts": {
|
|
242
|
+
"tablist": "tablist",
|
|
243
|
+
"tab": "tab",
|
|
244
|
+
"tabpanel": "tabpanel"
|
|
245
|
+
},
|
|
246
|
+
"fixture": ["link"]
|
|
247
|
+
},
|
|
248
|
+
"toolbar": {
|
|
249
|
+
"specs": ["toolbar"],
|
|
250
|
+
"parts": {
|
|
251
|
+
"toolbar": "toolbar",
|
|
252
|
+
"item": "item"
|
|
253
|
+
},
|
|
254
|
+
"fixture": ["dialog", "menuitem", "option", "popup"]
|
|
255
|
+
},
|
|
256
|
+
"tooltip": {
|
|
257
|
+
"specs": ["tooltip"],
|
|
258
|
+
"parts": {
|
|
259
|
+
"trigger": "trigger",
|
|
260
|
+
"tooltip": "tooltip"
|
|
261
|
+
},
|
|
262
|
+
"fixture": []
|
|
263
|
+
},
|
|
264
|
+
"treegrid": {
|
|
265
|
+
"specs": ["treegrid"],
|
|
266
|
+
"parts": {
|
|
267
|
+
"treegrid": "grid",
|
|
268
|
+
"row": "row",
|
|
269
|
+
"cell": "cell",
|
|
270
|
+
"chevron": "expander"
|
|
271
|
+
},
|
|
272
|
+
"fixture": ["checkbox", "document", "info", "link", "menu"]
|
|
273
|
+
},
|
|
274
|
+
"treeview": {
|
|
275
|
+
"specs": ["treeview"],
|
|
276
|
+
"parts": {
|
|
277
|
+
"tree": "tree",
|
|
278
|
+
"treeitem": "node"
|
|
279
|
+
},
|
|
280
|
+
"fixture": []
|
|
281
|
+
},
|
|
282
|
+
"windowsplitter": {
|
|
283
|
+
"specs": ["windowsplitter"],
|
|
284
|
+
"parts": {
|
|
285
|
+
"separator": "splitter",
|
|
286
|
+
"primary": "primary",
|
|
287
|
+
"secondary": "secondary"
|
|
288
|
+
},
|
|
289
|
+
"fixture": []
|
|
290
|
+
}
|
|
291
|
+
}
|
package/shared/aria.qnt
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// shared/aria.qnt — the ARIA vocabulary the APG pattern specs used to copy: the
|
|
2
|
+
// typeahead rules, orientation tokens and key mapping, selection modes and the
|
|
3
|
+
// "true" / "false" attribute token, so a pattern spec states only its delta.
|
|
4
|
+
//
|
|
5
|
+
// Pure defs only: import with `import aria.* from "../../shared/aria"`.
|
|
6
|
+
// Every def is prefixed `aria`, and the family is the second word: `ariaCycle*`
|
|
7
|
+
// (wraparound), `ariaWrap*` (1-based step), `ariaTa*` (typeahead), `ariaAxis*` /
|
|
8
|
+
// `ariaOrientation*` / `ariaFlipped` / `ariaValueArrow` (orientation),
|
|
9
|
+
// `ariaSel*` / `ariaSingle*` (selection modes), `ariaBoolToken`. None of them is
|
|
10
|
+
// an attribute name: `ariaSelected`, `ariaExpanded`, `ariaOrientation`,
|
|
11
|
+
// `ariaMultiselectable`, ... stay each spec's OWN derived contract and must not
|
|
12
|
+
// be redefined here (a spec that imports this module would collide with them).
|
|
13
|
+
// State (focus, buffer) is passed IN and the next value comes back OUT; the
|
|
14
|
+
// pattern owns the vars. A `val` here would be inlined as an invariant into
|
|
15
|
+
// every importer, so invariants are predicate defs the importer wraps in a `val`.
|
|
16
|
+
//
|
|
17
|
+
// The generator inlines the whole closure into every importer's model and hashes
|
|
18
|
+
// every imported file, so editing this file makes every importer stale (run
|
|
19
|
+
// `generate:all`), and everything here must stay inside the generator subset:
|
|
20
|
+
// no collections, no `let`, no lambdas, no string concatenation, no recursion.
|
|
21
|
+
//
|
|
22
|
+
// Provided (the contract), with the specs that import each rule:
|
|
23
|
+
// - wraparound: `ariaCycle0` / `ariaCycle1` (candidate k steps on, 0- / 1-based;
|
|
24
|
+
// listbox-typeahead, combobox-select-only / treeview) and `ariaWrapNext1` /
|
|
25
|
+
// `ariaWrapPrev1` (one step, 1-based, 0 = outside; menu-button, menu-menubar,
|
|
26
|
+
// menu-checkable)
|
|
27
|
+
// - typeahead start: `ariaTaStart0` / `ariaTaStart1` (a fresh buffer searches
|
|
28
|
+
// from the item AFTER the current one, later characters from the current one
|
|
29
|
+
// so refining a match keeps focus on it; listbox-typeahead / treeview) and
|
|
30
|
+
// `ariaTaRepeatStart0` (the select-only combobox: the SAME character as the
|
|
31
|
+
// last cycles from the item after the current one, a different one starts
|
|
32
|
+
// again from the top; combobox-select-only)
|
|
33
|
+
// - typeahead case: `ariaTaFold` / `ariaTaSameChar` fold ASCII A-Z to a-z
|
|
34
|
+
// (APG: matching is case-insensitive). NO spec imports these yet: every
|
|
35
|
+
// typeahead pool is lowercase or an integer code, so nothing exercises them
|
|
36
|
+
// - orientation: `ariaOrientationKnown` ("horizontal" | "vertical"; tabs,
|
|
37
|
+
// toolbar, slider, slider-multithumb, windowsplitter), `ariaAxisForward` /
|
|
38
|
+
// `ariaAxisBackward` (only the arrow pair ALONG the axis moves; tabs),
|
|
39
|
+
// `ariaFlipped` / `ariaValueArrow` (slider arrows raise / lower on both axes,
|
|
40
|
+
// RTL mirrors the horizontal pair; slider, slider-multithumb)
|
|
41
|
+
// - selection modes: `ariaSelModeKnown` / `ariaSelIsMulti` ("single" | "multi";
|
|
42
|
+
// treegrid) and `ariaSingleHoldsAtMostOne` (no more than one selected /
|
|
43
|
+
// expanded item without the multi flag; a controlled host owns the value;
|
|
44
|
+
// accordion, treeview, treegrid, listbox-single, listbox-rearrangeable)
|
|
45
|
+
// - attribute token: `ariaBoolToken` ("true" | "false" from a bool; accordion,
|
|
46
|
+
// disclosure, treeview, treegrid, button)
|
|
47
|
+
//
|
|
48
|
+
// NOT provided, so still the pattern's own (the gap list):
|
|
49
|
+
// - roving focus, Home / End, wrap policy of arrow navigation: shared/focusgroup
|
|
50
|
+
// (`fg*`). The 1-based `ariaWrap*` here exist because the menus use 0 as
|
|
51
|
+
// "outside"; `fgStep` is 0-based
|
|
52
|
+
// - the typeahead SCAN itself: "the first item whose label starts with the
|
|
53
|
+
// buffer" needs a label lookup per candidate, i.e. a function or collection
|
|
54
|
+
// argument. A spec keeps its unrolled `if` chain and calls `ariaCycle*` for
|
|
55
|
+
// the candidates. The same goes for the prefix test, which depends on how the
|
|
56
|
+
// spec encodes names (base-4 digit code in listbox-typeahead, per-position
|
|
57
|
+
// chars in treeview, a prefix trie in combobox-autocomplete, a one-letter code
|
|
58
|
+
// in the menus) and for the buffer encoding itself
|
|
59
|
+
// - the first-character policy of the listbox / tree (`ariaTaStart*`) and of the
|
|
60
|
+
// select-only combobox (`ariaTaRepeatStart0`) are DIFFERENT rules; neither is
|
|
61
|
+
// the other's special case. The menus search only after the current item with
|
|
62
|
+
// a single character and use `ariaWrapNext1` directly
|
|
63
|
+
// - the windowsplitter key mapping is the PERPENDICULAR axis (a vertical bar
|
|
64
|
+
// moves with Left / Right), which no other spec shares; the toolbar's
|
|
65
|
+
// orientation -> focusgroup axis (`axisOf`) has a single user
|
|
66
|
+
// - roles, `aria-activedescendant`, `aria-expanded` and the other per-pattern
|
|
67
|
+
// attribute derivations: each spec's contract, shapes differ. The one-line
|
|
68
|
+
// `if (open) active else NONE` in the three combobox specs stays local: it
|
|
69
|
+
// would only thread the spec's own `NONE` sentinel through a parameter
|
|
70
|
+
// - "selection follows focus" (tabs automatic, treegrid / listbox single,
|
|
71
|
+
// combobox-tree): the shape depends on the spec's selection encoding (bit
|
|
72
|
+
// mask, one index, per-list masks), so only the cardinality rule is shared
|
|
73
|
+
// - the bit-mask helpers (`bit`, `pow2`, `popcount`: 4 to 7 copies, each over
|
|
74
|
+
// its own width) wait for `ipow` / `Set[int]` in the generator
|
|
75
|
+
// - the controlled-value protocol (`holds` / `follows` / `verdict` / `landed` /
|
|
76
|
+
// `propAfter`, 30+ copies) is not ARIA: it wants its own module
|
|
77
|
+
//
|
|
78
|
+
// NOT expressible as pure defs (no collections / vars / lambdas here), so NOT
|
|
79
|
+
// modelled:
|
|
80
|
+
// - disabled and hidden items, a label per item, a dynamic item count: the
|
|
81
|
+
// defs take the count `n` and assume every index is a candidate
|
|
82
|
+
// - non-ASCII case folding (locale rules, ß, İ), IME composition, the timeout
|
|
83
|
+
// of the buffer (a spec models it as an event), multi-character strings typed
|
|
84
|
+
// in quick succession in the select-only combobox
|
|
85
|
+
// - `aria-orientation` defaults per role and an absent / "undefined" orientation
|
|
86
|
+
// Collections would lift the first group: see
|
|
87
|
+
// docs/research/quint-generator-ui-extensions.md (item 6).
|
|
88
|
+
//
|
|
89
|
+
// Domains: `ariaCycle*` and `ariaWrap*` need n >= 1 and k >= 0; `ariaCycle*`
|
|
90
|
+
// return `cur` itself when n < 1 (no candidates) instead of dividing by zero.
|
|
91
|
+
module aria {
|
|
92
|
+
// --- wraparound ----------------------------------------------------------
|
|
93
|
+
// the item k steps after cur among n items, wrapping; k = 0 is cur itself
|
|
94
|
+
// (0-based: items 0..n-1)
|
|
95
|
+
def ariaCycle0(n: int, cur: int, k: int): int =
|
|
96
|
+
if (n < 1) cur else (cur + k) % n
|
|
97
|
+
// (1-based: items 1..n; cur = 0 reads as "before the first", the same as n)
|
|
98
|
+
def ariaCycle1(n: int, cur: int, k: int): int =
|
|
99
|
+
if (n < 1) cur else ((cur + k + n - 1) % n) + 1
|
|
100
|
+
|
|
101
|
+
// one step on a ring of items 1..n, 0 = outside; n = 0 is the empty ring
|
|
102
|
+
def ariaWrapNext1(i: int, n: int): int = if (i >= n) 1 else i + 1
|
|
103
|
+
def ariaWrapPrev1(i: int, n: int): int = if (i <= 1) n else i - 1
|
|
104
|
+
|
|
105
|
+
// --- typeahead -----------------------------------------------------------
|
|
106
|
+
// where a search begins: after the current item for the first character of a
|
|
107
|
+
// buffer, at the current item for the following ones
|
|
108
|
+
def ariaTaStart0(n: int, cur: int, fresh: bool): int =
|
|
109
|
+
if (fresh) ariaCycle0(n, cur, 1) else cur
|
|
110
|
+
def ariaTaStart1(n: int, cur: int, fresh: bool): int =
|
|
111
|
+
if (fresh) ariaCycle1(n, cur, 1) else cur
|
|
112
|
+
|
|
113
|
+
// select-only combobox: the same character as the last cycles on from the item
|
|
114
|
+
// after the current one, a different one starts again at the first item.
|
|
115
|
+
// typedBefore is the last typed character (any value that is not a character,
|
|
116
|
+
// e.g. -1, when the buffer is empty)
|
|
117
|
+
def ariaTaRepeatStart0(n: int, cur: int, typedBefore: int, ch: int): int =
|
|
118
|
+
if (typedBefore == ch) ariaCycle0(n, cur, 1) else 0
|
|
119
|
+
|
|
120
|
+
// ASCII case fold: "A".."Z" -> "a".."z", everything else is unchanged
|
|
121
|
+
def ariaTaFold(c: str): str =
|
|
122
|
+
if (c == "A") "a"
|
|
123
|
+
else if (c == "B") "b"
|
|
124
|
+
else if (c == "C") "c"
|
|
125
|
+
else if (c == "D") "d"
|
|
126
|
+
else if (c == "E") "e"
|
|
127
|
+
else if (c == "F") "f"
|
|
128
|
+
else if (c == "G") "g"
|
|
129
|
+
else if (c == "H") "h"
|
|
130
|
+
else if (c == "I") "i"
|
|
131
|
+
else if (c == "J") "j"
|
|
132
|
+
else if (c == "K") "k"
|
|
133
|
+
else if (c == "L") "l"
|
|
134
|
+
else if (c == "M") "m"
|
|
135
|
+
else if (c == "N") "n"
|
|
136
|
+
else if (c == "O") "o"
|
|
137
|
+
else if (c == "P") "p"
|
|
138
|
+
else if (c == "Q") "q"
|
|
139
|
+
else if (c == "R") "r"
|
|
140
|
+
else if (c == "S") "s"
|
|
141
|
+
else if (c == "T") "t"
|
|
142
|
+
else if (c == "U") "u"
|
|
143
|
+
else if (c == "V") "v"
|
|
144
|
+
else if (c == "W") "w"
|
|
145
|
+
else if (c == "X") "x"
|
|
146
|
+
else if (c == "Y") "y"
|
|
147
|
+
else if (c == "Z") "z"
|
|
148
|
+
else c
|
|
149
|
+
// two typed characters are the same character for repetition and matching
|
|
150
|
+
def ariaTaSameChar(a: str, b: str): bool = ariaTaFold(a) == ariaTaFold(b)
|
|
151
|
+
|
|
152
|
+
// --- orientation ---------------------------------------------------------
|
|
153
|
+
def ariaOrientationKnown(o: str): bool = or(o == "horizontal", o == "vertical")
|
|
154
|
+
|
|
155
|
+
// composite widgets that move along their axis only (tabs): the arrow ALONG the
|
|
156
|
+
// axis steps forward / backward, the perpendicular pair is left to the page
|
|
157
|
+
def ariaAxisForward(o: str, key: str): bool =
|
|
158
|
+
or(and(o == "horizontal", key == "ArrowRight"), and(o == "vertical", key == "ArrowDown"))
|
|
159
|
+
def ariaAxisBackward(o: str, key: str): bool =
|
|
160
|
+
or(and(o == "horizontal", key == "ArrowLeft"), and(o == "vertical", key == "ArrowUp"))
|
|
161
|
+
|
|
162
|
+
// sliders: the horizontal axis is visually mirrored in a right-to-left page
|
|
163
|
+
def ariaFlipped(o: str, d: str): bool = and(o == "horizontal", d == "rtl")
|
|
164
|
+
// +1 raises, -1 lowers, 0 for any other key; Up / Down work on both
|
|
165
|
+
// orientations, Right / Left swap under RTL (multiply by the small step)
|
|
166
|
+
def ariaValueArrow(key: str, o: str, d: str): int =
|
|
167
|
+
if (key == "ArrowUp") 1
|
|
168
|
+
else if (key == "ArrowDown") -1
|
|
169
|
+
else if (key == "ArrowRight") (if (ariaFlipped(o, d)) -1 else 1)
|
|
170
|
+
else if (key == "ArrowLeft") (if (ariaFlipped(o, d)) 1 else -1)
|
|
171
|
+
else 0
|
|
172
|
+
|
|
173
|
+
// --- selection modes -----------------------------------------------------
|
|
174
|
+
// "single" selects at most one item, "multi" is aria-multiselectable
|
|
175
|
+
def ariaSelModeKnown(m: str): bool = or(m == "single", m == "multi")
|
|
176
|
+
def ariaSelIsMulti(m: str): bool = m == "multi"
|
|
177
|
+
// APG: no more than one item selected (or expanded) without the multi flag. An
|
|
178
|
+
// uncontrolled invariant: a controlled host owns the value and may hand us any set
|
|
179
|
+
def ariaSingleHoldsAtMostOne(controlled: bool, multi: bool, cnt: int): bool =
|
|
180
|
+
or(controlled, multi, cnt <= 1)
|
|
181
|
+
|
|
182
|
+
// --- attribute tokens ----------------------------------------------------
|
|
183
|
+
// aria-expanded / aria-pressed / aria-selected ... from a bool; an absent
|
|
184
|
+
// attribute is the pattern's own token ("absent" or "none")
|
|
185
|
+
def ariaBoolToken(b: bool): str = if (b) "true" else "false"
|
|
186
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// shared/details-group.qnt — the platform contract of `<details name="group">`:
|
|
2
|
+
// an exclusive accordion with no script.
|
|
3
|
+
//
|
|
4
|
+
// Pure defs only: import with `import details_group.* from "../../shared/details-group"`.
|
|
5
|
+
// Defs are prefixed `dg`. Exclusivity is built into the representation: a group
|
|
6
|
+
// is ONE int, the index of its open `<details>` (`-1` = all closed), so two
|
|
7
|
+
// open members of one group cannot be written down. A pattern with `n` panels
|
|
8
|
+
// keeps `open: int` and applies `dgToggle` / `dgSetOpen`.
|
|
9
|
+
//
|
|
10
|
+
// Provided:
|
|
11
|
+
// - at most one open member per `name`, per tree scope (a shadow root is a
|
|
12
|
+
// separate scope: verified, both stay open)
|
|
13
|
+
// - opening one closes the other, whether by summary click, Enter, Space or
|
|
14
|
+
// `open = true`; the last opened wins
|
|
15
|
+
// - ALL may be closed: toggling the open member closes it (no "keep one open")
|
|
16
|
+
// - at parse time with several `open` in one group the FIRST stays open
|
|
17
|
+
// (`dgParseOpen`); other groups and unnamed `<details>` are unaffected
|
|
18
|
+
//
|
|
19
|
+
// NOT provided, still the pattern's (or a reason to use the library accordion):
|
|
20
|
+
// - heading semantics: `<summary>` is not a heading, and there is no
|
|
21
|
+
// `aria-level`; the group is exposed as plain groups
|
|
22
|
+
// - arrow-key / Home / End navigation between summaries (APG: optional)
|
|
23
|
+
// - aria-disabled panels, a "single vs multiple" mode switch (no `name` means
|
|
24
|
+
// multiple), `hidden=until-found` search reveal, animated height
|
|
25
|
+
// - the `toggle` event ordering across the closing and opening members
|
|
26
|
+
//
|
|
27
|
+
// Verified in Chromium 153.0.8010.12 (Playwright 1.63.0, native, 2026-10-07):
|
|
28
|
+
// initial open member, opening another closes it, a different group is
|
|
29
|
+
// unaffected, clicking the open summary closes it, Enter and Space on a focused
|
|
30
|
+
// summary toggle, programmatic `open` on two members leaves the last open,
|
|
31
|
+
// three `open` at parse leaves the first, `name` is scoped per tree.
|
|
32
|
+
// Pin: WHATWG HTML `details` `name` (Baseline newly: C120 / F130 / S17.2).
|
|
33
|
+
module details_group {
|
|
34
|
+
// the user toggles member i of the group
|
|
35
|
+
def dgToggle(open: int, i: int): int = if (open == i) -1 else i
|
|
36
|
+
|
|
37
|
+
// script sets member i's `open` to wanted
|
|
38
|
+
def dgSetOpen(open: int, i: int, wanted: bool): int =
|
|
39
|
+
if (wanted) i else if (open == i) -1 else open
|
|
40
|
+
|
|
41
|
+
// the member left open when the parser meets members `a` and `b` (both
|
|
42
|
+
// `open`, -1 = not open) of one group: the first one wins
|
|
43
|
+
def dgParseOpen(a: int, b: int): int = if (a >= 0) a else b
|
|
44
|
+
|
|
45
|
+
def dgIsOpen(open: int, i: int): bool = open == i
|
|
46
|
+
|
|
47
|
+
// invariant predicate (wrap in a `val` in the pattern): the open index names
|
|
48
|
+
// a real member of an n-member group, or none
|
|
49
|
+
def dgValid(n: int, open: int): bool = and(open >= -1, open <= n - 1)
|
|
50
|
+
}
|