@visulima/packem 2.0.0-alpha.8 → 2.0.0-alpha.80

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +1145 -2
  2. package/LICENSE.md +3812 -2243
  3. package/README.md +59 -32
  4. package/dist/builder/typedoc/index.d.ts +11 -23
  5. package/dist/builder/typedoc/index.js +3 -3
  6. package/dist/cli/index.js +67 -39
  7. package/dist/config/index.d.ts +55 -24
  8. package/dist/config/preset/preact.d.ts +31 -0
  9. package/dist/config/preset/preact.js +2 -0
  10. package/dist/config/preset/react.d.ts +72 -0
  11. package/dist/config/preset/react.js +1 -0
  12. package/dist/config/preset/solid.d.ts +114 -0
  13. package/dist/config/preset/solid.js +1 -0
  14. package/dist/config/preset/svelte.d.ts +84 -0
  15. package/dist/config/preset/svelte.js +1 -0
  16. package/dist/config/preset/vue.d.ts +66 -0
  17. package/dist/config/preset/vue.js +1 -0
  18. package/dist/css/loaders/less.d.ts +1 -0
  19. package/dist/css/loaders/less.js +1 -0
  20. package/dist/css/loaders/lightningcss.d.ts +1 -0
  21. package/dist/css/loaders/lightningcss.js +1 -0
  22. package/dist/css/loaders/postcss.d.ts +1 -0
  23. package/dist/css/loaders/postcss.js +1 -0
  24. package/dist/css/loaders/sass.d.ts +1 -0
  25. package/dist/css/loaders/sass.js +1 -0
  26. package/dist/css/loaders/sourcemap.d.ts +1 -0
  27. package/dist/css/loaders/sourcemap.js +1 -0
  28. package/dist/css/loaders/stylus.d.ts +1 -0
  29. package/dist/css/loaders/stylus.js +1 -0
  30. package/dist/{rollup/plugins/css/minifiers/lightningcss.js → css/loaders/tailwindcss.d.ts} +1 -1
  31. package/dist/css/loaders/tailwindcss.js +1 -0
  32. package/dist/css/minifiers/cssnano.d.ts +1 -0
  33. package/dist/css/minifiers/cssnano.js +1 -0
  34. package/dist/css/minifiers/lightningcss.d.ts +1 -0
  35. package/dist/css/minifiers/lightningcss.js +1 -0
  36. package/dist/index.d.ts +55 -30
  37. package/dist/index.js +41 -1
  38. package/dist/packem_shared/create-or-update-key-storage-D8L6IRYf.js +13 -0
  39. package/dist/packem_shared/default-DCITr7u7.js +1 -0
  40. package/dist/packem_shared/index-D4AUfFZu.js +251 -0
  41. package/dist/packem_shared/oxcResolvePlugin-DeIohkWk-DfJ30lek.js +170 -0
  42. package/dist/packem_shared/oxcTransformPlugin-Dwvbw2jE-Bbz81VnA.js +4 -0
  43. package/dist/packem_shared/types.d-Cm6dnCyD.d.ts +426 -0
  44. package/dist/packem_shared/utils-nmTpa3um.js +1 -0
  45. package/dist/rollup/plugins/esbuild/index.d.ts +1 -24
  46. package/dist/rollup/plugins/esbuild/index.js +1 -1
  47. package/dist/rollup/plugins/oxc/oxc-transformer.d.ts +1 -20
  48. package/dist/rollup/plugins/oxc/oxc-transformer.js +1 -1
  49. package/dist/rollup/plugins/sucrase/index.d.ts +1 -19
  50. package/dist/rollup/plugins/sucrase/index.js +1 -1
  51. package/dist/rollup/plugins/swc/swc-plugin.d.ts +1 -26
  52. package/dist/rollup/plugins/swc/swc-plugin.js +1 -1
  53. package/files.d.ts +37 -0
  54. package/package.json +108 -76
  55. package/dist/packem_shared/browserslistToEsbuild-C0IWmbNe-C6xPL1oW.js +0 -1
  56. package/dist/packem_shared/create-or-update-key-storage-GwAIWW7R.js +0 -3
  57. package/dist/packem_shared/default-B6X7-Lx3.js +0 -1
  58. package/dist/packem_shared/default-B_dUKZ_J.js +0 -1
  59. package/dist/packem_shared/default-C3sdXf4G.js +0 -1
  60. package/dist/packem_shared/default-DR5Fia_R.js +0 -1
  61. package/dist/packem_shared/default-DqRcOUe1.js +0 -1
  62. package/dist/packem_shared/esbuildPlugin-BAwyhG6L-yty60jMl.js +0 -3
  63. package/dist/packem_shared/index-CDdkRKp3.js +0 -138
  64. package/dist/packem_shared/index-CUp9WuCG.js +0 -1
  65. package/dist/packem_shared/index-zikl8Yu3.d.ts +0 -5229
  66. package/dist/packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js +0 -1
  67. package/dist/packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js +0 -1
  68. package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js +0 -3
  69. package/dist/packem_shared/oxcResolvePlugin-BJpi-eSG-BsYx9cDO.js +0 -1
  70. package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Cpfv95eA.js +0 -4
  71. package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.js +0 -6
  72. package/dist/packem_shared/swcPlugin-Boip4lWG-CwJ-HVJc.js +0 -1
  73. package/dist/packem_shared/types-Dn9KmF6u.d.ts +0 -163
  74. package/dist/rollup/plugins/css/loaders/less.d.ts +0 -1
  75. package/dist/rollup/plugins/css/loaders/less.js +0 -1
  76. package/dist/rollup/plugins/css/loaders/lightningcss.d.ts +0 -1
  77. package/dist/rollup/plugins/css/loaders/lightningcss.js +0 -1
  78. package/dist/rollup/plugins/css/loaders/postcss.d.ts +0 -1
  79. package/dist/rollup/plugins/css/loaders/postcss.js +0 -1
  80. package/dist/rollup/plugins/css/loaders/sass.d.ts +0 -1
  81. package/dist/rollup/plugins/css/loaders/sass.js +0 -1
  82. package/dist/rollup/plugins/css/loaders/sourcemap.d.ts +0 -8
  83. package/dist/rollup/plugins/css/loaders/sourcemap.js +0 -1
  84. package/dist/rollup/plugins/css/loaders/stylus.d.ts +0 -1
  85. package/dist/rollup/plugins/css/loaders/stylus.js +0 -1
  86. package/dist/rollup/plugins/css/minifiers/cssnano.d.ts +0 -1
  87. package/dist/rollup/plugins/css/minifiers/cssnano.js +0 -1
  88. package/dist/rollup/plugins/css/minifiers/lightningcss.d.ts +0 -1
  89. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +0 -25
  90. package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.js +0 -1
  91. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +0 -20
  92. package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.js +0 -1
  93. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +0 -24
  94. package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.js +0 -1
@@ -0,0 +1,72 @@
1
+ import { BabelPluginConfig } from '@visulima/packem-plugins/babel';
2
+ import { B as BuildConfig } from "../../packem_shared/types.d-Cm6dnCyD.js";
3
+ import '@arethetypeswrong/core';
4
+ import '@visulima/packem-plugins';
5
+ import '@visulima/packem-plugins/oxc';
6
+ import '@visulima/packem-plugins/plugin/externals';
7
+ import '@visulima/packem-plugins/plugin/native-modules';
8
+ import '@visulima/packem-rollup';
9
+ import '@visulima/packem-share/types';
10
+ import '@visulima/packem-share/utils';
11
+ import '@visulima/rollup-plugin-css';
12
+ import 'jiti';
13
+ import 'rollup';
14
+ import 'typedoc';
15
+ interface ReactPresetOptions {
16
+ /**
17
+ * Enable React Compiler optimization
18
+ * @default false
19
+ */
20
+ compiler?: boolean | {
21
+ /**
22
+ * React Compiler compilation mode
23
+ * @default "infer"
24
+ */
25
+ compilationMode?: "infer" | "annotation";
26
+ /**
27
+ * React Compiler panic threshold
28
+ * @default "critical_errors"
29
+ */
30
+ panicThreshold?: "critical_errors" | "all_errors";
31
+ };
32
+ /**
33
+ * Custom Babel plugins to add
34
+ */
35
+ plugins?: BabelPluginConfig["plugins"];
36
+ /**
37
+ * Custom Babel presets to add
38
+ */
39
+ presets?: BabelPluginConfig["presets"];
40
+ }
41
+ /**
42
+ * React preset for Packem. Configures Babel with React presets and optionally React Compiler.
43
+ * @description This preset configures Babel to run before your main transformer (esbuild/SWC/etc.).
44
+ * Babel handles JSX transformation, while TypeScript is handled by the transformer via parser plugins.
45
+ * This matches the approach used by `@vitejs/plugin-react`.
46
+ * @example
47
+ * ```typescript
48
+ * // Basic usage
49
+ * export default defineConfig({
50
+ * preset: "react"
51
+ * });
52
+ *
53
+ * // With React Compiler
54
+ * import { createReactPreset } from "@visulima/packem/config/preset/react";
55
+ * export default defineConfig({
56
+ * preset: createReactPreset({
57
+ * compiler: true
58
+ * })
59
+ * });
60
+ *
61
+ * // With custom options
62
+ * export default defineConfig({
63
+ * preset: createReactPreset({
64
+ * compiler: {
65
+ * compilationMode: "annotation"
66
+ * }
67
+ * })
68
+ * });
69
+ * ```
70
+ */
71
+ declare const createReactPreset: (options?: ReactPresetOptions) => BuildConfig;
72
+ export { ReactPresetOptions, createReactPreset };
@@ -0,0 +1 @@
1
+ var m=Object.defineProperty;var d=(o,e)=>m(o,"name",{value:e,configurable:!0});var f=Object.defineProperty,b=d((o,e)=>f(o,"name",{value:e,configurable:!0}),"s");const v=b((o={})=>{const{compiler:e,plugins:i,presets:a}=o,l=[],p=[];if(e){const s=typeof e=="object"?e:{};l.push(["babel-plugin-react-compiler",{compilationMode:s.compilationMode??"infer",panicThreshold:s.panicThreshold??"critical_errors"}])}p.push(["@babel/preset-react",{runtime:"automatic"}]);const c=[...l,...Array.isArray(i)?i:[]],u=[...p,...Array.isArray(a)?a:[]];return{hooks:{"rollup:options":b((s,h)=>{const t=s.options.rollup.babel;if(t&&typeof t=="object"&&t.presets){const n=t.presets.findIndex(r=>Array.isArray(r)&&r[0]==="@babel/preset-react");if(n!==-1){const r=t.presets[n];t.presets[n]=[r[0],{...typeof r[1]=="object"&&r[1]!==null?r[1]:{},development:s.environment==="development"}]}}},"rollup:options")},rollup:{babel:{plugins:c.length>0?c:void 0,presets:u.length>0?u:void 0}},validation:{dependencies:{hoisted:{exclude:[]},unused:{exclude:["react","react-dom"]}}}}},"createReactPreset");export{v as createReactPreset};
@@ -0,0 +1,114 @@
1
+ import { BabelPluginConfig } from '@visulima/packem-plugins/babel';
2
+ import { B as BuildConfig } from "../../packem_shared/types.d-Cm6dnCyD.js";
3
+ import '@arethetypeswrong/core';
4
+ import '@visulima/packem-plugins';
5
+ import '@visulima/packem-plugins/oxc';
6
+ import '@visulima/packem-plugins/plugin/externals';
7
+ import '@visulima/packem-plugins/plugin/native-modules';
8
+ import '@visulima/packem-rollup';
9
+ import '@visulima/packem-share/types';
10
+ import '@visulima/packem-share/utils';
11
+ import '@visulima/rollup-plugin-css';
12
+ import 'jiti';
13
+ import 'rollup';
14
+ import 'typedoc';
15
+ interface SolidPresetOptions {
16
+ /**
17
+ * Pass any additional babel transform options. They will be merged with
18
+ * the transformations required by Solid.
19
+ */
20
+ babel?: BabelPluginConfig | ((source: string, id: string) => BabelPluginConfig | Promise<BabelPluginConfig>);
21
+ /**
22
+ * Custom Babel plugins to add
23
+ */
24
+ plugins?: BabelPluginConfig["plugins"];
25
+ /**
26
+ * Custom Babel presets to add
27
+ */
28
+ presets?: BabelPluginConfig["presets"];
29
+ /**
30
+ * SolidJS-specific options for babel-preset-solid
31
+ */
32
+ solidOptions?: {
33
+ /**
34
+ * Array of Component exports from module, that aren't included by default with the library.
35
+ * This plugin will automatically import them if it comes across them in the JSX.
36
+ * @default ["For","Show","Switch","Match","Suspense","SuspenseList","Portal","Index","Dynamic","ErrorBoundary"]
37
+ */
38
+ builtIns?: string[];
39
+ /**
40
+ * Boolean indicates whether to set current render context on Custom Elements and slots.
41
+ * Useful for seemless Context API with Web Components.
42
+ * @default true
43
+ */
44
+ contextToCustomElements?: boolean;
45
+ /**
46
+ * Boolean to indicate whether to enable automatic event delegation on camelCase.
47
+ * @default true
48
+ */
49
+ delegateEvents?: boolean;
50
+ /**
51
+ * The output mode of the compiler.
52
+ * Can be:
53
+ * - "dom" is standard output
54
+ * - "ssr" is for server side rendering of strings.
55
+ * - "universal" is for using custom renderers from solid-js/universal
56
+ * @default "dom"
57
+ */
58
+ generate?: "ssr" | "dom" | "universal";
59
+ /**
60
+ * Indicate whether the output should contain hydratable markers.
61
+ * @default false
62
+ */
63
+ hydratable?: boolean;
64
+ /**
65
+ * The name of the runtime module to import the methods from.
66
+ * @default "solid-js/web"
67
+ */
68
+ moduleName?: string;
69
+ /**
70
+ * Boolean indicates whether smart conditional detection should be used.
71
+ * This optimizes simple boolean expressions and ternaries in JSX.
72
+ * @default true
73
+ */
74
+ wrapConditionals?: boolean;
75
+ };
76
+ }
77
+ /**
78
+ * SolidJS preset for Packem. Configures Babel with babel-preset-solid.
79
+ * @description This preset configures Babel to run before your main transformer (esbuild/SWC/etc.).
80
+ * Babel handles JSX transformation for SolidJS using babel-preset-solid. TypeScript is handled
81
+ * automatically via parser plugins based on file extensions (no preset needed).
82
+ * @example
83
+ * ```typescript
84
+ * // Basic usage
85
+ * export default defineConfig({
86
+ * preset: "solid"
87
+ * });
88
+ *
89
+ * // With custom Solid options
90
+ * import { createSolidPreset } from "@visulima/packem/config/preset/solid";
91
+ * export default defineConfig({
92
+ * preset: createSolidPreset({
93
+ * solidOptions: {
94
+ * generate: "ssr",
95
+ * hydratable: true
96
+ * }
97
+ * })
98
+ * });
99
+ *
100
+ * // With custom Babel options
101
+ * export default defineConfig({
102
+ * preset: createSolidPreset({
103
+ * solidOptions: {
104
+ * moduleName: "solid-js/web"
105
+ * },
106
+ * babel: {
107
+ * // Additional babel options
108
+ * }
109
+ * })
110
+ * });
111
+ * ```
112
+ */
113
+ declare const createSolidPreset: (options?: SolidPresetOptions) => BuildConfig;
114
+ export { SolidPresetOptions, createSolidPreset };
@@ -0,0 +1 @@
1
+ var j=Object.defineProperty;var g=(o,e)=>j(o,"name",{value:e,configurable:!0});var O=Object.defineProperty,a=g((o,e)=>O(o,"name",{value:e,configurable:!0}),"g");const N=a(o=>{const e={contextToCustomElements:o?.contextToCustomElements??!0,delegateEvents:o?.delegateEvents??!0,generate:o?.generate??"dom",hydratable:o?.hydratable??!1,moduleName:o?.moduleName??"solid-js/web",wrapConditionals:o?.wrapConditionals??!0};return o?.builtIns!==void 0&&(e.builtIns=o.builtIns),e},"buildSolidPresetOptions"),E=a((o,e,n,l)=>{if(!e||typeof e=="function")return o;let s=n;if(e.plugins){const i=Array.isArray(e.plugins)?e.plugins:[];s=[...n??[],...i]}let r=l;if(e.presets){const i=Array.isArray(e.presets)?e.presets:[];r=[...l??[],...i]}return{...o,...e,plugins:s&&s.length>0?s:void 0,presets:r&&r.length>0?r:void 0}},"mergeUserBabelOptions"),x=a((o={})=>{const{babel:e,plugins:n,presets:l,solidOptions:s}=o,r=[],i=[],m=["babel-preset-solid",N(s)];i.push(m);const u=[...r,...Array.isArray(n)?n:[]],d=[...i,...Array.isArray(l)?l:[]],b={ast:!1,babelrc:!1,configFile:!1,plugins:u.length>0?u:void 0,presets:d.length>0?d:void 0,sourceMaps:!0},f={babel:E(b,e,u,d),resolve:{exportConditions:["solid"]}};return{externals:["solid-js","solid-js/web","solid-js/store"],hooks:{"rollup:options":a((t,h)=>{const c=t.environment==="development"?"development":"production",p=c==="development",{runtime:y}=t.options,v=y==="node";t.options.rollup.replace||(t.options.rollup.replace={preventAssignment:!0,values:{}}),t.options.rollup.replace.values||(t.options.rollup.replace.values={});const S={[["import","meta","env","DEV"].join(".")]:p,[["import","meta","env","NODE_ENV"].join(".")]:JSON.stringify(c),[["import","meta","env","PROD"].join(".")]:!p,[["import","meta","env","SSR"].join(".")]:v,[["process","env","DEV"].join(".")]:JSON.stringify(String(p)),[["process","env","NODE_ENV"].join(".")]:JSON.stringify(c),[["process","env","PROD"].join(".")]:JSON.stringify(String(!p)),[["process","env","SSR"].join(".")]:JSON.stringify(String(v))};Object.assign(t.options.rollup.replace.values,S)},"rollup:options")},rollup:f,validation:{dependencies:{hoisted:{exclude:[]},unused:{exclude:["solid-js"]}}}}},"createSolidPreset");export{x as createSolidPreset};
@@ -0,0 +1,84 @@
1
+ import { B as BuildConfig } from "../../packem_shared/types.d-Cm6dnCyD.js";
2
+ import '@arethetypeswrong/core';
3
+ import '@visulima/packem-plugins';
4
+ import '@visulima/packem-plugins/oxc';
5
+ import '@visulima/packem-plugins/plugin/externals';
6
+ import '@visulima/packem-plugins/plugin/native-modules';
7
+ import '@visulima/packem-rollup';
8
+ import '@visulima/packem-share/types';
9
+ import '@visulima/packem-share/utils';
10
+ import '@visulima/rollup-plugin-css';
11
+ import 'jiti';
12
+ import 'rollup';
13
+ import 'typedoc';
14
+ interface SveltePresetOptions {
15
+ /**
16
+ * Svelte plugin options
17
+ */
18
+ pluginOptions?: {
19
+ /**
20
+ * Svelte compiler options
21
+ */
22
+ compilerOptions?: {
23
+ [key: string]: unknown;
24
+ /**
25
+ * Custom element mode
26
+ * @default false
27
+ */
28
+ customElement?: boolean;
29
+ /**
30
+ * Enable dev mode
31
+ * @default false
32
+ */
33
+ dev?: boolean;
34
+ /**
35
+ * Generate mode: "client" for client-side rendering, "server" for SSR
36
+ * @default "client"
37
+ */
38
+ generate?: "client" | "server" | false;
39
+ /**
40
+ * Enable hydratable output
41
+ * @default false
42
+ */
43
+ hydratable?: boolean;
44
+ };
45
+ /**
46
+ * Exclude patterns for Svelte files
47
+ */
48
+ exclude?: RegExp | RegExp[];
49
+ /**
50
+ * Include patterns for Svelte files
51
+ * @default [/\.svelte$/]
52
+ */
53
+ include?: RegExp | RegExp[];
54
+ /**
55
+ * Preprocessor options
56
+ */
57
+ preprocess?: unknown;
58
+ };
59
+ }
60
+ /**
61
+ * Svelte preset for Packem. Configures Rollup with rollup-plugin-svelte.
62
+ * @description This preset configures the Svelte plugin to handle .svelte file compilation.
63
+ * @example
64
+ * ```typescript
65
+ * // Basic usage
66
+ * export default defineConfig({
67
+ * preset: "svelte"
68
+ * });
69
+ *
70
+ * // With custom options
71
+ * import { createSveltePreset } from "@visulima/packem/config/preset/svelte";
72
+ * export default defineConfig({
73
+ * preset: createSveltePreset({
74
+ * pluginOptions: {
75
+ * compilerOptions: {
76
+ * hydratable: true
77
+ * }
78
+ * }
79
+ * })
80
+ * });
81
+ * ```
82
+ */
83
+ declare const createSveltePreset: (options?: SveltePresetOptions) => BuildConfig;
84
+ export { SveltePresetOptions, createSveltePreset };
@@ -0,0 +1 @@
1
+ var s=Object.defineProperty;var t=(r,e)=>s(r,"name",{value:e,configurable:!0});import{DEFAULT_EXTENSIONS as n}from"@visulima/packem-share/constants";import o from"rollup-plugin-svelte";var l=Object.defineProperty,i=t((r,e)=>l(r,"name",{value:e,configurable:!0}),"n");const c=/\.svelte$/,v=i((r={})=>{const{pluginOptions:e={}}=r;return{rollup:{plugins:[{enforce:"pre",plugin:o({compilerOptions:{generate:"client",runes:!0,...e.compilerOptions},emitCss:!1,exclude:e.exclude,extensions:[".svelte"],include:e.include??[c],preprocess:e.preprocess})}],resolve:{browser:!0,exportConditions:["svelte"],extensions:[...n,".svelte"]}},validation:{dependencies:{hoisted:{exclude:[]},unused:{exclude:["svelte"]}}}}},"createSveltePreset");export{v as createSveltePreset};
@@ -0,0 +1,66 @@
1
+ import { B as BuildConfig } from "../../packem_shared/types.d-Cm6dnCyD.js";
2
+ import '@arethetypeswrong/core';
3
+ import '@visulima/packem-plugins';
4
+ import '@visulima/packem-plugins/oxc';
5
+ import '@visulima/packem-plugins/plugin/externals';
6
+ import '@visulima/packem-plugins/plugin/native-modules';
7
+ import '@visulima/packem-rollup';
8
+ import '@visulima/packem-share/types';
9
+ import '@visulima/packem-share/utils';
10
+ import '@visulima/rollup-plugin-css';
11
+ import 'jiti';
12
+ import 'rollup';
13
+ import 'typedoc';
14
+ interface VuePresetOptions {
15
+ /**
16
+ * Vue plugin options
17
+ */
18
+ pluginOptions?: {
19
+ /**
20
+ * Enable custom elements mode
21
+ * @default false
22
+ */
23
+ customElement?: boolean;
24
+ /**
25
+ * Exclude patterns for Vue files
26
+ */
27
+ exclude?: RegExp | RegExp[];
28
+ /**
29
+ * Include patterns for Vue files
30
+ * @default [/\.vue$/]
31
+ */
32
+ include?: RegExp | RegExp[];
33
+ /**
34
+ * Template compiler options
35
+ */
36
+ template?: {
37
+ compilerOptions?: {
38
+ [key: string]: unknown;
39
+ isCustomElement?: (tag: string) => boolean;
40
+ };
41
+ };
42
+ };
43
+ }
44
+ /**
45
+ * Vue preset for Packem. Configures Rollup with unplugin-vue.
46
+ * @description This preset configures the Vue plugin to handle .vue file compilation.
47
+ * @example
48
+ * ```typescript
49
+ * // Basic usage
50
+ * export default defineConfig({
51
+ * preset: "vue"
52
+ * });
53
+ *
54
+ * // With custom options
55
+ * import { createVuePreset } from "@visulima/packem/config/preset/vue";
56
+ * export default defineConfig({
57
+ * preset: createVuePreset({
58
+ * pluginOptions: {
59
+ * customElement: true
60
+ * }
61
+ * })
62
+ * });
63
+ * ```
64
+ */
65
+ declare const createVuePreset: (options?: VuePresetOptions) => BuildConfig;
66
+ export { VuePresetOptions, createVuePreset };
@@ -0,0 +1 @@
1
+ var n=Object.defineProperty;var u=(t,e)=>n(t,"name",{value:e,configurable:!0});import l from"unplugin-vue/rollup";var r=Object.defineProperty,c=u((t,e)=>r(t,"name",{value:e,configurable:!0}),"n");const o=/\.vue$/,a=c((t={})=>{const{pluginOptions:e={}}=t;return{rollup:{plugins:[{enforce:"pre",plugin:l({customElement:e.customElement??!1,exclude:e.exclude,include:e.include??[o],template:e.template})}]},validation:{dependencies:{hoisted:{exclude:[]},unused:{exclude:["vue"]}}}}},"createVuePreset");export{a as createVuePreset};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/loader/less';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/less";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/loader/lightningcss';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/lightningcss";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/loader/postcss';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/postcss";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/loader/sass';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/sass";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/loader/sourcemap';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/sourcemap";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/loader/stylus';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/stylus";export{o as default};
@@ -1 +1 @@
1
- import{default as o}from"@visulima/rollup-css-plugin/minifier/lightningcss";export{o as default};
1
+ export { default } from '@visulima/rollup-plugin-css/loader/tailwindcss';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/loader/tailwindcss";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/minifier/cssnano';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/minifier/cssnano";export{o as default};
@@ -0,0 +1 @@
1
+ export { default } from '@visulima/rollup-plugin-css/minifier/lightningcss';
@@ -0,0 +1 @@
1
+ import{default as o}from"@visulima/rollup-plugin-css/minifier/lightningcss";export{o as default};
package/dist/index.d.ts CHANGED
@@ -1,36 +1,61 @@
1
1
  import { ConstructorOptions } from '@visulima/pail';
2
- import { B as BuildConfig } from './packem_shared/types-Dn9KmF6u.js';
3
- export { a as BuildEntry, b as BuildOptions, R as RollupBuildOptions } from './packem_shared/types-Dn9KmF6u.js';
4
- import { E as Environment, M as Mode } from './packem_shared/index-zikl8Yu3.js';
5
- export { B as BuildContext, b as BuildContextBuildAssetAndChunk, c as BuildContextBuildEntry, d as BuildHooks, I as IsolatedDeclarationsTransformer, R as Runtime, T as TransformerFn, a as TransformerName } from './packem_shared/index-zikl8Yu3.js';
6
- import '@visulima/rollup-css-plugin';
2
+ import { B as BuildConfig } from "./packem_shared/types.d-Cm6dnCyD.js";
3
+ export type { c as BuildEntry, d as BuildOptions, R as RollupBuildOptions } from "./packem_shared/types.d-Cm6dnCyD.js";
4
+ export type { TransformerFn, TransformerName } from '@visulima/packem-plugins';
5
+ import { Environment, Mode } from '@visulima/packem-share/types';
6
+ export type { BuildContext, BuildContextBuildAssetAndChunk, BuildContextBuildEntry, BuildHooks, Environment, Mode, Runtime } from '@visulima/packem-share/types';
7
+ import '@arethetypeswrong/core';
8
+ import '@visulima/packem-plugins/oxc';
9
+ import '@visulima/packem-plugins/plugin/externals';
10
+ import '@visulima/packem-plugins/plugin/native-modules';
11
+ import '@visulima/packem-rollup';
12
+ import '@visulima/packem-share/utils';
13
+ import '@visulima/rollup-plugin-css';
7
14
  import 'jiti';
8
- import 'typedoc';
9
- import '@rollup/plugin-alias';
10
- import '@rollup/plugin-commonjs';
11
- import '@rollup/plugin-json';
12
- import '@rollup/plugin-node-resolve';
13
- import '@rollup/plugin-replace';
14
- import '@rollup/plugin-wasm';
15
- import '@rollup/pluginutils';
16
15
  import 'rollup';
17
- import 'rollup-plugin-dts';
18
- import 'rollup-plugin-polyfill-node';
19
- import 'rollup-plugin-pure';
20
- import 'rollup-plugin-visualizer';
21
- import 'esbuild';
22
- import '@visulima/package';
23
- import '@visulima/colorize';
24
- import 'oxc-resolver';
25
- import 'oxc-transform';
26
- import 'sucrase';
27
-
16
+ import 'typedoc';
17
+ /**
18
+ * Configuration options for Packem bundler.
19
+ * @interface PackemOptions
20
+ * @augments {BuildConfig}
21
+ */
28
22
  interface PackemOptions extends BuildConfig {
29
- environment?: Environment;
30
- logger?: ConstructorOptions<string, string>;
31
- mode?: Mode;
23
+ /**
24
+ * The environment to build for
25
+ * Determines the build environment configuration
26
+ * @default "production"
27
+ * @type {Environment}
28
+ * @memberof PackemOptions
29
+ */
30
+ environment?: Environment;
31
+ /**
32
+ * Logger configuration options
33
+ * Used to customize the logging behavior and output format
34
+ * @type {ConstructorOptions<string, string>}
35
+ * @memberof PackemOptions
36
+ */
37
+ logger?: ConstructorOptions<string, string>;
38
+ /**
39
+ * The mode to run Packem in
40
+ * Controls how the bundler processes and optimizes the code
41
+ * @default "build"
42
+ * @type {Mode}
43
+ * @memberof PackemOptions
44
+ */
45
+ mode?: Mode;
32
46
  }
47
+ /**
48
+ * Runs the Packem bundler with the specified options.
49
+ * @param rootDirectory The root directory of the project to bundle
50
+ * @param options Configuration options for the bundler
51
+ * @returns Promise that resolves with the build result
52
+ * @example
53
+ * ```typescript
54
+ * const result = await packem("./src", {
55
+ * mode: "build",
56
+ * environment: "production"
57
+ * });
58
+ * ```
59
+ */
33
60
  declare const packem: (rootDirectory: string, options?: PackemOptions) => Promise<void>;
34
-
35
- export { Environment, Mode, packem };
36
- export type { PackemOptions };
61
+ export { PackemOptions, packem };