@abuzareal/contour-ui 0.5.0 → 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 +12 -0
- package/COMBOBOX.md +87 -0
- package/CONTRACTS.md +17 -17
- package/DOCS.md +80 -0
- package/FOUNDATION.md +35 -0
- package/GETTING-STARTED.md +63 -0
- package/NEXTJS.md +3 -1
- package/PUBLIC-API.md +174 -164
- package/README.md +7 -5
- package/RECIPES.md +43 -0
- package/RELEASING.md +2 -2
- package/SIZE.md +9 -3
- package/dist/components/ui/Combobox.d.ts +325 -0
- package/dist/components/ui/Combobox.js +120 -0
- package/dist/components/ui/Combobox.types.d.ts +46 -0
- package/dist/components/ui/Combobox.types.js +1 -0
- package/dist/components/ui/DataTable.js +5 -4
- package/dist/components/ui/Field.js +1 -1
- package/dist/components/ui/FloatingPortal.js +2 -40
- package/dist/components/ui/FloatingScope.d.ts +9 -0
- package/dist/components/ui/FloatingScope.js +43 -0
- package/dist/components/ui/Table.d.ts +20 -0
- package/dist/components/ui/Table.js +9 -0
- package/dist/hooks/useComboboxAnchor.d.ts +17 -0
- package/dist/hooks/useComboboxAnchor.js +61 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/kit/data-display.css +6 -0
- package/dist/kit/forms.css +34 -0
- package/dist/lib/componentClasses.js +1 -1
- package/dist/scoped/kit/data-display.css +6 -0
- package/dist/scoped/kit/forms.css +34 -0
- package/examples/optional/LazyScene.tsx +78 -0
- package/examples/optional/OptionalSmoothScroll.tsx +25 -0
- package/examples/optional/SmoothScrollOwner.tsx +7 -0
- package/examples/optional/optional.css +25 -0
- package/examples/recipes/AsyncProjectPicker.tsx +82 -0
- package/examples/recipes/DeleteProjectConfirmation.tsx +97 -0
- package/examples/recipes/InputCompositions.tsx +49 -0
- package/examples/recipes/RemoteRecordsTable.tsx +256 -0
- package/examples/recipes/useRemoteResource.ts +81 -0
- package/examples/reproduction/README.md +9 -0
- package/examples/reproduction/index.html +14 -0
- package/examples/reproduction/package.json +27 -0
- package/examples/reproduction/src/main.tsx +33 -0
- package/examples/reproduction/src/style.css +19 -0
- package/examples/reproduction/tsconfig.json +18 -0
- package/examples/reproduction/vite.config.ts +19 -0
- package/examples/starters/next/README.md +18 -0
- package/examples/starters/next/app/Demo.tsx +65 -0
- package/examples/starters/next/app/layout.tsx +25 -0
- package/examples/starters/next/app/next-page/page.tsx +9 -0
- package/examples/starters/next/app/page.tsx +11 -0
- package/examples/starters/next/app/style.css +19 -0
- package/examples/starters/next/next-env.d.ts +2 -0
- package/examples/starters/next/next.config.mjs +1 -0
- package/examples/starters/next/package.json +27 -0
- package/examples/starters/next/proxy.ts +16 -0
- package/examples/starters/next/tsconfig.json +30 -0
- package/examples/starters/vite/README.md +16 -0
- package/examples/starters/vite/index.html +14 -0
- package/examples/starters/vite/package.json +27 -0
- package/examples/starters/vite/src/main.tsx +81 -0
- package/examples/starters/vite/src/style.css +19 -0
- package/examples/starters/vite/tsconfig.json +18 -0
- package/examples/starters/vite/vite.config.ts +19 -0
- package/package.json +19 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { defineConfig } from "vite";
|
|
3
|
+
import { themeBootstrapScript } from "@abuzareal/contour-ui/theme-bootstrap";
|
|
4
|
+
const hash = createHash("sha256").update(themeBootstrapScript).digest("base64");
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
{
|
|
8
|
+
name: "contour-theme-bootstrap",
|
|
9
|
+
transformIndexHtml(html) {
|
|
10
|
+
// Hash the exact bytes inserted here; no inline handler or unsafe-eval allowance.
|
|
11
|
+
const policy = `default-src 'self'; script-src 'self' 'sha256-${hash}'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:; connect-src 'self'; object-src 'none'; base-uri 'none'`;
|
|
12
|
+
return html.replace(
|
|
13
|
+
"<!-- theme-bootstrap -->",
|
|
14
|
+
`<meta http-equiv="Content-Security-Policy" content="${policy}"><script>${themeBootstrapScript}</script>`,
|
|
15
|
+
);
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abuzareal/contour-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Editorial React components, themes, restrained motion, and optional Three.js objects.",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,16 @@
|
|
|
21
21
|
"examples/forms",
|
|
22
22
|
"OVERLAYS.md",
|
|
23
23
|
"STYLING.md",
|
|
24
|
-
"SIZE.md"
|
|
24
|
+
"SIZE.md",
|
|
25
|
+
"FOUNDATION.md",
|
|
26
|
+
"COMBOBOX.md",
|
|
27
|
+
"RECIPES.md",
|
|
28
|
+
"GETTING-STARTED.md",
|
|
29
|
+
"DOCS.md",
|
|
30
|
+
"examples/recipes",
|
|
31
|
+
"examples/starters",
|
|
32
|
+
"examples/reproduction",
|
|
33
|
+
"examples/optional"
|
|
25
34
|
],
|
|
26
35
|
"sideEffects": [
|
|
27
36
|
"**/*.css"
|
|
@@ -71,7 +80,7 @@
|
|
|
71
80
|
"test": "node --test tests/*.test.mjs",
|
|
72
81
|
"test:browser": "node --test tests/*.browser.mjs",
|
|
73
82
|
"check:package": "node scripts/check-package.mjs",
|
|
74
|
-
"validate": "npm run check:styles && npm run typecheck && npm run lint && npm run build && npm test && npm run test:browser && npm run check:package",
|
|
83
|
+
"validate": "npm run check:styles && npm run typecheck && npm run lint && npm run build && npm run check:docs && npm test && npm run test:browser && npm run check:package",
|
|
75
84
|
"prepublishOnly": "node scripts/verify-release.mjs",
|
|
76
85
|
"test:consumer": "node scripts/test-consumer.mjs",
|
|
77
86
|
"test:compat": "node scripts/test-compat.mjs",
|
|
@@ -83,9 +92,13 @@
|
|
|
83
92
|
"measure:size": "node scripts/measure-size.mjs",
|
|
84
93
|
"check:size": "node scripts/measure-size.mjs --check",
|
|
85
94
|
"check:api-docs": "node scripts/check-api-docs.mjs",
|
|
86
|
-
"check:styles": "node scripts/build-styles.mjs --check"
|
|
95
|
+
"check:styles": "node scripts/build-styles.mjs --check",
|
|
96
|
+
"test:adoption-recipes": "node scripts/test-adoption-recipes.mjs",
|
|
97
|
+
"test:starters": "node scripts/test-starters.mjs",
|
|
98
|
+
"check:docs": "node scripts/check-docs.mjs"
|
|
87
99
|
},
|
|
88
100
|
"dependencies": {
|
|
101
|
+
"@base-ui/react": "1.9.0",
|
|
89
102
|
"@floating-ui/dom": "1.8.0",
|
|
90
103
|
"@fontsource-variable/dm-sans": "^5.3.0",
|
|
91
104
|
"@fontsource-variable/space-grotesk": "^5.3.0",
|
|
@@ -108,6 +121,8 @@
|
|
|
108
121
|
},
|
|
109
122
|
"devDependencies": {
|
|
110
123
|
"@playwright/test": "1.63.0",
|
|
124
|
+
"@tanstack/react-store": "0.11.2",
|
|
125
|
+
"@tanstack/react-table": "9.3.1",
|
|
111
126
|
"@testing-library/react": "^16.3.3",
|
|
112
127
|
"@types/react": "^18.3.5",
|
|
113
128
|
"@types/react-dom": "^18.3.0",
|