@i18n-micro/devtools-ui 1.2.8 → 1.2.15

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 (37) hide show
  1. package/dist/App.ce.vue.d.ts +3 -2
  2. package/dist/bridge/create-bridge.js +69 -76
  3. package/dist/bridge/create-bridge.js.map +1 -1
  4. package/dist/bridge/interface.js +6 -5
  5. package/dist/bridge/interface.js.map +1 -1
  6. package/dist/components/config/ConfigCard.vue.d.ts +9 -12
  7. package/dist/components/config/DiffViewer.vue.d.ts +2 -1
  8. package/dist/components/config/SettingsCard.vue.d.ts +9 -12
  9. package/dist/components/data/LocaleTable.vue.d.ts +2 -1
  10. package/dist/components/data/LocalesList.vue.d.ts +3 -2
  11. package/dist/components/data/StatItem.vue.d.ts +3 -2
  12. package/dist/components/data/Statistics.vue.d.ts +2 -16
  13. package/dist/components/data/TreeItem.vue.d.ts +3 -2
  14. package/dist/components/editor/TranslationControls.vue.d.ts +3 -2
  15. package/dist/components/editor/TranslationEditor.vue.d.ts +3 -2
  16. package/dist/components/layout/ActionBar.vue.d.ts +3 -2
  17. package/dist/components/layout/SplitPane.vue.d.ts +10 -13
  18. package/dist/components/ui/Button.vue.d.ts +8 -12
  19. package/dist/components/ui/Loader.vue.d.ts +3 -2
  20. package/dist/components/ui/Modal.vue.d.ts +11 -13
  21. package/dist/components/ui/Pagination.vue.d.ts +3 -2
  22. package/dist/components/ui/StatusIndicator.vue.d.ts +3 -2
  23. package/dist/components/ui/Tabs.vue.d.ts +3 -2
  24. package/dist/components/ui/icons/GlobeIcon.vue.d.ts +2 -1
  25. package/dist/components/ui/icons/ServerIcon.vue.d.ts +2 -1
  26. package/dist/components/ui/icons/SettingsIcon.vue.d.ts +2 -1
  27. package/dist/devtools-ui.css +3 -1
  28. package/dist/index.es.js +6261 -8230
  29. package/dist/index.es.js.map +1 -1
  30. package/dist/index.umd.js +28 -9
  31. package/dist/index.umd.js.map +1 -1
  32. package/dist/views/ConfigView.vue.d.ts +2 -1
  33. package/dist/views/I18nView.vue.d.ts +2 -3
  34. package/dist/views/SettingsView.vue.d.ts +2 -1
  35. package/dist/vite/plugin.mjs +211 -254
  36. package/dist/vite/plugin.mjs.map +1 -1
  37. package/package.json +14 -12
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { I18nDevToolsBridge } from './bridge/interface';
3
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
4
  bridge: {
5
5
  type: PropType<I18nDevToolsBridge>;
6
6
  required: false;
@@ -10,5 +10,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
10
10
  type: PropType<I18nDevToolsBridge>;
11
11
  required: false;
12
12
  };
13
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
14
+ declare const _default: typeof __VLS_export;
14
15
  export default _default;
@@ -1,77 +1,70 @@
1
- import { buildSourceRootPath as g, buildSourcePagePath as p } from "@i18n-micro/utils/merge-source";
2
- import { parseTranslationRelativePath as b } from "@i18n-micro/utils/parse-path";
3
- function w(u) {
4
- const { adapter: n, locales: f = [], defaultLocale: i = "en", translationDir: c = "src/locales" } = u, d = () => {
5
- const o = {}, t = n.getRouteCache();
6
- for (const [e, a] of Object.entries(t)) {
7
- if (!a || typeof a != "object" || Array.isArray(a) || Object.keys(a).length === 0)
8
- continue;
9
- const s = e.indexOf(":");
10
- if (s === -1)
11
- continue;
12
- const r = e.substring(0, s), l = e.substring(s + 1);
13
- o[l === "index" ? g(r) : p(l, r)] = a;
14
- }
15
- return o;
16
- };
17
- return {
18
- async getLocalesAndTranslations() {
19
- return d();
20
- },
21
- async getConfigs() {
22
- return {
23
- defaultLocale: i || n.getCurrentLocale?.() || "en",
24
- fallbackLocale: n.getFallbackLocale?.() || i || "en",
25
- locales: f || [],
26
- translationDir: c || "locales"
27
- };
28
- },
29
- async saveTranslation(o, t) {
30
- try {
31
- const e = o.replace(/^\/+/, "").replace(/\/+/g, "/"), a = b(e);
32
- if (a.type === "page")
33
- n.addRouteTranslations(a.locale, a.pageName, t, !1);
34
- else if (a.type === "root")
35
- n.addTranslations(a.locale, t, !1);
36
- else
37
- throw new Error(`Unknown file path format: ${o}`);
38
- const s = c ? `${c}/${e}` : e;
39
- try {
40
- const r = await fetch("/__i18n_api/save", {
41
- method: "POST",
42
- headers: {
43
- "Content-Type": "application/json"
44
- },
45
- body: JSON.stringify({
46
- file: s,
47
- content: t
48
- })
49
- });
50
- if (!r.ok) {
51
- const l = await r.json().catch(() => ({ error: "Unknown error" }));
52
- throw new Error(l.error || `Network response was not ok: ${r.statusText}`);
53
- }
54
- console.log(`[i18n-bridge] Saved to disk: ${s}`);
55
- } catch (r) {
56
- if (typeof localStorage < "u") {
57
- console.warn("[i18n-bridge] Server save failed, falling back to localStorage:", r);
58
- const l = `i18n_save_${o}`;
59
- localStorage.setItem(l, JSON.stringify(t, null, 2));
60
- } else
61
- throw r;
62
- }
63
- } catch (e) {
64
- throw new Error(`Failed to save: ${e instanceof Error ? e.message : String(e)}`);
65
- }
66
- },
67
- onLocalesUpdate(o) {
68
- return n.subscribe(() => {
69
- o(d());
70
- });
71
- }
72
- };
1
+ import { buildSourcePagePath as e, buildSourceRootPath as t } from "@i18n-micro/utils/merge-source";
2
+ import { parseTranslationRelativePath as n } from "@i18n-micro/utils/parse-path";
3
+ //#region src/bridge/create-bridge.ts
4
+ function r(r) {
5
+ let { adapter: i, locales: a = [], defaultLocale: o = "en", translationDir: s = "src/locales" } = r, c = () => {
6
+ let n = {}, r = i.getRouteCache();
7
+ for (let [i, a] of Object.entries(r)) {
8
+ if (!a || typeof a != "object" || Array.isArray(a) || Object.keys(a).length === 0) continue;
9
+ let r = i.indexOf(":");
10
+ if (r === -1) continue;
11
+ let o = i.substring(0, r), s = i.substring(r + 1);
12
+ n[s === "index" ? t(o) : e(s, o)] = a;
13
+ }
14
+ return n;
15
+ };
16
+ return {
17
+ async getLocalesAndTranslations() {
18
+ return c();
19
+ },
20
+ async getConfigs() {
21
+ return {
22
+ defaultLocale: o || i.getCurrentLocale?.() || "en",
23
+ fallbackLocale: i.getFallbackLocale?.() || o || "en",
24
+ locales: a || [],
25
+ translationDir: s || "locales"
26
+ };
27
+ },
28
+ async saveTranslation(e, t) {
29
+ try {
30
+ let r = e.replace(/^\/+/, "").replace(/\/+/g, "/"), a = n(r);
31
+ if (a.type === "page") i.addRouteTranslations(a.locale, a.pageName, t, !1);
32
+ else if (a.type === "root") i.addTranslations(a.locale, t, !1);
33
+ else throw Error(`Unknown file path format: ${e}`);
34
+ let o = s ? `${s}/${r}` : r;
35
+ try {
36
+ let e = await fetch("/__i18n_api/save", {
37
+ method: "POST",
38
+ headers: { "Content-Type": "application/json" },
39
+ body: JSON.stringify({
40
+ file: o,
41
+ content: t
42
+ })
43
+ });
44
+ if (!e.ok) {
45
+ let t = await e.json().catch(() => ({ error: "Unknown error" }));
46
+ throw Error(t.error || `Network response was not ok: ${e.statusText}`);
47
+ }
48
+ console.log(`[i18n-bridge] Saved to disk: ${o}`);
49
+ } catch (n) {
50
+ if (typeof localStorage < "u") {
51
+ console.warn("[i18n-bridge] Server save failed, falling back to localStorage:", n);
52
+ let r = `i18n_save_${e}`;
53
+ localStorage.setItem(r, JSON.stringify(t, null, 2));
54
+ } else throw n;
55
+ }
56
+ } catch (e) {
57
+ throw Error(`Failed to save: ${e instanceof Error ? e.message : String(e)}`);
58
+ }
59
+ },
60
+ onLocalesUpdate(e) {
61
+ return i.subscribe(() => {
62
+ e(c());
63
+ });
64
+ }
65
+ };
73
66
  }
74
- export {
75
- w as createBridge
76
- };
77
- //# sourceMappingURL=create-bridge.js.map
67
+ //#endregion
68
+ export { r as createBridge };
69
+
70
+ //# sourceMappingURL=create-bridge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-bridge.js","sources":["../../src/bridge/create-bridge.ts"],"sourcesContent":["import type { Locale, ModuleOptions } from '@i18n-micro/types'\nimport { buildSourcePagePath, buildSourceRootPath } from '@i18n-micro/utils/merge-source'\nimport { parseTranslationRelativePath } from '@i18n-micro/utils/parse-path'\nimport type { I18nDevToolsBridge, LocaleData, TranslationContent } from './interface'\n\n/**\n * Adapter interface for accessing i18n instance data\n * Each framework package will implement this adapter for their specific i18n instance\n */\nexport interface BridgeAdapter {\n /**\n * Get translations cache\n * Keys are in format \"locale:routeName\" (e.g., \"en:index\", \"en:home\")\n */\n getRouteCache: () => Record<string, TranslationContent>\n\n /**\n * Add or update translations for a locale\n */\n addTranslations: (locale: string, content: TranslationContent, merge: boolean) => void\n\n /**\n * Add or update route-specific translations\n */\n addRouteTranslations: (locale: string, routeName: string, content: TranslationContent, merge: boolean) => void\n\n /**\n * Subscribe to changes in translations\n * @returns Unsubscribe function\n */\n subscribe: (callback: () => void) => () => void\n\n /**\n * Get current locale (optional)\n */\n getCurrentLocale?: () => string\n\n /**\n * Get fallback locale (optional)\n */\n getFallbackLocale?: () => string\n}\n\nexport interface CreateBridgeOptions {\n adapter: BridgeAdapter\n locales?: Locale[]\n defaultLocale?: string\n translationDir?: string\n}\n\n/**\n * Create a universal bridge for DevTools communication\n * This bridge works with any framework by using an adapter pattern\n */\nexport function createBridge(options: CreateBridgeOptions): I18nDevToolsBridge {\n const { adapter, locales = [], defaultLocale = 'en', translationDir = 'src/locales' } = options\n\n // Helper function to build locale data from cache\n const buildLocaleData = (): LocaleData => {\n const data: LocaleData = {}\n\n // All translations are stored as \"locale:routeName\" (e.g., \"en:index\", \"en:about\")\n const routeCache = adapter.getRouteCache()\n for (const [key, content] of Object.entries(routeCache)) {\n if (!content || typeof content !== 'object' || Array.isArray(content) || Object.keys(content).length === 0) {\n continue\n }\n\n const separatorIndex = key.indexOf(':')\n if (separatorIndex === -1) {\n continue\n }\n\n const locale = key.substring(0, separatorIndex)\n const routeName = key.substring(separatorIndex + 1)\n\n data[routeName === 'index' ? buildSourceRootPath(locale) : buildSourcePagePath(routeName, locale)] = content\n }\n\n return data\n }\n\n return {\n async getLocalesAndTranslations(): Promise<LocaleData> {\n return buildLocaleData()\n },\n\n async getConfigs(): Promise<ModuleOptions> {\n return {\n defaultLocale: defaultLocale || adapter.getCurrentLocale?.() || 'en',\n fallbackLocale: adapter.getFallbackLocale?.() || defaultLocale || 'en',\n locales: locales || [],\n translationDir: translationDir || 'locales',\n } as ModuleOptions\n },\n\n async saveTranslation(filePath: string, content: TranslationContent): Promise<void> {\n try {\n // 1. Update state in memory (Hot Update)\n // Normalize path: remove leading / and extra slashes\n const normalizedPath = filePath.replace(/^\\/+/, '').replace(/\\/+/g, '/')\n\n const parsedPath = parseTranslationRelativePath(normalizedPath)\n\n if (parsedPath.type === 'page') {\n adapter.addRouteTranslations(parsedPath.locale, parsedPath.pageName, content, false)\n } else if (parsedPath.type === 'root') {\n adapter.addTranslations(parsedPath.locale, content, false)\n } else {\n throw new Error(`Unknown file path format: ${filePath}`)\n }\n\n // 2. Send request to server to save file to disk\n // Build real path relative to project root\n const realFilePath = translationDir ? `${translationDir}/${normalizedPath}` : normalizedPath\n\n try {\n const response = await fetch('/__i18n_api/save', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n file: realFilePath,\n content,\n }),\n })\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({ error: 'Unknown error' }))\n throw new Error(errorData.error || `Network response was not ok: ${response.statusText}`)\n }\n\n console.log(`[i18n-bridge] Saved to disk: ${realFilePath}`)\n } catch (serverError) {\n // Fallback: Save to localStorage if server is unavailable (e.g., in production preview)\n if (typeof localStorage !== 'undefined') {\n console.warn('[i18n-bridge] Server save failed, falling back to localStorage:', serverError)\n const storageKey = `i18n_save_${filePath}`\n localStorage.setItem(storageKey, JSON.stringify(content, null, 2))\n } else {\n // If no server and no localStorage, throw error\n throw serverError\n }\n }\n } catch (error) {\n throw new Error(`Failed to save: ${error instanceof Error ? error.message : String(error)}`)\n }\n },\n\n onLocalesUpdate(callback: (data: LocaleData) => void): () => void {\n // Subscribe to changes in i18n instance\n const unsubscribe = adapter.subscribe(() => {\n // On any change, rebuild data and send to DevTools\n callback(buildLocaleData())\n })\n return unsubscribe\n },\n }\n}\n"],"names":["createBridge","options","adapter","locales","defaultLocale","translationDir","buildLocaleData","data","routeCache","key","content","separatorIndex","locale","routeName","buildSourceRootPath","buildSourcePagePath","filePath","normalizedPath","parsedPath","parseTranslationRelativePath","realFilePath","response","errorData","serverError","storageKey","error","callback"],"mappings":"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"}
1
+ {"version":3,"file":"create-bridge.js","names":[],"sources":["../../src/bridge/create-bridge.ts"],"sourcesContent":["import type { Locale, ModuleOptions } from '@i18n-micro/types'\nimport { buildSourcePagePath, buildSourceRootPath } from '@i18n-micro/utils/merge-source'\nimport { parseTranslationRelativePath } from '@i18n-micro/utils/parse-path'\nimport type { I18nDevToolsBridge, LocaleData, TranslationContent } from './interface'\n\n/**\n * Adapter interface for accessing i18n instance data\n * Each framework package will implement this adapter for their specific i18n instance\n */\nexport interface BridgeAdapter {\n /**\n * Get translations cache\n * Keys are in format \"locale:routeName\" (e.g., \"en:index\", \"en:home\")\n */\n getRouteCache: () => Record<string, TranslationContent>\n\n /**\n * Add or update translations for a locale\n */\n addTranslations: (locale: string, content: TranslationContent, merge: boolean) => void\n\n /**\n * Add or update route-specific translations\n */\n addRouteTranslations: (locale: string, routeName: string, content: TranslationContent, merge: boolean) => void\n\n /**\n * Subscribe to changes in translations\n * @returns Unsubscribe function\n */\n subscribe: (callback: () => void) => () => void\n\n /**\n * Get current locale (optional)\n */\n getCurrentLocale?: () => string\n\n /**\n * Get fallback locale (optional)\n */\n getFallbackLocale?: () => string\n}\n\nexport interface CreateBridgeOptions {\n adapter: BridgeAdapter\n locales?: Locale[]\n defaultLocale?: string\n translationDir?: string\n}\n\n/**\n * Create a universal bridge for DevTools communication\n * This bridge works with any framework by using an adapter pattern\n */\nexport function createBridge(options: CreateBridgeOptions): I18nDevToolsBridge {\n const { adapter, locales = [], defaultLocale = 'en', translationDir = 'src/locales' } = options\n\n // Helper function to build locale data from cache\n const buildLocaleData = (): LocaleData => {\n const data: LocaleData = {}\n\n // All translations are stored as \"locale:routeName\" (e.g., \"en:index\", \"en:about\")\n const routeCache = adapter.getRouteCache()\n for (const [key, content] of Object.entries(routeCache)) {\n if (!content || typeof content !== 'object' || Array.isArray(content) || Object.keys(content).length === 0) {\n continue\n }\n\n const separatorIndex = key.indexOf(':')\n if (separatorIndex === -1) {\n continue\n }\n\n const locale = key.substring(0, separatorIndex)\n const routeName = key.substring(separatorIndex + 1)\n\n data[routeName === 'index' ? buildSourceRootPath(locale) : buildSourcePagePath(routeName, locale)] = content\n }\n\n return data\n }\n\n return {\n async getLocalesAndTranslations(): Promise<LocaleData> {\n return buildLocaleData()\n },\n\n async getConfigs(): Promise<ModuleOptions> {\n return {\n defaultLocale: defaultLocale || adapter.getCurrentLocale?.() || 'en',\n fallbackLocale: adapter.getFallbackLocale?.() || defaultLocale || 'en',\n locales: locales || [],\n translationDir: translationDir || 'locales',\n } as ModuleOptions\n },\n\n async saveTranslation(filePath: string, content: TranslationContent): Promise<void> {\n try {\n // 1. Update state in memory (Hot Update)\n // Normalize path: remove leading / and extra slashes\n const normalizedPath = filePath.replace(/^\\/+/, '').replace(/\\/+/g, '/')\n\n const parsedPath = parseTranslationRelativePath(normalizedPath)\n\n if (parsedPath.type === 'page') {\n adapter.addRouteTranslations(parsedPath.locale, parsedPath.pageName, content, false)\n } else if (parsedPath.type === 'root') {\n adapter.addTranslations(parsedPath.locale, content, false)\n } else {\n throw new Error(`Unknown file path format: ${filePath}`)\n }\n\n // 2. Send request to server to save file to disk\n // Build real path relative to project root\n const realFilePath = translationDir ? `${translationDir}/${normalizedPath}` : normalizedPath\n\n try {\n const response = await fetch('/__i18n_api/save', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n file: realFilePath,\n content,\n }),\n })\n\n if (!response.ok) {\n const errorData = await response.json().catch(() => ({ error: 'Unknown error' }))\n throw new Error(errorData.error || `Network response was not ok: ${response.statusText}`)\n }\n\n console.log(`[i18n-bridge] Saved to disk: ${realFilePath}`)\n } catch (serverError) {\n // Fallback: Save to localStorage if server is unavailable (e.g., in production preview)\n if (typeof localStorage !== 'undefined') {\n console.warn('[i18n-bridge] Server save failed, falling back to localStorage:', serverError)\n const storageKey = `i18n_save_${filePath}`\n localStorage.setItem(storageKey, JSON.stringify(content, null, 2))\n } else {\n // If no server and no localStorage, throw error\n throw serverError\n }\n }\n } catch (error) {\n throw new Error(`Failed to save: ${error instanceof Error ? error.message : String(error)}`)\n }\n },\n\n onLocalesUpdate(callback: (data: LocaleData) => void): () => void {\n // Subscribe to changes in i18n instance\n const unsubscribe = adapter.subscribe(() => {\n // On any change, rebuild data and send to DevTools\n callback(buildLocaleData())\n })\n return unsubscribe\n },\n }\n}\n"],"mappings":";;;AAsDA,SAAgB,EAAa,GAAkD;CAC7E,IAAM,EAAE,YAAS,aAAU,CAAC,GAAG,mBAAgB,MAAM,oBAAiB,kBAAkB,GAGlF,UAAoC;EACxC,IAAM,IAAmB,CAAC,GAGpB,IAAa,EAAQ,cAAc;EACzC,KAAK,IAAM,CAAC,GAAK,MAAY,OAAO,QAAQ,CAAU,GAAG;GACvD,IAAI,CAAC,KAAW,OAAO,KAAY,YAAY,MAAM,QAAQ,CAAO,KAAK,OAAO,KAAK,CAAO,CAAC,CAAC,WAAW,GACvG;GAGF,IAAM,IAAiB,EAAI,QAAQ,GAAG;GACtC,IAAI,MAAmB,IACrB;GAGF,IAAM,IAAS,EAAI,UAAU,GAAG,CAAc,GACxC,IAAY,EAAI,UAAU,IAAiB,CAAC;GAElD,EAAK,MAAc,UAAU,EAAoB,CAAM,IAAI,EAAoB,GAAW,CAAM,KAAK;EACvG;EAEA,OAAO;CACT;CAEA,OAAO;EACL,MAAM,4BAAiD;GACrD,OAAO,EAAgB;EACzB;EAEA,MAAM,aAAqC;GACzC,OAAO;IACL,eAAe,KAAiB,EAAQ,mBAAmB,KAAK;IAChE,gBAAgB,EAAQ,oBAAoB,KAAK,KAAiB;IAClE,SAAS,KAAW,CAAC;IACrB,gBAAgB,KAAkB;GACpC;EACF;EAEA,MAAM,gBAAgB,GAAkB,GAA4C;GAClF,IAAI;IAGF,IAAM,IAAiB,EAAS,QAAQ,QAAQ,EAAE,CAAC,CAAC,QAAQ,QAAQ,GAAG,GAEjE,IAAa,EAA6B,CAAc;IAE9D,IAAI,EAAW,SAAS,QACtB,EAAQ,qBAAqB,EAAW,QAAQ,EAAW,UAAU,GAAS,EAAK;SAC9E,IAAI,EAAW,SAAS,QAC7B,EAAQ,gBAAgB,EAAW,QAAQ,GAAS,EAAK;SAEzD,MAAU,MAAM,6BAA6B,GAAU;IAKzD,IAAM,IAAe,IAAiB,GAAG,EAAe,GAAG,MAAmB;IAE9E,IAAI;KACF,IAAM,IAAW,MAAM,MAAM,oBAAoB;MAC/C,QAAQ;MACR,SAAS,EACP,gBAAgB,mBAClB;MACA,MAAM,KAAK,UAAU;OACnB,MAAM;OACN;MACF,CAAC;KACH,CAAC;KAED,IAAI,CAAC,EAAS,IAAI;MAChB,IAAM,IAAY,MAAM,EAAS,KAAK,CAAC,CAAC,aAAa,EAAE,OAAO,gBAAgB,EAAE;MAChF,MAAU,MAAM,EAAU,SAAS,gCAAgC,EAAS,YAAY;KAC1F;KAEA,QAAQ,IAAI,gCAAgC,GAAc;IAC5D,SAAS,GAAa;KAEpB,IAAI,OAAO,eAAiB,KAAa;MACvC,QAAQ,KAAK,mEAAmE,CAAW;MAC3F,IAAM,IAAa,aAAa;MAChC,aAAa,QAAQ,GAAY,KAAK,UAAU,GAAS,MAAM,CAAC,CAAC;KACnE,OAEE,MAAM;IAEV;GACF,SAAS,GAAO;IACd,MAAU,MAAM,mBAAmB,aAAiB,QAAQ,EAAM,UAAU,OAAO,CAAK,GAAG;GAC7F;EACF;EAEA,gBAAgB,GAAkD;GAMhE,OAJoB,EAAQ,gBAAgB;IAE1C,EAAS,EAAgB,CAAC;GAC5B,CACO;EACT;CACF;AACF"}
@@ -1,5 +1,6 @@
1
- const E = !0;
2
- export {
3
- E as BRIDGE_INTERFACE_MODULE
4
- };
5
- //# sourceMappingURL=interface.js.map
1
+ //#region src/bridge/interface.ts
2
+ var e = !0;
3
+ //#endregion
4
+ export { e as BRIDGE_INTERFACE_MODULE };
5
+
6
+ //# sourceMappingURL=interface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interface.js","sources":["../../src/bridge/interface.ts"],"sourcesContent":["import type { ModuleOptions } from '@i18n-micro/types'\n\nexport type JSONValue = string | null | number | boolean | { [key: string]: JSONValue }\n\nexport interface TranslationContent {\n [key: string]: JSONValue\n}\n\nexport type LocaleData = Record<string, TranslationContent>\n\n/**\n * Bridge interface for communication between DevTools UI and framework-specific RPC\n * This abstraction allows the UI to work with both Nuxt and Astro DevTools\n */\nexport interface I18nDevToolsBridge {\n /**\n * Get all locales and their translation files\n * @returns Promise resolving to a record of file paths to translation content\n */\n getLocalesAndTranslations(): Promise<LocaleData>\n\n /**\n * Get i18n module configuration\n * @returns Promise resolving to module options\n */\n getConfigs(): Promise<ModuleOptions>\n\n /**\n * Save translation content to a file\n * @param filePath - Path to the translation file\n * @param content - Translation content to save\n */\n saveTranslation(filePath: string, content: TranslationContent): Promise<void>\n\n /**\n * Subscribe to locale updates from the server\n * @param callback - Function to call when locales are updated\n * @returns Unsubscribe function\n */\n onLocalesUpdate(callback: (data: LocaleData) => void): () => void\n}\n\n/** Runtime marker so the bridge types entry can be published as a JS module. */\nexport const BRIDGE_INTERFACE_MODULE = true\n"],"names":["BRIDGE_INTERFACE_MODULE"],"mappings":"AA2CO,MAAMA,IAA0B;"}
1
+ {"version":3,"file":"interface.js","names":[],"sources":["../../src/bridge/interface.ts"],"sourcesContent":["import type { ModuleOptions } from '@i18n-micro/types'\n\nexport type JSONValue = string | null | number | boolean | { [key: string]: JSONValue }\n\nexport interface TranslationContent {\n [key: string]: JSONValue\n}\n\nexport type LocaleData = Record<string, TranslationContent>\n\n/**\n * Bridge interface for communication between DevTools UI and framework-specific RPC\n * This abstraction allows the UI to work with both Nuxt and Astro DevTools\n */\nexport interface I18nDevToolsBridge {\n /**\n * Get all locales and their translation files\n * @returns Promise resolving to a record of file paths to translation content\n */\n getLocalesAndTranslations(): Promise<LocaleData>\n\n /**\n * Get i18n module configuration\n * @returns Promise resolving to module options\n */\n getConfigs(): Promise<ModuleOptions>\n\n /**\n * Save translation content to a file\n * @param filePath - Path to the translation file\n * @param content - Translation content to save\n */\n saveTranslation(filePath: string, content: TranslationContent): Promise<void>\n\n /**\n * Subscribe to locale updates from the server\n * @param callback - Function to call when locales are updated\n * @returns Unsubscribe function\n */\n onLocalesUpdate(callback: (data: LocaleData) => void): () => void\n}\n\n/** Runtime marker so the bridge types entry can be published as a JS module. */\nexport const BRIDGE_INTERFACE_MODULE = true\n"],"mappings":";AA2CA,IAAa,IAA0B"}
@@ -2,20 +2,17 @@ type __VLS_Props = {
2
2
  title: string;
3
3
  icon?: string;
4
4
  };
5
- declare function __VLS_template(): {
6
- attrs: Partial<{}>;
7
- slots: {
8
- icon?(_: {}): any;
9
- default?(_: {}): any;
10
- };
11
- refs: {};
12
- rootEl: HTMLDivElement;
5
+ declare var __VLS_1: {}, __VLS_3: {};
6
+ type __VLS_Slots = {} & {
7
+ icon?: (props: typeof __VLS_1) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_3) => any;
13
10
  };
14
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
11
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
17
14
  export default _default;
18
- type __VLS_WithTemplateSlots<T, S> = T & {
15
+ type __VLS_WithSlots<T, S> = T & {
19
16
  new (): {
20
17
  $slots: S;
21
18
  };
@@ -3,5 +3,6 @@ type __VLS_Props = {
3
3
  current: TranslationContent;
4
4
  base: TranslationContent;
5
5
  };
6
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
@@ -2,20 +2,17 @@ interface Props {
2
2
  title: string;
3
3
  icon?: string;
4
4
  }
5
- declare function __VLS_template(): {
6
- attrs: Partial<{}>;
7
- slots: {
8
- icon?(_: {}): any;
9
- default?(_: {}): any;
10
- };
11
- refs: {};
12
- rootEl: HTMLDivElement;
5
+ declare var __VLS_1: {}, __VLS_3: {};
6
+ type __VLS_Slots = {} & {
7
+ icon?: (props: typeof __VLS_1) => any;
8
+ } & {
9
+ default?: (props: typeof __VLS_3) => any;
13
10
  };
14
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
- declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
11
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
17
14
  export default _default;
18
- type __VLS_WithTemplateSlots<T, S> = T & {
15
+ type __VLS_WithSlots<T, S> = T & {
19
16
  new (): {
20
17
  $slots: S;
21
18
  };
@@ -9,5 +9,6 @@ interface Locale {
9
9
  type __VLS_Props = {
10
10
  locales: Locale[];
11
11
  };
12
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
12
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
13
14
  export default _default;
@@ -3,9 +3,10 @@ type __VLS_Props = {
3
3
  locales: LocaleData;
4
4
  selectedFile: string;
5
5
  };
6
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
7
  fileSelected: (...args: any[]) => void;
8
8
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
9
  onFileSelected?: ((...args: any[]) => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
11
12
  export default _default;
@@ -1,4 +1,4 @@
1
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  label: StringConstructor;
3
3
  value: (NumberConstructor | StringConstructor)[];
4
4
  trend: NumberConstructor;
@@ -16,5 +16,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
16
16
  };
17
17
  }>> & Readonly<{}>, {
18
18
  stacked: boolean;
19
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
20
+ declare const _default: typeof __VLS_export;
20
21
  export default _default;
@@ -2,20 +2,6 @@ import { TranslationContent } from '../../types';
2
2
  type __VLS_Props = {
3
3
  content: TranslationContent;
4
4
  };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
6
- diffModal: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
7
- current: TranslationContent;
8
- base: TranslationContent;
9
- }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
- P: {};
11
- B: {};
12
- D: {};
13
- C: {};
14
- M: {};
15
- Defaults: {};
16
- }, Readonly<{
17
- current: TranslationContent;
18
- base: TranslationContent;
19
- }> & Readonly<{}>, {}, {}, {}, {}, {}> | null;
20
- }, HTMLDivElement>;
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
21
7
  export default _default;
@@ -7,9 +7,10 @@ type __VLS_Props = {
7
7
  defaultExpanded?: boolean;
8
8
  selected?: boolean;
9
9
  };
10
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
11
  fileSelected: (...args: any[]) => void;
12
12
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
13
13
  onFileSelected?: ((...args: any[]) => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
15
16
  export default _default;
@@ -5,7 +5,7 @@ interface Props {
5
5
  [key: string]: string;
6
6
  };
7
7
  }
8
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
9
  "update:driver": (value: string) => any;
10
10
  "update:apiToken": (value: string) => any;
11
11
  "update:options": (value: {
@@ -17,5 +17,6 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
17
17
  "onUpdate:options"?: ((value: {
18
18
  [key: string]: string;
19
19
  }) => any) | undefined;
20
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
20
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
21
22
  export default _default;
@@ -2,9 +2,10 @@ import { TranslationContent } from '../../types';
2
2
  type __VLS_Props = {
3
3
  modelValue: TranslationContent;
4
4
  };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
6
  "update:modelValue": (value: TranslationContent) => any;
7
7
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
8
  "onUpdate:modelValue"?: ((value: TranslationContent) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
10
11
  export default _default;
@@ -1,7 +1,7 @@
1
1
  interface Props {
2
2
  showTranslateButton?: boolean;
3
3
  }
4
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
5
  export: () => any;
6
6
  import: () => any;
7
7
  "show-stats": () => any;
@@ -13,5 +13,6 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
13
13
  "onShow-stats"?: (() => any) | undefined;
14
14
  "onTranslate-missing"?: (() => any) | undefined;
15
15
  onSave?: (() => any) | undefined;
16
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
16
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
17
18
  export default _default;
@@ -4,24 +4,21 @@ type __VLS_Props = {
4
4
  minLeftWidth?: number;
5
5
  minRightWidth?: number;
6
6
  };
7
- declare function __VLS_template(): {
8
- attrs: Partial<{}>;
9
- slots: {
10
- left?(_: {}): any;
11
- right?(_: {}): any;
12
- };
13
- refs: {};
14
- rootEl: HTMLDivElement;
7
+ declare var __VLS_1: {}, __VLS_3: {};
8
+ type __VLS_Slots = {} & {
9
+ left?: (props: typeof __VLS_1) => any;
10
+ } & {
11
+ right?: (props: typeof __VLS_3) => any;
15
12
  };
16
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
17
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
14
  defaultLeftWidth: string;
19
15
  minLeftWidth: number;
20
16
  minRightWidth: number;
21
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
23
20
  export default _default;
24
- type __VLS_WithTemplateSlots<T, S> = T & {
21
+ type __VLS_WithSlots<T, S> = T & {
25
22
  new (): {
26
23
  $slots: S;
27
24
  };
@@ -4,16 +4,11 @@ type __VLS_Props = {
4
4
  disabled?: boolean;
5
5
  type?: 'button' | 'submit' | 'reset';
6
6
  };
7
- declare function __VLS_template(): {
8
- attrs: Partial<{}>;
9
- slots: {
10
- default?(_: {}): any;
11
- };
12
- refs: {};
13
- rootEl: HTMLButtonElement;
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
14
10
  };
15
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
12
  click: (event: MouseEvent) => any;
18
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
14
  onClick?: ((event: MouseEvent) => any) | undefined;
@@ -22,10 +17,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
22
17
  type: "button" | "submit" | "reset";
23
18
  disabled: boolean;
24
19
  variant: "primary" | "secondary" | "danger" | "ghost";
25
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
26
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
27
23
  export default _default;
28
- type __VLS_WithTemplateSlots<T, S> = T & {
24
+ type __VLS_WithSlots<T, S> = T & {
29
25
  new (): {
30
26
  $slots: S;
31
27
  };
@@ -2,8 +2,9 @@ interface LoaderProps {
2
2
  message?: string;
3
3
  size?: 'sm' | 'md' | 'lg';
4
4
  }
5
- declare const _default: import('vue').DefineComponent<LoaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LoaderProps> & Readonly<{}>, {
5
+ declare const __VLS_export: import('vue').DefineComponent<LoaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LoaderProps> & Readonly<{}>, {
6
6
  message: string;
7
7
  size: "sm" | "md" | "lg";
8
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
9
10
  export default _default;
@@ -9,18 +9,15 @@ type __VLS_Props = {
9
9
  showCloseButton?: boolean;
10
10
  headerClass?: string;
11
11
  };
12
- declare function __VLS_template(): {
13
- attrs: Partial<{}>;
14
- slots: {
15
- header?(_: {}): any;
16
- default?(_: {}): any;
17
- footer?(_: {}): any;
18
- };
19
- refs: {};
20
- rootEl: any;
12
+ declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
13
+ type __VLS_Slots = {} & {
14
+ header?: (props: typeof __VLS_13) => any;
15
+ } & {
16
+ default?: (props: typeof __VLS_15) => any;
17
+ } & {
18
+ footer?: (props: typeof __VLS_17) => any;
21
19
  };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
24
21
  close: () => any;
25
22
  "update:show": (value: boolean) => any;
26
23
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
@@ -32,9 +29,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
32
29
  disableEsc: boolean;
33
30
  showCloseButton: boolean;
34
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
35
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
32
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
+ declare const _default: typeof __VLS_export;
36
34
  export default _default;
37
- type __VLS_WithTemplateSlots<T, S> = T & {
35
+ type __VLS_WithSlots<T, S> = T & {
38
36
  new (): {
39
37
  $slots: S;
40
38
  };
@@ -2,9 +2,10 @@ type __VLS_Props = {
2
2
  currentPage: number;
3
3
  totalPages: number;
4
4
  };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
6
  "update:page": (page: number) => any;
7
7
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
8
  "onUpdate:page"?: ((page: number) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
10
11
  export default _default;
@@ -3,7 +3,8 @@ interface Props {
3
3
  label: string;
4
4
  size?: 'sm' | 'md' | 'lg';
5
5
  }
6
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
6
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
7
7
  size: "sm" | "md" | "lg";
8
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
+ declare const _default: typeof __VLS_export;
9
10
  export default _default;
@@ -8,9 +8,10 @@ type __VLS_Props = {
8
8
  modelValue: string;
9
9
  tabs: Tab[];
10
10
  };
11
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
12
  "update:modelValue": (...args: any[]) => void;
13
13
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
14
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
15
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
15
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
16
17
  export default _default;