@ui0/nuxt 0.1.1 → 0.1.3

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/module.d.mts CHANGED
@@ -10,8 +10,16 @@ interface Ui0NuxtModuleOptions {
10
10
  config?: string;
11
11
  /**
12
12
  * Auto-register the ui0 components (`Flex`, `Button`, `Icon`,
13
- * `ThemeProvider`) for Nuxt auto-import, and add their built styles to the
13
+ * `ThemeProvider`) for Nuxt auto-import and add their built styles to the
14
14
  * ssr css pipeline. Default `true`.
15
+ *
16
+ * `false` — manual mode: import the components in code yourself and add
17
+ * the matching built styles to the nuxt `css` array, e.g.
18
+ * `'@ui0/button/style.css'` for `Button`, `'@ui0/flex/style.css'` for
19
+ * `Flex`, `'@ui0/theme/theme-provider/style.css'` for `ThemeProvider`;
20
+ * without them the ssr html ships unstyled (fouc). The icon runtime stays
21
+ * installed either way — a manually imported `Icon` resolves the
22
+ * `icon-ui0*` components only when the pack is globally registered.
15
23
  */
16
24
  components?: boolean;
17
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.mts","names":[],"sources":["../src/types.ts","../src/module.ts"],"mappings":";UACiB;;;;;;;;EAQf;;;;;;EAOA;;cCsBI,QAAQ,WAAW"}
1
+ {"version":3,"file":"module.d.mts","names":[],"sources":["../src/types.ts","../src/module.ts"],"mappings":";UACiB;;;;;;;;EAQf;;;;;;;;;;;;;;EAeA;;cCgCI,QAAQ,WAAW"}
package/dist/module.mjs CHANGED
@@ -4,6 +4,17 @@ import { addComponent, addPlugin, addTemplate, addTypeTemplate, createResolver,
4
4
  import ui0Theme from "@ui0/theme/vite";
5
5
  // src/module.ts
6
6
  const CONFIG_NAMES = ["ui0.config.ts", "ui0.theme.ts"];
7
+ const stubStyleText = {
8
+ name: "ui0:stub-style-text",
9
+ resolveId(source) {
10
+ if (source.endsWith("style-text.js")) return "\0ui0:empty-style-text";
11
+ return null;
12
+ },
13
+ load(id) {
14
+ if (id === "\0ui0:empty-style-text") return "export default \"\"";
15
+ return null;
16
+ }
17
+ };
7
18
  const module = defineNuxtModule({
8
19
  meta: {
9
20
  name: "@ui0/nuxt",
@@ -21,6 +32,19 @@ const module = defineNuxtModule({
21
32
  } else configPath = CONFIG_NAMES.map((name) => path.join(nuxt.options.rootDir, name)).find((p) => existsSync(p));
22
33
  nuxt.hooks.hook("vite:extendConfig", (config) => {
23
34
  Object.assign(config, { plugins: [...config.plugins ?? [], ui0Theme(configPath ? { config: configPath } : {})] });
35
+ const ssr = config.ssr ?? {};
36
+ ssr.noExternal = [
37
+ ...Array.isArray(ssr.noExternal) ? ssr.noExternal : [],
38
+ "@ui0/core",
39
+ "@ui0/theme",
40
+ "@ui0/composable",
41
+ "@ui0/util",
42
+ "@ui0/flex",
43
+ "@ui0/button",
44
+ "@ui0/icon",
45
+ "@ui0/icons"
46
+ ];
47
+ Object.assign(config, { ssr });
24
48
  });
25
49
  nuxt.options.css.push("virtual:ui0-theme.css");
26
50
  nuxt.options.css.push("@ui0/core/style.css");
@@ -45,6 +69,9 @@ const module = defineNuxtModule({
45
69
  "@ui0/icons"
46
70
  ];
47
71
  nitroConfig.externals = externals;
72
+ const nitro = nitroConfig;
73
+ nitro.rollupConfig = nitro.rollupConfig ?? {};
74
+ nitro.rollupConfig.plugins = [...nitro.rollupConfig.plugins ?? [], stubStyleText];
48
75
  });
49
76
  addTemplate({
50
77
  filename: "ui0-config.mjs",
@@ -69,8 +96,8 @@ const module = defineNuxtModule({
69
96
  ].join("\n")
70
97
  });
71
98
  addPlugin({ src: resolver.resolve("./runtime/plugin.mjs") });
99
+ addPlugin({ src: resolver.resolve("./runtime/components.mjs") });
72
100
  if (options.components) {
73
- addPlugin({ src: resolver.resolve("./runtime/components.mjs") });
74
101
  addComponent({
75
102
  name: "Flex",
76
103
  filePath: "@ui0/flex",
@@ -1 +1 @@
1
- {"version":3,"file":"module.mjs","names":[],"sources":["../src/module.ts"],"sourcesContent":["// The ui0 Nuxt module. Everything a Nuxt host needs to render ui0 on the\n// server and hydrate it on the client, in one install:\n//\n// modules: ['@ui0/nuxt']\n//\n// Setup steps:\n// 1. wire the theme vite plugin into every nuxt vite config, so the\n// generated theme css is served as `virtual:ui0-theme.css` (config\n// discovery + watch + HMR come free);\n// 2. push the css through nuxt's own pipeline - theme css + the built\n// package styles land in the <head> of every SSR response, so there is\n// no client-side-only injection and no fouc on hydration;\n// 3. expose the consumer's theme config to the build as a template module\n// (single source of truth for server + client);\n// 4. install the runtime plugin creating the core instance + theme on both\n// sides (createUi0 + createUi0Theme are SSR-safe);\n// 5. auto-register the ui0 components for nuxt auto-import.\nimport { existsSync } from 'node:fs'\nimport path from 'node:path'\n\nimport {\n addComponent,\n addPlugin,\n addTemplate,\n addTypeTemplate,\n createResolver,\n defineNuxtModule,\n useLogger,\n} from '@nuxt/kit'\nimport type { NuxtModule } from '@nuxt/schema'\nimport ui0Theme from '@ui0/theme/vite'\n\nimport type { Ui0NuxtModuleOptions } from './types'\n\n// same convention the vite plugin / cli use: the theme config default-exports\n// a ThemePluginConfig (or a core-config wrapper) at the project root\nconst CONFIG_NAMES = ['ui0.config.ts', 'ui0.theme.ts']\n\nconst module: NuxtModule<Ui0NuxtModuleOptions> = defineNuxtModule<Ui0NuxtModuleOptions>({\n meta: {\n name: '@ui0/nuxt',\n configKey: 'ui0',\n compatibility: { nuxt: '^4.0.0' }\n },\n defaults: {\n components: true\n },\n setup(options, nuxt) {\n const logger = useLogger('@ui0/nuxt')\n const resolver = createResolver(import.meta.url)\n\n let configPath: string | undefined\n if (options.config) {\n configPath = path.resolve(nuxt.options.rootDir, options.config)\n if (!existsSync(configPath)) {\n throw new Error(`@ui0/nuxt: theme config not found at ${configPath}`)\n }\n } else {\n configPath = CONFIG_NAMES.map((name) => path.join(nuxt.options.rootDir, name)).find((p) => existsSync(p))\n }\n\n // 1. the theme css pipeline, in every vite config nuxt composes\n nuxt.hooks.hook('vite:extendConfig', (config) => {\n Object.assign(config, { plugins: [...(config.plugins ?? []), ui0Theme(configPath ? { config: configPath } : {})] })\n })\n\n // 2. ssr-safe css: the virtual theme module + the built package styles\n // ship in the head of every response\n nuxt.options.css.push('virtual:ui0-theme.css')\n nuxt.options.css.push('@ui0/core/style.css')\n if (options.components) {\n nuxt.options.css.push('@ui0/flex/style.css')\n nuxt.options.css.push('@ui0/button/style.css')\n nuxt.options.css.push('@ui0/icon/style.css')\n nuxt.options.css.push('@ui0/icons/style.css')\n nuxt.options.css.push('@ui0/theme/theme-provider/style.css')\n }\n\n // The component packages ship a side-effect style import in their entry\n // (auto-styles for bundler consumers). Node ESM cannot load css, so a\n // nitro server externalizing them crashes at runtime - inline the ui0\n // runtime scope into the nitro build instead, where vite transforms the\n // css imports away.\n nuxt.hooks.hook('nitro:config', (nitroConfig) => {\n // the fallback hook type omits `externals` (it exists on NitroConfig at runtime)\n const externals = (nitroConfig as { externals?: { inline?: Array<string | RegExp | ((id: string) => boolean)> } }).externals ?? {}\n externals.inline = [...(externals.inline ?? []), '@ui0/core', '@ui0/theme', '@ui0/composable', '@ui0/util', '@ui0/flex', '@ui0/button', '@ui0/icon', '@ui0/icons']\n ;(nitroConfig as { externals?: unknown }).externals = externals\n })\n\n // 3. the config as a build module - the runtime plugin imports it on the\n // server and the client from the single source of truth\n addTemplate({\n filename: 'ui0-config.mjs',\n getContents: () =>\n configPath\n ? [\n `import config from ${JSON.stringify(configPath)}`,\n 'export default config',\n // accept both shapes the vite plugin accepts: a bare\n // ThemePluginConfig or a core-config wrapper\n `export const themeConfig = 'theme' in config ? config.theme : config`\n ].join('\\n')\n : [\n // no config at all: the built-in default theme ships alone\n `import defaults from '@ui0/theme/config.default'`,\n 'export default {}',\n 'export const themeConfig = defaults'\n ].join('\\n')\n })\n addTypeTemplate({\n filename: 'types/ui0-config.d.ts',\n getContents: () =>\n [\n \"declare module '#build/ui0-config.mjs' {\",\n ' const config: any',\n ' export default config',\n ' export const themeConfig: any',\n '}'\n ].join('\\n')\n })\n\n // 4. the ui0 runtime: core + theme install, on the server and the client\n addPlugin({ src: resolver.resolve('./runtime/plugin.mjs') })\n\n // 5. component auto-registration (+ the icon wiring)\n if (options.components) {\n addPlugin({ src: resolver.resolve('./runtime/components.mjs') })\n addComponent({ name: 'Flex', filePath: '@ui0/flex', export: 'Flex' })\n addComponent({ name: 'Button', filePath: '@ui0/button', export: 'Button' })\n addComponent({ name: 'Icon', filePath: '@ui0/icon', export: 'Icon' })\n addComponent({ name: 'ThemeProvider', filePath: '@ui0/theme/theme-provider', export: 'ThemeProvider' })\n }\n\n logger.info(configPath ? `ui0: theme config at ${path.relative(nuxt.options.rootDir, configPath)}` : 'ui0: built-in default theme')\n }\n})\n\nexport default module\n"],"mappings":";;;;;AAoCA,MAAM,eAAe,CAAC,iBAAiB,cAAc;AAErD,MAAM,SAA2C,iBAAuC;CACtF,MAAM;EACJ,MAAM;EACN,WAAW;EACX,eAAe,EAAE,MAAM,SAAS;CAClC;CACA,UAAU,EACR,YAAY,KACd;CACA,MAAM,SAAS,MAAM;EACnB,MAAM,SAAS,UAAU,WAAW;EACpC,MAAM,WAAW,eAAe,YAAY,GAAG;EAE/C,IAAI;EACJ,IAAI,QAAQ,QAAQ;GAClB,aAAa,KAAK,QAAQ,KAAK,QAAQ,SAAS,QAAQ,MAAM;GAC9D,IAAI,CAAC,WAAW,UAAU,GACxB,MAAM,IAAI,MAAM,wCAAwC,YAAY;EAExE,OACE,aAAa,aAAa,KAAK,SAAS,KAAK,KAAK,KAAK,QAAQ,SAAS,IAAI,CAAC,CAAC,CAAC,MAAM,MAAM,WAAW,CAAC,CAAC;EAI1G,KAAK,MAAM,KAAK,sBAAsB,WAAW;GAC/C,OAAO,OAAO,QAAQ,EAAE,SAAS,CAAC,GAAI,OAAO,WAAW,CAAC,GAAI,SAAS,aAAa,EAAE,QAAQ,WAAW,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;EACpH,CAAC;EAID,KAAK,QAAQ,IAAI,KAAK,uBAAuB;EAC7C,KAAK,QAA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CACpI;AACF,CAAC"}
1
+ {"version":3,"file":"module.mjs","names":[],"sources":["../src/module.ts"],"sourcesContent":["// The ui0 Nuxt module. Everything a Nuxt host needs to render ui0 on the\n// server and hydrate it on the client, in one install:\n//\n// modules: ['@ui0/nuxt']\n//\n// Setup steps:\n// 1. wire the theme vite plugin into every nuxt vite config, so the\n// generated theme css is served as `virtual:ui0-theme.css` (config\n// discovery + watch + HMR come free);\n// 2. push the css through nuxt's own pipeline - theme css + the built\n// package styles land in the <head> of every SSR response, so there is\n// no client-side-only injection and no fouc on hydration;\n// 3. expose the consumer's theme config to the build as a template module\n// (single source of truth for server + client);\n// 4. install the runtime plugin creating the core instance + theme on both\n// sides (createUi0 + createUi0Theme are SSR-safe);\n// 5. install the icon runtime (the Icon component resolves icon-ui0* via\n// resolveComponent - only globally registered components, so the pack\n// registration is mandatory, not auto-import sugar);\n// 6. auto-register the ui0 components for nuxt auto-import (the\n// `components` option; off = manual component imports + manual css).\nimport { existsSync } from 'node:fs'\nimport path from 'node:path'\n\nimport {\n addComponent,\n addPlugin,\n addTemplate,\n addTypeTemplate,\n createResolver,\n defineNuxtModule,\n useLogger,\n} from '@nuxt/kit'\nimport type { NuxtModule } from '@nuxt/schema'\nimport ui0Theme from '@ui0/theme/vite'\n\nimport type { Ui0NuxtModuleOptions } from './types'\n\n// same convention the vite plugin / cli use: the theme config default-exports\n// a ThemePluginConfig (or a core-config wrapper) at the project root\nconst CONFIG_NAMES = ['ui0.config.ts', 'ui0.theme.ts']\n\n// resolves the inlined core's './style-text.js' dynamic import to an empty\n// module (see the nitro:config hook below)\nconst stubStyleText = {\n name: 'ui0:stub-style-text',\n resolveId(source: string) {\n if (source.endsWith('style-text.js')) return '\\0ui0:empty-style-text'\n return null\n },\n load(id: string) {\n if (id === '\\0ui0:empty-style-text') return 'export default \"\"'\n return null\n }\n}\n\nconst module: NuxtModule<Ui0NuxtModuleOptions> = defineNuxtModule<Ui0NuxtModuleOptions>({\n meta: {\n name: '@ui0/nuxt',\n configKey: 'ui0',\n compatibility: { nuxt: '^4.0.0' }\n },\n defaults: {\n components: true\n },\n setup(options, nuxt) {\n const logger = useLogger('@ui0/nuxt')\n const resolver = createResolver(import.meta.url)\n\n let configPath: string | undefined\n if (options.config) {\n configPath = path.resolve(nuxt.options.rootDir, options.config)\n if (!existsSync(configPath)) {\n throw new Error(`@ui0/nuxt: theme config not found at ${configPath}`)\n }\n } else {\n configPath = CONFIG_NAMES.map((name) => path.join(nuxt.options.rootDir, name)).find((p) => existsSync(p))\n }\n\n // 1. the theme css pipeline, in every vite config nuxt composes\n nuxt.hooks.hook('vite:extendConfig', (config) => {\n Object.assign(config, { plugins: [...(config.plugins ?? []), ui0Theme(configPath ? { config: configPath } : {})] })\n\n // dev ssr (vite-node) externalizes node_modules by default - the ui0\n // entries side-effect-import their built css, which plain Node ESM\n // cannot load (\"Unknown file extension .css\"); transpile the scope\n // through vite so the css imports are transformed away. The production\n // server side is covered by the nitro:config inline below.\n const ssr = (config.ssr ?? {}) as { noExternal?: Array<string | RegExp> }\n ssr.noExternal = [\n ...(Array.isArray(ssr.noExternal) ? ssr.noExternal : []),\n '@ui0/core', '@ui0/theme', '@ui0/composable', '@ui0/util', '@ui0/flex', '@ui0/button', '@ui0/icon', '@ui0/icons'\n ]\n Object.assign(config, { ssr })\n })\n\n // 2. ssr-safe css: the virtual theme module + the built package styles\n // ship in the head of every response\n nuxt.options.css.push('virtual:ui0-theme.css')\n nuxt.options.css.push('@ui0/core/style.css')\n if (options.components) {\n nuxt.options.css.push('@ui0/flex/style.css')\n nuxt.options.css.push('@ui0/button/style.css')\n nuxt.options.css.push('@ui0/icon/style.css')\n nuxt.options.css.push('@ui0/icons/style.css')\n nuxt.options.css.push('@ui0/theme/theme-provider/style.css')\n }\n\n // The component packages ship a side-effect style import in their entry\n // (auto-styles for bundler consumers). Node ESM cannot load css, so a\n // nitro server externalizing them crashes at runtime - inline the ui0\n // runtime scope into the nitro build instead, where vite transforms the\n // css imports away.\n nuxt.hooks.hook('nitro:config', (nitroConfig) => {\n // the fallback hook type omits `externals` (it exists on NitroConfig at runtime)\n const externals = (nitroConfig as { externals?: { inline?: Array<string | RegExp | ((id: string) => boolean)> } }).externals ?? {}\n externals.inline = [...(externals.inline ?? []), '@ui0/core', '@ui0/theme', '@ui0/composable', '@ui0/util', '@ui0/flex', '@ui0/button', '@ui0/icon', '@ui0/icons']\n ;(nitroConfig as { externals?: unknown }).externals = externals\n\n // the inlined core's install() dynamically imports its built css text\n // asset ('./style-text.js'); vite inlines the specifier as a literal\n // relative to the bundling chunk, so nitro's rollup resolves it\n // against .nuxt/dist/server - where the asset does not exist. stub it:\n // the module's css pipeline ships the core styles anyway\n const nitro = nitroConfig as { rollupConfig?: { plugins?: unknown[] } }\n nitro.rollupConfig = nitro.rollupConfig ?? {}\n nitro.rollupConfig.plugins = [...(nitro.rollupConfig.plugins ?? []), stubStyleText]\n })\n\n // 3. the config as a build module - the runtime plugin imports it on the\n // server and the client from the single source of truth\n addTemplate({\n filename: 'ui0-config.mjs',\n getContents: () =>\n configPath\n ? [\n `import config from ${JSON.stringify(configPath)}`,\n 'export default config',\n // accept both shapes the vite plugin accepts: a bare\n // ThemePluginConfig or a core-config wrapper\n `export const themeConfig = 'theme' in config ? config.theme : config`\n ].join('\\n')\n : [\n // no config at all: the built-in default theme ships alone\n `import defaults from '@ui0/theme/config.default'`,\n 'export default {}',\n 'export const themeConfig = defaults'\n ].join('\\n')\n })\n addTypeTemplate({\n filename: 'types/ui0-config.d.ts',\n getContents: () =>\n [\n \"declare module '#build/ui0-config.mjs' {\",\n ' const config: any',\n ' export default config',\n ' export const themeConfig: any',\n '}'\n ].join('\\n')\n })\n\n // 4. the ui0 runtime: core + theme install, on the server and the client\n addPlugin({ src: resolver.resolve('./runtime/plugin.mjs') })\n\n // 5. the icon runtime, always: Icon resolves the icon-ui0* components via\n // resolveComponent, so the pack must be globally registered for a\n // manually imported Icon to render at all (silent empty output\n // otherwise); the pnpm-strict host cannot fix this itself, the icon\n // packages are not visible to the app\n addPlugin({ src: resolver.resolve('./runtime/components.mjs') })\n\n // 6. component auto-registration (+ their built styles). Off: the\n // consumer imports the components in code and adds the matching\n // '@ui0/*/style.css' entries to the nuxt css array by hand\n if (options.components) {\n addComponent({ name: 'Flex', filePath: '@ui0/flex', export: 'Flex' })\n addComponent({ name: 'Button', filePath: '@ui0/button', export: 'Button' })\n addComponent({ name: 'Icon', filePath: '@ui0/icon', export: 'Icon' })\n addComponent({ name: 'ThemeProvider', filePath: '@ui0/theme/theme-provider', export: 'ThemeProvider' })\n }\n\n logger.info(configPath ? `ui0: theme config at ${path.relative(nuxt.options.rootDir, configPath)}` : 'ui0: built-in default theme')\n }\n})\n\nexport default module\n"],"mappings":";;;;;AAwCA,MAAM,eAAe,CAAC,iBAAiB,cAAc;AAIrD,MAAM,gBAAgB;CACpB,MAAM;CACN,UAAU,QAAgB;EACxB,IAAI,OAAO,SAAS,eAAe,GAAG,OAAO;EAC7C,OAAO;CACT;CACA,KAAK,IAAY;EACf,IAAI,OAAO,0BAA0B,OAAO;EAC5C,OAAO;CACT;AACF;AAEA,MAAM,SAA2C,iBAAuC;CACtF,MAAM;EACJ,MAAM;EACN,WAAW;EACX,eAAe,EAAE,MAAM,SAAS;CAClC;CACA,UAAU,EACR,YAAY,KACd;CACA,MAAM,SAAS,MAAM;EACnB,MAAM,SAAS,UAAU,WAAW;EACpC,MAAM,WAAW,eAAe,YAAY,GAAG;EAE/C,IAAI;EACJ,IAAI,QAAQ,QAAQ;GAClB,aAAa,KAAK,QAAQ,KAAK,QAAQ,SAAS,QAAQ,MAAM;GAC9D,IAAI,CAAC,WAAW,UAAU,GACxB,MAAM,IAAI,MAAM,wCAAwC,YAAY;EAExE,OACE,aAAa,aAAa,KAAK,SAAS,KAAK,KAAK,KAAK,QAAQ,SAAS,IAAI,CAAC,CAAC,CAAC,MAAM,MAAM,WAAW,CAAC,CAAC;EAI1G,KAAK,MAAM,KAAK,sBAAsB,WAAW;GAC/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;IACE;IACA;IACA;IACA;IACA;GACF,CAAC,CAAC,KAAK,IAAI;EACf,CAAC;EAGD,UAAU,EAAE,KAAK,SAAS,QAAQ,sBAAsB,EAAE,CAAC;EAO3D,UAAU,EAAE,KAAK,SAAS,QAAQ,0BAA0B,EAAE,CAAC;EAK/D,IAAI,QAAQ,YAAY;GACtB,aAAa;IAAE,MAAM;IAAQ,UAAU;IAAa,QAAQ;GAAO,CAAC;GACpE,aAAa;IAAE,MAAM;IAAU,UAAU;IAAe,QAAQ;GAAS,CAAC;GAC1E,aAAa;IAAE,MAAM;IAAQ,UAAU;IAAa,QAAQ;GAAO,CAAC;GACpE,aAAa;IAAE,MAAM;IAAiB,UAAU;IAA6B,QAAQ;GAAgB,CAAC;EACxG;EAEA,OAAO,KAAK,aAAa,wBAAwB,KAAK,SAAS,KAAK,QAAQ,SAAS,UAAU,MAAM,6BAA6B;CACpI;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"components.mjs","names":[],"sources":["../../src/runtime/components.ts"],"sourcesContent":["import { createIcon } from '@ui0/icon'\nimport { createUi0IconFramework } from '@ui0/icon/ui0'\nimport Icons from '@ui0/icons'\nimport { defineNuxtPlugin } from '#app'\n\n// The icon wiring, added only when the module's `components` option is on\n// (same flag as the Icon component auto-registration). The ui0 bridge feeds\n// the icon theme contracts + configured defaults from the instances the\n// core plugin installed; the pack registers the IconUi0* components the\n// Icon component resolves at render.\nexport default defineNuxtPlugin((nuxtApp) => {\n nuxtApp.vueApp.use(createIcon({ framework: createUi0IconFramework() }))\n nuxtApp.vueApp.use(Icons)\n})\n"],"mappings":";;;;;AAUA,IAAA,qBAAe,kBAAkB,YAAY;CAC3C,QAAQ,OAAO,IAAI,WAAW,EAAE,WAAW,uBAAuB,EAAE,CAAC,CAAC;CACtE,QAAQ,OAAO,IAAI,KAAK;AAC1B,CAAC"}
1
+ {"version":3,"file":"components.mjs","names":[],"sources":["../../src/runtime/components.ts"],"sourcesContent":["import { createIcon } from '@ui0/icon'\nimport { createUi0IconFramework } from '@ui0/icon/ui0'\nimport Icons from '@ui0/icons'\nimport { defineNuxtPlugin } from '#app'\n\n// The icon wiring, installed regardless of the module's `components` option\n// (that flag only covers auto-registration + styles). The ui0 bridge feeds\n// the icon theme contracts + configured defaults from the instances the\n// core plugin installed; the pack registers the IconUi0* components the\n// Icon component resolves at render - without this a manually imported\n// Icon renders nothing.\nexport default defineNuxtPlugin((nuxtApp) => {\n nuxtApp.vueApp.use(createIcon({ framework: createUi0IconFramework() }))\n nuxtApp.vueApp.use(Icons)\n})\n"],"mappings":";;;;;AAWA,IAAA,qBAAe,kBAAkB,YAAY;CAC3C,QAAQ,OAAO,IAAI,WAAW,EAAE,WAAW,uBAAuB,EAAE,CAAC,CAAC;CACtE,QAAQ,OAAO,IAAI,KAAK;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui0/nuxt",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Nuxt module for ui0: theme css pipeline, core+theme plugin install, component auto-registration - SSR-safe out of the box",
5
5
  "files": [
6
6
  "dist"
@@ -30,12 +30,12 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@nuxt/kit": "^4.6.4",
33
- "@ui0/button": "^0.1.3",
34
- "@ui0/core": "^0.1.4",
35
- "@ui0/flex": "^0.1.3",
36
- "@ui0/icon": "^0.1.3",
37
- "@ui0/icons": "^0.1.3",
38
- "@ui0/theme": "^0.1.4"
33
+ "@ui0/button": "^0.1.4",
34
+ "@ui0/core": "^0.1.5",
35
+ "@ui0/flex": "^0.1.4",
36
+ "@ui0/icon": "^0.1.4",
37
+ "@ui0/icons": "^0.1.4",
38
+ "@ui0/theme": "^0.1.5"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@nuxt/schema": "^4.6.4",