@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/vue.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as pluginCore, d as TOOL_DEFINITION, f as TOOL_NAME } from "./plugin-
|
|
|
2
2
|
import { t as GENERATION_EVENT } from "./contract-vY0niHkh.js";
|
|
3
3
|
import { mulmoBeatSchema, mulmoScriptSchema } from "@mulmocast/types";
|
|
4
4
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineAsyncComponent, defineComponent, inject, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, reactive, ref, renderList, toDisplayString, unref, vModelText, vShow, watch, withDirectives, withModifiers } from "vue";
|
|
5
|
-
import {
|
|
5
|
+
import { createUseT, useRuntime } from "gui-chat-protocol/vue";
|
|
6
6
|
//#region src/vue/support.ts
|
|
7
7
|
function isRecord(value) {
|
|
8
8
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -184,9 +184,11 @@ var EMPTY_ADAPTER = {};
|
|
|
184
184
|
function useHostAdapter() {
|
|
185
185
|
return inject(MULMOSCRIPT_HOST_ADAPTER_KEY, EMPTY_ADAPTER);
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
/** Reactive message bundle for the active host locale. The plugin carries its
|
|
188
|
+
* own translations (no host i18n dependency); it reads the locale off the
|
|
189
|
+
* injected `BrowserPluginRuntime.locale` ref and falls back to English.
|
|
190
|
+
* Same pattern as @mulmoclaude/html-plugin. */
|
|
191
|
+
var useT = createUseT({
|
|
190
192
|
de: {
|
|
191
193
|
beatCount: (count) => count === 1 ? `${count} Beat` : `${count} Beats`,
|
|
192
194
|
movie: "Video",
|
|
@@ -443,18 +445,7 @@ var MESSAGES = {
|
|
|
443
445
|
close: "关闭",
|
|
444
446
|
cancel: "取消"
|
|
445
447
|
}
|
|
446
|
-
};
|
|
447
|
-
function isSupportedLocale(value) {
|
|
448
|
-
return Object.hasOwn(MESSAGES, value);
|
|
449
|
-
}
|
|
450
|
-
/** Reactive message bundle for the active host locale. The plugin carries its
|
|
451
|
-
* own translations (no host i18n dependency); it reads the locale off the
|
|
452
|
-
* injected `BrowserPluginRuntime.locale` ref and falls back to English.
|
|
453
|
-
* Same pattern as @mulmoclaude/html-plugin. */
|
|
454
|
-
function useT() {
|
|
455
|
-
const locale = inject(PLUGIN_RUNTIME_KEY, void 0)?.locale ?? ref("en");
|
|
456
|
-
return computed(() => isSupportedLocale(locale.value) ? MESSAGES[locale.value] : MESSAGES.en);
|
|
457
|
-
}
|
|
448
|
+
});
|
|
458
449
|
//#endregion
|
|
459
450
|
//#region src/vue/View.vue?vue&type=script&setup=true&lang.ts
|
|
460
451
|
var _hoisted_1$1 = { class: "h-full bg-white flex flex-col overflow-hidden" };
|