@bamboocss/generator 1.30.1 → 1.32.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/dist/index.cjs +198 -136
- package/dist/index.d.cts +30 -1
- package/dist/index.d.mts +30 -1
- package/dist/index.mjs +198 -137
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -146,4 +146,33 @@ declare class Generator extends Context {
|
|
|
146
146
|
*/
|
|
147
147
|
declare function getThemeCss(ctx: Context, themeName: string): string;
|
|
148
148
|
//#endregion
|
|
149
|
-
|
|
149
|
+
//#region src/artifacts/js/package-json.d.ts
|
|
150
|
+
/**
|
|
151
|
+
* The entry points this output offers, and — where it is resolved as a package — the only
|
|
152
|
+
* paths into it.
|
|
153
|
+
*
|
|
154
|
+
* Two things this buys, and one it does not.
|
|
155
|
+
*
|
|
156
|
+
* It makes the entry points resolve under `node16`/`nodenext`. Without a map, those modes do
|
|
157
|
+
* no directory-index lookup, so `styled-system/tokens` does not resolve at all and the
|
|
158
|
+
* artifact has to be spelled `styled-system/tokens/index.mjs` — a workaround
|
|
159
|
+
* `token-references.ts` still has to recognise because people write it. Declaring `./tokens`
|
|
160
|
+
* is what makes the ordinary spelling work.
|
|
161
|
+
*
|
|
162
|
+
* It states the boundary. `css/merge-css`, `css/utilities`, `tokens/tokens` and `helpers`
|
|
163
|
+
* exist to be imported by the modules beside them, not by an app; a relative import inside
|
|
164
|
+
* the package is unaffected by this map, an external one now fails.
|
|
165
|
+
*
|
|
166
|
+
* What it does not do is enforce that against the common setup. The generated directory
|
|
167
|
+
* usually lives in the project and is reached through a `paths` alias —
|
|
168
|
+
* `"styled-system/*": ["./styled-system/*"]` — and a `paths` mapping resolves straight to the
|
|
169
|
+
* filesystem, so no `exports` map is consulted. There is nothing this file can do about that;
|
|
170
|
+
* the enforcement lands where the output is consumed as a real package, which is the
|
|
171
|
+
* component-library layout `emit-pkg` produces.
|
|
172
|
+
*
|
|
173
|
+
* `./types` carries no runtime target because the directory holds only declarations. A type
|
|
174
|
+
* import resolves; a value import fails, which is the truth about it.
|
|
175
|
+
*/
|
|
176
|
+
declare function generatePackageExports(ctx: Context, base?: string): Record<string, unknown>;
|
|
177
|
+
//#endregion
|
|
178
|
+
export { Generator, SplitCssArtifact, SplitCssResult, generatePackageExports, getThemeCss };
|
package/dist/index.d.mts
CHANGED
|
@@ -146,4 +146,33 @@ declare class Generator extends Context {
|
|
|
146
146
|
*/
|
|
147
147
|
declare function getThemeCss(ctx: Context, themeName: string): string;
|
|
148
148
|
//#endregion
|
|
149
|
-
|
|
149
|
+
//#region src/artifacts/js/package-json.d.ts
|
|
150
|
+
/**
|
|
151
|
+
* The entry points this output offers, and — where it is resolved as a package — the only
|
|
152
|
+
* paths into it.
|
|
153
|
+
*
|
|
154
|
+
* Two things this buys, and one it does not.
|
|
155
|
+
*
|
|
156
|
+
* It makes the entry points resolve under `node16`/`nodenext`. Without a map, those modes do
|
|
157
|
+
* no directory-index lookup, so `styled-system/tokens` does not resolve at all and the
|
|
158
|
+
* artifact has to be spelled `styled-system/tokens/index.mjs` — a workaround
|
|
159
|
+
* `token-references.ts` still has to recognise because people write it. Declaring `./tokens`
|
|
160
|
+
* is what makes the ordinary spelling work.
|
|
161
|
+
*
|
|
162
|
+
* It states the boundary. `css/merge-css`, `css/utilities`, `tokens/tokens` and `helpers`
|
|
163
|
+
* exist to be imported by the modules beside them, not by an app; a relative import inside
|
|
164
|
+
* the package is unaffected by this map, an external one now fails.
|
|
165
|
+
*
|
|
166
|
+
* What it does not do is enforce that against the common setup. The generated directory
|
|
167
|
+
* usually lives in the project and is reached through a `paths` alias —
|
|
168
|
+
* `"styled-system/*": ["./styled-system/*"]` — and a `paths` mapping resolves straight to the
|
|
169
|
+
* filesystem, so no `exports` map is consulted. There is nothing this file can do about that;
|
|
170
|
+
* the enforcement lands where the output is consumed as a real package, which is the
|
|
171
|
+
* component-library layout `emit-pkg` produces.
|
|
172
|
+
*
|
|
173
|
+
* `./types` carries no runtime target because the directory holds only declarations. A type
|
|
174
|
+
* import resolves; a value import fails, which is the truth about it.
|
|
175
|
+
*/
|
|
176
|
+
declare function generatePackageExports(ctx: Context, base?: string): Record<string, unknown>;
|
|
177
|
+
//#endregion
|
|
178
|
+
export { Generator, SplitCssArtifact, SplitCssResult, generatePackageExports, getThemeCss };
|