@novely/core 0.46.3 → 0.46.4
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/index.d.ts +4 -0
- package/dist/index.global.js +12 -2
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -652,6 +652,10 @@ type CustomHandlerFunctionParameters<L extends string, S extends State> = {
|
|
|
652
652
|
* Game language
|
|
653
653
|
*/
|
|
654
654
|
lang: L;
|
|
655
|
+
/**
|
|
656
|
+
* Function to replace template content
|
|
657
|
+
*/
|
|
658
|
+
templateReplace: (content: TextContent<L, State>, values?: State) => string;
|
|
655
659
|
};
|
|
656
660
|
type CustomHandlerFunction<L extends string, S extends State> = (parameters: CustomHandlerFunctionParameters<L, S>) => Thenable<void>;
|
|
657
661
|
type CustomHandlerCalling = {
|
package/dist/index.global.js
CHANGED
|
@@ -1094,7 +1094,15 @@ var Novely = (() => {
|
|
|
1094
1094
|
CUSTOM_ACTION_MAP.set(ctx.id + fn.key, holder);
|
|
1095
1095
|
return holder;
|
|
1096
1096
|
};
|
|
1097
|
-
var handleCustomAction = (ctx, fn, {
|
|
1097
|
+
var handleCustomAction = (ctx, fn, {
|
|
1098
|
+
lang,
|
|
1099
|
+
state,
|
|
1100
|
+
setMountElement,
|
|
1101
|
+
setClear,
|
|
1102
|
+
remove: renderersRemove,
|
|
1103
|
+
getStack: getStack2,
|
|
1104
|
+
templateReplace
|
|
1105
|
+
}) => {
|
|
1098
1106
|
const holder = getCustomActionHolder(ctx, fn);
|
|
1099
1107
|
const flags = {
|
|
1100
1108
|
...ctx.meta
|
|
@@ -1143,6 +1151,7 @@ var Novely = (() => {
|
|
|
1143
1151
|
lang,
|
|
1144
1152
|
state,
|
|
1145
1153
|
data,
|
|
1154
|
+
templateReplace,
|
|
1146
1155
|
clear,
|
|
1147
1156
|
remove,
|
|
1148
1157
|
rendererContext: ctx,
|
|
@@ -2154,7 +2163,8 @@ var Novely = (() => {
|
|
|
2154
2163
|
...ctx.custom(fn),
|
|
2155
2164
|
state,
|
|
2156
2165
|
lang,
|
|
2157
|
-
getStack: useStack
|
|
2166
|
+
getStack: useStack,
|
|
2167
|
+
templateReplace
|
|
2158
2168
|
});
|
|
2159
2169
|
const next2 = () => {
|
|
2160
2170
|
if (fn.requireUserAction && !ctx.meta.preview) {
|