@usethrottle/storefront-react 0.0.0-stage → 0.1.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/CLAUDE.md +67 -0
- package/README.md +119 -2
- package/dist/StorefrontProvider-Br4wUHui.d.cts +559 -0
- package/dist/StorefrontProvider-DLEPEjg6.d.ts +559 -0
- package/dist/account/index.cjs +69 -0
- package/dist/account/index.cjs.map +1 -0
- package/dist/account/index.d.cts +23 -0
- package/dist/account/index.d.ts +23 -0
- package/dist/account/index.js +68 -0
- package/dist/account/index.js.map +1 -0
- package/dist/chunk-2LCPIY2P.cjs +16 -0
- package/dist/chunk-2LCPIY2P.cjs.map +1 -0
- package/dist/chunk-3A72UY6T.js +2126 -0
- package/dist/chunk-3A72UY6T.js.map +1 -0
- package/dist/chunk-3JMIVAHN.js +185 -0
- package/dist/chunk-3JMIVAHN.js.map +1 -0
- package/dist/chunk-4J6AGWNC.cjs +24 -0
- package/dist/chunk-4J6AGWNC.cjs.map +1 -0
- package/dist/chunk-4U6MYDZV.js +17 -0
- package/dist/chunk-4U6MYDZV.js.map +1 -0
- package/dist/chunk-66HDJVPS.js +22 -0
- package/dist/chunk-66HDJVPS.js.map +1 -0
- package/dist/chunk-6X2OZSNV.cjs +83 -0
- package/dist/chunk-6X2OZSNV.cjs.map +1 -0
- package/dist/chunk-6ZMMZ245.cjs +2127 -0
- package/dist/chunk-6ZMMZ245.cjs.map +1 -0
- package/dist/chunk-7R37CVAB.cjs +23 -0
- package/dist/chunk-7R37CVAB.cjs.map +1 -0
- package/dist/chunk-A3IFWQUV.js +368 -0
- package/dist/chunk-A3IFWQUV.js.map +1 -0
- package/dist/chunk-AYC2YK4E.cjs +95 -0
- package/dist/chunk-AYC2YK4E.cjs.map +1 -0
- package/dist/chunk-AZV5U7YB.cjs +18 -0
- package/dist/chunk-AZV5U7YB.cjs.map +1 -0
- package/dist/chunk-CE2SKNQP.cjs +71 -0
- package/dist/chunk-CE2SKNQP.cjs.map +1 -0
- package/dist/chunk-D76CRI4X.js +2175 -0
- package/dist/chunk-D76CRI4X.js.map +1 -0
- package/dist/chunk-DOAII637.cjs +186 -0
- package/dist/chunk-DOAII637.cjs.map +1 -0
- package/dist/chunk-DYHHAOMG.cjs +17 -0
- package/dist/chunk-DYHHAOMG.cjs.map +1 -0
- package/dist/chunk-EYSVU5SJ.js +196 -0
- package/dist/chunk-EYSVU5SJ.js.map +1 -0
- package/dist/chunk-HSUUDZWS.js +37 -0
- package/dist/chunk-HSUUDZWS.js.map +1 -0
- package/dist/chunk-HZ6VEN6Q.cjs +101 -0
- package/dist/chunk-HZ6VEN6Q.cjs.map +1 -0
- package/dist/chunk-IJOTLGPT.js +16 -0
- package/dist/chunk-IJOTLGPT.js.map +1 -0
- package/dist/chunk-ISDATHVC.js +219 -0
- package/dist/chunk-ISDATHVC.js.map +1 -0
- package/dist/chunk-LW2A6USV.js +100 -0
- package/dist/chunk-LW2A6USV.js.map +1 -0
- package/dist/chunk-M4YXSLRG.cjs +369 -0
- package/dist/chunk-M4YXSLRG.cjs.map +1 -0
- package/dist/chunk-NDUEJJLP.cjs +2176 -0
- package/dist/chunk-NDUEJJLP.cjs.map +1 -0
- package/dist/chunk-NNE4FYRT.js +820 -0
- package/dist/chunk-NNE4FYRT.js.map +1 -0
- package/dist/chunk-NW3EFHY2.js +15 -0
- package/dist/chunk-NW3EFHY2.js.map +1 -0
- package/dist/chunk-NZRUQUN5.js +167 -0
- package/dist/chunk-NZRUQUN5.js.map +1 -0
- package/dist/chunk-P6HHE57S.cjs +38 -0
- package/dist/chunk-P6HHE57S.cjs.map +1 -0
- package/dist/chunk-PHY7AY27.cjs +197 -0
- package/dist/chunk-PHY7AY27.cjs.map +1 -0
- package/dist/chunk-PNJOFFTL.cjs +128 -0
- package/dist/chunk-PNJOFFTL.cjs.map +1 -0
- package/dist/chunk-PXZQ4ONA.js +127 -0
- package/dist/chunk-PXZQ4ONA.js.map +1 -0
- package/dist/chunk-Q3VTUBPP.js +82 -0
- package/dist/chunk-Q3VTUBPP.js.map +1 -0
- package/dist/chunk-Q3XFD5UI.js +45 -0
- package/dist/chunk-Q3XFD5UI.js.map +1 -0
- package/dist/chunk-QM7KTT7F.js +94 -0
- package/dist/chunk-QM7KTT7F.js.map +1 -0
- package/dist/chunk-RLWZOLXL.js +70 -0
- package/dist/chunk-RLWZOLXL.js.map +1 -0
- package/dist/chunk-SV53BRP2.js +23 -0
- package/dist/chunk-SV53BRP2.js.map +1 -0
- package/dist/chunk-VWXJO427.cjs +821 -0
- package/dist/chunk-VWXJO427.cjs.map +1 -0
- package/dist/chunk-WIIOJDHR.cjs +220 -0
- package/dist/chunk-WIIOJDHR.cjs.map +1 -0
- package/dist/chunk-XQHGFWLG.cjs +46 -0
- package/dist/chunk-XQHGFWLG.cjs.map +1 -0
- package/dist/chunk-ZHCXI2ZZ.cjs +168 -0
- package/dist/chunk-ZHCXI2ZZ.cjs.map +1 -0
- package/dist/index-RSj2Rg62.d.cts +8 -0
- package/dist/index-RSj2Rg62.d.ts +8 -0
- package/dist/index.cjs +2829 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1718 -0
- package/dist/index.d.ts +1718 -0
- package/dist/index.js +2828 -0
- package/dist/index.js.map +1 -0
- package/dist/metadata-QhKw-tvz.d.cts +188 -0
- package/dist/metadata-QhKw-tvz.d.ts +188 -0
- package/dist/next/client.cjs +84 -0
- package/dist/next/client.cjs.map +1 -0
- package/dist/next/client.d.cts +40 -0
- package/dist/next/client.d.ts +40 -0
- package/dist/next/client.js +83 -0
- package/dist/next/client.js.map +1 -0
- package/dist/next/index.cjs +1090 -0
- package/dist/next/index.cjs.map +1 -0
- package/dist/next/index.d.cts +218 -0
- package/dist/next/index.d.ts +218 -0
- package/dist/next/index.js +1049 -0
- package/dist/next/index.js.map +1 -0
- package/dist/server/index.cjs +994 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +229 -0
- package/dist/server/index.d.ts +229 -0
- package/dist/server/index.js +951 -0
- package/dist/server/index.js.map +1 -0
- package/dist/styles.css +2111 -0
- package/dist/use-part-DCfFk7kf.d.ts +24 -0
- package/dist/use-part-DgjPBL_O.d.cts +24 -0
- package/package.json +121 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { a as StorefrontPartKey } from './index-RSj2Rg62.js';
|
|
2
|
+
|
|
3
|
+
/** Extra class names keyed by part key (`{ 'product-card-title': 'text-lg' }`). Appended after the part's own classes, so they win. */
|
|
4
|
+
type PartClassNames = Partial<Record<StorefrontPartKey, string>>;
|
|
5
|
+
/** The styling props every storefront component takes and hands to `usePart`. */
|
|
6
|
+
type UsePartLocal = {
|
|
7
|
+
/** Extra class names per part, keyed by part key. Applied after `appearance.parts`. */
|
|
8
|
+
classNames?: PartClassNames;
|
|
9
|
+
/** Extra class names for the component's root element, applied last. */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Overrides the ambient `<Unstyled>` for this part. */
|
|
12
|
+
unstyled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The attributes of one part. The class order is the base `tsf-<key>` (dropped
|
|
16
|
+
* when unstyled), then `appearance.parts[key]`, then `classNames[key]`, then
|
|
17
|
+
* `className`, so the most local one is last.
|
|
18
|
+
*/
|
|
19
|
+
declare function usePart(key: StorefrontPartKey, local?: UsePartLocal): {
|
|
20
|
+
className: string | undefined;
|
|
21
|
+
'data-throttle-part': StorefrontPartKey;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { type PartClassNames as P, type UsePartLocal as U, usePart as u };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { a as StorefrontPartKey } from './index-RSj2Rg62.cjs';
|
|
2
|
+
|
|
3
|
+
/** Extra class names keyed by part key (`{ 'product-card-title': 'text-lg' }`). Appended after the part's own classes, so they win. */
|
|
4
|
+
type PartClassNames = Partial<Record<StorefrontPartKey, string>>;
|
|
5
|
+
/** The styling props every storefront component takes and hands to `usePart`. */
|
|
6
|
+
type UsePartLocal = {
|
|
7
|
+
/** Extra class names per part, keyed by part key. Applied after `appearance.parts`. */
|
|
8
|
+
classNames?: PartClassNames;
|
|
9
|
+
/** Extra class names for the component's root element, applied last. */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Overrides the ambient `<Unstyled>` for this part. */
|
|
12
|
+
unstyled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The attributes of one part. The class order is the base `tsf-<key>` (dropped
|
|
16
|
+
* when unstyled), then `appearance.parts[key]`, then `classNames[key]`, then
|
|
17
|
+
* `className`, so the most local one is last.
|
|
18
|
+
*/
|
|
19
|
+
declare function usePart(key: StorefrontPartKey, local?: UsePartLocal): {
|
|
20
|
+
className: string | undefined;
|
|
21
|
+
'data-throttle-part': StorefrontPartKey;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { type PartClassNames as P, type UsePartLocal as U, usePart as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usethrottle/storefront-react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Drop-in, settings-driven React storefront components for Throttle catalogs.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"CLAUDE.md"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"**/*.css"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./dist/index.d.cts",
|
|
25
|
+
"default": "./dist/index.cjs"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"./server": {
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/server/index.d.ts",
|
|
31
|
+
"default": "./dist/server/index.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/server/index.d.cts",
|
|
35
|
+
"default": "./dist/server/index.cjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"./next": {
|
|
39
|
+
"import": {
|
|
40
|
+
"types": "./dist/next/index.d.ts",
|
|
41
|
+
"default": "./dist/next/index.js"
|
|
42
|
+
},
|
|
43
|
+
"require": {
|
|
44
|
+
"types": "./dist/next/index.d.cts",
|
|
45
|
+
"default": "./dist/next/index.cjs"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"./next/client": {
|
|
49
|
+
"import": {
|
|
50
|
+
"types": "./dist/next/client.d.ts",
|
|
51
|
+
"default": "./dist/next/client.js"
|
|
52
|
+
},
|
|
53
|
+
"require": {
|
|
54
|
+
"types": "./dist/next/client.d.cts",
|
|
55
|
+
"default": "./dist/next/client.cjs"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"./account": {
|
|
59
|
+
"import": {
|
|
60
|
+
"types": "./dist/account/index.d.ts",
|
|
61
|
+
"default": "./dist/account/index.js"
|
|
62
|
+
},
|
|
63
|
+
"require": {
|
|
64
|
+
"types": "./dist/account/index.d.cts",
|
|
65
|
+
"default": "./dist/account/index.cjs"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"./styles.css": "./dist/styles.css",
|
|
69
|
+
"./package.json": "./package.json"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@usethrottle/ui": "^0.1.2"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"@usethrottle/auth": ">=0.15.0",
|
|
76
|
+
"@usethrottle/catalog": "^1.4.1",
|
|
77
|
+
"@usethrottle/money": "^1.1.0",
|
|
78
|
+
"@usethrottle/scripts": ">=0.4.0",
|
|
79
|
+
"next": ">=15",
|
|
80
|
+
"react": ">=18",
|
|
81
|
+
"react-dom": ">=18"
|
|
82
|
+
},
|
|
83
|
+
"peerDependenciesMeta": {
|
|
84
|
+
"@usethrottle/auth": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"@usethrottle/scripts": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"next": {
|
|
91
|
+
"optional": true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@testing-library/react": "^16.1.0",
|
|
96
|
+
"@types/node": "^20",
|
|
97
|
+
"@types/react": "^19.1.0",
|
|
98
|
+
"@types/react-dom": "^19.1.0",
|
|
99
|
+
"@usethrottle/catalog": "1.4.1",
|
|
100
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
101
|
+
"jsdom": "^25.0.1",
|
|
102
|
+
"next": "16.3.5",
|
|
103
|
+
"react": "^19.1.0",
|
|
104
|
+
"react-dom": "^19.1.0",
|
|
105
|
+
"tsup": "^8.0.0",
|
|
106
|
+
"typescript": "^5.7.0",
|
|
107
|
+
"vitest": "^2.1.9",
|
|
108
|
+
"@usethrottle/auth": "0.15.0",
|
|
109
|
+
"@usethrottle/money": "1.1.0",
|
|
110
|
+
"@usethrottle/scripts": "0.4.0"
|
|
111
|
+
},
|
|
112
|
+
"publishConfig": {
|
|
113
|
+
"access": "public"
|
|
114
|
+
},
|
|
115
|
+
"engines": {
|
|
116
|
+
"node": ">=20"
|
|
117
|
+
},
|
|
118
|
+
"scripts": {
|
|
119
|
+
"build": "tsup",
|
|
120
|
+
"dev": "tsup --watch",
|
|
121
|
+
"test": "vitest run",
|
|
122
|
+
"typecheck": "tsc --noEmit"
|
|
123
|
+
}
|
|
6
124
|
}
|