@vastare/fundatio 0.1.0 → 1.0.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/README.md +299 -32
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +16 -3
- package/src/scss/adapters/bootstrap/v5/index.scss +6 -0
- package/src/scss/tokens/_theme.scss +12 -0
package/README.md
CHANGED
|
@@ -1,84 +1,351 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @vastare/fundatio
|
|
2
2
|
|
|
3
|
-
**Version:** 1.0.
|
|
4
|
-
**Distribution:**
|
|
5
|
-
**Purpose:**
|
|
3
|
+
**Version:** 1.0.1
|
|
4
|
+
**Distribution:** npm
|
|
5
|
+
**Purpose:** Shared design foundation for Vastare projects
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
`@vastare/fundatio` is the canonical foundation package for Vastare front-end systems. It provides:
|
|
8
|
+
|
|
9
|
+
- design tokens and theme primitives
|
|
10
|
+
- typography and bundled font contracts
|
|
11
|
+
- CSS variable emission mixins
|
|
12
|
+
- Bootstrap 5 integration through the Fundatio adapter
|
|
13
|
+
- typed DOM element helpers for runtime-enhanced UI work
|
|
14
|
+
- a shared baseline for WordPress themes, Vite applications, and other web builds
|
|
15
|
+
|
|
16
|
+
This package is intended to be consumed as a real upstream dependency. The examples below use the
|
|
17
|
+
**actual published package name** and the **1.0.1 release surface**.
|
|
9
18
|
|
|
10
19
|
---
|
|
11
20
|
|
|
12
21
|
## Installation
|
|
13
22
|
|
|
14
23
|
```bash
|
|
15
|
-
npm install fundatio
|
|
24
|
+
npm install @vastare/fundatio
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For a theme or application that compiles Sass directly from source, also ensure you have the
|
|
28
|
+
expected peer toolchain in place, typically including:
|
|
29
|
+
|
|
30
|
+
- `sass`
|
|
31
|
+
- `bootstrap`
|
|
32
|
+
- `vite` or your build tool of choice
|
|
33
|
+
- `postcss` and `autoprefixer` when relevant
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Package entry points
|
|
38
|
+
|
|
39
|
+
### JavaScript / TypeScript root
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { fundatioVersion, elements, tailwind } from '@vastare/fundatio';
|
|
43
|
+
|
|
44
|
+
console.log(fundatioVersion);
|
|
16
45
|
```
|
|
17
46
|
|
|
47
|
+
The root entry exposes:
|
|
48
|
+
|
|
49
|
+
- `fundatioVersion`
|
|
50
|
+
- `elements`
|
|
51
|
+
- `tailwind`
|
|
52
|
+
|
|
53
|
+
### CSS entry points
|
|
54
|
+
|
|
55
|
+
Prebuilt CSS is available when you want the compiled output directly:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import '@vastare/fundatio/css';
|
|
59
|
+
import '@vastare/fundatio/css/core';
|
|
60
|
+
import '@vastare/fundatio/css/main';
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Sass entry points
|
|
64
|
+
|
|
65
|
+
Fundatio is primarily designed to be consumed through Sass modules.
|
|
66
|
+
|
|
67
|
+
```scss
|
|
68
|
+
@use '@vastare/fundatio/scss';
|
|
69
|
+
@use '@vastare/fundatio/scss/tokens/theme' as theme;
|
|
70
|
+
@use '@vastare/fundatio/scss/mixins/theme' as theme-mx;
|
|
71
|
+
@use '@vastare/fundatio/scss/mixins/fonts' as font-mx;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Useful public Sass entry points include:
|
|
75
|
+
|
|
76
|
+
- `@vastare/fundatio/scss`
|
|
77
|
+
- `@vastare/fundatio/scss/functions`
|
|
78
|
+
- `@vastare/fundatio/scss/mixins`
|
|
79
|
+
- `@vastare/fundatio/scss/tokens`
|
|
80
|
+
- `@vastare/fundatio/scss/maps`
|
|
81
|
+
- `@vastare/fundatio/scss/tokens/theme`
|
|
82
|
+
- `@vastare/fundatio/scss/adapters/bootstrap/v5`
|
|
83
|
+
|
|
84
|
+
### Bootstrap 5 adapter
|
|
85
|
+
|
|
86
|
+
```scss
|
|
87
|
+
@use '@vastare/fundatio/scss/adapters/bootstrap/v5' with (
|
|
88
|
+
$vs-bootstrap-baseline: core
|
|
89
|
+
);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Supported baseline values:
|
|
93
|
+
|
|
94
|
+
- `none` : Bootstrap only
|
|
95
|
+
- `core` : Fundatio core + Bootstrap
|
|
96
|
+
- `main` : Fundatio main baseline + Bootstrap
|
|
97
|
+
|
|
18
98
|
---
|
|
19
99
|
|
|
20
|
-
##
|
|
100
|
+
## Theme tokens and CSS variable emission
|
|
21
101
|
|
|
22
|
-
###
|
|
102
|
+
### Emit all theme variables
|
|
23
103
|
|
|
24
104
|
```scss
|
|
25
|
-
@use 'fundatio/mixins/theme' as theme;
|
|
105
|
+
@use '@vastare/fundatio/scss/mixins/theme' as theme-mx;
|
|
26
106
|
|
|
27
107
|
:root {
|
|
28
|
-
@include theme.theme-root-vars();
|
|
108
|
+
@include theme-mx.theme-root-vars();
|
|
29
109
|
}
|
|
30
110
|
```
|
|
31
111
|
|
|
32
|
-
###
|
|
112
|
+
### Emit a single group
|
|
33
113
|
|
|
34
114
|
```scss
|
|
35
|
-
|
|
36
|
-
|
|
115
|
+
@use '@vastare/fundatio/scss/mixins/theme' as theme-mx;
|
|
116
|
+
|
|
117
|
+
:root {
|
|
118
|
+
@include theme-mx.theme-group-vars('brand-colours');
|
|
37
119
|
}
|
|
38
120
|
```
|
|
39
121
|
|
|
122
|
+
### Override theme primitives
|
|
123
|
+
|
|
124
|
+
```scss
|
|
125
|
+
@use '@vastare/fundatio/scss/tokens/theme' with (
|
|
126
|
+
$theme-prefix: 'vastsite-',
|
|
127
|
+
$primary-colour: #233b4e,
|
|
128
|
+
$secondary-colour: #00bcd4,
|
|
129
|
+
$tertiary-colour: #4b3869
|
|
130
|
+
);
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The theme token layer is the consumer override surface. Downstream maps, functions, and mixins read
|
|
134
|
+
from it and should not be patched directly unless you are deliberately extending Fundatio itself.
|
|
135
|
+
|
|
40
136
|
---
|
|
41
137
|
|
|
42
138
|
## Fonts
|
|
43
139
|
|
|
44
|
-
### Default
|
|
140
|
+
### Default font contract
|
|
45
141
|
|
|
46
|
-
Fundatio ships with:
|
|
142
|
+
Fundatio ships with these bundled defaults:
|
|
47
143
|
|
|
48
|
-
- Base font
|
|
49
|
-
- Heading font
|
|
50
|
-
-
|
|
144
|
+
- **Base font:** Merriweather
|
|
145
|
+
- **Heading font:** Montserrat
|
|
146
|
+
- **Code font:** `ui-monospace`
|
|
147
|
+
- **Default packaged font format:** `ttf`
|
|
51
148
|
|
|
52
|
-
###
|
|
149
|
+
### Override the packaged font format
|
|
150
|
+
|
|
151
|
+
Fundatio no longer relies on bundled fallback source stacks. The active packaged format is
|
|
152
|
+
controlled by a single overrideable token.
|
|
53
153
|
|
|
54
154
|
```scss
|
|
55
|
-
@use 'fundatio/tokens/theme' with (
|
|
155
|
+
@use '@vastare/fundatio/scss/tokens/theme' with (
|
|
56
156
|
$font-package-format: 'woff2'
|
|
57
157
|
);
|
|
58
158
|
```
|
|
59
159
|
|
|
60
|
-
|
|
160
|
+
That token controls the emitted source extension for the packaged contract.
|
|
161
|
+
|
|
162
|
+
### Override font families
|
|
163
|
+
|
|
164
|
+
```scss
|
|
165
|
+
@use '@vastare/fundatio/scss/tokens/theme' with (
|
|
166
|
+
$base-font: 'Custom Serif',
|
|
167
|
+
$heading-font: 'Custom Sans'
|
|
168
|
+
);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Emit `@font-face` rules
|
|
172
|
+
|
|
173
|
+
```scss
|
|
174
|
+
@use '@vastare/fundatio/scss/mixins/fonts' as font-mx;
|
|
175
|
+
|
|
176
|
+
@include font-mx.font-group-faces('base');
|
|
177
|
+
@include font-mx.font-group-faces('headings');
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
or all groups:
|
|
181
|
+
|
|
182
|
+
```scss
|
|
183
|
+
@use '@vastare/fundatio/scss/mixins/fonts' as font-mx;
|
|
184
|
+
|
|
185
|
+
@include font-mx.font-faces();
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Font asset paths in real builds
|
|
189
|
+
|
|
190
|
+
This matters, because build tools love pretending asset paths are obvious when they absolutely are
|
|
191
|
+
not.
|
|
192
|
+
|
|
193
|
+
Fundatio emits font URLs using the configurable theme token:
|
|
194
|
+
|
|
195
|
+
```scss
|
|
196
|
+
$base-font-path
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Default:
|
|
200
|
+
|
|
201
|
+
```scss
|
|
202
|
+
'../assets/fonts'
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
That default is intentionally conservative and works best when the consuming project copies the
|
|
206
|
+
Fundatio font assets into its own build output.
|
|
207
|
+
|
|
208
|
+
#### Recommended approach for Vite / WordPress themes
|
|
209
|
+
|
|
210
|
+
1. Copy the package font assets into your project-owned public or dist asset directory.
|
|
211
|
+
2. Override `$base-font-path` to the path your final CSS should use at runtime.
|
|
212
|
+
|
|
213
|
+
Example:
|
|
214
|
+
|
|
215
|
+
```scss
|
|
216
|
+
@use '@vastare/fundatio/scss/tokens/theme' with (
|
|
217
|
+
$base-font-path: '../assets/fonts'
|
|
218
|
+
);
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
If your build emits CSS somewhere else, set the path accordingly:
|
|
61
222
|
|
|
62
223
|
```scss
|
|
63
|
-
@use 'fundatio/tokens/theme' with (
|
|
64
|
-
$base-font: '
|
|
224
|
+
@use '@vastare/fundatio/scss/tokens/theme' with (
|
|
225
|
+
$base-font-path: '/wp-content/themes/vastsite/dist/assets/fonts'
|
|
65
226
|
);
|
|
66
227
|
```
|
|
67
228
|
|
|
229
|
+
#### Why this is explicit now
|
|
230
|
+
|
|
231
|
+
Bundlers such as Vite cannot safely guess your deployment structure for self-hosted font assets
|
|
232
|
+
inside a WordPress theme, library consumer app, or multi-stage CI pipeline. Fundatio therefore
|
|
233
|
+
treats the font base path as a **consumer-controlled deployment concern** rather than hiding it
|
|
234
|
+
behind brittle magic.
|
|
235
|
+
|
|
236
|
+
That keeps the package predictable across:
|
|
237
|
+
|
|
238
|
+
- Vite applications
|
|
239
|
+
- WordPress themes
|
|
240
|
+
- static site builds
|
|
241
|
+
- other self-hosted pipelines
|
|
242
|
+
|
|
68
243
|
---
|
|
69
244
|
|
|
70
|
-
##
|
|
245
|
+
## Bootstrap adapter notes
|
|
71
246
|
|
|
72
|
-
Fundatio
|
|
247
|
+
Fundatio's Bootstrap adapter exists to provide a stable Bootstrap 5 composition point while still
|
|
248
|
+
allowing Fundatio tokens and baselines to participate in the build.
|
|
249
|
+
|
|
250
|
+
```scss
|
|
251
|
+
@use '@vastare/fundatio/scss/adapters/bootstrap/v5' with (
|
|
252
|
+
$vs-bootstrap-baseline: main
|
|
253
|
+
);
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### About Sass deprecation warnings
|
|
257
|
+
|
|
258
|
+
Bootstrap 5 still depends on legacy Sass import-era patterns internally. Because Bootstrap's
|
|
259
|
+
variable configuration model is still based on that pipeline, Fundatio maintains a minimal
|
|
260
|
+
compatibility bridge in the adapter.
|
|
261
|
+
|
|
262
|
+
In practice this means:
|
|
263
|
+
|
|
264
|
+
- Fundatio keeps its own Sass modules modern where it can
|
|
265
|
+
- Bootstrap-originated Sass warnings may still appear until Bootstrap fully modernises upstream
|
|
266
|
+
- those upstream warnings are not the same thing as Fundatio having an invalid public API
|
|
267
|
+
|
|
268
|
+
If you are auditing warnings in CI, separate:
|
|
269
|
+
|
|
270
|
+
- **Fundatio-owned warnings**
|
|
271
|
+
- **Bootstrap upstream warnings**
|
|
272
|
+
|
|
273
|
+
That distinction saves a lot of pointless suffering.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Real-world Vite + WordPress integration example
|
|
73
278
|
|
|
74
|
-
|
|
75
|
-
|
|
279
|
+
```scss
|
|
280
|
+
@use '@vastare/fundatio/scss/tokens/theme' with (
|
|
281
|
+
$theme-prefix: 'vastsite-',
|
|
282
|
+
$base-font-path: '../assets/fonts',
|
|
283
|
+
$primary-colour: #233b4e,
|
|
284
|
+
$secondary-colour: #00bcd4,
|
|
285
|
+
$tertiary-colour: #4b3869
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
@use '@vastare/fundatio/scss/adapters/bootstrap/v5' with (
|
|
289
|
+
$vs-bootstrap-baseline: core
|
|
290
|
+
);
|
|
291
|
+
|
|
292
|
+
@use '@vastare/fundatio/scss/mixins/theme' as theme-mx;
|
|
293
|
+
@use '@vastare/fundatio/scss/mixins/fonts' as font-mx;
|
|
294
|
+
|
|
295
|
+
:root {
|
|
296
|
+
@include theme-mx.theme-root-vars();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@include font-mx.font-faces();
|
|
300
|
+
```
|
|
76
301
|
|
|
77
302
|
---
|
|
78
303
|
|
|
79
|
-
##
|
|
304
|
+
## Public API notes
|
|
305
|
+
|
|
306
|
+
### Version export
|
|
307
|
+
|
|
308
|
+
```ts
|
|
309
|
+
import { fundatioVersion } from '@vastare/fundatio';
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Elements namespace
|
|
313
|
+
|
|
314
|
+
```ts
|
|
315
|
+
import { elements } from '@vastare/fundatio';
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Tailwind adapter namespace
|
|
319
|
+
|
|
320
|
+
```ts
|
|
321
|
+
import { tailwind } from '@vastare/fundatio';
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Fundatio's public surface should be treated as intentional. Internal naming leftovers should not be
|
|
325
|
+
relied upon for new integrations.
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Versioning and release discipline
|
|
330
|
+
|
|
331
|
+
Fundatio follows semantic versioning.
|
|
332
|
+
|
|
333
|
+
- `1.x` is the stable public package line
|
|
334
|
+
- `1.0.1` is the current release represented by this repository snapshot
|
|
335
|
+
|
|
336
|
+
For releases, keep these aligned every single time:
|
|
337
|
+
|
|
338
|
+
- `package.json`
|
|
339
|
+
- git tag
|
|
340
|
+
- npm publish version
|
|
341
|
+
- README examples and metadata
|
|
342
|
+
|
|
343
|
+
Because breaking your consumers with version drift is a spectacularly boring way to lose trust.
|
|
344
|
+
|
|
345
|
+
---
|
|
80
346
|
|
|
81
|
-
|
|
347
|
+
## Release metadata
|
|
82
348
|
|
|
83
|
-
**
|
|
84
|
-
|
|
349
|
+
- **Package:** `@vastare/fundatio`
|
|
350
|
+
- **Release:** `1.0.1`
|
|
351
|
+
- **README target:** production consumer usage
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./chunks/index.cjs");function t(n){return`rgb(var(${n}) / <alpha-value>)`}function e(n){return`--Fundatio-colour-${n}-rgb`}function l(n){return{50:t(e(`${n}-tint-90`)),100:t(e(`${n}-tint-80`)),200:t(e(`${n}-tint-70`)),300:t(e(`${n}-tint-60`)),500:t(e(`${n}-base`)),600:t(e(`${n}-shade-10`)),700:t(e(`${n}-shade-20`)),800:t(e(`${n}-shade-30`)),900:t(e(`${n}-shade-40`))}}function a(){const n=["grey","blue","indigo","purple","pink","red","orange","yellow","green","teal"],i={Fundatio:{0:t("--Fundatio-colour-black-rgb"),1e3:t("--Fundatio-colour-white-rgb")}};for(const o of n)i[o]=l(o);return i}const s={theme:{extend:{colors:a()}}};function u(n){return typeof n=="object"&&n!==null}async function d(){let n;try{n=await Promise.resolve().then(()=>require("./chunks/fundatio.cjs"))}catch{throw new Error('Tailwind is not installed. Install "tailwindcss" to use solTailwindPlugin.')}const i=u(n)&&"default"in n?n.default:n;if(typeof i!="function")throw new Error('"tailwindcss/plugin" did not export a plugin factory function as expected.');return i}async function c(){return(await d())(({addUtilities:i})=>{i({".Fundatio-example":{fontSize:"1rem"}})})}const f=Object.freeze(Object.defineProperty({__proto__:null,solTailwindPlugin:c,solTailwindPreset:s},Symbol.toStringTag,{value:"Module"})),g="1.0.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./chunks/index.cjs");function t(n){return`rgb(var(${n}) / <alpha-value>)`}function e(n){return`--Fundatio-colour-${n}-rgb`}function l(n){return{50:t(e(`${n}-tint-90`)),100:t(e(`${n}-tint-80`)),200:t(e(`${n}-tint-70`)),300:t(e(`${n}-tint-60`)),500:t(e(`${n}-base`)),600:t(e(`${n}-shade-10`)),700:t(e(`${n}-shade-20`)),800:t(e(`${n}-shade-30`)),900:t(e(`${n}-shade-40`))}}function a(){const n=["grey","blue","indigo","purple","pink","red","orange","yellow","green","teal"],i={Fundatio:{0:t("--Fundatio-colour-black-rgb"),1e3:t("--Fundatio-colour-white-rgb")}};for(const o of n)i[o]=l(o);return i}const s={theme:{extend:{colors:a()}}};function u(n){return typeof n=="object"&&n!==null}async function d(){let n;try{n=await Promise.resolve().then(()=>require("./chunks/fundatio.cjs"))}catch{throw new Error('Tailwind is not installed. Install "tailwindcss" to use solTailwindPlugin.')}const i=u(n)&&"default"in n?n.default:n;if(typeof i!="function")throw new Error('"tailwindcss/plugin" did not export a plugin factory function as expected.');return i}async function c(){return(await d())(({addUtilities:i})=>{i({".Fundatio-example":{fontSize:"1rem"}})})}const f=Object.freeze(Object.defineProperty({__proto__:null,solTailwindPlugin:c,solTailwindPreset:s},Symbol.toStringTag,{value:"Module"})),g="1.0.1";exports.elements=r.index;exports.fundatioVersion=g;exports.tailwind=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/ts/adapters/tailwind/v4/preset.ts","../../src/ts/adapters/tailwind/v4/plugin.ts","../../src/index.ts"],"sourcesContent":["/**\n * Fundatio Tailwind preset.\n *\n * This intentionally:\n * - does NOT import Tailwind at runtime (so it can be used as a plain object)\n * - maps Fundatio CSS variables to Tailwind theme tokens\n */\n\nexport type SolTailwindPreset = {\n theme?: Record<string, unknown>;\n};\n\ntype TailwindColours = Record<string, Record<string, string>>;\n\nfunction rgbaVar(varName: string): string {\n // Tailwind supports the <alpha-value> placeholder for arbitrary alpha.\n return `rgb(var(${varName}) / <alpha-value>)`;\n}\n\nfunction solColourVarRgb(token: string): string {\n return `--Fundatio-colour-${token}-rgb`;\n}\n\nfunction makeSolColourScale(colourName: string): Record<string, string> {\n // Fundatio defines: tint-90/80/70/60 + base + shade-10/20/30/40.\n // Map to Tailwind's 50..900 scale.\n return {\n '50': rgbaVar(solColourVarRgb(`${colourName}-tint-90`)),\n '100': rgbaVar(solColourVarRgb(`${colourName}-tint-80`)),\n '200': rgbaVar(solColourVarRgb(`${colourName}-tint-70`)),\n '300': rgbaVar(solColourVarRgb(`${colourName}-tint-60`)),\n '500': rgbaVar(solColourVarRgb(`${colourName}-base`)),\n '600': rgbaVar(solColourVarRgb(`${colourName}-shade-10`)),\n '700': rgbaVar(solColourVarRgb(`${colourName}-shade-20`)),\n '800': rgbaVar(solColourVarRgb(`${colourName}-shade-30`)),\n '900': rgbaVar(solColourVarRgb(`${colourName}-shade-40`)),\n };\n}\n\nfunction makeSolColours(): TailwindColours {\n const names = [\n 'grey',\n 'blue',\n 'indigo',\n 'purple',\n 'pink',\n 'red',\n 'orange',\n 'yellow',\n 'green',\n 'teal',\n ];\n\n const colours: TailwindColours = {\n // Convenience accessors.\n Fundatio: {\n '0': rgbaVar('--Fundatio-colour-black-rgb'),\n '1000': rgbaVar('--Fundatio-colour-white-rgb'),\n },\n };\n\n for (const name of names) {\n colours[name] = makeSolColourScale(name);\n }\n\n return colours;\n}\n\nexport const solTailwindPreset: SolTailwindPreset = {\n theme: {\n extend: {\n colors: makeSolColours(),\n },\n },\n};\n","export type PluginApi = {\n addUtilities: (utilities: Record<string, Record<string, string>>) => void;\n theme: (path: string) => unknown;\n};\n\ntype TailwindPluginFactory = (handler: (api: PluginApi) => void) => unknown;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nasync function loadTailwindPluginFactory(): Promise<TailwindPluginFactory> {\n let mod: unknown;\n\n try {\n // Dynamic import keeps Tailwind as an optional peer dependency.\n mod = (await import('tailwindcss/plugin')) as unknown;\n } catch {\n throw new Error('Tailwind is not installed. Install \"tailwindcss\" to use solTailwindPlugin.');\n }\n\n // Handle both CJS and ESM default export shapes.\n const candidate: unknown = isRecord(mod) && 'default' in mod ? mod.default : mod;\n\n if (typeof candidate !== 'function') {\n throw new Error('\"tailwindcss/plugin\" did not export a plugin factory function as expected.');\n }\n\n return candidate as TailwindPluginFactory;\n}\n\n/**\n * Returns the Fundatio Tailwind plugin.\n *\n * Note: this is async so Tailwind can remain an optional peer dependency.\n */\nexport async function solTailwindPlugin(): Promise<unknown> {\n const plugin = await loadTailwindPluginFactory();\n\n return plugin(({ addUtilities }: PluginApi) => {\n addUtilities({\n '.Fundatio-example': {\n fontSize: '1rem',\n },\n });\n });\n}\n","export * as elements from './elements';\nexport * as tailwind from './ts/adapters/tailwind/v4';\n\nexport const
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ts/adapters/tailwind/v4/preset.ts","../../src/ts/adapters/tailwind/v4/plugin.ts","../../src/index.ts"],"sourcesContent":["/**\n * Fundatio Tailwind preset.\n *\n * This intentionally:\n * - does NOT import Tailwind at runtime (so it can be used as a plain object)\n * - maps Fundatio CSS variables to Tailwind theme tokens\n */\n\nexport type SolTailwindPreset = {\n theme?: Record<string, unknown>;\n};\n\ntype TailwindColours = Record<string, Record<string, string>>;\n\nfunction rgbaVar(varName: string): string {\n // Tailwind supports the <alpha-value> placeholder for arbitrary alpha.\n return `rgb(var(${varName}) / <alpha-value>)`;\n}\n\nfunction solColourVarRgb(token: string): string {\n return `--Fundatio-colour-${token}-rgb`;\n}\n\nfunction makeSolColourScale(colourName: string): Record<string, string> {\n // Fundatio defines: tint-90/80/70/60 + base + shade-10/20/30/40.\n // Map to Tailwind's 50..900 scale.\n return {\n '50': rgbaVar(solColourVarRgb(`${colourName}-tint-90`)),\n '100': rgbaVar(solColourVarRgb(`${colourName}-tint-80`)),\n '200': rgbaVar(solColourVarRgb(`${colourName}-tint-70`)),\n '300': rgbaVar(solColourVarRgb(`${colourName}-tint-60`)),\n '500': rgbaVar(solColourVarRgb(`${colourName}-base`)),\n '600': rgbaVar(solColourVarRgb(`${colourName}-shade-10`)),\n '700': rgbaVar(solColourVarRgb(`${colourName}-shade-20`)),\n '800': rgbaVar(solColourVarRgb(`${colourName}-shade-30`)),\n '900': rgbaVar(solColourVarRgb(`${colourName}-shade-40`)),\n };\n}\n\nfunction makeSolColours(): TailwindColours {\n const names = [\n 'grey',\n 'blue',\n 'indigo',\n 'purple',\n 'pink',\n 'red',\n 'orange',\n 'yellow',\n 'green',\n 'teal',\n ];\n\n const colours: TailwindColours = {\n // Convenience accessors.\n Fundatio: {\n '0': rgbaVar('--Fundatio-colour-black-rgb'),\n '1000': rgbaVar('--Fundatio-colour-white-rgb'),\n },\n };\n\n for (const name of names) {\n colours[name] = makeSolColourScale(name);\n }\n\n return colours;\n}\n\nexport const solTailwindPreset: SolTailwindPreset = {\n theme: {\n extend: {\n colors: makeSolColours(),\n },\n },\n};\n","export type PluginApi = {\n addUtilities: (utilities: Record<string, Record<string, string>>) => void;\n theme: (path: string) => unknown;\n};\n\ntype TailwindPluginFactory = (handler: (api: PluginApi) => void) => unknown;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nasync function loadTailwindPluginFactory(): Promise<TailwindPluginFactory> {\n let mod: unknown;\n\n try {\n // Dynamic import keeps Tailwind as an optional peer dependency.\n mod = (await import('tailwindcss/plugin')) as unknown;\n } catch {\n throw new Error('Tailwind is not installed. Install \"tailwindcss\" to use solTailwindPlugin.');\n }\n\n // Handle both CJS and ESM default export shapes.\n const candidate: unknown = isRecord(mod) && 'default' in mod ? mod.default : mod;\n\n if (typeof candidate !== 'function') {\n throw new Error('\"tailwindcss/plugin\" did not export a plugin factory function as expected.');\n }\n\n return candidate as TailwindPluginFactory;\n}\n\n/**\n * Returns the Fundatio Tailwind plugin.\n *\n * Note: this is async so Tailwind can remain an optional peer dependency.\n */\nexport async function solTailwindPlugin(): Promise<unknown> {\n const plugin = await loadTailwindPluginFactory();\n\n return plugin(({ addUtilities }: PluginApi) => {\n addUtilities({\n '.Fundatio-example': {\n fontSize: '1rem',\n },\n });\n });\n}\n","export * as elements from './elements';\nexport * as tailwind from './ts/adapters/tailwind/v4';\n\n/**\n * Canonical package version.\n */\nexport const fundatioVersion: string = '1.0.1';\n"],"names":["rgbaVar","varName","solColourVarRgb","token","makeSolColourScale","colourName","makeSolColours","names","colours","name","solTailwindPreset","isRecord","value","loadTailwindPluginFactory","mod","candidate","solTailwindPlugin","addUtilities","fundatioVersion"],"mappings":"sHAcA,SAASA,EAAQC,EAAyB,CAExC,MAAO,WAAWA,CAAO,oBAC3B,CAEA,SAASC,EAAgBC,EAAuB,CAC9C,MAAO,qBAAqBA,CAAK,MACnC,CAEA,SAASC,EAAmBC,EAA4C,CAGtE,MAAO,CACL,GAAML,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC,EACtD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC,EACvD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC,EACvD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC,EACvD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,OAAO,CAAC,EACpD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC,EACxD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC,EACxD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC,EACxD,IAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC,CAAA,CAE5D,CAEA,SAASC,GAAkC,CACzC,MAAMC,EAAQ,CACZ,OACA,OACA,SACA,SACA,OACA,MACA,SACA,SACA,QACA,MAAA,EAGIC,EAA2B,CAE/B,SAAU,CACR,EAAKR,EAAQ,6BAA6B,EAC1C,IAAQA,EAAQ,6BAA6B,CAAA,CAC/C,EAGF,UAAWS,KAAQF,EACjBC,EAAQC,CAAI,EAAIL,EAAmBK,CAAI,EAGzC,OAAOD,CACT,CAEO,MAAME,EAAuC,CAClD,MAAO,CACL,OAAQ,CACN,OAAQJ,EAAA,CAAe,CACzB,CAEJ,ECnEA,SAASK,EAASC,EAAkD,CAClE,OAAO,OAAOA,GAAU,UAAYA,IAAU,IAChD,CAEA,eAAeC,GAA4D,CACzE,IAAIC,EAEJ,GAAI,CAEFA,EAAO,MAAM,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,uBAAoB,CAAA,CAC1C,MAAQ,CACN,MAAM,IAAI,MAAM,4EAA4E,CAC9F,CAGA,MAAMC,EAAqBJ,EAASG,CAAG,GAAK,YAAaA,EAAMA,EAAI,QAAUA,EAE7E,GAAI,OAAOC,GAAc,WACvB,MAAM,IAAI,MAAM,4EAA4E,EAG9F,OAAOA,CACT,CAOA,eAAsBC,GAAsC,CAG1D,OAFe,MAAMH,EAAA,GAEP,CAAC,CAAE,aAAAI,KAA8B,CAC7CA,EAAa,CACX,oBAAqB,CACnB,SAAU,MAAA,CACZ,CACD,CACH,CAAC,CACH,4ICxCaC,EAA0B"}
|
package/dist/esm/index.js
CHANGED
|
@@ -30,16 +30,16 @@ function a() {
|
|
|
30
30
|
"yellow",
|
|
31
31
|
"green",
|
|
32
32
|
"teal"
|
|
33
|
-
],
|
|
33
|
+
], i = {
|
|
34
34
|
// Convenience accessors.
|
|
35
35
|
Fundatio: {
|
|
36
36
|
0: t("--Fundatio-colour-black-rgb"),
|
|
37
37
|
1e3: t("--Fundatio-colour-white-rgb")
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
for (const
|
|
41
|
-
o
|
|
42
|
-
return
|
|
40
|
+
for (const o of n)
|
|
41
|
+
i[o] = r(o);
|
|
42
|
+
return i;
|
|
43
43
|
}
|
|
44
44
|
const l = {
|
|
45
45
|
theme: {
|
|
@@ -58,14 +58,14 @@ async function u() {
|
|
|
58
58
|
} catch {
|
|
59
59
|
throw new Error('Tailwind is not installed. Install "tailwindcss" to use solTailwindPlugin.');
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
if (typeof
|
|
61
|
+
const i = s(n) && "default" in n ? n.default : n;
|
|
62
|
+
if (typeof i != "function")
|
|
63
63
|
throw new Error('"tailwindcss/plugin" did not export a plugin factory function as expected.');
|
|
64
|
-
return
|
|
64
|
+
return i;
|
|
65
65
|
}
|
|
66
66
|
async function d() {
|
|
67
|
-
return (await u())(({ addUtilities:
|
|
68
|
-
|
|
67
|
+
return (await u())(({ addUtilities: i }) => {
|
|
68
|
+
i({
|
|
69
69
|
".Fundatio-example": {
|
|
70
70
|
fontSize: "1rem"
|
|
71
71
|
}
|
|
@@ -76,10 +76,10 @@ const c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
76
76
|
__proto__: null,
|
|
77
77
|
solTailwindPlugin: d,
|
|
78
78
|
solTailwindPreset: l
|
|
79
|
-
}, Symbol.toStringTag, { value: "Module" })), f = "1.0.
|
|
79
|
+
}, Symbol.toStringTag, { value: "Module" })), f = "1.0.1";
|
|
80
80
|
export {
|
|
81
81
|
w as elements,
|
|
82
|
-
f as
|
|
82
|
+
f as fundatioVersion,
|
|
83
83
|
c as tailwind
|
|
84
84
|
};
|
|
85
85
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/ts/adapters/tailwind/v4/preset.ts","../../src/ts/adapters/tailwind/v4/plugin.ts","../../src/index.ts"],"sourcesContent":["/**\n * Fundatio Tailwind preset.\n *\n * This intentionally:\n * - does NOT import Tailwind at runtime (so it can be used as a plain object)\n * - maps Fundatio CSS variables to Tailwind theme tokens\n */\n\nexport type SolTailwindPreset = {\n theme?: Record<string, unknown>;\n};\n\ntype TailwindColours = Record<string, Record<string, string>>;\n\nfunction rgbaVar(varName: string): string {\n // Tailwind supports the <alpha-value> placeholder for arbitrary alpha.\n return `rgb(var(${varName}) / <alpha-value>)`;\n}\n\nfunction solColourVarRgb(token: string): string {\n return `--Fundatio-colour-${token}-rgb`;\n}\n\nfunction makeSolColourScale(colourName: string): Record<string, string> {\n // Fundatio defines: tint-90/80/70/60 + base + shade-10/20/30/40.\n // Map to Tailwind's 50..900 scale.\n return {\n '50': rgbaVar(solColourVarRgb(`${colourName}-tint-90`)),\n '100': rgbaVar(solColourVarRgb(`${colourName}-tint-80`)),\n '200': rgbaVar(solColourVarRgb(`${colourName}-tint-70`)),\n '300': rgbaVar(solColourVarRgb(`${colourName}-tint-60`)),\n '500': rgbaVar(solColourVarRgb(`${colourName}-base`)),\n '600': rgbaVar(solColourVarRgb(`${colourName}-shade-10`)),\n '700': rgbaVar(solColourVarRgb(`${colourName}-shade-20`)),\n '800': rgbaVar(solColourVarRgb(`${colourName}-shade-30`)),\n '900': rgbaVar(solColourVarRgb(`${colourName}-shade-40`)),\n };\n}\n\nfunction makeSolColours(): TailwindColours {\n const names = [\n 'grey',\n 'blue',\n 'indigo',\n 'purple',\n 'pink',\n 'red',\n 'orange',\n 'yellow',\n 'green',\n 'teal',\n ];\n\n const colours: TailwindColours = {\n // Convenience accessors.\n Fundatio: {\n '0': rgbaVar('--Fundatio-colour-black-rgb'),\n '1000': rgbaVar('--Fundatio-colour-white-rgb'),\n },\n };\n\n for (const name of names) {\n colours[name] = makeSolColourScale(name);\n }\n\n return colours;\n}\n\nexport const solTailwindPreset: SolTailwindPreset = {\n theme: {\n extend: {\n colors: makeSolColours(),\n },\n },\n};\n","export type PluginApi = {\n addUtilities: (utilities: Record<string, Record<string, string>>) => void;\n theme: (path: string) => unknown;\n};\n\ntype TailwindPluginFactory = (handler: (api: PluginApi) => void) => unknown;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nasync function loadTailwindPluginFactory(): Promise<TailwindPluginFactory> {\n let mod: unknown;\n\n try {\n // Dynamic import keeps Tailwind as an optional peer dependency.\n mod = (await import('tailwindcss/plugin')) as unknown;\n } catch {\n throw new Error('Tailwind is not installed. Install \"tailwindcss\" to use solTailwindPlugin.');\n }\n\n // Handle both CJS and ESM default export shapes.\n const candidate: unknown = isRecord(mod) && 'default' in mod ? mod.default : mod;\n\n if (typeof candidate !== 'function') {\n throw new Error('\"tailwindcss/plugin\" did not export a plugin factory function as expected.');\n }\n\n return candidate as TailwindPluginFactory;\n}\n\n/**\n * Returns the Fundatio Tailwind plugin.\n *\n * Note: this is async so Tailwind can remain an optional peer dependency.\n */\nexport async function solTailwindPlugin(): Promise<unknown> {\n const plugin = await loadTailwindPluginFactory();\n\n return plugin(({ addUtilities }: PluginApi) => {\n addUtilities({\n '.Fundatio-example': {\n fontSize: '1rem',\n },\n });\n });\n}\n","export * as elements from './elements';\nexport * as tailwind from './ts/adapters/tailwind/v4';\n\nexport const
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/ts/adapters/tailwind/v4/preset.ts","../../src/ts/adapters/tailwind/v4/plugin.ts","../../src/index.ts"],"sourcesContent":["/**\n * Fundatio Tailwind preset.\n *\n * This intentionally:\n * - does NOT import Tailwind at runtime (so it can be used as a plain object)\n * - maps Fundatio CSS variables to Tailwind theme tokens\n */\n\nexport type SolTailwindPreset = {\n theme?: Record<string, unknown>;\n};\n\ntype TailwindColours = Record<string, Record<string, string>>;\n\nfunction rgbaVar(varName: string): string {\n // Tailwind supports the <alpha-value> placeholder for arbitrary alpha.\n return `rgb(var(${varName}) / <alpha-value>)`;\n}\n\nfunction solColourVarRgb(token: string): string {\n return `--Fundatio-colour-${token}-rgb`;\n}\n\nfunction makeSolColourScale(colourName: string): Record<string, string> {\n // Fundatio defines: tint-90/80/70/60 + base + shade-10/20/30/40.\n // Map to Tailwind's 50..900 scale.\n return {\n '50': rgbaVar(solColourVarRgb(`${colourName}-tint-90`)),\n '100': rgbaVar(solColourVarRgb(`${colourName}-tint-80`)),\n '200': rgbaVar(solColourVarRgb(`${colourName}-tint-70`)),\n '300': rgbaVar(solColourVarRgb(`${colourName}-tint-60`)),\n '500': rgbaVar(solColourVarRgb(`${colourName}-base`)),\n '600': rgbaVar(solColourVarRgb(`${colourName}-shade-10`)),\n '700': rgbaVar(solColourVarRgb(`${colourName}-shade-20`)),\n '800': rgbaVar(solColourVarRgb(`${colourName}-shade-30`)),\n '900': rgbaVar(solColourVarRgb(`${colourName}-shade-40`)),\n };\n}\n\nfunction makeSolColours(): TailwindColours {\n const names = [\n 'grey',\n 'blue',\n 'indigo',\n 'purple',\n 'pink',\n 'red',\n 'orange',\n 'yellow',\n 'green',\n 'teal',\n ];\n\n const colours: TailwindColours = {\n // Convenience accessors.\n Fundatio: {\n '0': rgbaVar('--Fundatio-colour-black-rgb'),\n '1000': rgbaVar('--Fundatio-colour-white-rgb'),\n },\n };\n\n for (const name of names) {\n colours[name] = makeSolColourScale(name);\n }\n\n return colours;\n}\n\nexport const solTailwindPreset: SolTailwindPreset = {\n theme: {\n extend: {\n colors: makeSolColours(),\n },\n },\n};\n","export type PluginApi = {\n addUtilities: (utilities: Record<string, Record<string, string>>) => void;\n theme: (path: string) => unknown;\n};\n\ntype TailwindPluginFactory = (handler: (api: PluginApi) => void) => unknown;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\nasync function loadTailwindPluginFactory(): Promise<TailwindPluginFactory> {\n let mod: unknown;\n\n try {\n // Dynamic import keeps Tailwind as an optional peer dependency.\n mod = (await import('tailwindcss/plugin')) as unknown;\n } catch {\n throw new Error('Tailwind is not installed. Install \"tailwindcss\" to use solTailwindPlugin.');\n }\n\n // Handle both CJS and ESM default export shapes.\n const candidate: unknown = isRecord(mod) && 'default' in mod ? mod.default : mod;\n\n if (typeof candidate !== 'function') {\n throw new Error('\"tailwindcss/plugin\" did not export a plugin factory function as expected.');\n }\n\n return candidate as TailwindPluginFactory;\n}\n\n/**\n * Returns the Fundatio Tailwind plugin.\n *\n * Note: this is async so Tailwind can remain an optional peer dependency.\n */\nexport async function solTailwindPlugin(): Promise<unknown> {\n const plugin = await loadTailwindPluginFactory();\n\n return plugin(({ addUtilities }: PluginApi) => {\n addUtilities({\n '.Fundatio-example': {\n fontSize: '1rem',\n },\n });\n });\n}\n","export * as elements from './elements';\nexport * as tailwind from './ts/adapters/tailwind/v4';\n\n/**\n * Canonical package version.\n */\nexport const fundatioVersion: string = '1.0.1';\n"],"names":["rgbaVar","varName","solColourVarRgb","token","makeSolColourScale","colourName","makeSolColours","names","colours","name","solTailwindPreset","isRecord","value","loadTailwindPluginFactory","mod","candidate","solTailwindPlugin","addUtilities","fundatioVersion"],"mappings":";AAcA,SAASA,EAAQC,GAAyB;AAExC,SAAO,WAAWA,CAAO;AAC3B;AAEA,SAASC,EAAgBC,GAAuB;AAC9C,SAAO,qBAAqBA,CAAK;AACnC;AAEA,SAASC,EAAmBC,GAA4C;AAGtE,SAAO;AAAA,IACL,IAAML,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC;AAAA,IACtD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC;AAAA,IACvD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC;AAAA,IACvD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,UAAU,CAAC;AAAA,IACvD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,OAAO,CAAC;AAAA,IACpD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC;AAAA,IACxD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC;AAAA,IACxD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC;AAAA,IACxD,KAAOL,EAAQE,EAAgB,GAAGG,CAAU,WAAW,CAAC;AAAA,EAAA;AAE5D;AAEA,SAASC,IAAkC;AACzC,QAAMC,IAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,GAGIC,IAA2B;AAAA;AAAA,IAE/B,UAAU;AAAA,MACR,GAAKR,EAAQ,6BAA6B;AAAA,MAC1C,KAAQA,EAAQ,6BAA6B;AAAA,IAAA;AAAA,EAC/C;AAGF,aAAWS,KAAQF;AACjB,IAAAC,EAAQC,CAAI,IAAIL,EAAmBK,CAAI;AAGzC,SAAOD;AACT;AAEO,MAAME,IAAuC;AAAA,EAClD,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,QAAQJ,EAAA;AAAA,IAAe;AAAA,EACzB;AAEJ;ACnEA,SAASK,EAASC,GAAkD;AAClE,SAAO,OAAOA,KAAU,YAAYA,MAAU;AAChD;AAEA,eAAeC,IAA4D;AACzE,MAAIC;AAEJ,MAAI;AAEF,IAAAA,IAAO,MAAM,OAAO,sBAAoB;AAAA,EAC1C,QAAQ;AACN,UAAM,IAAI,MAAM,4EAA4E;AAAA,EAC9F;AAGA,QAAMC,IAAqBJ,EAASG,CAAG,KAAK,aAAaA,IAAMA,EAAI,UAAUA;AAE7E,MAAI,OAAOC,KAAc;AACvB,UAAM,IAAI,MAAM,4EAA4E;AAG9F,SAAOA;AACT;AAOA,eAAsBC,IAAsC;AAG1D,UAFe,MAAMH,EAAA,GAEP,CAAC,EAAE,cAAAI,QAA8B;AAC7C,IAAAA,EAAa;AAAA,MACX,qBAAqB;AAAA,QACnB,UAAU;AAAA,MAAA;AAAA,IACZ,CACD;AAAA,EACH,CAAC;AACH;;;;;8CCxCaC,IAA0B;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export * as elements from './elements';
|
|
2
2
|
export * as tailwind from './ts/adapters/tailwind/v4';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Canonical package version.
|
|
5
|
+
*/
|
|
6
|
+
export declare const fundatioVersion: string;
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AAEtD,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,QAAQ,MAAM,2BAA2B,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vastare/fundatio",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Production-grade design foundation for Vastare themes, applications, and shared UI infrastructure.",
|
|
5
5
|
"homepage": "https://github.com/vastaredev/fundatio#readme",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/vastaredev/fundatio/issues"
|
|
@@ -702,5 +702,18 @@
|
|
|
702
702
|
"tailwindcss": {
|
|
703
703
|
"optional": true
|
|
704
704
|
}
|
|
705
|
-
}
|
|
705
|
+
},
|
|
706
|
+
"keywords": [
|
|
707
|
+
"vastare",
|
|
708
|
+
"design-system",
|
|
709
|
+
"design-tokens",
|
|
710
|
+
"sass",
|
|
711
|
+
"scss",
|
|
712
|
+
"bootstrap",
|
|
713
|
+
"vite",
|
|
714
|
+
"wordpress",
|
|
715
|
+
"typescript",
|
|
716
|
+
"foundation"
|
|
717
|
+
],
|
|
718
|
+
"sass": "./src/scss/main.scss"
|
|
706
719
|
}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* Provides a single SCSS entry for consuming Bootstrap v5, optionally composed
|
|
5
5
|
* with a Fundatio baseline.
|
|
6
6
|
*
|
|
7
|
+
* Bootstrap 5 still exposes its Sass customisation surface through legacy import-era
|
|
8
|
+
* globals. Fundatio therefore keeps the adapter bridge intentionally small and
|
|
9
|
+
* isolated here so the rest of the package can remain module-first.
|
|
10
|
+
*
|
|
7
11
|
* Baseline options:
|
|
8
12
|
* - none: Bootstrap only
|
|
9
13
|
* - core: Fundatio core + Bootstrap
|
|
@@ -35,6 +39,8 @@ $_allowed-baselines: (none, core, main);
|
|
|
35
39
|
|
|
36
40
|
/**
|
|
37
41
|
* Bootstrap still relies on legacy global variable configuration via @import.
|
|
42
|
+
* Fundatio limits that legacy flow to this adapter because Bootstrap variable
|
|
43
|
+
* overrides are not yet exposed through a fully modern @use-based API upstream.
|
|
38
44
|
* Dart Sass requires @use to appear before other rules, so these @imports must
|
|
39
45
|
* come after @use.
|
|
40
46
|
*
|
|
@@ -141,6 +141,18 @@ $dark-colour: colours.$grey-shade-80 !default;
|
|
|
141
141
|
- Asset paths
|
|
142
142
|
--------------------------------------------------------------------------- */
|
|
143
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Base runtime path used when emitting packaged font URLs.
|
|
146
|
+
*
|
|
147
|
+
* Consumers should override this to the final public path used by their own
|
|
148
|
+
* deployment target when copying Fundatio fonts into application-owned assets.
|
|
149
|
+
*
|
|
150
|
+
* Examples:
|
|
151
|
+
* - '../assets/fonts' for a theme/app-local dist structure
|
|
152
|
+
* - '/wp-content/themes/vastsite/dist/assets/fonts' for a WordPress deployment
|
|
153
|
+
*
|
|
154
|
+
* @type string
|
|
155
|
+
*/
|
|
144
156
|
$base-font-path: '../assets/fonts' !default;
|
|
145
157
|
|
|
146
158
|
/* ----------------------------------------------------------------------------
|