@nubisco/ui 5.27.1 → 5.27.2
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/plugins/vite/glyphs.d.ts +2 -1
- package/dist/plugins/vite/glyphs.d.ts.map +1 -1
- package/dist/plugins/vite/glyphs.js +7 -2
- package/dist/plugins/vite/imports.d.ts +2 -1
- package/dist/plugins/vite/imports.d.ts.map +1 -1
- package/dist/plugins/vite/imports.js +7 -2
- package/dist/plugins/vite/index.js +1 -1
- package/dist/plugins/vite/vendor.d.ts +3 -0
- package/dist/plugins/vite/vendor.js +16340 -0
- package/package.json +4 -6
- package/src/plugins/vite/glyphs.ts +8 -2
- package/src/plugins/vite/imports.ts +8 -2
- package/src/plugins/vite/index.ts +1 -1
- package/src/plugins/vite/vendor.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nubisco/ui",
|
|
3
|
-
"version": "5.27.
|
|
3
|
+
"version": "5.27.2",
|
|
4
4
|
"description": "Vue 3 UI component library",
|
|
5
5
|
"packageManager": "pnpm@12.3.4+sha512.961aa41fb077da3a04a441d9f8e15ebc0c96da8ef710b2eb67bf9ee7cb0610eabd48f1fd85f51cffe73846785fa0f87c56a3a872a1d893f8446741b5cce45457",
|
|
6
6
|
"repository": {
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"build": "pnpm run build:lib && pnpm run build:types && pnpm run build:plugins && node scripts/finalize-dist.mjs && pnpm run verify:types",
|
|
140
140
|
"build:lib": "vite build",
|
|
141
141
|
"build:types": "vue-tsc --noEmit false --declaration --emitDeclarationOnly --outDir dist && node scripts/copy-type-modules.mjs && node scripts/rewrite-dist-aliases.mjs dist",
|
|
142
|
-
"build:plugins": "tsc --project tsconfig.plugins.json",
|
|
142
|
+
"build:plugins": "tsc --project tsconfig.plugins.json && node scripts/bundle-plugin-vendor.mjs",
|
|
143
143
|
"verify:types": "pnpm run verify:dist-types && pnpm run verify:consumer-types && pnpm run verify:consumer-globals && pnpm run verify:resolution && pnpm run verify:styles && pnpm run verify:glyph-defaults && pnpm run verify:theme-export",
|
|
144
144
|
"verify:dist-types": "node scripts/verify-dist-types.mjs dist",
|
|
145
145
|
"verify:consumer-types": "node scripts/verify-consumer-types.mjs",
|
|
@@ -207,6 +207,7 @@
|
|
|
207
207
|
"eslint-plugin-vue": "^10.8.0",
|
|
208
208
|
"jsdom": "^29.0.1",
|
|
209
209
|
"lint-staged": "^16.4.0",
|
|
210
|
+
"magic-string": "^1.2.3",
|
|
210
211
|
"markdown-it-container": "^4.0.0",
|
|
211
212
|
"mermaid": "^11.13.0",
|
|
212
213
|
"pixi.js": "^8.19.0",
|
|
@@ -217,6 +218,7 @@
|
|
|
217
218
|
"tinycolor2": "^1.6.0",
|
|
218
219
|
"typescript": "^5.9.3",
|
|
219
220
|
"typescript-eslint": "^8.57.2",
|
|
221
|
+
"unplugin-vue-components": "^32.1.0",
|
|
220
222
|
"vite": "^8.0.2",
|
|
221
223
|
"vite-svg-loader": "^5.1.1",
|
|
222
224
|
"vitepress": "^1.6.4",
|
|
@@ -248,9 +250,5 @@
|
|
|
248
250
|
}
|
|
249
251
|
]
|
|
250
252
|
]
|
|
251
|
-
},
|
|
252
|
-
"dependencies": {
|
|
253
|
-
"magic-string": "^1.2.3",
|
|
254
|
-
"unplugin-vue-components": "^32.1.0"
|
|
255
253
|
}
|
|
256
254
|
}
|
|
@@ -2,7 +2,8 @@ import { readFile } from 'node:fs/promises'
|
|
|
2
2
|
import { existsSync } from 'node:fs'
|
|
3
3
|
import path from 'node:path'
|
|
4
4
|
import { fileURLToPath } from 'node:url'
|
|
5
|
-
import
|
|
5
|
+
import type { Rollup } from 'vite'
|
|
6
|
+
import { MagicString } from './vendor.js'
|
|
6
7
|
import { parse, babelParse } from 'vue/compiler-sfc'
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -462,7 +463,12 @@ export function nubiscoGlyphs(options: IGlyphOptions = {}) {
|
|
|
462
463
|
|
|
463
464
|
return {
|
|
464
465
|
code: magic.toString(),
|
|
465
|
-
|
|
466
|
+
// Typed as Vite's own source map input, so the published declarations
|
|
467
|
+
// do not name magic-string, which is bundled and not installed.
|
|
468
|
+
map: magic.generateMap({
|
|
469
|
+
hires: true,
|
|
470
|
+
source: file,
|
|
471
|
+
}) as Rollup.SourceMapInput,
|
|
466
472
|
}
|
|
467
473
|
},
|
|
468
474
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Rollup } from 'vite'
|
|
2
|
+
import { MagicString } from './vendor.js'
|
|
2
3
|
import { parse, babelParse } from 'vue/compiler-sfc'
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -185,7 +186,12 @@ export function nubiscoImports(options: INubiscoImportOptions) {
|
|
|
185
186
|
|
|
186
187
|
return {
|
|
187
188
|
code: magic.toString(),
|
|
188
|
-
|
|
189
|
+
// Typed as Vite's own source map input, so the published declarations
|
|
190
|
+
// do not name magic-string, which is bundled and not installed.
|
|
191
|
+
map: magic.generateMap({
|
|
192
|
+
hires: true,
|
|
193
|
+
source: file,
|
|
194
|
+
}) as Rollup.SourceMapInput,
|
|
189
195
|
}
|
|
190
196
|
},
|
|
191
197
|
}
|
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs'
|
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
import { fileURLToPath } from 'node:url'
|
|
4
4
|
import type { Plugin } from 'vite'
|
|
5
|
-
import Components from '
|
|
5
|
+
import { Components } from './vendor.js'
|
|
6
6
|
import { COMPONENT_MANIFEST } from '../../components/manifest.js'
|
|
7
7
|
import { nubiscoGlyphs, type IGlyphOptions } from './glyphs.js'
|
|
8
8
|
import { nubiscoImports } from './imports.js'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The third-party code `@nubisco/ui/vite` runs on, in one module.
|
|
3
|
+
*
|
|
4
|
+
* Both packages are build-time tooling. As dependencies of the library they
|
|
5
|
+
* put Vite, PostCSS, Sass and the rest of a bundler into the production
|
|
6
|
+
* dependency tree of every app that installs `@nubisco/ui`, and declaring them
|
|
7
|
+
* as optional peers does not help, because pnpm resolves an optional peer the
|
|
8
|
+
* consumer has installed under the library and reports it there.
|
|
9
|
+
*
|
|
10
|
+
* So the library build inlines this module, with everything it imports, into
|
|
11
|
+
* `dist/plugins/vite/vendor.js` (see `scripts/bundle-plugin-vendor.mjs`). The
|
|
12
|
+
* packages stay devDependencies of the library and never reach a consumer's
|
|
13
|
+
* dependency tree. In the source tree, and in tests, this is a plain re-export.
|
|
14
|
+
*/
|
|
15
|
+
export { default as Components } from 'unplugin-vue-components/vite'
|
|
16
|
+
export { default as MagicString } from 'magic-string'
|