@ponchia/ui 0.4.1 → 0.6.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/CHANGELOG.md +552 -8
- package/MIGRATIONS.json +106 -0
- package/README.md +34 -8
- package/annotations/index.d.ts +402 -0
- package/annotations/index.d.ts.map +1 -0
- package/annotations/index.js +792 -0
- package/behaviors/carousel.js +198 -0
- package/behaviors/combobox.js +226 -0
- package/behaviors/command.js +190 -0
- package/behaviors/connectors.js +95 -0
- package/behaviors/crosshair.js +57 -0
- package/behaviors/dialog.js +74 -0
- package/behaviors/disclosure.js +26 -0
- package/behaviors/dismissible.js +25 -0
- package/behaviors/forms.js +186 -0
- package/behaviors/glyph.js +108 -0
- package/behaviors/index.d.ts +79 -0
- package/behaviors/index.js +18 -1409
- package/behaviors/internal.js +97 -0
- package/behaviors/legend.js +67 -0
- package/behaviors/menu.js +47 -0
- package/behaviors/popover.js +179 -0
- package/behaviors/spotlight.js +52 -0
- package/behaviors/table.js +136 -0
- package/behaviors/tabs.js +103 -0
- package/behaviors/theme.js +84 -0
- package/behaviors/toast.js +164 -0
- package/classes/classes.json +1857 -0
- package/classes/index.d.ts +306 -13
- package/classes/index.js +339 -12
- package/classes/vscode.css-custom-data.json +12 -0
- package/connectors/index.d.ts +191 -0
- package/connectors/index.d.ts.map +1 -0
- package/connectors/index.js +275 -0
- package/css/analytical.css +21 -0
- package/css/annotations.css +292 -0
- package/css/app.css +43 -13
- package/css/base.css +15 -10
- package/css/command.css +97 -0
- package/css/connectors.css +110 -0
- package/css/content.css +7 -1
- package/css/crosshair.css +100 -0
- package/css/dataviz.css +5 -1
- package/css/disclosure.css +38 -6
- package/css/dots.css +57 -0
- package/css/feedback.css +111 -2
- package/css/fonts.css +11 -7
- package/css/forms.css +42 -1
- package/css/generated.css +117 -0
- package/css/legend.css +272 -0
- package/css/marks.css +174 -0
- package/css/motion.css +24 -44
- package/css/navigation.css +7 -0
- package/css/overlay.css +31 -1
- package/css/primitives.css +109 -5
- package/css/report.css +39 -81
- package/css/selection.css +46 -0
- package/css/site.css +16 -2
- package/css/sources.css +221 -0
- package/css/spotlight.css +104 -0
- package/css/state.css +121 -0
- package/css/tokens.css +60 -37
- package/css/workbench.css +83 -0
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -0
- package/dist/css/annotations.css +1 -0
- package/dist/css/app.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/command.css +1 -0
- package/dist/css/connectors.css +1 -0
- package/dist/css/content.css +1 -1
- package/dist/css/crosshair.css +1 -0
- package/dist/css/disclosure.css +1 -1
- package/dist/css/dots.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/fonts.css +1 -1
- package/dist/css/forms.css +1 -1
- package/dist/css/generated.css +1 -0
- package/dist/css/legend.css +1 -0
- package/dist/css/marks.css +1 -0
- package/dist/css/motion.css +1 -1
- package/dist/css/navigation.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/report.css +1 -1
- package/dist/css/selection.css +1 -0
- package/dist/css/site.css +1 -1
- package/dist/css/sources.css +1 -0
- package/dist/css/spotlight.css +1 -0
- package/dist/css/state.css +1 -0
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -0
- package/docs/adr/0003-theme-model.md +7 -4
- package/docs/annotations.md +425 -0
- package/docs/architecture.md +246 -0
- package/docs/command.md +95 -0
- package/docs/connectors.md +91 -0
- package/docs/contrast.md +116 -92
- package/docs/crosshair.md +63 -0
- package/docs/d2.md +195 -0
- package/docs/generated.md +91 -0
- package/docs/legends.md +184 -0
- package/docs/marks.md +93 -0
- package/docs/mermaid.md +152 -0
- package/docs/reference.md +385 -23
- package/docs/reporting.md +436 -63
- package/docs/selection.md +40 -0
- package/docs/sources.md +137 -0
- package/docs/spotlight.md +78 -0
- package/docs/stability.md +24 -2
- package/docs/state.md +85 -0
- package/docs/usage.md +123 -4
- package/docs/vega.md +225 -0
- package/docs/workbench.md +78 -0
- package/fonts/doto-400.woff2 +0 -0
- package/fonts/doto-500.woff2 +0 -0
- package/fonts/doto-600.woff2 +0 -0
- package/fonts/doto-700.woff2 +0 -0
- package/fonts/doto-800.woff2 +0 -0
- package/fonts/doto-900.woff2 +0 -0
- package/glyphs/glyphs.js +6 -4
- package/llms.txt +362 -14
- package/package.json +115 -12
- package/qwik/index.d.ts +42 -54
- package/qwik/index.d.ts.map +1 -0
- package/qwik/index.js +75 -3
- package/react/index.d.ts +39 -56
- package/react/index.d.ts.map +1 -0
- package/react/index.js +67 -3
- package/solid/index.d.ts +64 -56
- package/solid/index.d.ts.map +1 -0
- package/solid/index.js +70 -3
- package/tokens/d2.d.ts +38 -0
- package/tokens/d2.js +71 -0
- package/tokens/d2.json +43 -0
- package/tokens/index.d.ts +5 -5
- package/tokens/index.js +23 -5
- package/tokens/index.json +9 -0
- package/tokens/mermaid.d.ts +23 -0
- package/tokens/mermaid.js +181 -0
- package/tokens/mermaid.json +163 -0
- package/tokens/resolved.json +45 -1
- package/tokens/skins.js +3 -2
- package/tokens/tokens.dtcg.json +26 -0
- package/tokens/vega.d.ts +34 -0
- package/tokens/vega.js +155 -0
- package/tokens/vega.json +179 -0
- package/fonts/doto-400.ttf +0 -0
- package/fonts/doto-500.ttf +0 -0
- package/fonts/doto-600.ttf +0 -0
- package/fonts/doto-700.ttf +0 -0
- package/fonts/doto-800.ttf +0 -0
- package/fonts/doto-900.ttf +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ponchia/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "CSS-first
|
|
5
|
+
"description": "CSS-first design system for interfaces that explain themselves — works in HTML, every framework, and PDF, no component runtime. A standard component set plus an opt-in analytical & report layer (annotations, legends, connectors, data-viz, report grammar). Monochrome with one rationed accent, re-skinnable from one --accent knob. Zero runtime dependencies.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"css",
|
|
8
8
|
"ui",
|
|
@@ -46,18 +46,37 @@
|
|
|
46
46
|
"classes",
|
|
47
47
|
"behaviors",
|
|
48
48
|
"glyphs",
|
|
49
|
+
"annotations",
|
|
50
|
+
"connectors",
|
|
49
51
|
"react",
|
|
50
52
|
"solid",
|
|
51
53
|
"qwik",
|
|
52
54
|
"shiki",
|
|
53
55
|
"llms.txt",
|
|
54
56
|
"CHANGELOG.md",
|
|
57
|
+
"MIGRATIONS.json",
|
|
58
|
+
"docs/architecture.md",
|
|
55
59
|
"docs/reference.md",
|
|
56
60
|
"docs/theming.md",
|
|
57
61
|
"docs/contrast.md",
|
|
58
62
|
"docs/stability.md",
|
|
59
63
|
"docs/usage.md",
|
|
60
64
|
"docs/reporting.md",
|
|
65
|
+
"docs/mermaid.md",
|
|
66
|
+
"docs/d2.md",
|
|
67
|
+
"docs/vega.md",
|
|
68
|
+
"docs/annotations.md",
|
|
69
|
+
"docs/legends.md",
|
|
70
|
+
"docs/marks.md",
|
|
71
|
+
"docs/connectors.md",
|
|
72
|
+
"docs/spotlight.md",
|
|
73
|
+
"docs/crosshair.md",
|
|
74
|
+
"docs/selection.md",
|
|
75
|
+
"docs/sources.md",
|
|
76
|
+
"docs/state.md",
|
|
77
|
+
"docs/generated.md",
|
|
78
|
+
"docs/workbench.md",
|
|
79
|
+
"docs/command.md",
|
|
61
80
|
"docs/adr/0001-color-system.md",
|
|
62
81
|
"docs/adr/0002-scope-and-2026-baseline.md",
|
|
63
82
|
"docs/adr/0003-theme-model.md"
|
|
@@ -69,56 +88,75 @@
|
|
|
69
88
|
"format": "prettier --write .",
|
|
70
89
|
"check:format": "prettier --check .",
|
|
71
90
|
"size:report": "node scripts/size-report.mjs",
|
|
91
|
+
"report:pdf": "node scripts/render-pdf.mjs",
|
|
92
|
+
"gen": "npm run prepack",
|
|
93
|
+
"fresh:build": "node scripts/gen-all.mjs",
|
|
72
94
|
"tokens:build": "node scripts/gen-tokens-json.mjs",
|
|
95
|
+
"tokens:css:build": "node scripts/gen-tokens-css.mjs",
|
|
73
96
|
"dtcg:build": "node scripts/gen-dtcg.mjs",
|
|
74
97
|
"resolved:build": "node scripts/gen-resolved.mjs",
|
|
75
98
|
"dts:build": "node scripts/gen-dts.mjs",
|
|
99
|
+
"dts:emit": "node scripts/emit-dts.mjs",
|
|
76
100
|
"glyphs:build": "node scripts/gen-glyphs.mjs",
|
|
77
101
|
"skins:build": "node scripts/gen-skins.mjs",
|
|
78
102
|
"charts:build": "node scripts/gen-charts.mjs",
|
|
103
|
+
"mermaid:build": "node scripts/gen-mermaid.mjs",
|
|
104
|
+
"d2:build": "node scripts/gen-d2.mjs",
|
|
105
|
+
"vega:build": "node scripts/gen-vega.mjs",
|
|
79
106
|
"reference:build": "node scripts/gen-reference.mjs",
|
|
107
|
+
"classes:json:build": "node scripts/gen-classes-json.mjs",
|
|
80
108
|
"contrast:build": "node scripts/gen-contrast.mjs",
|
|
81
109
|
"vscode:build": "node scripts/gen-vscode-data.mjs",
|
|
82
110
|
"dist:build": "node scripts/build-dist.mjs",
|
|
83
111
|
"check:exports": "node scripts/check-exports.mjs",
|
|
84
|
-
"check:
|
|
112
|
+
"check:fresh": "node scripts/check-fresh.mjs",
|
|
85
113
|
"check:classes": "node scripts/check-classes.mjs",
|
|
86
|
-
"check:
|
|
114
|
+
"check:recipe-types": "node scripts/check-recipe-types.mjs",
|
|
115
|
+
"check:chain": "node scripts/check-chain.mjs",
|
|
87
116
|
"check:behaviors": "node scripts/check-behaviors.mjs",
|
|
88
|
-
"check:
|
|
117
|
+
"check:dts-emit": "node scripts/check-dts-emit.mjs",
|
|
89
118
|
"check:glyphs": "node scripts/check-glyphs.mjs",
|
|
90
119
|
"check:color-policy": "node scripts/check-color-policy.mjs",
|
|
91
120
|
"check:skins": "node scripts/check-skins.mjs",
|
|
92
121
|
"check:charts": "node scripts/check-charts.mjs",
|
|
122
|
+
"check:mermaid": "node scripts/check-mermaid.mjs",
|
|
123
|
+
"check:d2": "node scripts/check-d2.mjs",
|
|
124
|
+
"check:vega": "node scripts/check-vega.mjs",
|
|
93
125
|
"check:report": "node scripts/check-report.mjs",
|
|
126
|
+
"check:legend": "node scripts/check-legend.mjs",
|
|
94
127
|
"check:types": "tsc -p tsconfig.json",
|
|
95
|
-
"check:dtcg": "node scripts/check-dtcg.mjs",
|
|
96
|
-
"check:resolved": "node scripts/check-resolved.mjs",
|
|
97
128
|
"check:shiki": "node scripts/check-shiki.mjs",
|
|
98
129
|
"check:dist": "node scripts/check-dist.mjs",
|
|
99
130
|
"check:pack": "node scripts/check-pack.mjs",
|
|
100
131
|
"check:release": "node scripts/check-release.mjs",
|
|
101
|
-
"check:
|
|
132
|
+
"check:versions": "node scripts/check-versions.mjs",
|
|
133
|
+
"check:doc-recipes": "node scripts/check-doc-recipes.mjs",
|
|
134
|
+
"check:contract": "node scripts/check-contract.mjs",
|
|
102
135
|
"check:contrast": "node scripts/check-contrast.mjs",
|
|
103
|
-
"check:
|
|
104
|
-
"check": "
|
|
136
|
+
"check:publint": "publint --strict",
|
|
137
|
+
"check:attw": "attw --pack --ignore-rules no-resolution cjs-resolves-to-esm",
|
|
138
|
+
"check": "npm run lint && npm run check:format && npm run check:exports && npm run check:fresh && npm run check:classes && npm run check:recipe-types && npm run check:types && npm run check:shiki && npm run check:dist && npm run check:pack && npm run check:publint && npm run check:attw && npm run check:release && npm run check:versions && npm run check:doc-recipes && npm run check:contract && npm run check:contrast && npm run check:behaviors && npm run check:dts-emit && npm run check:glyphs && npm run check:color-policy && npm run check:skins && npm run check:charts && npm run check:mermaid && npm run check:d2 && npm run check:vega && npm run check:report && npm run check:legend && npm run check:chain",
|
|
105
139
|
"test": "node --test \"test/*.test.mjs\"",
|
|
106
|
-
"prepack": "npm run tokens:build && npm run dtcg:build && npm run resolved:build && npm run dts:build && npm run reference:build && npm run contrast:build && npm run vscode:build && npm run skins:build && npm run charts:build && npm run dist:build && npm run glyphs:build",
|
|
140
|
+
"prepack": "npm run tokens:css:build && npm run tokens:build && npm run dtcg:build && npm run resolved:build && npm run dts:build && npm run dts:emit && npm run reference:build && npm run classes:json:build && npm run contrast:build && npm run vscode:build && npm run skins:build && npm run charts:build && npm run mermaid:build && npm run d2:build && npm run vega:build && npm run dist:build && npm run glyphs:build",
|
|
107
141
|
"prepublishOnly": "npm run check && npm test"
|
|
108
142
|
},
|
|
109
143
|
"devDependencies": {
|
|
144
|
+
"@arethetypeswrong/cli": "^0.18.3",
|
|
110
145
|
"@axe-core/playwright": "^4.11.3",
|
|
111
146
|
"@builder.io/qwik": "^1.20.0",
|
|
112
147
|
"@playwright/test": "^1.60.0",
|
|
113
148
|
"jsdom": "^29.1.1",
|
|
114
149
|
"prettier": "^3.8.3",
|
|
150
|
+
"publint": "^0.3.21",
|
|
115
151
|
"react": "^19.2.6",
|
|
116
152
|
"react-dom": "^19.2.6",
|
|
117
153
|
"solid-js": "^1.9.13",
|
|
118
154
|
"stylelint": "^17.11.1",
|
|
119
155
|
"stylelint-config-standard": "^40.0.0",
|
|
120
156
|
"stylelint-use-logical": "^2.1.3",
|
|
121
|
-
"typescript": "^6.0.3"
|
|
157
|
+
"typescript": "^6.0.3",
|
|
158
|
+
"vega": "^6.2.0",
|
|
159
|
+
"vega-lite": "^6.4.3"
|
|
122
160
|
},
|
|
123
161
|
"peerDependencies": {
|
|
124
162
|
"@builder.io/qwik": ">=1.5",
|
|
@@ -162,6 +200,19 @@
|
|
|
162
200
|
"./css/skins.css": "./dist/css/skins.css",
|
|
163
201
|
"./css/dataviz.css": "./dist/css/dataviz.css",
|
|
164
202
|
"./css/report.css": "./dist/css/report.css",
|
|
203
|
+
"./css/annotations.css": "./dist/css/annotations.css",
|
|
204
|
+
"./css/legend.css": "./dist/css/legend.css",
|
|
205
|
+
"./css/marks.css": "./dist/css/marks.css",
|
|
206
|
+
"./css/connectors.css": "./dist/css/connectors.css",
|
|
207
|
+
"./css/spotlight.css": "./dist/css/spotlight.css",
|
|
208
|
+
"./css/crosshair.css": "./dist/css/crosshair.css",
|
|
209
|
+
"./css/selection.css": "./dist/css/selection.css",
|
|
210
|
+
"./css/sources.css": "./dist/css/sources.css",
|
|
211
|
+
"./css/state.css": "./dist/css/state.css",
|
|
212
|
+
"./css/generated.css": "./dist/css/generated.css",
|
|
213
|
+
"./css/workbench.css": "./dist/css/workbench.css",
|
|
214
|
+
"./css/command.css": "./dist/css/command.css",
|
|
215
|
+
"./css/analytical.css": "./dist/css/analytical.css",
|
|
165
216
|
"./css/unlayered/tokens.css": "./css/tokens.css",
|
|
166
217
|
"./css/unlayered/fonts.css": "./css/fonts.css",
|
|
167
218
|
"./css/unlayered/base.css": "./css/base.css",
|
|
@@ -180,6 +231,18 @@
|
|
|
180
231
|
"./css/unlayered/skins.css": "./css/skins.css",
|
|
181
232
|
"./css/unlayered/dataviz.css": "./css/dataviz.css",
|
|
182
233
|
"./css/unlayered/report.css": "./css/report.css",
|
|
234
|
+
"./css/unlayered/annotations.css": "./css/annotations.css",
|
|
235
|
+
"./css/unlayered/legend.css": "./css/legend.css",
|
|
236
|
+
"./css/unlayered/marks.css": "./css/marks.css",
|
|
237
|
+
"./css/unlayered/connectors.css": "./css/connectors.css",
|
|
238
|
+
"./css/unlayered/spotlight.css": "./css/spotlight.css",
|
|
239
|
+
"./css/unlayered/crosshair.css": "./css/crosshair.css",
|
|
240
|
+
"./css/unlayered/selection.css": "./css/selection.css",
|
|
241
|
+
"./css/unlayered/sources.css": "./css/sources.css",
|
|
242
|
+
"./css/unlayered/state.css": "./css/state.css",
|
|
243
|
+
"./css/unlayered/generated.css": "./css/generated.css",
|
|
244
|
+
"./css/unlayered/workbench.css": "./css/workbench.css",
|
|
245
|
+
"./css/unlayered/command.css": "./css/command.css",
|
|
183
246
|
"./tokens": {
|
|
184
247
|
"types": "./tokens/index.d.ts",
|
|
185
248
|
"default": "./tokens/index.js"
|
|
@@ -190,12 +253,28 @@
|
|
|
190
253
|
"./tokens/resolved.json": "./tokens/resolved.json",
|
|
191
254
|
"./shiki/nothing.json": "./shiki/nothing.json",
|
|
192
255
|
"./llms.txt": "./llms.txt",
|
|
256
|
+
"./docs/architecture.md": "./docs/architecture.md",
|
|
193
257
|
"./docs/reference.md": "./docs/reference.md",
|
|
194
258
|
"./docs/theming.md": "./docs/theming.md",
|
|
195
259
|
"./docs/contrast.md": "./docs/contrast.md",
|
|
196
260
|
"./docs/stability.md": "./docs/stability.md",
|
|
197
261
|
"./docs/usage.md": "./docs/usage.md",
|
|
198
262
|
"./docs/reporting.md": "./docs/reporting.md",
|
|
263
|
+
"./docs/mermaid.md": "./docs/mermaid.md",
|
|
264
|
+
"./docs/d2.md": "./docs/d2.md",
|
|
265
|
+
"./docs/vega.md": "./docs/vega.md",
|
|
266
|
+
"./docs/annotations.md": "./docs/annotations.md",
|
|
267
|
+
"./docs/legends.md": "./docs/legends.md",
|
|
268
|
+
"./docs/marks.md": "./docs/marks.md",
|
|
269
|
+
"./docs/connectors.md": "./docs/connectors.md",
|
|
270
|
+
"./docs/spotlight.md": "./docs/spotlight.md",
|
|
271
|
+
"./docs/crosshair.md": "./docs/crosshair.md",
|
|
272
|
+
"./docs/selection.md": "./docs/selection.md",
|
|
273
|
+
"./docs/sources.md": "./docs/sources.md",
|
|
274
|
+
"./docs/state.md": "./docs/state.md",
|
|
275
|
+
"./docs/generated.md": "./docs/generated.md",
|
|
276
|
+
"./docs/workbench.md": "./docs/workbench.md",
|
|
277
|
+
"./docs/command.md": "./docs/command.md",
|
|
199
278
|
"./docs/adr/0001-color-system.md": "./docs/adr/0001-color-system.md",
|
|
200
279
|
"./docs/adr/0002-scope-and-2026-baseline.md": "./docs/adr/0002-scope-and-2026-baseline.md",
|
|
201
280
|
"./docs/adr/0003-theme-model.md": "./docs/adr/0003-theme-model.md",
|
|
@@ -203,6 +282,7 @@
|
|
|
203
282
|
"types": "./classes/index.d.ts",
|
|
204
283
|
"default": "./classes/index.js"
|
|
205
284
|
},
|
|
285
|
+
"./classes.json": "./classes/classes.json",
|
|
206
286
|
"./behaviors": {
|
|
207
287
|
"types": "./behaviors/index.d.ts",
|
|
208
288
|
"default": "./behaviors/index.js"
|
|
@@ -211,6 +291,14 @@
|
|
|
211
291
|
"types": "./glyphs/glyphs.d.ts",
|
|
212
292
|
"default": "./glyphs/glyphs.js"
|
|
213
293
|
},
|
|
294
|
+
"./annotations": {
|
|
295
|
+
"types": "./annotations/index.d.ts",
|
|
296
|
+
"default": "./annotations/index.js"
|
|
297
|
+
},
|
|
298
|
+
"./connectors": {
|
|
299
|
+
"types": "./connectors/index.d.ts",
|
|
300
|
+
"default": "./connectors/index.js"
|
|
301
|
+
},
|
|
214
302
|
"./react": {
|
|
215
303
|
"types": "./react/index.d.ts",
|
|
216
304
|
"default": "./react/index.js"
|
|
@@ -232,6 +320,21 @@
|
|
|
232
320
|
"default": "./tokens/charts.js"
|
|
233
321
|
},
|
|
234
322
|
"./charts.json": "./tokens/charts.json",
|
|
323
|
+
"./mermaid": {
|
|
324
|
+
"types": "./tokens/mermaid.d.ts",
|
|
325
|
+
"default": "./tokens/mermaid.js"
|
|
326
|
+
},
|
|
327
|
+
"./mermaid.json": "./tokens/mermaid.json",
|
|
328
|
+
"./d2": {
|
|
329
|
+
"types": "./tokens/d2.d.ts",
|
|
330
|
+
"default": "./tokens/d2.js"
|
|
331
|
+
},
|
|
332
|
+
"./d2.json": "./tokens/d2.json",
|
|
333
|
+
"./vega": {
|
|
334
|
+
"types": "./tokens/vega.d.ts",
|
|
335
|
+
"default": "./tokens/vega.js"
|
|
336
|
+
},
|
|
337
|
+
"./vega.json": "./tokens/vega.json",
|
|
235
338
|
"./fonts/*": "./fonts/*"
|
|
236
339
|
}
|
|
237
340
|
}
|
package/qwik/index.d.ts
CHANGED
|
@@ -1,55 +1,43 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
1
|
+
/** Generic escape hatch. NOTE for Qwik: prefer the specific `use*` hooks
|
|
2
|
+
* below — they inline a statically-imported behavior so the optimizer can
|
|
3
|
+
* serialize the task. Passing a runtime function here is only safe when it
|
|
4
|
+
* is itself optimizer-visible (a module import).
|
|
5
|
+
* @param {(opts?: DelegateOpts) => Cleanup | void} init
|
|
6
|
+
* @param {BrontoBindingOptsResolver} [opts]
|
|
7
|
+
* @returns {void} */
|
|
8
|
+
export function useBrontoBehavior(init: (opts?: DelegateOpts) => Cleanup | void, opts?: BrontoBindingOptsResolver): void;
|
|
9
|
+
export function useThemeToggle(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>): void;
|
|
10
|
+
export function useDismissible(opts?: BrontoBindingOptsResolver): void;
|
|
11
|
+
export function useDisclosure(opts?: BrontoBindingOptsResolver): void;
|
|
12
|
+
export function useMenu(opts?: BrontoBindingOptsResolver): void;
|
|
13
|
+
export function useFormValidation(opts?: BrontoBindingOptsResolver): void;
|
|
14
|
+
export function useCombobox(opts?: BrontoBindingOptsResolver): void;
|
|
15
|
+
export function usePopover(opts?: BrontoBindingOptsResolver): void;
|
|
16
|
+
export function useTableSort(opts?: BrontoBindingOptsResolver): void;
|
|
17
|
+
export function useTabs(opts?: BrontoBindingOptsResolver): void;
|
|
18
|
+
export function useDialog(opts?: BrontoBindingOptsResolver): void;
|
|
19
|
+
export function useCarousel(opts?: BrontoBindingOptsResolver): void;
|
|
20
|
+
export function useDotGlyph(opts?: BrontoBindingOptsResolver): void;
|
|
21
|
+
export function useLegend(opts?: BrontoBindingOptsResolver): void;
|
|
22
|
+
export function useConnectors(opts?: BrontoBindingOptsResolver): void;
|
|
23
|
+
export function useSpotlight(opts?: BrontoBindingOptsResolver): void;
|
|
24
|
+
export function useCrosshair(opts?: BrontoBindingOptsResolver): void;
|
|
25
|
+
export function useCommand(opts?: BrontoBindingOptsResolver): void;
|
|
26
|
+
export function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
|
|
27
|
+
export { applyStoredTheme };
|
|
28
|
+
export type Cleanup = import("../behaviors/index.js").Cleanup;
|
|
29
|
+
export type DelegateOpts = import("../behaviors/index.js").DelegateOpts;
|
|
30
|
+
export type ThemeStorageOpts = import("../behaviors/index.js").ThemeStorageOpts;
|
|
31
|
+
export type ToastOpts = import("../behaviors/index.js").ToastOpts;
|
|
32
|
+
export type BrontoBindingRoot = Document | Element | {
|
|
33
|
+
value: Document | Element | null | undefined;
|
|
34
|
+
} | {
|
|
35
|
+
current: Document | Element | null | undefined;
|
|
36
|
+
} | (() => Document | Element | null | undefined) | null | undefined;
|
|
37
|
+
export type BrontoBindingOpts<T extends DelegateOpts = import("../behaviors/index.js").DelegateOpts> = Omit<T, "root"> & {
|
|
38
|
+
root?: BrontoBindingRoot;
|
|
19
39
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| null
|
|
25
|
-
| undefined;
|
|
26
|
-
|
|
27
|
-
/** Run any delegated behavior for the component's lifetime (init on visible,
|
|
28
|
-
* its returned cleanup on dispose). Prefer the specific `use*` hooks in Qwik
|
|
29
|
-
* so the optimizer can serialize the task; this generic form is safe only with
|
|
30
|
-
* an optimizer-visible (module-imported) behavior. */
|
|
31
|
-
export declare function useBrontoBehavior(
|
|
32
|
-
init: (opts?: DelegateOpts) => Cleanup | void,
|
|
33
|
-
opts?: BrontoBindingOptsResolver,
|
|
34
|
-
): void;
|
|
35
|
-
|
|
36
|
-
export declare function useThemeToggle(
|
|
37
|
-
opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>,
|
|
38
|
-
): void;
|
|
39
|
-
export declare function useDismissible(opts?: BrontoBindingOptsResolver): void;
|
|
40
|
-
export declare function useDisclosure(opts?: BrontoBindingOptsResolver): void;
|
|
41
|
-
export declare function useMenu(opts?: BrontoBindingOptsResolver): void;
|
|
42
|
-
export declare function useFormValidation(opts?: BrontoBindingOptsResolver): void;
|
|
43
|
-
export declare function useCombobox(opts?: BrontoBindingOptsResolver): void;
|
|
44
|
-
export declare function usePopover(opts?: BrontoBindingOptsResolver): void;
|
|
45
|
-
export declare function useTableSort(opts?: BrontoBindingOptsResolver): void;
|
|
46
|
-
export declare function useTabs(opts?: BrontoBindingOptsResolver): void;
|
|
47
|
-
export declare function useDialog(opts?: BrontoBindingOptsResolver): void;
|
|
48
|
-
export declare function useCarousel(opts?: BrontoBindingOptsResolver): void;
|
|
49
|
-
export declare function useDotGlyph(opts?: BrontoBindingOptsResolver): void;
|
|
50
|
-
|
|
51
|
-
/** The `toast()` imperative (no lifecycle of its own). */
|
|
52
|
-
export declare function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
|
|
53
|
-
|
|
54
|
-
export { applyStoredTheme } from '../behaviors/index.js';
|
|
55
|
-
export { cls, ui, cx } from '../classes/index.js';
|
|
40
|
+
export type BrontoBindingOptsResolver<T extends DelegateOpts = import("../behaviors/index.js").DelegateOpts> = BrontoBindingOpts<T> | (() => BrontoBindingOpts<T> | null | undefined) | null | undefined;
|
|
41
|
+
import { applyStoredTheme } from '../behaviors/index.js';
|
|
42
|
+
export { cls, ui, cx } from "../classes/index.js";
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AA8GA;;;;;;sBAMsB;AACtB,wCAHY,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,IAAI,SACvC,yBAAyB,GACvB,IAAI,CAIjB;AAGM,sCADK,yBAAyB,CAAC,gBAAgB,GAAG,YAAY,CAAC,GAAmB,IAAI,CAGhC;AAEtD,sCADK,yBAAyB,GAAmB,IAAI,CAGH;AAElD,qCADK,yBAAyB,GAAmB,IAAI,CAGA;AAErD,+BADK,yBAAyB,GAAmB,IAAI,CAGN;AAE/C,yCADK,yBAAyB,GAAmB,IAAI,CAGI;AAEzD,mCADK,yBAAyB,GAAmB,IAAI,CAGF;AAEnD,kCADK,yBAAyB,GAAmB,IAAI,CAGH;AAElD,oCADK,yBAAyB,GAAmB,IAAI,CAGD;AAEpD,+BADK,yBAAyB,GAAmB,IAAI,CAGN;AAE/C,iCADK,yBAAyB,GAAmB,IAAI,CAGJ;AAEjD,mCADK,yBAAyB,GAAmB,IAAI,CAGF;AAEnD,mCADK,yBAAyB,GAAmB,IAAI,CAGF;AAEnD,iCADK,yBAAyB,GAAmB,IAAI,CAGJ;AAEjD,qCADK,yBAAyB,GAAmB,IAAI,CAGA;AAErD,oCADK,yBAAyB,GAAmB,IAAI,CAGD;AAEpD,oCADK,yBAAyB,GAAmB,IAAI,CAGD;AAEpD,kCADK,yBAAyB,GAAmB,IAAI,CAGH;AAIlD,4BADO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,OAAO,CACzB;;sBAtKtB,OAAO,uBAAuB,EAAE,OAAO;2BACvC,OAAO,uBAAuB,EAAE,YAAY;+BAC5C,OAAO,uBAAuB,EAAE,gBAAgB;wBAChD,OAAO,uBAAuB,EAAE,SAAS;gCAEzC,QAAQ,GACd,OAAO,GACP;IAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAChD;IAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAClD,CAAC,MAAM,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAC7C,IAAI,GACJ,SAAS;8BAIa,CAAC,SAAhB,YAAa,mDACd,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE;sCAI9B,CAAC,SAAhB,YAAa,mDACd,iBAAiB,CAAC,CAAC,CAAC,GAC1B,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAC/C,IAAI,GACJ,SAAS;iCAuBT,uBAAuB"}
|
package/qwik/index.js
CHANGED
|
@@ -24,6 +24,32 @@
|
|
|
24
24
|
* Scope a behavior to a subtree by passing a Qwik signal:
|
|
25
25
|
* const root = useSignal();
|
|
26
26
|
* useDialog({ root }); // <section ref={root}> … </section>
|
|
27
|
+
*
|
|
28
|
+
* @typedef {import('../behaviors/index.js').Cleanup} Cleanup
|
|
29
|
+
* @typedef {import('../behaviors/index.js').DelegateOpts} DelegateOpts
|
|
30
|
+
* @typedef {import('../behaviors/index.js').ThemeStorageOpts} ThemeStorageOpts
|
|
31
|
+
* @typedef {import('../behaviors/index.js').ToastOpts} ToastOpts
|
|
32
|
+
*
|
|
33
|
+
* @typedef {Document
|
|
34
|
+
* | Element
|
|
35
|
+
* | { value: Document | Element | null | undefined }
|
|
36
|
+
* | { current: Document | Element | null | undefined }
|
|
37
|
+
* | (() => Document | Element | null | undefined)
|
|
38
|
+
* | null
|
|
39
|
+
* | undefined} BrontoBindingRoot
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @template {DelegateOpts} [T=DelegateOpts]
|
|
44
|
+
* @typedef {Omit<T, 'root'> & { root?: BrontoBindingRoot }} BrontoBindingOpts
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @template {DelegateOpts} [T=DelegateOpts]
|
|
49
|
+
* @typedef {BrontoBindingOpts<T>
|
|
50
|
+
* | (() => BrontoBindingOpts<T> | null | undefined)
|
|
51
|
+
* | null
|
|
52
|
+
* | undefined} BrontoBindingOptsResolver
|
|
27
53
|
*/
|
|
28
54
|
import { useVisibleTask$ } from '@builder.io/qwik';
|
|
29
55
|
import {
|
|
@@ -40,6 +66,11 @@ import {
|
|
|
40
66
|
initDialog,
|
|
41
67
|
initCarousel,
|
|
42
68
|
initDotGlyph,
|
|
69
|
+
initLegend,
|
|
70
|
+
initConnectors,
|
|
71
|
+
initSpotlight,
|
|
72
|
+
initCrosshair,
|
|
73
|
+
initCommand,
|
|
43
74
|
toast,
|
|
44
75
|
} from '../behaviors/index.js';
|
|
45
76
|
|
|
@@ -59,8 +90,13 @@ function resolveRoot(root) {
|
|
|
59
90
|
function resolveOpts(opts) {
|
|
60
91
|
const value = resolveMaybe(opts);
|
|
61
92
|
if (!value || typeof value !== 'object') return undefined;
|
|
93
|
+
// No `root` key → no scope requested; leave root out so the behavior
|
|
94
|
+
// delegates from `document`. A `root` key that resolves falsy means a scope
|
|
95
|
+
// WAS requested but the ref is not ready: emit `root: null` so the behavior
|
|
96
|
+
// no-ops instead of hijacking the whole document.
|
|
97
|
+
if (!('root' in value)) return { ...value };
|
|
62
98
|
const root = resolveRoot(value.root);
|
|
63
|
-
return
|
|
99
|
+
return { ...value, root: root || null };
|
|
64
100
|
}
|
|
65
101
|
|
|
66
102
|
/** Run a delegated behavior on visible and register its cleanup on dispose.
|
|
@@ -75,50 +111,86 @@ function start(init, opts, ctx) {
|
|
|
75
111
|
/** Generic escape hatch. NOTE for Qwik: prefer the specific `use*` hooks
|
|
76
112
|
* below — they inline a statically-imported behavior so the optimizer can
|
|
77
113
|
* serialize the task. Passing a runtime function here is only safe when it
|
|
78
|
-
* is itself optimizer-visible (a module import).
|
|
114
|
+
* is itself optimizer-visible (a module import).
|
|
115
|
+
* @param {(opts?: DelegateOpts) => Cleanup | void} init
|
|
116
|
+
* @param {BrontoBindingOptsResolver} [opts]
|
|
117
|
+
* @returns {void} */
|
|
79
118
|
export function useBrontoBehavior(init, opts) {
|
|
80
119
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
81
120
|
useVisibleTask$((ctx) => start(init, opts, ctx));
|
|
82
121
|
}
|
|
83
122
|
|
|
123
|
+
/** @param {BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>} [opts] @returns {void} */
|
|
84
124
|
export const useThemeToggle = (opts) =>
|
|
85
125
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
86
126
|
useVisibleTask$((ctx) => start(initThemeToggle, opts, ctx));
|
|
127
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
87
128
|
export const useDismissible = (opts) =>
|
|
88
129
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
89
130
|
useVisibleTask$((ctx) => start(dismissible, opts, ctx));
|
|
131
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
90
132
|
export const useDisclosure = (opts) =>
|
|
91
133
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
92
134
|
useVisibleTask$((ctx) => start(initDisclosure, opts, ctx));
|
|
135
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
93
136
|
export const useMenu = (opts) =>
|
|
94
137
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
95
138
|
useVisibleTask$((ctx) => start(initMenu, opts, ctx));
|
|
139
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
96
140
|
export const useFormValidation = (opts) =>
|
|
97
141
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
98
142
|
useVisibleTask$((ctx) => start(initFormValidation, opts, ctx));
|
|
143
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
99
144
|
export const useCombobox = (opts) =>
|
|
100
145
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
101
146
|
useVisibleTask$((ctx) => start(initCombobox, opts, ctx));
|
|
147
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
102
148
|
export const usePopover = (opts) =>
|
|
103
149
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
104
150
|
useVisibleTask$((ctx) => start(initPopover, opts, ctx));
|
|
151
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
105
152
|
export const useTableSort = (opts) =>
|
|
106
153
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
107
154
|
useVisibleTask$((ctx) => start(initTableSort, opts, ctx));
|
|
155
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
108
156
|
export const useTabs = (opts) =>
|
|
109
157
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
110
158
|
useVisibleTask$((ctx) => start(initTabs, opts, ctx));
|
|
159
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
111
160
|
export const useDialog = (opts) =>
|
|
112
161
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
113
162
|
useVisibleTask$((ctx) => start(initDialog, opts, ctx));
|
|
163
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
114
164
|
export const useCarousel = (opts) =>
|
|
115
165
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
116
166
|
useVisibleTask$((ctx) => start(initCarousel, opts, ctx));
|
|
167
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
117
168
|
export const useDotGlyph = (opts) =>
|
|
118
169
|
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
119
170
|
useVisibleTask$((ctx) => start(initDotGlyph, opts, ctx));
|
|
171
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
172
|
+
export const useLegend = (opts) =>
|
|
173
|
+
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
174
|
+
useVisibleTask$((ctx) => start(initLegend, opts, ctx));
|
|
175
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
176
|
+
export const useConnectors = (opts) =>
|
|
177
|
+
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
178
|
+
useVisibleTask$((ctx) => start(initConnectors, opts, ctx));
|
|
179
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
180
|
+
export const useSpotlight = (opts) =>
|
|
181
|
+
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
182
|
+
useVisibleTask$((ctx) => start(initSpotlight, opts, ctx));
|
|
183
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
184
|
+
export const useCrosshair = (opts) =>
|
|
185
|
+
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
186
|
+
useVisibleTask$((ctx) => start(initCrosshair, opts, ctx));
|
|
187
|
+
/** @param {BrontoBindingOptsResolver} [opts] @returns {void} */
|
|
188
|
+
export const useCommand = (opts) =>
|
|
189
|
+
// eslint-disable-next-line qwik/no-use-visible-task -- delegated DOM glue + cleanup
|
|
190
|
+
useVisibleTask$((ctx) => start(initCommand, opts, ctx));
|
|
120
191
|
|
|
121
|
-
/** The `toast()` imperative (no lifecycle of its own).
|
|
192
|
+
/** The `toast()` imperative (no lifecycle of its own).
|
|
193
|
+
* @returns {(message: string, opts?: ToastOpts) => Cleanup} */
|
|
122
194
|
export const useToast = () => toast;
|
|
123
195
|
|
|
124
196
|
// No-flash theme application must run before paint — do it in an inline head
|
package/react/index.d.ts
CHANGED
|
@@ -1,57 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
21
|
-
|
|
1
|
+
/** Run a delegated behavior for the component's lifetime (init on mount, its
|
|
2
|
+
* returned cleanup on unmount). The behavior is run once; `opts` resolves
|
|
3
|
+
* on mount so refs are usable for scoped roots.
|
|
4
|
+
* @param {(opts?: DelegateOpts) => Cleanup | void} init
|
|
5
|
+
* @param {BrontoBindingOptsResolver} [opts]
|
|
6
|
+
* @returns {void} */
|
|
7
|
+
export function useBrontoBehavior(init: (opts?: DelegateOpts) => Cleanup | void, opts?: BrontoBindingOptsResolver): void;
|
|
8
|
+
export function useThemeToggle(opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>): void;
|
|
9
|
+
export function useDismissible(opts?: BrontoBindingOptsResolver): void;
|
|
10
|
+
export function useDisclosure(opts?: BrontoBindingOptsResolver): void;
|
|
11
|
+
export function useMenu(opts?: BrontoBindingOptsResolver): void;
|
|
12
|
+
export function useFormValidation(opts?: BrontoBindingOptsResolver): void;
|
|
13
|
+
export function useCombobox(opts?: BrontoBindingOptsResolver): void;
|
|
14
|
+
export function usePopover(opts?: BrontoBindingOptsResolver): void;
|
|
15
|
+
export function useTableSort(opts?: BrontoBindingOptsResolver): void;
|
|
16
|
+
export function useTabs(opts?: BrontoBindingOptsResolver): void;
|
|
17
|
+
export function useDialog(opts?: BrontoBindingOptsResolver): void;
|
|
18
|
+
export function useCarousel(opts?: BrontoBindingOptsResolver): void;
|
|
19
|
+
export function useDotGlyph(opts?: BrontoBindingOptsResolver): void;
|
|
20
|
+
export function useLegend(opts?: BrontoBindingOptsResolver): void;
|
|
21
|
+
export function useConnectors(opts?: BrontoBindingOptsResolver): void;
|
|
22
|
+
export function useSpotlight(opts?: BrontoBindingOptsResolver): void;
|
|
23
|
+
export function useCrosshair(opts?: BrontoBindingOptsResolver): void;
|
|
24
|
+
export function useCommand(opts?: BrontoBindingOptsResolver): void;
|
|
25
|
+
export function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
|
|
26
|
+
export { applyStoredTheme };
|
|
27
|
+
export type Cleanup = import("../behaviors/index.js").Cleanup;
|
|
28
|
+
export type DelegateOpts = import("../behaviors/index.js").DelegateOpts;
|
|
29
|
+
export type ThemeStorageOpts = import("../behaviors/index.js").ThemeStorageOpts;
|
|
30
|
+
export type ToastOpts = import("../behaviors/index.js").ToastOpts;
|
|
31
|
+
export type BrontoBindingRoot = Document | Element | {
|
|
32
|
+
current: Document | Element | null | undefined;
|
|
33
|
+
} | (() => Document | Element | null | undefined) | null | undefined;
|
|
34
|
+
export type BrontoBindingOpts<T extends DelegateOpts = import("../behaviors/index.js").DelegateOpts> = Omit<T, "root"> & {
|
|
35
|
+
root?: BrontoBindingRoot;
|
|
22
36
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| null
|
|
28
|
-
| undefined;
|
|
29
|
-
|
|
30
|
-
/** Run any delegated behavior for the component's lifetime (init on mount,
|
|
31
|
-
* its returned cleanup on unmount). The behavior is run once. Options resolve
|
|
32
|
-
* on mount, so scoped roots may be React refs or resolver callbacks. */
|
|
33
|
-
export declare function useBrontoBehavior(
|
|
34
|
-
init: (opts?: DelegateOpts) => Cleanup | void,
|
|
35
|
-
opts?: BrontoBindingOptsResolver,
|
|
36
|
-
): void;
|
|
37
|
-
|
|
38
|
-
export declare function useThemeToggle(
|
|
39
|
-
opts?: BrontoBindingOptsResolver<ThemeStorageOpts & DelegateOpts>,
|
|
40
|
-
): void;
|
|
41
|
-
export declare function useDismissible(opts?: BrontoBindingOptsResolver): void;
|
|
42
|
-
export declare function useDisclosure(opts?: BrontoBindingOptsResolver): void;
|
|
43
|
-
export declare function useMenu(opts?: BrontoBindingOptsResolver): void;
|
|
44
|
-
export declare function useFormValidation(opts?: BrontoBindingOptsResolver): void;
|
|
45
|
-
export declare function useCombobox(opts?: BrontoBindingOptsResolver): void;
|
|
46
|
-
export declare function usePopover(opts?: BrontoBindingOptsResolver): void;
|
|
47
|
-
export declare function useTableSort(opts?: BrontoBindingOptsResolver): void;
|
|
48
|
-
export declare function useTabs(opts?: BrontoBindingOptsResolver): void;
|
|
49
|
-
export declare function useDialog(opts?: BrontoBindingOptsResolver): void;
|
|
50
|
-
export declare function useCarousel(opts?: BrontoBindingOptsResolver): void;
|
|
51
|
-
export declare function useDotGlyph(opts?: BrontoBindingOptsResolver): void;
|
|
52
|
-
|
|
53
|
-
/** The `toast()` imperative (no lifecycle of its own). */
|
|
54
|
-
export declare function useToast(): (message: string, opts?: ToastOpts) => Cleanup;
|
|
55
|
-
|
|
56
|
-
export { applyStoredTheme } from '../behaviors/index.js';
|
|
57
|
-
export { cls, ui, cx } from '../classes/index.js';
|
|
37
|
+
export type BrontoBindingOptsResolver<T extends DelegateOpts = import("../behaviors/index.js").DelegateOpts> = BrontoBindingOpts<T> | (() => BrontoBindingOpts<T> | null | undefined) | null | undefined;
|
|
38
|
+
import { applyStoredTheme } from '../behaviors/index.js';
|
|
39
|
+
export { cls, ui, cx } from "../classes/index.js";
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AA4FA;;;;;sBAKsB;AACtB,wCAHY,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,GAAG,IAAI,SACvC,yBAAyB,GACvB,IAAI,CAGjB;AAGM,sCADK,yBAAyB,CAAC,gBAAgB,GAAG,YAAY,CAAC,GAAmB,IAAI,CACb;AAEzE,sCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,qCADK,yBAAyB,GAAmB,IAAI,CACkB;AAEvE,+BADK,yBAAyB,GAAmB,IAAI,CACM;AAE3D,yCADK,yBAAyB,GAAmB,IAAI,CAC0B;AAE/E,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAEnE,kCADK,yBAAyB,GAAmB,IAAI,CACY;AAEjE,oCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,+BADK,yBAAyB,GAAmB,IAAI,CACM;AAE3D,iCADK,yBAAyB,GAAmB,IAAI,CACU;AAE/D,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAEnE,mCADK,yBAAyB,GAAmB,IAAI,CACc;AAEnE,iCADK,yBAAyB,GAAmB,IAAI,CACU;AAE/D,qCADK,yBAAyB,GAAmB,IAAI,CACkB;AAEvE,oCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,oCADK,yBAAyB,GAAmB,IAAI,CACgB;AAErE,kCADK,yBAAyB,GAAmB,IAAI,CACY;AAIjE,4BADO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,KAAK,OAAO,CACzB;;sBArHtB,OAAO,uBAAuB,EAAE,OAAO;2BACvC,OAAO,uBAAuB,EAAE,YAAY;+BAC5C,OAAO,uBAAuB,EAAE,gBAAgB;wBAChD,OAAO,uBAAuB,EAAE,SAAS;gCAEzC,QAAQ,GACd,OAAO,GACP;IAAE,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAClD,CAAC,MAAM,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,GAC7C,IAAI,GACJ,SAAS;8BAIa,CAAC,SAAhB,YAAa,mDACd,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE;sCAI9B,CAAC,SAAhB,YAAa,mDACd,iBAAiB,CAAC,CAAC,CAAC,GAC1B,CAAC,MAAM,iBAAiB,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,GAC/C,IAAI,GACJ,SAAS;iCAuBT,uBAAuB"}
|