@fastkit/plugboy-vanilla-extract-plugin 1.0.2 → 1.0.4

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/css.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { StyleRule, GlobalStyleRule } from '@vanilla-extract/css';
1
+ import { createGlobalTheme, StyleRule, GlobalStyleRule } from '@vanilla-extract/css';
2
2
 
3
3
  type LayerStyleRules = NonNullable<StyleRule['@layer']>[string];
4
4
  type LayerGlobalStyleRules = NonNullable<GlobalStyleRule['@layer']>[string];
@@ -17,19 +17,42 @@ interface LayerStyle {
17
17
  * @see {@link globalStyle}
18
18
  */
19
19
  global(selector: string, rule: LayerGlobalStyleRules): void;
20
- defineNestedLayer(globalNameOrNestedOptions?: string | NestedLayerOptions): LayerStyle;
20
+ /**
21
+ * @see {@link _createGlobalTheme}
22
+ */
23
+ globalTheme: typeof createGlobalTheme;
24
+ defineNestedLayer(globalNameOrNestedOptions?: string | DefineLayerOptions): LayerStyle;
25
+ /**
26
+ * Add global CSS variable with layer
27
+ *
28
+ * @remarks The vanilla-extract API is buggy when handling layered css variables.
29
+ *
30
+ * @param selector - selector
31
+ * @param vars - variables
32
+ */
33
+ pushGlobalVars(selector: string, vars: Record<string, string>): void;
34
+ /**
35
+ * Output variables accumulated by `pushGlobalVars`.
36
+ *
37
+ * @remarks The vanilla-extract API is buggy when handling layered css variables.
38
+ */
39
+ dumpGlobalVars(): void;
21
40
  }
22
- interface DefineLayerBaseOptions {
41
+ interface DefineLayerParentOptions {
23
42
  parent?: string;
24
43
  }
25
- interface DefineLayerScopedOptions extends DefineLayerBaseOptions {
44
+ interface DefineLayerScopedOptions {
45
+ /** Debug ID */
26
46
  debugId?: string;
47
+ globalName?: never;
27
48
  }
28
- interface DefineLayerGlobalOptions extends DefineLayerBaseOptions {
49
+ interface DefineLayerGlobalOptions {
50
+ debugId?: never;
51
+ /** Parent layer name */
29
52
  globalName: string;
30
53
  }
31
54
  type DefineLayerOptions = DefineLayerScopedOptions | DefineLayerGlobalOptions;
32
- type NestedLayerOptions = Omit<DefineLayerOptions, 'parent'>;
33
- declare function defineLayerStyle(globalNameOrOptions?: string | DefineLayerOptions): LayerStyle;
55
+ type DefineNestableLayerOptions = DefineLayerOptions & DefineLayerParentOptions;
56
+ declare function defineLayerStyle(globalNameOrOptions?: string | DefineNestableLayerOptions): LayerStyle;
34
57
 
35
- export { DefineLayerBaseOptions, DefineLayerGlobalOptions, DefineLayerOptions, DefineLayerScopedOptions, LayerStyle, NestedLayerOptions, defineLayerStyle };
58
+ export { DefineLayerGlobalOptions, DefineLayerOptions, DefineLayerParentOptions, DefineLayerScopedOptions, DefineNestableLayerOptions, LayerStyle, defineLayerStyle };
package/dist/css.mjs CHANGED
@@ -1,5 +1,61 @@
1
- import { globalLayer, layer, globalStyle, style } from '@vanilla-extract/css';
1
+ import { globalLayer, layer, globalStyle, createThemeContract, style } from '@vanilla-extract/css';
2
2
 
3
+ // src/css/utils.ts
4
+ function get(obj, path) {
5
+ let result = obj;
6
+ for (const key of path) {
7
+ if (!(key in result)) {
8
+ throw new Error(`Path ${path.join(" -> ")} does not exist in object`);
9
+ }
10
+ result = result[key];
11
+ }
12
+ return result;
13
+ }
14
+ function walkObject(obj, fn, path = []) {
15
+ const clone = obj.constructor();
16
+ for (const key in obj) {
17
+ const value = obj[key];
18
+ const currentPath = [...path, key];
19
+ if (typeof value === "string" || typeof value === "number" || value == null) {
20
+ clone[key] = fn(value, currentPath);
21
+ } else if (typeof value === "object" && !Array.isArray(value)) {
22
+ clone[key] = walkObject(value, fn, currentPath);
23
+ } else {
24
+ console.warn(
25
+ `Skipping invalid key "${currentPath.join(
26
+ "."
27
+ )}". Should be a string, number, null or object. Received: "${Array.isArray(value) ? "Array" : typeof value}"`
28
+ );
29
+ }
30
+ }
31
+ return clone;
32
+ }
33
+ function assignVars(varContract, tokens) {
34
+ const varSetters = {};
35
+ walkObject(tokens, (value, path) => {
36
+ varSetters[get(varContract, path)] = String(value);
37
+ });
38
+ return varSetters;
39
+ }
40
+
41
+ // src/css/theme.ts
42
+ function createGlobalTheme(layerName, selector, arg2, arg3) {
43
+ const shouldCreateVars = Boolean(!arg3);
44
+ const themeVars = shouldCreateVars ? createThemeContract(arg2) : arg2;
45
+ const tokens = shouldCreateVars ? arg2 : arg3;
46
+ globalStyle(selector, {
47
+ "@layer": {
48
+ [layerName]: {
49
+ vars: assignVars(themeVars, tokens)
50
+ }
51
+ }
52
+ });
53
+ if (shouldCreateVars) {
54
+ return themeVars;
55
+ }
56
+ }
57
+
58
+ // src/css/layer.ts
3
59
  function isGlobalOptions(options) {
4
60
  return "globalName" in options;
5
61
  }
@@ -34,6 +90,24 @@ function defineLayerStyle(globalNameOrOptions) {
34
90
  }
35
91
  });
36
92
  };
93
+ layerStyle.globalTheme = (...args) => createGlobalTheme(layerName, ...args);
94
+ let _varQueues = [];
95
+ layerStyle.pushGlobalVars = function pushGlobalVars(selector, vars) {
96
+ let queue = _varQueues.find((q) => q[0] === selector);
97
+ if (!queue) {
98
+ queue = [selector, {}];
99
+ _varQueues.push(queue);
100
+ }
101
+ Object.assign(queue[1], vars);
102
+ };
103
+ layerStyle.dumpGlobalVars = function dumpGlobalVars() {
104
+ for (const [selector, vars] of _varQueues) {
105
+ layerStyle.global(selector, {
106
+ vars
107
+ });
108
+ }
109
+ _varQueues = [];
110
+ };
37
111
  layerStyle.defineNestedLayer = function defineNestedLayer(globalNameOrNestedOptions) {
38
112
  const options2 = normalizeToObject(globalNameOrNestedOptions);
39
113
  return defineLayerStyle({
package/dist/css.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/css/layer.ts"],"names":["layerStyle","options"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OAEK;AA+CP,SAAS,gBACP,SACqC;AACrC,SAAO,gBAAgB;AACzB;AAEA,SAAS,kBACP,QACG;AACH,MAAI,CAAC;AAAQ,WAAO,CAAC;AACrB,MAAI,OAAO,WAAW;AAAU,WAAO,EAAE,YAAY,OAAO;AAC5D,SAAO;AACT;AAEO,SAAS,iBACd,qBACY;AACZ,QAAM,UAAU,kBAAkB,mBAAmB;AACrD,QAAM,EAAE,OAAO,IAAI;AAEnB,QAAM,YAAY,gBAAgB,OAAO,IACrC,YAAY,EAAE,OAAO,GAAG,QAAQ,UAAU,IAC1C,MAAM,EAAE,OAAO,GAAG,QAAQ,OAAO;AAErC,QAAM,aAAyB,SAASA,YAAW,MAAM,SAAS;AAChE,WAAO;AAAA,MACL;AAAA,QACE,UAAU;AAAA,UACR,CAAC,SAAS,GAAG;AAAA,QACf;AAAA,MACF;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,aAAW,YAAY;AACvB,aAAW,kBAAkB,UAAU;AACvC,aAAW,QAAQ;AAEnB,aAAW,SAAS,SAAS,iBAAiB,UAAU,MAAM;AAC5D,WAAO,YAAY,UAAU;AAAA,MAC3B,UAAU;AAAA,QACR,CAAC,SAAS,GAAG;AAAA,MACf;AAAA,IACF,CAAC;AAAA,EACH;AAEA,aAAW,oBAAoB,SAAS,kBACtC,2BACA;AACA,UAAMC,WAAU,kBAAkB,yBAAyB;AAC3D,WAAO,iBAAiB;AAAA,MACtB,GAAGA;AAAA,MACH,QAAQ;AAAA,IACV,CAAC;AAAA,EACH;AAEA,SAAO;AACT","sourcesContent":["import {\n style,\n layer,\n globalLayer,\n StyleRule,\n globalStyle,\n GlobalStyleRule,\n} from '@vanilla-extract/css';\n\ntype LayerStyleRules = NonNullable<StyleRule['@layer']>[string];\n\ntype LayerGlobalStyleRules = NonNullable<GlobalStyleRule['@layer']>[string];\n\nexport interface LayerStyle {\n layerName: string;\n parentLayerName: string | null;\n /**\n * @see {@link style}\n */\n (rule: LayerStyleRules, debugId?: string): string;\n\n /**\n * @see {@link style}\n */\n style(rule: LayerStyleRules, debugId?: string): string;\n\n /**\n * @see {@link globalStyle}\n */\n global(selector: string, rule: LayerGlobalStyleRules): void;\n\n defineNestedLayer(\n globalNameOrNestedOptions?: string | NestedLayerOptions,\n ): LayerStyle;\n}\n\nexport interface DefineLayerBaseOptions {\n parent?: string;\n}\n\nexport interface DefineLayerScopedOptions extends DefineLayerBaseOptions {\n debugId?: string;\n}\n\nexport interface DefineLayerGlobalOptions extends DefineLayerBaseOptions {\n globalName: string;\n}\n\nexport type DefineLayerOptions =\n | DefineLayerScopedOptions\n | DefineLayerGlobalOptions;\n\nexport type NestedLayerOptions = Omit<DefineLayerOptions, 'parent'>;\n\nfunction isGlobalOptions(\n options: DefineLayerOptions,\n): options is DefineLayerGlobalOptions {\n return 'globalName' in options;\n}\n\nfunction normalizeToObject<T extends NestedLayerOptions>(\n source?: string | T,\n): T {\n if (!source) return {} as T;\n if (typeof source === 'string') return { globalName: source } as unknown as T;\n return source;\n}\n\nexport function defineLayerStyle(\n globalNameOrOptions?: string | DefineLayerOptions,\n): LayerStyle {\n const options = normalizeToObject(globalNameOrOptions);\n const { parent } = options;\n\n const layerName = isGlobalOptions(options)\n ? globalLayer({ parent }, options.globalName)\n : layer({ parent }, options.debugId);\n\n const layerStyle: LayerStyle = function layerStyle(rule, debugId) {\n return style(\n {\n '@layer': {\n [layerName]: rule,\n },\n },\n debugId,\n );\n };\n\n layerStyle.layerName = layerName;\n layerStyle.parentLayerName = parent || null;\n layerStyle.style = layerStyle;\n\n layerStyle.global = function layerGlobalStyle(selector, rule) {\n return globalStyle(selector, {\n '@layer': {\n [layerName]: rule,\n },\n });\n };\n\n layerStyle.defineNestedLayer = function defineNestedLayer(\n globalNameOrNestedOptions,\n ) {\n const options = normalizeToObject(globalNameOrNestedOptions);\n return defineLayerStyle({\n ...options,\n parent: layerName,\n });\n };\n\n return layerStyle;\n}\n"]}
1
+ {"version":3,"sources":["../src/css/layer.ts","../src/css/theme.ts","../src/css/utils.ts"],"names":["globalStyle","layerStyle","options"],"mappings":";;;;;;;;;;;;;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,UAAU,CAAC,CAAC;AACrB,iBAAW,KAAK,KAAK;AAAA,IACvB;AACA,WAAO,OAAO,MAAM,CAAC,GAAG,IAAI;AAAA,EAC9B;AAEA,aAAW,iBAAiB,SAAS,iBAAiB;AACpD,eAAW,CAAC,UAAU,IAAI,KAAK,YAAY;AACzC,iBAAW,OAAO,UAAU;AAAA,QAC1B;AAAA,MACF,CAAC;AAAA,IACH;AACA,iBAAa,CAAC;AAAA,EAChB;AAEA,aAAW,oBAAoB,SAAS,kBACtC,2BACA;AACA,UAAME,WAAU,kBAAkB,yBAAyB;AAC3D,WAAO,iBAAiB;AAAA,MACtB,GAAGA;AAAA,MACH,QAAQ;AAAA,IACV,CAAC;AAAA,EACH;AAEA,SAAO;AACT","sourcesContent":["import {\n style,\n layer,\n globalLayer,\n StyleRule,\n globalStyle,\n GlobalStyleRule,\n createGlobalTheme as _createGlobalTheme,\n} from '@vanilla-extract/css';\nimport { createGlobalTheme } from './theme';\n\ntype LayerStyleRules = NonNullable<StyleRule['@layer']>[string];\n\ntype LayerGlobalStyleRules = NonNullable<GlobalStyleRule['@layer']>[string];\n\nexport interface LayerStyle {\n layerName: string;\n parentLayerName: string | null;\n /**\n * @see {@link style}\n */\n (rule: LayerStyleRules, debugId?: string): string;\n\n /**\n * @see {@link style}\n */\n style(rule: LayerStyleRules, debugId?: string): string;\n\n /**\n * @see {@link globalStyle}\n */\n global(selector: string, rule: LayerGlobalStyleRules): void;\n\n /**\n * @see {@link _createGlobalTheme}\n */\n globalTheme: typeof _createGlobalTheme;\n\n defineNestedLayer(\n globalNameOrNestedOptions?: string | DefineLayerOptions,\n ): LayerStyle;\n\n /**\n * Add global CSS variable with layer\n *\n * @remarks The vanilla-extract API is buggy when handling layered css variables.\n *\n * @param selector - selector\n * @param vars - variables\n */\n pushGlobalVars(selector: string, vars: Record<string, string>): void;\n\n /**\n * Output variables accumulated by `pushGlobalVars`.\n *\n * @remarks The vanilla-extract API is buggy when handling layered css variables.\n */\n dumpGlobalVars(): void;\n}\n\nexport interface DefineLayerParentOptions {\n parent?: string;\n}\n\nexport interface DefineLayerScopedOptions {\n /** Debug ID */\n debugId?: string;\n globalName?: never;\n}\n\nexport interface DefineLayerGlobalOptions {\n debugId?: never;\n /** Parent layer name */\n globalName: string;\n}\n\nexport type DefineLayerOptions =\n | DefineLayerScopedOptions\n | DefineLayerGlobalOptions;\n\nexport type DefineNestableLayerOptions = DefineLayerOptions &\n DefineLayerParentOptions;\n\nfunction isGlobalOptions(\n options: DefineLayerOptions,\n): options is DefineLayerGlobalOptions {\n return 'globalName' in options;\n}\n\nfunction normalizeToObject<T extends DefineLayerOptions>(\n source?: string | T,\n): T {\n if (!source) return {} as T;\n if (typeof source === 'string') return { globalName: source } as unknown as T;\n return source;\n}\n\nexport function defineLayerStyle(\n globalNameOrOptions?: string | DefineNestableLayerOptions,\n): LayerStyle {\n const options = normalizeToObject(globalNameOrOptions);\n const { parent } = options;\n\n const layerName = isGlobalOptions(options)\n ? globalLayer({ parent }, options.globalName)\n : layer({ parent }, options.debugId);\n\n const layerStyle: LayerStyle = function layerStyle(rule, debugId) {\n return style(\n {\n '@layer': {\n [layerName]: rule,\n },\n },\n debugId,\n );\n };\n\n layerStyle.layerName = layerName;\n layerStyle.parentLayerName = parent || null;\n layerStyle.style = layerStyle;\n\n layerStyle.global = function layerGlobalStyle(selector, rule) {\n return globalStyle(selector, {\n '@layer': {\n [layerName]: rule,\n },\n });\n };\n\n layerStyle.globalTheme = (...args: any) =>\n (createGlobalTheme as any)(layerName, ...args);\n\n let _varQueues: [string, Record<string, string>][] = [];\n\n layerStyle.pushGlobalVars = function pushGlobalVars(selector, vars) {\n let queue = _varQueues.find((q) => q[0] === selector);\n if (!queue) {\n queue = [selector, {}];\n _varQueues.push(queue);\n }\n Object.assign(queue[1], vars);\n };\n\n layerStyle.dumpGlobalVars = function dumpGlobalVars() {\n for (const [selector, vars] of _varQueues) {\n layerStyle.global(selector, {\n vars,\n });\n }\n _varQueues = [];\n };\n\n layerStyle.defineNestedLayer = function defineNestedLayer(\n globalNameOrNestedOptions,\n ) {\n const options = normalizeToObject(globalNameOrNestedOptions);\n return defineLayerStyle({\n ...options,\n parent: layerName,\n });\n };\n\n return layerStyle;\n}\n","import { Tokens, ThemeVars, Contract, MapLeafNodes } from './types';\nimport { createThemeContract, globalStyle } from '@vanilla-extract/css';\nimport { assignVars } from './utils';\n\nexport function createGlobalTheme<ThemeTokens extends Tokens>(\n layerName: string,\n selector: string,\n tokens: ThemeTokens,\n): ThemeVars<ThemeTokens>;\nexport function createGlobalTheme<ThemeContract extends Contract>(\n layerName: string,\n selector: string,\n themeContract: ThemeContract,\n tokens: MapLeafNodes<ThemeContract, string>,\n): void;\nexport function createGlobalTheme(\n layerName: string,\n selector: string,\n arg2: any,\n arg3?: any,\n): any {\n const shouldCreateVars = Boolean(!arg3);\n\n const themeVars = shouldCreateVars\n ? createThemeContract(arg2)\n : (arg2 as ThemeVars<any>);\n\n const tokens = shouldCreateVars ? arg2 : arg3;\n\n globalStyle(selector, {\n '@layer': {\n [layerName]: {\n vars: assignVars(themeVars, tokens),\n },\n },\n });\n\n // appendCss(\n // {\n // type: 'global',\n // selector: selector,\n // rule: { vars: assignVars(themeVars, tokens) },\n // },\n // getFileScope(),\n // );\n\n if (shouldCreateVars) {\n return themeVars;\n }\n}\n","import { Contract, MapLeafNodes, CSSVarFunction } from './types';\n\ntype Primitive = string | number | null | undefined;\n\ntype Walkable = {\n [Key in string | number]: Primitive | Walkable;\n};\n\nexport function get(obj: any, path: Array<string>) {\n let result = obj;\n\n for (const key of path) {\n if (!(key in result)) {\n throw new Error(`Path ${path.join(' -> ')} does not exist in object`);\n }\n result = result[key];\n }\n\n return result;\n}\nexport function walkObject<T extends Walkable, MapTo>(\n obj: T,\n fn: (value: Primitive, path: Array<string>) => MapTo,\n path: Array<string> = [],\n): MapLeafNodes<T, MapTo> {\n const clone = obj.constructor();\n\n for (const key in obj) {\n const value = obj[key];\n const currentPath = [...path, key];\n\n if (\n typeof value === 'string' ||\n typeof value === 'number' ||\n value == null\n ) {\n clone[key] = fn(value as Primitive, currentPath);\n } else if (typeof value === 'object' && !Array.isArray(value)) {\n clone[key] = walkObject(value as Walkable, fn, currentPath);\n } else {\n console.warn(\n `Skipping invalid key \"${currentPath.join(\n '.',\n )}\". Should be a string, number, null or object. Received: \"${\n Array.isArray(value) ? 'Array' : typeof value\n }\"`,\n );\n }\n }\n\n return clone;\n}\n\nexport function assignVars<VarContract extends Contract>(\n varContract: VarContract,\n tokens: MapLeafNodes<VarContract, string>,\n): Record<CSSVarFunction, string> {\n const varSetters: { [cssVarName: string]: string } = {};\n // const { valid, diffString } = validateContract(varContract, tokens);\n\n // if (!valid) {\n // throw new Error(`Tokens don't match contract.\\n${diffString}`);\n // }\n\n walkObject(tokens, (value, path) => {\n varSetters[get(varContract, path)] = String(value);\n });\n\n return varSetters;\n}\n"]}
@@ -35,18 +35,6 @@ var emptyVanillaImportRe = /(^|\n)import '@vanilla-extract\/css';?/g;
35
35
  function cleanJS(code) {
36
36
  return code.replace(emptyVanillaImportRe, "");
37
37
  }
38
- var allLayerDefMatchRe = /(^|\n)@layer ([a-zA-Z\d\-_\$\.]+?);/g;
39
- function cleanCSS(code) {
40
- const layersDefs = code.match(allLayerDefMatchRe);
41
- if (!layersDefs?.length)
42
- return code;
43
- const uniques = Array.from(new Set(layersDefs)).map((row) => row.trim());
44
- for (const def of uniques) {
45
- code = code.replace(new RegExp(def + "\n?", "g"), "");
46
- }
47
- code = uniques.join("\n") + "\n\n" + code;
48
- return code;
49
- }
50
38
  async function createVanillaExtractPlugin(options = {}) {
51
39
  return definePlugin({
52
40
  name: PLUGIN_NAME,
@@ -69,7 +57,9 @@ async function createVanillaExtractPlugin(options = {}) {
69
57
  if (!ext)
70
58
  return;
71
59
  const code = await fs.readFile(filePath, "utf-8");
72
- const cleaner = ext === "mjs" ? cleanJS : cleanCSS;
60
+ const cleaner = ext === "mjs" ? cleanJS : void 0;
61
+ if (!cleaner)
62
+ return;
73
63
  const replaced = cleaner(code);
74
64
  if (code === replaced)
75
65
  return;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts","../src/plugin.ts","../src/esbuild.ts","../src/utils.ts","../src/vite.ts"],"names":["vanillaExtractPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,IAAM,cAAc;;;ACf3B,SAAS,cAAc,gBAAgB;;;ACCvC,SAAS,4BAA4B;;;ACDrC,IAAM,oBAAoB,CAAC,QAAQ;AAE5B,SAAS,iBAAiB,QAA4C;AAC3E,QAAM,SAAmB,CAAC,GAAG,iBAAiB;AAC9C,aAAW,SAAS,QAAQ;AAC1B,aAAS,OAAO,KAAK,GAAG,KAAK;AAAA,EAC/B;AACA,SAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC;AACnC;;;ADHO,SAAS,sBACd,UAAyB,CAAC,GACX;AACf,QAAM,EAAE,iBAAiB,CAAC,EAAE,IAAI;AAEhC,SAAO,qBAAqB;AAAA,IAC1B,GAAG;AAAA,IACH,gBAAgB;AAAA,MACd,GAAG;AAAA,MACH,UAAU,cAAc,eAAe,QAAQ;AAAA,IACjD;AAAA,EACF,CAAC;AACH;;;ADdA,OAAO,QAAQ;AAQf,IAAM,aAAa;AAEnB,SAAS,WAAW,UAAkB;AACpC,SAAO,SAAS,MAAM,UAAU,IAAI,CAAC;AACvC;AAEA,IAAM,uBAAuB;AAE7B,SAAS,QAAQ,MAAc;AAC7B,SAAO,KAAK,QAAQ,sBAAsB,EAAE;AAC9C;AAEA,IAAM,qBAAqB;AAE3B,SAAS,SAAS,MAAc;AAC9B,QAAM,aAAa,KAAK,MAAM,kBAAkB;AAChD,MAAI,CAAC,YAAY;AAAQ,WAAO;AAChC,QAAM,UAAU,MAAM,KAAK,IAAI,IAAI,UAAU,CAAC,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC;AAEvE,aAAW,OAAO,SAAS;AACzB,WAAO,KAAK,QAAQ,IAAI,O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a;AAAA,IACb,gBAAgB,qBAAqB,CAAC;AAAA,EACxC,IAAI,QAAQ,WAAW,CAAC;AAExB,QAAM,EAAE,iBAAiB,CAAC,EAAE,IAAI;AAEhC,SAAOA,sBAAqB;AAAA,IAC1B,aAAa;AAAA,IACb,GAAG;AAAA,IACH,gBAAgB;AAAA,MACd,GAAG;AAAA,MACH,GAAG;AAAA,MACH,UAAU;AAAA,QACR,mBAAmB;AAAA,QACnB,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,EACF,CAAC;AACH","sourcesContent":["import { Plugin } from '@fastkit/plugboy';\nimport type { vanillaExtractPlugin as esbuildPlugin } from '@vanilla-extract/esbuild-plugin';\n\ntype VanillaExtractPluginOptions = NonNullable<\n Parameters<typeof esbuildPlugin>[0]\n>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface VanillaExtractEsbuildOptions\n extends NonNullable<VanillaExtractPluginOptions['esbuildOptions']> {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface PluginOptions\n extends Pick<VanillaExtractPluginOptions, 'identifiers' | 'esbuildOptions'> {}\n\nexport const PLUGIN_NAME = 'plugboy-vanilla-extract';\n\nexport interface VanillaExtractPlugin extends Plugin {\n name: typeof PLUGIN_NAME;\n options: PluginOptions;\n}\n","import { definePlugin, findFile } from '@fastkit/plugboy';\nimport { ESBuildVanillaExtract } from './esbuild';\nimport { VanillaExtractPlugin, PluginOptions, PLUGIN_NAME } from './types';\nimport fs from 'node:fs/promises';\n\ndeclare module '@fastkit/plugboy' {\n export interface WorkspaceMeta {\n hasVanillaExtract: boolean;\n }\n}\n\nconst extMatchRe = /\\.(mjs|css)$/;\n\nfunction extractExt(filePath: string) {\n return filePath.match(extMatchRe)?.[1] as 'mjs' | 'css' | undefined;\n}\n\nconst emptyVanillaImportRe = /(^|\\n)import '@vanilla-extract\\/css';?/g;\n\nfunction cleanJS(code: string) {\n return code.replace(emptyVanillaImportRe, '');\n}\n\nconst allLayerDefMatchRe = /(^|\\n)@layer ([a-zA-Z\\d\\-_\\$\\.]+?);/g;\n\nfunction cleanCSS(code: string) {\n const layersDefs = code.match(allLayerDefMatchRe);\n if (!layersDefs?.length) return code;\n const uniques = Array.from(new Set(layersDefs)).map((row) => row.trim());\n\n for (const def of uniques) {\n code = code.replace(new RegExp(def + '\\n?', 'g'), '');\n }\n\n code = uniques.join('\\n') + '\\n\\n' + code;\n return code;\n}\n\nexport async function createVanillaExtractPlugin(options: PluginOptions = {}) {\n return definePlugin<VanillaExtractPlugin>({\n name: PLUGIN_NAME,\n options,\n hooks: {\n async setupWorkspace(ctx) {\n const { external = [] } = ctx.config;\n\n ctx.config.external = [...external, /@vanilla\\-extract/];\n\n ctx.meta.hasVanillaExtract = await !!findFile(\n ctx.dirs.src.value,\n /\\.css\\.ts$/,\n );\n },\n async onSuccess(builder, files) {\n if (!builder.workspace.meta.hasVanillaExtract) return;\n await Promise.all(\n files.map(async ({ path: filePath }) => {\n const ext = extractExt(filePath);\n if (!ext) return;\n\n const code = await fs.readFile(filePath, 'utf-8');\n const cleaner = ext === 'mjs' ? cleanJS : cleanCSS;\n const replaced = cleaner(code);\n if (code === replaced) return;\n\n await fs.writeFile(filePath, replaced.trimStart(), 'utf-8');\n }),\n );\n },\n },\n esbuildPlugins: [\n (workspace) => {\n if (!workspace.meta.hasVanillaExtract) return;\n return ESBuildVanillaExtract(options);\n },\n ],\n });\n}\n","import { ESBuildPlugin } from '@fastkit/plugboy';\nimport { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin';\nimport { PluginOptions } from './types';\nimport { mergeExternal } from './utils';\n\nexport function ESBuildVanillaExtract(\n options: PluginOptions = {},\n): ESBuildPlugin {\n const { esbuildOptions = {} } = options;\n\n return vanillaExtractPlugin({\n ...options,\n esbuildOptions: {\n ...esbuildOptions,\n external: mergeExternal(esbuildOptions.external),\n },\n }) as any;\n}\n","const EXTERNAL_DEFAULTS = ['node:*'];\n\nexport function mergeExternal(...chunks: (string[] | undefined)[]): string[] {\n const result: string[] = [...EXTERNAL_DEFAULTS];\n for (const chunk of chunks) {\n chunk && result.push(...chunk);\n }\n return Array.from(new Set(result));\n}\n","import { PLUGIN_NAME, VanillaExtractPlugin } from './types';\nimport { findProjectPlugin } from '@fastkit/plugboy';\nimport { Plugin as VitePlugin } from 'vite';\nimport { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';\nimport { mergeExternal } from './utils';\n\ntype VanillaExtractVitePluginOptions = NonNullable<\n Parameters<typeof vanillaExtractPlugin>[0]\n>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ViteVanillaExtractPluginOptions\n extends VanillaExtractVitePluginOptions {}\n\nexport async function ViteVanillaExtractPlugin(\n options: ViteVanillaExtractPluginOptions = {},\n): Promise<VitePlugin> {\n const plugin = await findProjectPlugin<VanillaExtractPlugin>(PLUGIN_NAME);\n const {\n identifiers: baseIdentifiers,\n esbuildOptions: baseEsbuildOptions = {},\n } = plugin?.options || {};\n\n const { esbuildOptions = {} } = options;\n\n return vanillaExtractPlugin({\n identifiers: baseIdentifiers,\n ...options,\n esbuildOptions: {\n ...baseEsbuildOptions,\n ...esbuildOptions,\n external: mergeExternal(\n baseEsbuildOptions.external,\n esbuildOptions.external,\n ),\n },\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/types.ts","../src/plugin.ts","../src/esbuild.ts","../src/utils.ts","../src/vite.ts"],"names":["vanillaExtractPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,IAAM,cAAc;;;ACf3B,SAAS,cAAc,gBAAgB;;;ACCvC,SAAS,4BAA4B;;;ACDrC,IAAM,oBAAoB,CAAC,QAAQ;AAE5B,SAAS,iBAAiB,QAA4C;AAC3E,QAAM,SAAmB,CAAC,GAAG,iBAAiB;AAC9C,aAAW,SAAS,QAAQ;AAC1B,aAAS,OAAO,KAAK,GAAG,KAAK;AAAA,EAC/B;AACA,SAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC;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AAAA,UAC5D,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF;AAAA,IACA,gBAAgB;AAAA,MACd,CAAC,cAAc;AACb,YAAI,CAAC,UAAU,KAAK;AAAmB;AACvC,eAAO,sBAAsB,OAAO;AAAA,MACtC;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;AG9DA,SAAS,yBAAyB;AAElC,SAAS,wBAAAA,6BAA4B;AAWrC,eAAsB,yBACpB,UAA2C,CAAC,GACvB;AACrB,QAAM,SAAS,MAAM,kBAAwC,WAAW;AACxE,QAAM;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB,qBAAqB,CAAC;AAAA,EACxC,IAAI,QAAQ,WAAW,CAAC;AAExB,QAAM,EAAE,iBAAiB,CAAC,EAAE,IAAI;AAEhC,SAAOA,sBAAqB;AAAA,IAC1B,aAAa;AAAA,IACb,GAAG;AAAA,IACH,gBAAgB;AAAA,MACd,GAAG;AAAA,MACH,GAAG;AAAA,MACH,UAAU;AAAA,QACR,mBAAmB;AAAA,QACnB,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,EACF,CAAC;AACH","sourcesContent":["import { Plugin } from '@fastkit/plugboy';\nimport type { vanillaExtractPlugin as esbuildPlugin } from '@vanilla-extract/esbuild-plugin';\n\ntype VanillaExtractPluginOptions = NonNullable<\n Parameters<typeof esbuildPlugin>[0]\n>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface VanillaExtractEsbuildOptions\n extends NonNullable<VanillaExtractPluginOptions['esbuildOptions']> {}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface PluginOptions\n extends Pick<VanillaExtractPluginOptions, 'identifiers' | 'esbuildOptions'> {}\n\nexport const PLUGIN_NAME = 'plugboy-vanilla-extract';\n\nexport interface VanillaExtractPlugin extends Plugin {\n name: typeof PLUGIN_NAME;\n options: PluginOptions;\n}\n","import { definePlugin, findFile } from '@fastkit/plugboy';\nimport { ESBuildVanillaExtract } from './esbuild';\nimport { VanillaExtractPlugin, PluginOptions, PLUGIN_NAME } from './types';\nimport fs from 'node:fs/promises';\n\ndeclare module '@fastkit/plugboy' {\n export interface WorkspaceMeta {\n hasVanillaExtract: boolean;\n }\n}\n\nconst extMatchRe = /\\.(mjs|css)$/;\n\nfunction extractExt(filePath: string) {\n return filePath.match(extMatchRe)?.[1] as 'mjs' | 'css' | undefined;\n}\n\nconst emptyVanillaImportRe = /(^|\\n)import '@vanilla-extract\\/css';?/g;\n\nfunction cleanJS(code: string) {\n return code.replace(emptyVanillaImportRe, '');\n}\n\nexport async function createVanillaExtractPlugin(options: PluginOptions = {}) {\n return definePlugin<VanillaExtractPlugin>({\n name: PLUGIN_NAME,\n options,\n hooks: {\n async setupWorkspace(ctx) {\n const { external = [] } = ctx.config;\n\n ctx.config.external = [...external, /@vanilla\\-extract/];\n\n ctx.meta.hasVanillaExtract = await !!findFile(\n ctx.dirs.src.value,\n /\\.css\\.ts$/,\n );\n },\n async onSuccess(builder, files) {\n if (!builder.workspace.meta.hasVanillaExtract) return;\n await Promise.all(\n files.map(async ({ path: filePath }) => {\n const ext = extractExt(filePath);\n if (!ext) return;\n\n const code = await fs.readFile(filePath, 'utf-8');\n const cleaner = ext === 'mjs' ? cleanJS : undefined;\n if (!cleaner) return;\n const replaced = cleaner(code);\n if (code === replaced) return;\n\n await fs.writeFile(filePath, replaced.trimStart(), 'utf-8');\n }),\n );\n },\n },\n esbuildPlugins: [\n (workspace) => {\n if (!workspace.meta.hasVanillaExtract) return;\n return ESBuildVanillaExtract(options);\n },\n ],\n });\n}\n","import { ESBuildPlugin } from '@fastkit/plugboy';\nimport { vanillaExtractPlugin } from '@vanilla-extract/esbuild-plugin';\nimport { PluginOptions } from './types';\nimport { mergeExternal } from './utils';\n\nexport function ESBuildVanillaExtract(\n options: PluginOptions = {},\n): ESBuildPlugin {\n const { esbuildOptions = {} } = options;\n\n return vanillaExtractPlugin({\n ...options,\n esbuildOptions: {\n ...esbuildOptions,\n external: mergeExternal(esbuildOptions.external),\n },\n }) as any;\n}\n","const EXTERNAL_DEFAULTS = ['node:*'];\n\nexport function mergeExternal(...chunks: (string[] | undefined)[]): string[] {\n const result: string[] = [...EXTERNAL_DEFAULTS];\n for (const chunk of chunks) {\n chunk && result.push(...chunk);\n }\n return Array.from(new Set(result));\n}\n","import { PLUGIN_NAME, VanillaExtractPlugin } from './types';\nimport { findProjectPlugin } from '@fastkit/plugboy';\nimport { Plugin as VitePlugin } from 'vite';\nimport { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';\nimport { mergeExternal } from './utils';\n\ntype VanillaExtractVitePluginOptions = NonNullable<\n Parameters<typeof vanillaExtractPlugin>[0]\n>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface ViteVanillaExtractPluginOptions\n extends VanillaExtractVitePluginOptions {}\n\nexport async function ViteVanillaExtractPlugin(\n options: ViteVanillaExtractPluginOptions = {},\n): Promise<VitePlugin> {\n const plugin = await findProjectPlugin<VanillaExtractPlugin>(PLUGIN_NAME);\n const {\n identifiers: baseIdentifiers,\n esbuildOptions: baseEsbuildOptions = {},\n } = plugin?.options || {};\n\n const { esbuildOptions = {} } = options;\n\n return vanillaExtractPlugin({\n identifiers: baseIdentifiers,\n ...options,\n esbuildOptions: {\n ...baseEsbuildOptions,\n ...esbuildOptions,\n external: mergeExternal(\n baseEsbuildOptions.external,\n esbuildOptions.external,\n ),\n },\n });\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastkit/plugboy-vanilla-extract-plugin",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -48,11 +48,11 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "vite": "^4.1.1",
51
- "@fastkit/plugboy": "0.1.1"
51
+ "@fastkit/plugboy": "0.1.3"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "vite": "^4.1.1",
55
- "@fastkit/plugboy": "0.1.1"
55
+ "@fastkit/plugboy": "0.1.3"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "@vanilla-extract/vite-plugin": {