@mulmoclaude/mulmoscript-plugin 0.2.3 → 1.0.0
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/lang/index.d.ts +1 -2
- package/dist/lang/index.d.ts.map +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/dist/vue.cjs +6 -15
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +7 -16
- package/dist/vue.js.map +1 -1
- package/package.json +2 -2
package/dist/lang/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type ComputedRef } from "vue";
|
|
2
1
|
import type { Messages } from "./messages";
|
|
3
2
|
/** Reactive message bundle for the active host locale. The plugin carries its
|
|
4
3
|
* own translations (no host i18n dependency); it reads the locale off the
|
|
5
4
|
* injected `BrowserPluginRuntime.locale` ref and falls back to English.
|
|
6
5
|
* Same pattern as @mulmoclaude/html-plugin. */
|
|
7
|
-
export declare
|
|
6
|
+
export declare const useT: () => import("vue").ComputedRef<Messages>;
|
|
8
7
|
export type { Messages };
|
|
9
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/lang/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lang/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lang/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAY3C;;;gDAGgD;AAChD,eAAO,MAAM,IAAI,2CAAuB,CAAC;AAEzC,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export { MULMOSCRIPT_HOST_ADAPTER_KEY, useHostAdapter, type MulmoScriptHostAdapt
|
|
|
12
12
|
export { useMulmoScriptTransport, type MulmoScriptTransport, type TransportResult } from "./transport";
|
|
13
13
|
export { View, Preview };
|
|
14
14
|
declare const _default: {
|
|
15
|
-
plugin: ToolPlugin<MulmoScriptData, MulmoScriptData, SaveMulmoScriptArgs, import("gui-chat-protocol
|
|
15
|
+
plugin: ToolPlugin<MulmoScriptData, MulmoScriptData, SaveMulmoScriptArgs, import("gui-chat-protocol").InputHandler, Record<string, unknown>>;
|
|
16
16
|
};
|
|
17
17
|
export default _default;
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/vue.cjs
CHANGED
|
@@ -188,9 +188,11 @@ var EMPTY_ADAPTER = {};
|
|
|
188
188
|
function useHostAdapter() {
|
|
189
189
|
return (0, vue.inject)(MULMOSCRIPT_HOST_ADAPTER_KEY, EMPTY_ADAPTER);
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
/** Reactive message bundle for the active host locale. The plugin carries its
|
|
192
|
+
* own translations (no host i18n dependency); it reads the locale off the
|
|
193
|
+
* injected `BrowserPluginRuntime.locale` ref and falls back to English.
|
|
194
|
+
* Same pattern as @mulmoclaude/html-plugin. */
|
|
195
|
+
var useT = (0, gui_chat_protocol_vue.createUseT)({
|
|
194
196
|
de: {
|
|
195
197
|
beatCount: (count) => count === 1 ? `${count} Beat` : `${count} Beats`,
|
|
196
198
|
movie: "Video",
|
|
@@ -447,18 +449,7 @@ var MESSAGES = {
|
|
|
447
449
|
close: "关闭",
|
|
448
450
|
cancel: "取消"
|
|
449
451
|
}
|
|
450
|
-
};
|
|
451
|
-
function isSupportedLocale(value) {
|
|
452
|
-
return Object.hasOwn(MESSAGES, value);
|
|
453
|
-
}
|
|
454
|
-
/** Reactive message bundle for the active host locale. The plugin carries its
|
|
455
|
-
* own translations (no host i18n dependency); it reads the locale off the
|
|
456
|
-
* injected `BrowserPluginRuntime.locale` ref and falls back to English.
|
|
457
|
-
* Same pattern as @mulmoclaude/html-plugin. */
|
|
458
|
-
function useT() {
|
|
459
|
-
const locale = (0, vue.inject)(gui_chat_protocol_vue.PLUGIN_RUNTIME_KEY, void 0)?.locale ?? (0, vue.ref)("en");
|
|
460
|
-
return (0, vue.computed)(() => isSupportedLocale(locale.value) ? MESSAGES[locale.value] : MESSAGES.en);
|
|
461
|
-
}
|
|
452
|
+
});
|
|
462
453
|
//#endregion
|
|
463
454
|
//#region src/vue/View.vue?vue&type=script&setup=true&lang.ts
|
|
464
455
|
var _hoisted_1$1 = { class: "h-full bg-white flex flex-col overflow-hidden" };
|