@fluenti/vue 0.4.0-rc.1 → 0.4.0-rc.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/vite-plugin.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.cjs","names":[],"sources":["../src/vue-runtime.ts","../src/vite-plugin.ts"],"sourcesContent":["import { createRuntimeGenerator } from '@fluenti/vite-plugin'\nimport type { RuntimeGenerator } from '@fluenti/vite-plugin'\n\nexport const vueRuntimeGenerator: RuntimeGenerator = createRuntimeGenerator({\n imports: `import { shallowReactive, ref } from 'vue'`,\n catalogInit: 'const __catalog = shallowReactive({ ...__defaultMsgs })',\n localeInit: (defaultLocale) => `const __currentLocale = ref('${defaultLocale}')`,\n loadingInit: 'const __loading = ref(false)',\n catalogUpdate: (msgs) => `Object.assign(__catalog, ${msgs})`,\n localeUpdate: (locale) => `__currentLocale.value = ${locale}`,\n loadingUpdate: (value) => `__loading.value = ${value}`,\n localeRead: '__currentLocale.value',\n runtimeKey: 'fluenti.runtime.vue.v1',\n})\n","import type { Plugin } from 'vite'\nimport type { FluentiPluginOptions } from '@fluenti/vite-plugin'\nimport { createFluentiPlugins } from '@fluenti/vite-plugin'\nimport { transformVtDirectives } from '@fluenti/vite-plugin/sfc-transform'\nimport { vueRuntimeGenerator } from './vue-runtime'\n\nexport type { FluentiPluginOptions as FluentiVueOptions } from '@fluenti/vite-plugin'\n\nexport default function fluentiVue(options?: FluentiPluginOptions): Plugin[] {\n const vueTemplatePlugin: Plugin = {\n name: 'fluenti:vue-template',\n enforce: 'pre',\n transform(code, id) {\n if (!id.endsWith('.vue')) return undefined\n if (!/\\bv-t\\b/.test(code) && !/<Trans[\\s>]/.test(code) && !/<Plural[\\s/>]/.test(code)) return undefined\n\n const transformed = transformVtDirectives(code)\n if (transformed === code) return undefined\n\n return { code: transformed, map: null }\n },\n }\n\n return createFluentiPlugins(\n { ...(options?.config !== undefined ? { config: options.config } : {}), framework: 'vue' },\n [vueTemplatePlugin],\n vueRuntimeGenerator,\n )\n}\n"],"mappings":"sFAGA,IAAa,GAAA,EAAA,EAAA,wBAA+D,CAC1E,QAAS,6CACT,YAAa,0DACb,WAAa,GAAkB,gCAAgC,EAAc,IAC7E,YAAa,+BACb,cAAgB,GAAS,4BAA4B,EAAK,GAC1D,aAAe,GAAW,2BAA2B,IACrD,cAAgB,GAAU,qBAAqB,IAC/C,WAAY,wBACZ,WAAY,yBACb,CAAC,
|
|
1
|
+
{"version":3,"file":"vite-plugin.cjs","names":[],"sources":["../src/vue-runtime.ts","../src/vite-plugin.ts"],"sourcesContent":["import { createRuntimeGenerator } from '@fluenti/vite-plugin'\nimport type { RuntimeGenerator } from '@fluenti/vite-plugin'\n\nexport const vueRuntimeGenerator: RuntimeGenerator = createRuntimeGenerator({\n imports: `import { shallowReactive, ref } from 'vue'`,\n catalogInit: 'const __catalog = shallowReactive({ ...__defaultMsgs })',\n localeInit: (defaultLocale) => `const __currentLocale = ref('${defaultLocale}')`,\n loadingInit: 'const __loading = ref(false)',\n catalogUpdate: (msgs) => `Object.assign(__catalog, ${msgs})`,\n localeUpdate: (locale) => `__currentLocale.value = ${locale}`,\n loadingUpdate: (value) => `__loading.value = ${value}`,\n localeRead: '__currentLocale.value',\n runtimeKey: 'fluenti.runtime.vue.v1',\n})\n","import type { Plugin } from 'vite'\nimport type { FluentiPluginOptions } from '@fluenti/vite-plugin'\nimport { createFluentiPlugins } from '@fluenti/vite-plugin'\nimport { transformVtDirectives } from '@fluenti/vite-plugin/sfc-transform'\nimport { vueRuntimeGenerator } from './vue-runtime'\n\nexport type { FluentiPluginOptions as FluentiVueOptions } from '@fluenti/vite-plugin'\n\n/**\n * Fluenti Vue 3 Vite plugin.\n *\n * @example Minimal — no fluenti.config.ts needed\n * ```ts\n * // vite.config.ts\n * import fluentiVue from '@fluenti/vue/vite-plugin'\n *\n * export default defineConfig({\n * plugins: [fluentiVue({ config: { locales: ['en', 'ja'] } })],\n * })\n * ```\n *\n * @example With fluenti.config.ts (for advanced options)\n * ```ts\n * export default defineConfig({\n * plugins: [fluentiVue()], // auto-reads fluenti.config.ts\n * })\n * ```\n */\nexport default function fluentiVue(options?: FluentiPluginOptions): Plugin[] {\n const vueTemplatePlugin: Plugin = {\n name: 'fluenti:vue-template',\n enforce: 'pre',\n transform(code, id) {\n if (!id.endsWith('.vue')) return undefined\n if (!/\\bv-t\\b/.test(code) && !/<Trans[\\s>]/.test(code) && !/<Plural[\\s/>]/.test(code)) return undefined\n\n const transformed = transformVtDirectives(code)\n if (transformed === code) return undefined\n\n return { code: transformed, map: null }\n },\n }\n\n return createFluentiPlugins(\n { ...(options?.config !== undefined ? { config: options.config } : {}), framework: 'vue' },\n [vueTemplatePlugin],\n vueRuntimeGenerator,\n )\n}\n"],"mappings":"sFAGA,IAAa,GAAA,EAAA,EAAA,wBAA+D,CAC1E,QAAS,6CACT,YAAa,0DACb,WAAa,GAAkB,gCAAgC,EAAc,IAC7E,YAAa,+BACb,cAAgB,GAAS,4BAA4B,EAAK,GAC1D,aAAe,GAAW,2BAA2B,IACrD,cAAgB,GAAU,qBAAqB,IAC/C,WAAY,wBACZ,WAAY,yBACb,CAAC,CCeF,SAAwB,EAAW,EAA0C,CAC3E,IAAM,EAA4B,CAChC,KAAM,uBACN,QAAS,MACT,UAAU,EAAM,EAAI,CAElB,GADI,CAAC,EAAG,SAAS,OAAO,EACpB,CAAC,UAAU,KAAK,EAAK,EAAI,CAAC,cAAc,KAAK,EAAK,EAAI,CAAC,gBAAgB,KAAK,EAAK,CAAE,OAEvF,IAAM,GAAA,EAAA,EAAA,uBAAoC,EAAK,CAC3C,OAAgB,EAEpB,MAAO,CAAE,KAAM,EAAa,IAAK,KAAM,EAE1C,CAED,OAAA,EAAA,EAAA,sBACE,CAAE,GAAI,GAAS,SAAW,IAAA,GAAyC,EAAE,CAA/B,CAAE,OAAQ,EAAQ,OAAQ,CAAQ,UAAW,MAAO,CAC1F,CAAC,EAAkB,CACnB,EACD"}
|
package/dist/vite-plugin.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
2
|
import { FluentiPluginOptions } from '@fluenti/vite-plugin';
|
|
3
3
|
export type { FluentiPluginOptions as FluentiVueOptions } from '@fluenti/vite-plugin';
|
|
4
|
+
/**
|
|
5
|
+
* Fluenti Vue 3 Vite plugin.
|
|
6
|
+
*
|
|
7
|
+
* @example Minimal — no fluenti.config.ts needed
|
|
8
|
+
* ```ts
|
|
9
|
+
* // vite.config.ts
|
|
10
|
+
* import fluentiVue from '@fluenti/vue/vite-plugin'
|
|
11
|
+
*
|
|
12
|
+
* export default defineConfig({
|
|
13
|
+
* plugins: [fluentiVue({ config: { locales: ['en', 'ja'] } })],
|
|
14
|
+
* })
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @example With fluenti.config.ts (for advanced options)
|
|
18
|
+
* ```ts
|
|
19
|
+
* export default defineConfig({
|
|
20
|
+
* plugins: [fluentiVue()], // auto-reads fluenti.config.ts
|
|
21
|
+
* })
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
4
24
|
export default function fluentiVue(options?: FluentiPluginOptions): Plugin[];
|
|
5
25
|
//# sourceMappingURL=vite-plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAKhE,YAAY,EAAE,oBAAoB,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAErF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAoB3E"}
|
|
1
|
+
{"version":3,"file":"vite-plugin.d.ts","sourceRoot":"","sources":["../src/vite-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAKhE,YAAY,EAAE,oBAAoB,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAErF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAoB3E"}
|
package/dist/vite-plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin.js","names":[],"sources":["../src/vue-runtime.ts","../src/vite-plugin.ts"],"sourcesContent":["import { createRuntimeGenerator } from '@fluenti/vite-plugin'\nimport type { RuntimeGenerator } from '@fluenti/vite-plugin'\n\nexport const vueRuntimeGenerator: RuntimeGenerator = createRuntimeGenerator({\n imports: `import { shallowReactive, ref } from 'vue'`,\n catalogInit: 'const __catalog = shallowReactive({ ...__defaultMsgs })',\n localeInit: (defaultLocale) => `const __currentLocale = ref('${defaultLocale}')`,\n loadingInit: 'const __loading = ref(false)',\n catalogUpdate: (msgs) => `Object.assign(__catalog, ${msgs})`,\n localeUpdate: (locale) => `__currentLocale.value = ${locale}`,\n loadingUpdate: (value) => `__loading.value = ${value}`,\n localeRead: '__currentLocale.value',\n runtimeKey: 'fluenti.runtime.vue.v1',\n})\n","import type { Plugin } from 'vite'\nimport type { FluentiPluginOptions } from '@fluenti/vite-plugin'\nimport { createFluentiPlugins } from '@fluenti/vite-plugin'\nimport { transformVtDirectives } from '@fluenti/vite-plugin/sfc-transform'\nimport { vueRuntimeGenerator } from './vue-runtime'\n\nexport type { FluentiPluginOptions as FluentiVueOptions } from '@fluenti/vite-plugin'\n\nexport default function fluentiVue(options?: FluentiPluginOptions): Plugin[] {\n const vueTemplatePlugin: Plugin = {\n name: 'fluenti:vue-template',\n enforce: 'pre',\n transform(code, id) {\n if (!id.endsWith('.vue')) return undefined\n if (!/\\bv-t\\b/.test(code) && !/<Trans[\\s>]/.test(code) && !/<Plural[\\s/>]/.test(code)) return undefined\n\n const transformed = transformVtDirectives(code)\n if (transformed === code) return undefined\n\n return { code: transformed, map: null }\n },\n }\n\n return createFluentiPlugins(\n { ...(options?.config !== undefined ? { config: options.config } : {}), framework: 'vue' },\n [vueTemplatePlugin],\n vueRuntimeGenerator,\n )\n}\n"],"mappings":";;;AAGA,IAAa,IAAwC,EAAuB;CAC1E,SAAS;CACT,aAAa;CACb,aAAa,MAAkB,gCAAgC,EAAc;CAC7E,aAAa;CACb,gBAAgB,MAAS,4BAA4B,EAAK;CAC1D,eAAe,MAAW,2BAA2B;CACrD,gBAAgB,MAAU,qBAAqB;CAC/C,YAAY;CACZ,YAAY;CACb,CAAC;;;
|
|
1
|
+
{"version":3,"file":"vite-plugin.js","names":[],"sources":["../src/vue-runtime.ts","../src/vite-plugin.ts"],"sourcesContent":["import { createRuntimeGenerator } from '@fluenti/vite-plugin'\nimport type { RuntimeGenerator } from '@fluenti/vite-plugin'\n\nexport const vueRuntimeGenerator: RuntimeGenerator = createRuntimeGenerator({\n imports: `import { shallowReactive, ref } from 'vue'`,\n catalogInit: 'const __catalog = shallowReactive({ ...__defaultMsgs })',\n localeInit: (defaultLocale) => `const __currentLocale = ref('${defaultLocale}')`,\n loadingInit: 'const __loading = ref(false)',\n catalogUpdate: (msgs) => `Object.assign(__catalog, ${msgs})`,\n localeUpdate: (locale) => `__currentLocale.value = ${locale}`,\n loadingUpdate: (value) => `__loading.value = ${value}`,\n localeRead: '__currentLocale.value',\n runtimeKey: 'fluenti.runtime.vue.v1',\n})\n","import type { Plugin } from 'vite'\nimport type { FluentiPluginOptions } from '@fluenti/vite-plugin'\nimport { createFluentiPlugins } from '@fluenti/vite-plugin'\nimport { transformVtDirectives } from '@fluenti/vite-plugin/sfc-transform'\nimport { vueRuntimeGenerator } from './vue-runtime'\n\nexport type { FluentiPluginOptions as FluentiVueOptions } from '@fluenti/vite-plugin'\n\n/**\n * Fluenti Vue 3 Vite plugin.\n *\n * @example Minimal — no fluenti.config.ts needed\n * ```ts\n * // vite.config.ts\n * import fluentiVue from '@fluenti/vue/vite-plugin'\n *\n * export default defineConfig({\n * plugins: [fluentiVue({ config: { locales: ['en', 'ja'] } })],\n * })\n * ```\n *\n * @example With fluenti.config.ts (for advanced options)\n * ```ts\n * export default defineConfig({\n * plugins: [fluentiVue()], // auto-reads fluenti.config.ts\n * })\n * ```\n */\nexport default function fluentiVue(options?: FluentiPluginOptions): Plugin[] {\n const vueTemplatePlugin: Plugin = {\n name: 'fluenti:vue-template',\n enforce: 'pre',\n transform(code, id) {\n if (!id.endsWith('.vue')) return undefined\n if (!/\\bv-t\\b/.test(code) && !/<Trans[\\s>]/.test(code) && !/<Plural[\\s/>]/.test(code)) return undefined\n\n const transformed = transformVtDirectives(code)\n if (transformed === code) return undefined\n\n return { code: transformed, map: null }\n },\n }\n\n return createFluentiPlugins(\n { ...(options?.config !== undefined ? { config: options.config } : {}), framework: 'vue' },\n [vueTemplatePlugin],\n vueRuntimeGenerator,\n )\n}\n"],"mappings":";;;AAGA,IAAa,IAAwC,EAAuB;CAC1E,SAAS;CACT,aAAa;CACb,aAAa,MAAkB,gCAAgC,EAAc;CAC7E,aAAa;CACb,gBAAgB,MAAS,4BAA4B,EAAK;CAC1D,eAAe,MAAW,2BAA2B;CACrD,gBAAgB,MAAU,qBAAqB;CAC/C,YAAY;CACZ,YAAY;CACb,CAAC;;;ACeF,SAAwB,EAAW,GAA0C;CAC3E,IAAM,IAA4B;EAChC,MAAM;EACN,SAAS;EACT,UAAU,GAAM,GAAI;AAElB,OADI,CAAC,EAAG,SAAS,OAAO,IACpB,CAAC,UAAU,KAAK,EAAK,IAAI,CAAC,cAAc,KAAK,EAAK,IAAI,CAAC,gBAAgB,KAAK,EAAK,CAAE;GAEvF,IAAM,IAAc,EAAsB,EAAK;AAC3C,aAAgB,EAEpB,QAAO;IAAE,MAAM;IAAa,KAAK;IAAM;;EAE1C;AAED,QAAO,EACL;EAAE,GAAI,GAAS,WAAW,KAAA,IAAyC,EAAE,GAA/B,EAAE,QAAQ,EAAQ,QAAQ;EAAQ,WAAW;EAAO,EAC1F,CAAC,EAAkB,EACnB,EACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluenti/vue",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vue 3 compile-time i18n — v-t directive, Trans/Plural/Select components, useI18n composable",
|
|
6
6
|
"homepage": "https://fluenti.dev",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@fluenti/core": "0.4.0-rc.
|
|
91
|
-
"@fluenti/vite-plugin": "0.4.0-rc.
|
|
90
|
+
"@fluenti/core": "0.4.0-rc.2",
|
|
91
|
+
"@fluenti/vite-plugin": "0.4.0-rc.2"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"typescript": "^5.9",
|