jiek 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/README.md +5 -0
  2. package/dist/cli.cjs.js +668 -0
  3. package/dist/cli.cjs.js.map +1 -0
  4. package/dist/cli.cjs.min.js +2 -0
  5. package/dist/{cli.umd.min.js.map → cli.cjs.min.js.map} +1 -1
  6. package/dist/commands/publish.esm.js +1 -1
  7. package/dist/commands/publish.esm.js.map +1 -1
  8. package/dist/commands/publish.esm.min.js +1 -1
  9. package/dist/commands/publish.esm.min.js.map +1 -1
  10. package/dist/index.cjs.js +6 -0
  11. package/dist/index.cjs.js.map +1 -0
  12. package/dist/index.cjs.min.js +2 -0
  13. package/dist/index.cjs.min.js.map +1 -0
  14. package/dist/rollup/utils/externalResolver.esm.js +5 -3
  15. package/dist/rollup/utils/externalResolver.esm.js.map +1 -1
  16. package/dist/rollup/utils/externalResolver.esm.min.js +1 -1
  17. package/dist/rollup/utils/externalResolver.esm.min.js.map +1 -1
  18. package/dist/rollup/utils/globalResolver.esm.js +3 -20
  19. package/dist/rollup/utils/globalResolver.esm.js.map +1 -1
  20. package/dist/rollup/utils/globalResolver.esm.min.js +1 -1
  21. package/dist/rollup/utils/globalResolver.esm.min.js.map +1 -1
  22. package/dist/rollup.cjs.js +227 -0
  23. package/dist/rollup.cjs.js.map +1 -0
  24. package/dist/rollup.cjs.min.js +2 -0
  25. package/dist/rollup.cjs.min.js.map +1 -0
  26. package/dist/rollup.d.ts +3 -0
  27. package/dist/rollup.esm.d.ts +3 -0
  28. package/dist/rollup.esm.js +11 -1
  29. package/dist/rollup.esm.js.map +1 -1
  30. package/dist/rollup.esm.min.js +1 -1
  31. package/dist/rollup.esm.min.js.map +1 -1
  32. package/package.json +6 -2
  33. package/dist/cli.iife.js +0 -658
  34. package/dist/cli.iife.js.map +0 -1
  35. package/dist/cli.iife.min.js +0 -2
  36. package/dist/cli.iife.min.js.map +0 -1
  37. package/dist/cli.umd.js +0 -661
  38. package/dist/cli.umd.js.map +0 -1
  39. package/dist/cli.umd.min.js +0 -2
  40. package/dist/index.iife.js +0 -11
  41. package/dist/index.iife.js.map +0 -1
  42. package/dist/index.iife.min.js +0 -2
  43. package/dist/index.iife.min.js.map +0 -1
  44. package/dist/index.umd.js +0 -12
  45. package/dist/index.umd.js.map +0 -1
  46. package/dist/index.umd.min.js +0 -2
  47. package/dist/index.umd.min.js.map +0 -1
  48. package/dist/rollup.iife.js +0 -228
  49. package/dist/rollup.iife.js.map +0 -1
  50. package/dist/rollup.iife.min.js +0 -2
  51. package/dist/rollup.iife.min.js.map +0 -1
  52. package/dist/rollup.umd.js +0 -229
  53. package/dist/rollup.umd.js.map +0 -1
  54. package/dist/rollup.umd.min.js +0 -2
  55. package/dist/rollup.umd.min.js.map +0 -1
@@ -1,229 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('node:path'), require('@jiek/utils/getWorkspaceDir'), require('@rollup/plugin-json'), require('autoprefixer'), require('rollup-plugin-dts'), require('rollup-plugin-esbuild'), require('rollup-plugin-postcss'), require('@rollup/plugin-terser')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'node:path', '@jiek/utils/getWorkspaceDir', '@rollup/plugin-json', 'autoprefixer', 'rollup-plugin-dts', 'rollup-plugin-esbuild', 'rollup-plugin-postcss', '@rollup/plugin-terser'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jiekrollup = {}, global.node_path, global.getWorkspaceDir, global.json, global.autoprefixer, global.rollupPluginDts, global.esbuild, global.postcss, global.terser));
5
- })(this, (function (exports, node_path, getWorkspaceDir, json, autoprefixer, rollupPluginDts, esbuild, postcss, terser) { 'use strict';
6
-
7
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
-
9
- var json__default = /*#__PURE__*/_interopDefault(json);
10
- var autoprefixer__default = /*#__PURE__*/_interopDefault(autoprefixer);
11
- var esbuild__default = /*#__PURE__*/_interopDefault(esbuild);
12
- var postcss__default = /*#__PURE__*/_interopDefault(postcss);
13
- var terser__default = /*#__PURE__*/_interopDefault(terser);
14
-
15
- function globalResolver(external) {
16
- if (external.startsWith("@zodui/")) {
17
- return external.replace(/[@/-](\w)/g, (_, c) => c.toUpperCase());
18
- }
19
- return {
20
- react: "React",
21
- // TODO `react/jsx-runtime` is not supported `umd`
22
- "react/jsx-runtime": "ReactJSXRuntime",
23
- // https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js
24
- "react-dom": "ReactDOM",
25
- // https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js
26
- // TODO make the library use the global variable `TDesignReact` replace `TDesign`
27
- "tdesign-react/esm": "TDesign",
28
- // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.js
29
- // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.css
30
- "tdesign-icons-react": "TDesignIconReact",
31
- // https://cdn.jsdelivr.net/npm/tdesign-icons-react@1.4.0/dist/index.js
32
- zod: "Zod",
33
- "@zodui/core": "ZodUICore",
34
- "@zodui/core/utils": "ZodUICoreUtils",
35
- "@zodui/react": "ZodUIReact"
36
- }[external];
37
- }
38
-
39
- function createGlobalsLinkage() {
40
- let globals = {};
41
- const dependencies = /* @__PURE__ */ new Set([]);
42
- return [
43
- ({ external } = {}) => {
44
- return {
45
- name: "globals",
46
- resolveId(id) {
47
- if (external?.some((dep) => dep instanceof RegExp ? dep.test(id) : dep === id)) {
48
- dependencies.add(id);
49
- return { id, external: true };
50
- }
51
- return null;
52
- },
53
- outputOptions(options) {
54
- globals = [...dependencies].reduce((acc, value) => ({
55
- ...acc,
56
- [value]: globalResolver(value)
57
- }), {});
58
- return { ...options, globals };
59
- }
60
- };
61
- },
62
- { outputOptions: (options) => ({ ...options, globals }) }
63
- ];
64
- }
65
-
66
- var skip = (options = {}) => {
67
- return {
68
- name: "skip",
69
- // skip the specified files by `options.patterns`
70
- load(id) {
71
- if (options.patterns?.some(
72
- (pattern) => typeof pattern === "string" ? id.includes(pattern) : pattern.test(id)
73
- )) {
74
- return "";
75
- }
76
- }
77
- };
78
- };
79
-
80
- const defineOutput = (output) => output;
81
- const commonOutputOptions = defineOutput({
82
- dir: "dist",
83
- exports: "named",
84
- interop: "auto",
85
- sourcemap: true
86
- });
87
-
88
- function externalResolver() {
89
- const cwd = process.cwd();
90
- const pkg = require(`${cwd}/package.json`);
91
- const { dependencies = {}, peerDependencies = {} } = pkg;
92
- const external = Object.keys(dependencies).concat(Object.keys(peerDependencies));
93
- return external.map((dep) => new RegExp(`^${dep}(/.*)?$`));
94
- }
95
-
96
- function withMinify(output) {
97
- return [
98
- output,
99
- {
100
- ...output,
101
- entryFileNames: output.entryFileNames?.replace(/(\.js)$/, ".min$1"),
102
- plugins: [...output.plugins ?? [], terser__default.default()]
103
- }
104
- ];
105
- }
106
-
107
- const workspaceRoot = getWorkspaceDir.getWorkspaceDir();
108
- function resolveWorkspacePath(p) {
109
- return node_path.resolve(workspaceRoot, p);
110
- }
111
- const template = ({
112
- styled = false,
113
- plugins: {
114
- index: indexPlugins = [],
115
- entry: entryPlugins = [],
116
- dts: dtsPlugins = []
117
- } = {}
118
- } = {}, pkg) => {
119
- if (!pkg.name) {
120
- throw new Error("pkg.name is required");
121
- }
122
- const namePrefix = pkg.name.replace(/[@|/-](\w)/g, (_, $1) => $1.toUpperCase());
123
- const exportsEntries = Object.fromEntries(
124
- Object.entries(pkg.exports ?? {}).filter(([key]) => !/\.(json|css|scss)$/.test(key)).filter(([, value]) => typeof value === "object" && value["inner-src"] && value["import"]).map(([key, value]) => [
125
- key.replace(/^\.$/, "index").replace(/^\.\//, ""),
126
- typeof value === "string" ? value : value["inner-src"]
127
- ])
128
- );
129
- const [globalsRegister, globalsOutput] = createGlobalsLinkage();
130
- const external = externalResolver();
131
- const commonPlugins = [
132
- json__default.default()
133
- ];
134
- return [
135
- {
136
- input: exportsEntries,
137
- output: [
138
- ...withMinify({
139
- ...commonOutputOptions,
140
- format: "esm",
141
- entryFileNames: "[name].esm.js",
142
- preserveModules: true
143
- })
144
- ],
145
- plugins: [
146
- commonPlugins,
147
- globalsRegister({ external }),
148
- styled && skip({ patterns: [/\.s?css$/] }),
149
- esbuild__default.default(),
150
- indexPlugins
151
- ]
152
- },
153
- ...Object.entries(exportsEntries).map(([name, input]) => {
154
- const outputName = namePrefix + (name === "index" ? "" : name.replace(/[@|/-](\w)/g, (_, $1) => $1.toUpperCase()));
155
- return {
156
- input,
157
- output: [
158
- ...withMinify({
159
- ...commonOutputOptions,
160
- name: outputName,
161
- format: "iife",
162
- entryFileNames: `${name}.iife.js`
163
- }),
164
- ...withMinify({
165
- ...commonOutputOptions,
166
- name: outputName,
167
- format: "umd",
168
- entryFileNames: `${name}.umd.js`
169
- })
170
- ],
171
- plugins: [
172
- commonPlugins,
173
- globalsOutput,
174
- styled && postcss__default.default({
175
- plugins: [autoprefixer__default.default],
176
- minimize: true,
177
- sourceMap: true,
178
- extract: `${name}.css`
179
- }),
180
- esbuild__default.default(),
181
- entryPlugins
182
- ],
183
- external
184
- };
185
- }),
186
- {
187
- input: exportsEntries,
188
- output: [
189
- {
190
- dir: "dist",
191
- entryFileNames: ({ name }) => `${name.replace(/^src\//, "")}.esm.d.ts`,
192
- preserveModules: true
193
- },
194
- {
195
- dir: "dist"
196
- }
197
- ],
198
- plugins: [
199
- commonPlugins,
200
- styled && skip({ patterns: [/\.s?css$/] }),
201
- rollupPluginDts.dts({ tsconfig: resolveWorkspacePath("tsconfig.dts.json") }),
202
- {
203
- name: "rollup-plugin-declare-module-replacer",
204
- /**
205
- * replace relative path `declare module './xxx'` to `declare module '{{package name}}'`
206
- * in output file generated
207
- */
208
- generateBundle(_, bundle) {
209
- for (const file of Object.values(bundle)) {
210
- if (!("code" in file))
211
- continue;
212
- file.code = file.code.replace(
213
- /declare module ['|"]\..*['|"]/g,
214
- `declare module '${pkg.name}'`
215
- );
216
- }
217
- }
218
- },
219
- dtsPlugins
220
- ],
221
- external
222
- }
223
- ];
224
- };
225
-
226
- exports.template = template;
227
-
228
- }));
229
- //# sourceMappingURL=rollup.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rollup.umd.js","sources":["../src/rollup/utils/globalResolver.ts","../src/rollup/plugins/globals.ts","../src/rollup/plugins/skip.ts","../src/rollup/utils/commonOptions.ts","../src/rollup/utils/externalResolver.ts","../src/rollup/utils/withMinify.ts","../src/rollup/index.ts"],"sourcesContent":["export default function (external: string) {\n if (external.startsWith('@zodui/')) {\n return external\n .replace(/[@/-](\\w)/g, (_, c) => c.toUpperCase())\n }\n return {\n react: 'React',\n // TODO `react/jsx-runtime` is not supported `umd`\n 'react/jsx-runtime': 'ReactJSXRuntime',\n // https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js\n 'react-dom': 'ReactDOM',\n // https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js\n // TODO make the library use the global variable `TDesignReact` replace `TDesign`\n 'tdesign-react/esm': 'TDesign',\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.js\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.css\n 'tdesign-icons-react': 'TDesignIconReact',\n // https://cdn.jsdelivr.net/npm/tdesign-icons-react@1.4.0/dist/index.js\n zod: 'Zod',\n '@zodui/core': 'ZodUICore',\n '@zodui/core/utils': 'ZodUICoreUtils',\n '@zodui/react': 'ZodUIReact'\n }[external]\n}\n","import type { Plugin, PluginImpl } from 'rollup'\n\nimport globalResolver from '../utils/globalResolver'\n\ninterface GlobalsOptions {\n external?: (string | RegExp)[]\n}\n\nexport function createGlobalsLinkage() {\n let globals = {}\n const dependencies = new Set<string>([])\n return [\n (({ external } = {}) => {\n return {\n name: 'globals',\n resolveId(id) {\n if (external?.some(dep => dep instanceof RegExp ? dep.test(id) : dep === id)) {\n dependencies.add(id)\n return { id, external: true }\n }\n return null\n },\n outputOptions(options) {\n globals = [...dependencies].reduce((acc, value) => ({\n ...acc,\n [value]: globalResolver(value)\n }), {})\n return { ...options, globals }\n }\n }\n }) as PluginImpl<GlobalsOptions>,\n { outputOptions: options => ({ ...options, globals }) } as Plugin\n ] as const\n}\n","import type { PluginImpl } from 'rollup'\n\ninterface Options {\n patterns?: (string | RegExp)[]\n}\n\nexport default ((options = {}) => {\n return {\n name: 'skip',\n // skip the specified files by `options.patterns`\n load(id) {\n if (\n options.patterns?.some((pattern) =>\n typeof pattern === 'string'\n ? id.includes(pattern)\n : pattern.test(id)\n )\n ) {\n return ''\n }\n }\n }\n}) as PluginImpl<Options>\n","import type { OutputOptions } from 'rollup'\n\nconst defineOutput = <O extends OutputOptions>(output: O) => output\n\nexport const commonOutputOptions = defineOutput({\n dir: 'dist',\n exports: 'named',\n interop: 'auto',\n sourcemap: true\n})\n","export default function () {\n const cwd = process.cwd()\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const pkg = require(`${cwd}/package.json`)\n const { dependencies = {}, peerDependencies = {} } = pkg\n const external = <(string | RegExp)[]>Object\n .keys(dependencies)\n .concat(Object.keys(peerDependencies))\n return external\n .map(dep => new RegExp(`^${dep}(/.*)?$`))\n}\n","import terser from '@rollup/plugin-terser'\nimport type { OutputOptions, OutputPlugin } from 'rollup'\n\nexport default function (output: OutputOptions & {\n entryFileNames?: string\n plugins?: OutputPlugin[]\n}): OutputOptions[] {\n return [\n output,\n {\n ...output,\n entryFileNames: output.entryFileNames?.replace(/(\\.js)$/, '.min$1'),\n plugins: [...(output.plugins ?? []), terser()]\n }\n ]\n}\n","import { resolve } from 'node:path'\n\nimport { getWorkspaceDir } from '@jiek/utils/getWorkspaceDir'\nimport json from '@rollup/plugin-json'\nimport autoprefixer from 'autoprefixer'\nimport type { InputPluginOption, RollupOptions } from 'rollup'\nimport { dts } from 'rollup-plugin-dts'\nimport esbuild from 'rollup-plugin-esbuild'\nimport postcss from 'rollup-plugin-postcss'\n\nimport { createGlobalsLinkage } from './plugins/globals'\nimport skip from './plugins/skip'\nimport { commonOutputOptions } from './utils/commonOptions'\nimport externalResolver from './utils/externalResolver'\nimport withMinify from './utils/withMinify'\n\nconst workspaceRoot = getWorkspaceDir()\nfunction resolveWorkspacePath(p: string) {\n return resolve(workspaceRoot, p)\n}\n\nexport const template = (\n {\n styled = false,\n plugins: {\n index: indexPlugins = [],\n entry: entryPlugins = [],\n dts: dtsPlugins = []\n } = {}\n }: {\n /**\n * include styles files\n */\n styled?: boolean\n plugins?: {\n index?: InputPluginOption\n entry?: InputPluginOption\n dts?: InputPluginOption\n }\n } = {},\n pkg: {\n name?: string\n exports?: Record<string, string | {\n import: string\n 'inner-src': string\n }>\n }\n) => {\n if (!pkg.name) {\n throw new Error('pkg.name is required')\n }\n const namePrefix = pkg\n .name\n .replace(/[@|/-](\\w)/g, (_, $1) => $1.toUpperCase())\n const exportsEntries = Object.fromEntries(\n Object.entries(pkg.exports ?? {})\n // filter static files\n .filter(([key]) => !/\\.(json|css|scss)$/.test(key))\n // filter no `inner-src` or `import` field entries\n .filter(([, value]) => typeof value === 'object' && value['inner-src'] && value['import'])\n .map(([key, value]) => [\n key\n .replace(/^\\.$/, 'index')\n .replace(/^\\.\\//, ''),\n typeof value === 'string' ? value : value['inner-src']\n ])\n )\n\n const [globalsRegister, globalsOutput] = createGlobalsLinkage()\n const external = externalResolver()\n\n const commonPlugins = [\n json()\n ]\n return [\n {\n input: exportsEntries,\n output: [\n ...withMinify({\n ...commonOutputOptions,\n format: 'esm',\n entryFileNames: '[name].esm.js',\n preserveModules: true\n })\n ],\n plugins: [\n commonPlugins,\n globalsRegister({ external }),\n styled && skip({ patterns: [/\\.s?css$/] }),\n esbuild(),\n indexPlugins\n ]\n },\n ...Object.entries(exportsEntries).map(([name, input]) => {\n const outputName = namePrefix + (\n name === 'index' ? '' : (\n name.replace(/[@|/-](\\w)/g, (_, $1) => $1.toUpperCase())\n )\n )\n return {\n input: input,\n output: [\n ...withMinify({\n ...commonOutputOptions,\n name: outputName,\n format: 'iife',\n entryFileNames: `${name}.iife.js`\n }),\n ...withMinify({\n ...commonOutputOptions,\n name: outputName,\n format: 'umd',\n entryFileNames: `${name}.umd.js`\n })\n ],\n plugins: [\n commonPlugins,\n globalsOutput,\n styled && postcss({\n plugins: [autoprefixer],\n minimize: true,\n sourceMap: true,\n extract: `${name}.css`\n }),\n esbuild(),\n entryPlugins\n ],\n external\n }\n }),\n {\n input: exportsEntries,\n output: [\n {\n dir: 'dist',\n entryFileNames: ({ name }) => `${name.replace(/^src\\//, '')}.esm.d.ts`,\n preserveModules: true\n },\n {\n dir: 'dist'\n }\n ],\n plugins: [\n commonPlugins,\n styled && skip({ patterns: [/\\.s?css$/] }),\n dts({ tsconfig: resolveWorkspacePath('tsconfig.dts.json') }),\n {\n name: 'rollup-plugin-declare-module-replacer',\n /**\n * replace relative path `declare module './xxx'` to `declare module '{{package name}}'`\n * in output file generated\n */\n generateBundle(_, bundle) {\n for (const file of Object.values(bundle)) {\n if (!('code' in file)) continue\n\n file.code = file.code.replace(\n /declare module ['|\"]\\..*['|\"]/g,\n `declare module '${pkg.name}'`\n )\n }\n }\n },\n dtsPlugins\n ],\n external\n }\n ] as RollupOptions[]\n}\n"],"names":["terser","getWorkspaceDir","resolve","json","esbuild","postcss","autoprefixer","dts"],"mappings":";;;;;;;;;;;;;;EAAA,uBAAA,CAAyB,QAAkB,EAAA;EACzC,EAAI,IAAA,QAAA,CAAS,UAAW,CAAA,SAAS,CAAG,EAAA;EAClC,IAAO,OAAA,QAAA,CACJ,QAAQ,YAAc,EAAA,CAAC,GAAG,CAAM,KAAA,CAAA,CAAE,aAAa,CAAA,CAAA;EAAA,GACpD;EACA,EAAO,OAAA;EAAA,IACL,KAAO,EAAA,OAAA;EAAA;EAAA,IAEP,mBAAqB,EAAA,iBAAA;EAAA;EAAA,IAErB,WAAa,EAAA,UAAA;EAAA;EAAA;EAAA,IAGb,mBAAqB,EAAA,SAAA;EAAA;EAAA;EAAA,IAGrB,qBAAuB,EAAA,kBAAA;EAA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,QAC3D;EAAA,UACE,IAAM,EAAA,uCAAA;EAAA;EAAA;EAAA;EAAA;EAAA,UAKN,cAAA,CAAe,GAAG,MAAQ,EAAA;EACxB,YAAA,KAAA,MAAW,IAAQ,IAAA,MAAA,CAAO,MAAO,CAAA,MAAM,CAAG,EAAA;EACxC,cAAA,IAAI,EAAE,MAAU,IAAA,IAAA,CAAA;EAAO,gBAAA,SAAA;EAEvB,cAAK,IAAA,CAAA,IAAA,GAAO,KAAK,IAAK,CAAA,OAAA;EAAA,gBACpB,gCAAA;EAAA,gBACA,CAAA,gBAAA,EAAmB,IAAI,IAAI,CAAA,CAAA,CAAA;EAAA,eAC7B,CAAA;EAAA,aACF;EAAA,WACF;EAAA,SACF;EAAA,QACA,UAAA;EAAA,OACF;EAAA,MACA,QAAA;EAAA,KACF;EAAA,GACF,CAAA;EACF;;;;;;;;"}
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("node:path"),require("@jiek/utils/getWorkspaceDir"),require("@rollup/plugin-json"),require("autoprefixer"),require("rollup-plugin-dts"),require("rollup-plugin-esbuild"),require("rollup-plugin-postcss"),require("@rollup/plugin-terser")):"function"==typeof define&&define.amd?define(["exports","node:path","@jiek/utils/getWorkspaceDir","@rollup/plugin-json","autoprefixer","rollup-plugin-dts","rollup-plugin-esbuild","rollup-plugin-postcss","@rollup/plugin-terser"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jiekrollup={},e.node_path,e.getWorkspaceDir,e.json,e.autoprefixer,e.rollupPluginDts,e.esbuild,e.postcss,e.terser)}(this,(function(e,t,r,s,n,i,o,l,u){"use strict";function p(e){return e&&e.__esModule?e:{default:e}}var a=p(s),c=p(n),d=p(o),m=p(l),f=p(u);function g(e){return e.startsWith("@zodui/")?e.replace(/[@/-](\w)/g,((e,t)=>t.toUpperCase())):{react:"React","react/jsx-runtime":"ReactJSXRuntime","react-dom":"ReactDOM","tdesign-react/esm":"TDesign","tdesign-icons-react":"TDesignIconReact",zod:"Zod","@zodui/core":"ZodUICore","@zodui/core/utils":"ZodUICoreUtils","@zodui/react":"ZodUIReact"}[e]}var j=(e={})=>({name:"skip",load(t){if(e.patterns?.some((e=>"string"==typeof e?t.includes(e):e.test(t))))return""}});const x={dir:"dist",exports:"named",interop:"auto",sourcemap:!0};function y(e){return[e,{...e,entryFileNames:e.entryFileNames?.replace(/(\.js)$/,".min$1"),plugins:[...e.plugins??[],f.default()]}]}const b=r.getWorkspaceDir();e.template=({styled:e=!1,plugins:{index:r=[],entry:s=[],dts:n=[]}={}}={},o)=>{if(!o.name)throw new Error("pkg.name is required");const l=o.name.replace(/[@|/-](\w)/g,((e,t)=>t.toUpperCase())),u=Object.fromEntries(Object.entries(o.exports??{}).filter((([e])=>!/\.(json|css|scss)$/.test(e))).filter((([,e])=>"object"==typeof e&&e["inner-src"]&&e.import)).map((([e,t])=>[e.replace(/^\.$/,"index").replace(/^\.\//,""),"string"==typeof t?t:t["inner-src"]]))),[p,f]=function(){let e={};const t=new Set([]);return[({external:r}={})=>({name:"globals",resolveId:e=>r?.some((t=>t instanceof RegExp?t.test(e):t===e))?(t.add(e),{id:e,external:!0}):null,outputOptions:r=>(e=[...t].reduce(((e,t)=>({...e,[t]:g(t)})),{}),{...r,globals:e})}),{outputOptions:t=>({...t,globals:e})}]}(),$=function(){const e=process.cwd(),t=require(`${e}/package.json`),{dependencies:r={},peerDependencies:s={}}=t;return Object.keys(r).concat(Object.keys(s)).map((e=>new RegExp(`^${e}(/.*)?$`)))}(),k=[a.default()];return[{input:u,output:[...y({...x,format:"esm",entryFileNames:"[name].esm.js",preserveModules:!0})],plugins:[k,p({external:$}),e&&j({patterns:[/\.s?css$/]}),d.default(),r]},...Object.entries(u).map((([t,r])=>{const n=l+("index"===t?"":t.replace(/[@|/-](\w)/g,((e,t)=>t.toUpperCase())));return{input:r,output:[...y({...x,name:n,format:"iife",entryFileNames:`${t}.iife.js`}),...y({...x,name:n,format:"umd",entryFileNames:`${t}.umd.js`})],plugins:[k,f,e&&m.default({plugins:[c.default],minimize:!0,sourceMap:!0,extract:`${t}.css`}),d.default(),s],external:$}})),{input:u,output:[{dir:"dist",entryFileNames:({name:e})=>`${e.replace(/^src\//,"")}.esm.d.ts`,preserveModules:!0},{dir:"dist"}],plugins:[k,e&&j({patterns:[/\.s?css$/]}),i.dts({tsconfig:(q="tsconfig.dts.json",t.resolve(b,q))}),{name:"rollup-plugin-declare-module-replacer",generateBundle(e,t){for(const e of Object.values(t))"code"in e&&(e.code=e.code.replace(/declare module ['|"]\..*['|"]/g,`declare module '${o.name}'`))}},n],external:$}];var q}}));
2
- //# sourceMappingURL=rollup.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rollup.umd.min.js","sources":["../src/rollup/utils/globalResolver.ts","../src/rollup/plugins/skip.ts","../src/rollup/utils/commonOptions.ts","../src/rollup/utils/withMinify.ts","../src/rollup/index.ts","../src/rollup/plugins/globals.ts","../src/rollup/utils/externalResolver.ts"],"sourcesContent":["export default function (external: string) {\n if (external.startsWith('@zodui/')) {\n return external\n .replace(/[@/-](\\w)/g, (_, c) => c.toUpperCase())\n }\n return {\n react: 'React',\n // TODO `react/jsx-runtime` is not supported `umd`\n 'react/jsx-runtime': 'ReactJSXRuntime',\n // https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.development.js\n 'react-dom': 'ReactDOM',\n // https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.development.js\n // TODO make the library use the global variable `TDesignReact` replace `TDesign`\n 'tdesign-react/esm': 'TDesign',\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.js\n // https://cdn.jsdelivr.net/npm/tdesign-react@1.4.0/dist/tdesign.css\n 'tdesign-icons-react': 'TDesignIconReact',\n // https://cdn.jsdelivr.net/npm/tdesign-icons-react@1.4.0/dist/index.js\n zod: 'Zod',\n '@zodui/core': 'ZodUICore',\n '@zodui/core/utils': 'ZodUICoreUtils',\n '@zodui/react': 'ZodUIReact'\n }[external]\n}\n","import type { PluginImpl } from 'rollup'\n\ninterface Options {\n patterns?: (string | RegExp)[]\n}\n\nexport default ((options = {}) => {\n return {\n name: 'skip',\n // skip the specified files by `options.patterns`\n load(id) {\n if (\n options.patterns?.some((pattern) =>\n typeof pattern === 'string'\n ? id.includes(pattern)\n : pattern.test(id)\n )\n ) {\n return ''\n }\n }\n }\n}) as PluginImpl<Options>\n","import type { OutputOptions } from 'rollup'\n\nconst defineOutput = <O extends OutputOptions>(output: O) => output\n\nexport const commonOutputOptions = defineOutput({\n dir: 'dist',\n exports: 'named',\n interop: 'auto',\n sourcemap: true\n})\n","import terser from '@rollup/plugin-terser'\nimport type { OutputOptions, OutputPlugin } from 'rollup'\n\nexport default function (output: OutputOptions & {\n entryFileNames?: string\n plugins?: OutputPlugin[]\n}): OutputOptions[] {\n return [\n output,\n {\n ...output,\n entryFileNames: output.entryFileNames?.replace(/(\\.js)$/, '.min$1'),\n plugins: [...(output.plugins ?? []), terser()]\n }\n ]\n}\n","import { resolve } from 'node:path'\n\nimport { getWorkspaceDir } from '@jiek/utils/getWorkspaceDir'\nimport json from '@rollup/plugin-json'\nimport autoprefixer from 'autoprefixer'\nimport type { InputPluginOption, RollupOptions } from 'rollup'\nimport { dts } from 'rollup-plugin-dts'\nimport esbuild from 'rollup-plugin-esbuild'\nimport postcss from 'rollup-plugin-postcss'\n\nimport { createGlobalsLinkage } from './plugins/globals'\nimport skip from './plugins/skip'\nimport { commonOutputOptions } from './utils/commonOptions'\nimport externalResolver from './utils/externalResolver'\nimport withMinify from './utils/withMinify'\n\nconst workspaceRoot = getWorkspaceDir()\nfunction resolveWorkspacePath(p: string) {\n return resolve(workspaceRoot, p)\n}\n\nexport const template = (\n {\n styled = false,\n plugins: {\n index: indexPlugins = [],\n entry: entryPlugins = [],\n dts: dtsPlugins = []\n } = {}\n }: {\n /**\n * include styles files\n */\n styled?: boolean\n plugins?: {\n index?: InputPluginOption\n entry?: InputPluginOption\n dts?: InputPluginOption\n }\n } = {},\n pkg: {\n name?: string\n exports?: Record<string, string | {\n import: string\n 'inner-src': string\n }>\n }\n) => {\n if (!pkg.name) {\n throw new Error('pkg.name is required')\n }\n const namePrefix = pkg\n .name\n .replace(/[@|/-](\\w)/g, (_, $1) => $1.toUpperCase())\n const exportsEntries = Object.fromEntries(\n Object.entries(pkg.exports ?? {})\n // filter static files\n .filter(([key]) => !/\\.(json|css|scss)$/.test(key))\n // filter no `inner-src` or `import` field entries\n .filter(([, value]) => typeof value === 'object' && value['inner-src'] && value['import'])\n .map(([key, value]) => [\n key\n .replace(/^\\.$/, 'index')\n .replace(/^\\.\\//, ''),\n typeof value === 'string' ? value : value['inner-src']\n ])\n )\n\n const [globalsRegister, globalsOutput] = createGlobalsLinkage()\n const external = externalResolver()\n\n const commonPlugins = [\n json()\n ]\n return [\n {\n input: exportsEntries,\n output: [\n ...withMinify({\n ...commonOutputOptions,\n format: 'esm',\n entryFileNames: '[name].esm.js',\n preserveModules: true\n })\n ],\n plugins: [\n commonPlugins,\n globalsRegister({ external }),\n styled && skip({ patterns: [/\\.s?css$/] }),\n esbuild(),\n indexPlugins\n ]\n },\n ...Object.entries(exportsEntries).map(([name, input]) => {\n const outputName = namePrefix + (\n name === 'index' ? '' : (\n name.replace(/[@|/-](\\w)/g, (_, $1) => $1.toUpperCase())\n )\n )\n return {\n input: input,\n output: [\n ...withMinify({\n ...commonOutputOptions,\n name: outputName,\n format: 'iife',\n entryFileNames: `${name}.iife.js`\n }),\n ...withMinify({\n ...commonOutputOptions,\n name: outputName,\n format: 'umd',\n entryFileNames: `${name}.umd.js`\n })\n ],\n plugins: [\n commonPlugins,\n globalsOutput,\n styled && postcss({\n plugins: [autoprefixer],\n minimize: true,\n sourceMap: true,\n extract: `${name}.css`\n }),\n esbuild(),\n entryPlugins\n ],\n external\n }\n }),\n {\n input: exportsEntries,\n output: [\n {\n dir: 'dist',\n entryFileNames: ({ name }) => `${name.replace(/^src\\//, '')}.esm.d.ts`,\n preserveModules: true\n },\n {\n dir: 'dist'\n }\n ],\n plugins: [\n commonPlugins,\n styled && skip({ patterns: [/\\.s?css$/] }),\n dts({ tsconfig: resolveWorkspacePath('tsconfig.dts.json') }),\n {\n name: 'rollup-plugin-declare-module-replacer',\n /**\n * replace relative path `declare module './xxx'` to `declare module '{{package name}}'`\n * in output file generated\n */\n generateBundle(_, bundle) {\n for (const file of Object.values(bundle)) {\n if (!('code' in file)) continue\n\n file.code = file.code.replace(\n /declare module ['|\"]\\..*['|\"]/g,\n `declare module '${pkg.name}'`\n )\n }\n }\n },\n dtsPlugins\n ],\n external\n }\n ] as RollupOptions[]\n}\n","import type { Plugin, PluginImpl } from 'rollup'\n\nimport globalResolver from '../utils/globalResolver'\n\ninterface GlobalsOptions {\n external?: (string | RegExp)[]\n}\n\nexport function createGlobalsLinkage() {\n let globals = {}\n const dependencies = new Set<string>([])\n return [\n (({ external } = {}) => {\n return {\n name: 'globals',\n resolveId(id) {\n if (external?.some(dep => dep instanceof RegExp ? dep.test(id) : dep === id)) {\n dependencies.add(id)\n return { id, external: true }\n }\n return null\n },\n outputOptions(options) {\n globals = [...dependencies].reduce((acc, value) => ({\n ...acc,\n [value]: globalResolver(value)\n }), {})\n return { ...options, globals }\n }\n }\n }) as PluginImpl<GlobalsOptions>,\n { outputOptions: options => ({ ...options, globals }) } as Plugin\n ] as const\n}\n","export default function () {\n const cwd = process.cwd()\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const pkg = require(`${cwd}/package.json`)\n const { dependencies = {}, peerDependencies = {} } = pkg\n const external = <(string | RegExp)[]>Object\n .keys(dependencies)\n .concat(Object.keys(peerDependencies))\n return external\n .map(dep => new RegExp(`^${dep}(/.*)?$`))\n}\n"],"names":["globalResolver","external","startsWith","replace","_","c","toUpperCase","react","zod","skip","options","name","load","id","patterns","some","pattern","includes","test","commonOutputOptions","dir","exports","interop","sourcemap","withMinify","output","entryFileNames","plugins","terser","workspaceRoot","getWorkspaceDir","styled","index","indexPlugins","entry","entryPlugins","dts","dtsPlugins","pkg","Error","namePrefix","$1","exportsEntries","Object","fromEntries","entries","filter","key","value","map","globalsRegister","globalsOutput","globals","dependencies","Set","resolveId","dep","RegExp","add","outputOptions","reduce","acc","createGlobalsLinkage","cwd","process","require","peerDependencies","keys","concat","externalResolver","commonPlugins","json","input","format","preserveModules","esbuild","outputName","postcss","autoprefixer","minimize","sourceMap","extract","tsconfig","p","resolve","generateBundle","bundle","file","values","code"],"mappings":"61BAAA,SAAAA,EAAyBC,GACnB,OAAAA,EAASC,WAAW,WACfD,EACJE,QAAQ,cAAc,CAACC,EAAGC,IAAMA,EAAEC,gBAEhC,CACLC,MAAO,QAEP,oBAAqB,kBAErB,YAAa,WAGb,oBAAqB,UAGrB,sBAAuB,mBAEvBC,IAAK,MACL,cAAe,YACf,oBAAqB,iBACrB,eAAgB,cAChBP,EACJ,CCjBA,IAAAQ,EAAgB,CAACC,EAAU,CAAA,KAClB,CACLC,KAAM,OAEN,IAAAC,CAAKC,GACH,GACEH,EAAQI,UAAUC,MAAMC,GACH,iBAAZA,EACHH,EAAGI,SAASD,GACZA,EAAQE,KAAKL,KAGZ,MAAA,EAEX,IClBJ,MAEaM,EAAmC,CAC9CC,IAAK,OACLC,QAAS,QACTC,QAAS,OACTC,WAAW,GCLb,SAAAC,EAAyBC,GAIhB,MAAA,CACLA,EACA,IACKA,EACHC,eAAgBD,EAAOC,gBAAgBvB,QAAQ,UAAW,UAC1DwB,QAAS,IAAKF,EAAOE,SAAW,GAAKC,cAG3C,CCCA,MAAMC,EAAgBC,EAAgBA,6BAKd,EAEpBC,UAAS,EACTJ,SACEK,MAAOC,EAAe,GACtBC,MAAOC,EAAe,GACtBC,IAAKC,EAAa,IAChB,CAAC,GAWH,CAAA,EACJC,KAQI,IAACA,EAAI3B,KACD,MAAA,IAAI4B,MAAM,wBAEZ,MAAAC,EAAaF,EAChB3B,KACAR,QAAQ,eAAe,CAACC,EAAGqC,IAAOA,EAAGnC,gBACl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