@rpgjs/client 5.0.0-alpha.2 → 5.0.0-alpha.20
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/Game/AnimationManager.d.ts +8 -0
- package/dist/Game/Map.d.ts +7 -1
- package/dist/Gui/Gui.d.ts +128 -5
- package/dist/RpgClient.d.ts +217 -59
- package/dist/RpgClientEngine.d.ts +345 -6
- package/dist/Sound.d.ts +199 -0
- package/dist/components/animations/index.d.ts +4 -0
- package/dist/components/dynamics/parse-value.d.ts +1 -0
- package/dist/components/gui/index.d.ts +3 -3
- package/dist/components/index.d.ts +3 -1
- package/dist/components/prebuilt/index.d.ts +18 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/index10.js +149 -4
- package/dist/index10.js.map +1 -1
- package/dist/index11.js +21 -7
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +6 -4
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +11 -14
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +8 -40
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +187 -180
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +104 -7
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +82 -372
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +361 -26
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +46 -20
- package/dist/index19.js.map +1 -1
- package/dist/index2.js +683 -32
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +5 -2417
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +383 -97
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +41 -104
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +21 -67
- package/dist/index23.js.map +1 -1
- package/dist/index24.js +2632 -20
- package/dist/index24.js.map +1 -1
- package/dist/index25.js +107 -34
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +69 -3
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +17 -318
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +24 -22
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +92 -8
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +68 -8
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +37 -7
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +18 -168
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +3 -499
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +332 -9
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +24 -4400
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +6 -311
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +8 -88
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +182 -56
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +500 -16
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +10 -18
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +23 -5
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +7 -0
- package/dist/index40.js.map +1 -0
- package/dist/index41.js +3690 -0
- package/dist/index41.js.map +1 -0
- package/dist/index42.js +77 -0
- package/dist/index42.js.map +1 -0
- package/dist/index43.js +6 -0
- package/dist/index43.js.map +1 -0
- package/dist/index44.js +20 -0
- package/dist/index44.js.map +1 -0
- package/dist/index45.js +146 -0
- package/dist/index45.js.map +1 -0
- package/dist/index46.js +12 -0
- package/dist/index46.js.map +1 -0
- package/dist/index47.js +113 -0
- package/dist/index47.js.map +1 -0
- package/dist/index48.js +136 -0
- package/dist/index48.js.map +1 -0
- package/dist/index49.js +137 -0
- package/dist/index49.js.map +1 -0
- package/dist/index5.js +2 -1
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +112 -0
- package/dist/index50.js.map +1 -0
- package/dist/index51.js +141 -0
- package/dist/index51.js.map +1 -0
- package/dist/index52.js +9 -0
- package/dist/index52.js.map +1 -0
- package/dist/index53.js +54 -0
- package/dist/index53.js.map +1 -0
- package/dist/index6.js +1 -1
- package/dist/index6.js.map +1 -1
- package/dist/index7.js +11 -3
- package/dist/index7.js.map +1 -1
- package/dist/index8.js +68 -7
- package/dist/index8.js.map +1 -1
- package/dist/index9.js +230 -15
- package/dist/index9.js.map +1 -1
- package/dist/presets/animation.d.ts +31 -0
- package/dist/presets/faceset.d.ts +30 -0
- package/dist/presets/index.d.ts +103 -0
- package/dist/presets/lpc.d.ts +89 -0
- package/dist/services/loadMap.d.ts +123 -2
- package/dist/services/mmorpg.d.ts +9 -4
- package/dist/services/standalone.d.ts +51 -2
- package/package.json +22 -18
- package/src/Game/{EffectManager.ts → AnimationManager.ts} +3 -2
- package/src/Game/Map.ts +20 -2
- package/src/Game/Object.ts +163 -9
- package/src/Gui/Gui.ts +300 -17
- package/src/RpgClient.ts +222 -58
- package/src/RpgClientEngine.ts +804 -36
- package/src/Sound.ts +253 -0
- package/src/components/{effects → animations}/animation.ce +3 -6
- package/src/components/{effects → animations}/index.ts +1 -1
- package/src/components/character.ce +165 -37
- package/src/components/dynamics/parse-value.ts +80 -0
- package/src/components/dynamics/text.ce +183 -0
- package/src/components/gui/box.ce +17 -0
- package/src/components/gui/dialogbox/index.ce +73 -35
- package/src/components/gui/dialogbox/selection.ce +16 -1
- package/src/components/gui/index.ts +3 -4
- package/src/components/index.ts +5 -1
- package/src/components/prebuilt/hp-bar.ce +255 -0
- package/src/components/prebuilt/index.ts +21 -0
- package/src/components/scenes/draw-map.ce +6 -23
- package/src/components/scenes/event-layer.ce +9 -3
- package/src/core/setup.ts +2 -0
- package/src/index.ts +5 -2
- package/src/module.ts +72 -6
- package/src/presets/animation.ts +46 -0
- package/src/presets/faceset.ts +60 -0
- package/src/presets/index.ts +7 -1
- package/src/presets/lpc.ts +108 -0
- package/src/services/loadMap.ts +132 -3
- package/src/services/mmorpg.ts +27 -5
- package/src/services/standalone.ts +68 -6
- package/tsconfig.json +1 -1
- package/vite.config.ts +1 -1
- package/dist/Game/EffectManager.d.ts +0 -5
- package/dist/components/effects/index.d.ts +0 -4
- package/src/components/scenes/element-map.ce +0 -23
- /package/src/components/{effects → animations}/hit.ce +0 -0
package/dist/index49.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { util } from './index48.js';
|
|
2
|
+
|
|
3
|
+
const ZodIssueCode = util.arrayToEnum([
|
|
4
|
+
"invalid_type",
|
|
5
|
+
"invalid_literal",
|
|
6
|
+
"custom",
|
|
7
|
+
"invalid_union",
|
|
8
|
+
"invalid_union_discriminator",
|
|
9
|
+
"invalid_enum_value",
|
|
10
|
+
"unrecognized_keys",
|
|
11
|
+
"invalid_arguments",
|
|
12
|
+
"invalid_return_type",
|
|
13
|
+
"invalid_date",
|
|
14
|
+
"invalid_string",
|
|
15
|
+
"too_small",
|
|
16
|
+
"too_big",
|
|
17
|
+
"invalid_intersection_types",
|
|
18
|
+
"not_multiple_of",
|
|
19
|
+
"not_finite",
|
|
20
|
+
]);
|
|
21
|
+
const quotelessJson = (obj) => {
|
|
22
|
+
const json = JSON.stringify(obj, null, 2);
|
|
23
|
+
return json.replace(/"([^"]+)":/g, "$1:");
|
|
24
|
+
};
|
|
25
|
+
class ZodError extends Error {
|
|
26
|
+
get errors() {
|
|
27
|
+
return this.issues;
|
|
28
|
+
}
|
|
29
|
+
constructor(issues) {
|
|
30
|
+
super();
|
|
31
|
+
this.issues = [];
|
|
32
|
+
this.addIssue = (sub) => {
|
|
33
|
+
this.issues = [...this.issues, sub];
|
|
34
|
+
};
|
|
35
|
+
this.addIssues = (subs = []) => {
|
|
36
|
+
this.issues = [...this.issues, ...subs];
|
|
37
|
+
};
|
|
38
|
+
const actualProto = new.target.prototype;
|
|
39
|
+
if (Object.setPrototypeOf) {
|
|
40
|
+
// eslint-disable-next-line ban/ban
|
|
41
|
+
Object.setPrototypeOf(this, actualProto);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.__proto__ = actualProto;
|
|
45
|
+
}
|
|
46
|
+
this.name = "ZodError";
|
|
47
|
+
this.issues = issues;
|
|
48
|
+
}
|
|
49
|
+
format(_mapper) {
|
|
50
|
+
const mapper = _mapper ||
|
|
51
|
+
function (issue) {
|
|
52
|
+
return issue.message;
|
|
53
|
+
};
|
|
54
|
+
const fieldErrors = { _errors: [] };
|
|
55
|
+
const processError = (error) => {
|
|
56
|
+
for (const issue of error.issues) {
|
|
57
|
+
if (issue.code === "invalid_union") {
|
|
58
|
+
issue.unionErrors.map(processError);
|
|
59
|
+
}
|
|
60
|
+
else if (issue.code === "invalid_return_type") {
|
|
61
|
+
processError(issue.returnTypeError);
|
|
62
|
+
}
|
|
63
|
+
else if (issue.code === "invalid_arguments") {
|
|
64
|
+
processError(issue.argumentsError);
|
|
65
|
+
}
|
|
66
|
+
else if (issue.path.length === 0) {
|
|
67
|
+
fieldErrors._errors.push(mapper(issue));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
let curr = fieldErrors;
|
|
71
|
+
let i = 0;
|
|
72
|
+
while (i < issue.path.length) {
|
|
73
|
+
const el = issue.path[i];
|
|
74
|
+
const terminal = i === issue.path.length - 1;
|
|
75
|
+
if (!terminal) {
|
|
76
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
77
|
+
// if (typeof el === "string") {
|
|
78
|
+
// curr[el] = curr[el] || { _errors: [] };
|
|
79
|
+
// } else if (typeof el === "number") {
|
|
80
|
+
// const errorArray: any = [];
|
|
81
|
+
// errorArray._errors = [];
|
|
82
|
+
// curr[el] = curr[el] || errorArray;
|
|
83
|
+
// }
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
87
|
+
curr[el]._errors.push(mapper(issue));
|
|
88
|
+
}
|
|
89
|
+
curr = curr[el];
|
|
90
|
+
i++;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
processError(this);
|
|
96
|
+
return fieldErrors;
|
|
97
|
+
}
|
|
98
|
+
static assert(value) {
|
|
99
|
+
if (!(value instanceof ZodError)) {
|
|
100
|
+
throw new Error(`Not a ZodError: ${value}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
toString() {
|
|
104
|
+
return this.message;
|
|
105
|
+
}
|
|
106
|
+
get message() {
|
|
107
|
+
return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
|
|
108
|
+
}
|
|
109
|
+
get isEmpty() {
|
|
110
|
+
return this.issues.length === 0;
|
|
111
|
+
}
|
|
112
|
+
flatten(mapper = (issue) => issue.message) {
|
|
113
|
+
const fieldErrors = {};
|
|
114
|
+
const formErrors = [];
|
|
115
|
+
for (const sub of this.issues) {
|
|
116
|
+
if (sub.path.length > 0) {
|
|
117
|
+
const firstEl = sub.path[0];
|
|
118
|
+
fieldErrors[firstEl] = fieldErrors[firstEl] || [];
|
|
119
|
+
fieldErrors[firstEl].push(mapper(sub));
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
formErrors.push(mapper(sub));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return { formErrors, fieldErrors };
|
|
126
|
+
}
|
|
127
|
+
get formErrors() {
|
|
128
|
+
return this.flatten();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
ZodError.create = (issues) => {
|
|
132
|
+
const error = new ZodError(issues);
|
|
133
|
+
return error;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { ZodError, ZodIssueCode, quotelessJson };
|
|
137
|
+
//# sourceMappingURL=index49.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index49.js","sources":["../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js"],"sourcesContent":["import { util } from \"./helpers/util.js\";\nexport const ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nexport const quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexport class ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n const firstEl = sub.path[0];\n fieldErrors[firstEl] = fieldErrors[firstEl] || [];\n fieldErrors[firstEl].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n"],"names":[],"mappings":";;AACY,MAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC;AAC7C,IAAI,cAAc;AAClB,IAAI,iBAAiB;AACrB,IAAI,QAAQ;AACZ,IAAI,eAAe;AACnB,IAAI,6BAA6B;AACjC,IAAI,oBAAoB;AACxB,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,cAAc;AAClB,IAAI,gBAAgB;AACpB,IAAI,WAAW;AACf,IAAI,SAAS;AACb,IAAI,4BAA4B;AAChC,IAAI,iBAAiB;AACrB,IAAI,YAAY;AAChB,CAAC;AACW,MAAC,aAAa,GAAG,CAAC,GAAG,KAAK;AACtC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7C,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC;AAC7C;AACO,MAAM,QAAQ,SAAS,KAAK,CAAC;AACpC,IAAI,IAAI,MAAM,GAAG;AACjB,QAAQ,OAAO,IAAI,CAAC,MAAM;AAC1B,IAAI;AACJ,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,EAAE;AACf,QAAQ,IAAI,CAAC,MAAM,GAAG,EAAE;AACxB,QAAQ,IAAI,CAA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AE,UAAU,EAAE,WAAW,EAAE;AAC1C,IAAI;AACJ,IAAI,IAAI,UAAU,GAAG;AACrB,QAAQ,OAAO,IAAI,CAAC,OAAO,EAAE;AAC7B,IAAI;AACJ;AACA,QAAQ,CAAC,MAAM,GAAG,CAAC,MAAM,KAAK;AAC9B,IAAI,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC;AACtC,IAAI,OAAO,KAAK;AAChB,CAAC;;;;","x_google_ignoreList":[0]}
|
package/dist/index5.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { injector, inject
|
|
1
|
+
import { Context, injector, inject } from './index18.js';
|
|
2
2
|
import { RpgClientEngine } from './index2.js';
|
|
3
3
|
import { setInject } from './index6.js';
|
|
4
4
|
|
|
5
5
|
async function startGame(options) {
|
|
6
6
|
const context = new Context();
|
|
7
|
+
context["side"] = "client";
|
|
7
8
|
setInject(context);
|
|
8
9
|
await injector(context, options.providers);
|
|
9
10
|
const engine = inject(context, RpgClientEngine);
|
package/dist/index5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":["../src/core/setup.ts"],"sourcesContent":["import { Context, FactoryProvider, findProvider, findProviders, inject, injector, Providers } from \"@signe/di\";\nimport { RpgClientEngine } from \"../RpgClientEngine\";\nimport { setInject } from \"./inject\";\n\ninterface SetupOptions {\n providers: Providers;\n}\n\nexport async function startGame(options: SetupOptions) {\n const context = new Context();\n setInject(context);\n\n await injector(context, options.providers);\n\n const engine = inject(context, RpgClientEngine);\n await engine.start();\n return context;\n}"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index5.js","sources":["../src/core/setup.ts"],"sourcesContent":["import { Context, FactoryProvider, findProvider, findProviders, inject, injector, Providers } from \"@signe/di\";\nimport { RpgClientEngine } from \"../RpgClientEngine\";\nimport { setInject } from \"./inject\";\n\ninterface SetupOptions {\n providers: Providers;\n}\n\n\nexport async function startGame(options: SetupOptions) {\n const context = new Context();\n context['side'] = 'client'\n setInject(context);\n\n await injector(context, options.providers);\n\n const engine = inject(context, RpgClientEngine);\n await engine.start();\n return context;\n}"],"names":[],"mappings":";;;;AASA,eAAsB,UAAU,OAAA,EAAuB;AACrD,EAAA,MAAM,OAAA,GAAU,IAAI,OAAA,EAAQ;AAC5B,EAAA,OAAA,CAAQ,MAAM,CAAA,GAAI,QAAA;AAClB,EAAA,SAAA,CAAU,OAAO,CAAA;AAEjB,EAAA,MAAM,QAAA,CAAS,OAAA,EAAS,OAAA,CAAQ,SAAS,CAAA;AAEzC,EAAA,MAAM,MAAA,GAAS,MAAA,CAAO,OAAA,EAAS,eAAe,CAAA;AAC9C,EAAA,MAAM,OAAO,KAAA,EAAM;AACnB,EAAA,OAAO,OAAA;AACT;;;;"}
|
package/dist/index50.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { ZodIssueCode } from './index49.js';
|
|
2
|
+
import { util, ZodParsedType } from './index48.js';
|
|
3
|
+
|
|
4
|
+
const errorMap = (issue, _ctx) => {
|
|
5
|
+
let message;
|
|
6
|
+
switch (issue.code) {
|
|
7
|
+
case ZodIssueCode.invalid_type:
|
|
8
|
+
if (issue.received === ZodParsedType.undefined) {
|
|
9
|
+
message = "Required";
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
message = `Expected ${issue.expected}, received ${issue.received}`;
|
|
13
|
+
}
|
|
14
|
+
break;
|
|
15
|
+
case ZodIssueCode.invalid_literal:
|
|
16
|
+
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
|
|
17
|
+
break;
|
|
18
|
+
case ZodIssueCode.unrecognized_keys:
|
|
19
|
+
message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
|
|
20
|
+
break;
|
|
21
|
+
case ZodIssueCode.invalid_union:
|
|
22
|
+
message = `Invalid input`;
|
|
23
|
+
break;
|
|
24
|
+
case ZodIssueCode.invalid_union_discriminator:
|
|
25
|
+
message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
|
|
26
|
+
break;
|
|
27
|
+
case ZodIssueCode.invalid_enum_value:
|
|
28
|
+
message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
|
|
29
|
+
break;
|
|
30
|
+
case ZodIssueCode.invalid_arguments:
|
|
31
|
+
message = `Invalid function arguments`;
|
|
32
|
+
break;
|
|
33
|
+
case ZodIssueCode.invalid_return_type:
|
|
34
|
+
message = `Invalid function return type`;
|
|
35
|
+
break;
|
|
36
|
+
case ZodIssueCode.invalid_date:
|
|
37
|
+
message = `Invalid date`;
|
|
38
|
+
break;
|
|
39
|
+
case ZodIssueCode.invalid_string:
|
|
40
|
+
if (typeof issue.validation === "object") {
|
|
41
|
+
if ("includes" in issue.validation) {
|
|
42
|
+
message = `Invalid input: must include "${issue.validation.includes}"`;
|
|
43
|
+
if (typeof issue.validation.position === "number") {
|
|
44
|
+
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if ("startsWith" in issue.validation) {
|
|
48
|
+
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
49
|
+
}
|
|
50
|
+
else if ("endsWith" in issue.validation) {
|
|
51
|
+
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
util.assertNever(issue.validation);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if (issue.validation !== "regex") {
|
|
58
|
+
message = `Invalid ${issue.validation}`;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
message = "Invalid";
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case ZodIssueCode.too_small:
|
|
65
|
+
if (issue.type === "array")
|
|
66
|
+
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
67
|
+
else if (issue.type === "string")
|
|
68
|
+
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
69
|
+
else if (issue.type === "number")
|
|
70
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
71
|
+
else if (issue.type === "bigint")
|
|
72
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
73
|
+
else if (issue.type === "date")
|
|
74
|
+
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
75
|
+
else
|
|
76
|
+
message = "Invalid input";
|
|
77
|
+
break;
|
|
78
|
+
case ZodIssueCode.too_big:
|
|
79
|
+
if (issue.type === "array")
|
|
80
|
+
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
81
|
+
else if (issue.type === "string")
|
|
82
|
+
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
83
|
+
else if (issue.type === "number")
|
|
84
|
+
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
|
85
|
+
else if (issue.type === "bigint")
|
|
86
|
+
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
|
87
|
+
else if (issue.type === "date")
|
|
88
|
+
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
|
|
89
|
+
else
|
|
90
|
+
message = "Invalid input";
|
|
91
|
+
break;
|
|
92
|
+
case ZodIssueCode.custom:
|
|
93
|
+
message = `Invalid input`;
|
|
94
|
+
break;
|
|
95
|
+
case ZodIssueCode.invalid_intersection_types:
|
|
96
|
+
message = `Intersection results could not be merged`;
|
|
97
|
+
break;
|
|
98
|
+
case ZodIssueCode.not_multiple_of:
|
|
99
|
+
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
100
|
+
break;
|
|
101
|
+
case ZodIssueCode.not_finite:
|
|
102
|
+
message = "Number must be finite";
|
|
103
|
+
break;
|
|
104
|
+
default:
|
|
105
|
+
message = _ctx.defaultError;
|
|
106
|
+
util.assertNever(issue);
|
|
107
|
+
}
|
|
108
|
+
return { message };
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export { errorMap as default };
|
|
112
|
+
//# sourceMappingURL=index50.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index50.js","sources":["../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js"],"sourcesContent":["import { ZodIssueCode } from \"../ZodError.js\";\nimport { util, ZodParsedType } from \"../helpers/util.js\";\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"bigint\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\nexport default errorMap;\n"],"names":[],"mappings":";;;AAEK,MAAC,QAAQ,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AAClC,IAAI,IAAI,OAAO;AACf,IAAI,QAAQ,KAAK,CAAC,IAAI;AACtB,QAAQ,KAAK,YAAY,CAAC,YAAY;AACtC,YAAY,IAAI,KAAK,CAAC,QAAQ,KAAK,aAAa,CAAC,SAAS,EAAE;AAC5D,gBAAgB,OAAO,GAAG,UAAU;AACpC,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,OAAO,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClF,YAAY;AACZ,YAAY;AACZ,QAAQ,KAAK,YAAY,CAAC,eAAe;AACzC,YAAY,OAAO,GAAG,CAAC,gCAAgC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;AACrH,YAAY;AACZ,QAAQ,KAAK,YAAY,CAAC,iBAAiB;AAC3C,YAAY,OAAO,GAAG,CAAC,+BAA+B,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,C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AAY;AACZ,QAAQ,KAAK,YAAY,CAAC,eAAe;AACzC,YAAY,OAAO,GAAG,CAAC,6BAA6B,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;AACxE,YAAY;AACZ,QAAQ,KAAK,YAAY,CAAC,UAAU;AACpC,YAAY,OAAO,GAAG,uBAAuB;AAC7C,YAAY;AACZ,QAAQ;AACR,YAAY,OAAO,GAAG,IAAI,CAAC,YAAY;AACvC,YAAY,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACnC;AACA,IAAI,OAAO,EAAE,OAAO,EAAE;AACtB;;;;","x_google_ignoreList":[0]}
|
package/dist/index51.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { useProps, useDefineProps, h, Text, computed } from 'canvasengine';
|
|
2
|
+
import { parseDynamicValue } from './index53.js';
|
|
3
|
+
|
|
4
|
+
function component($$props) {
|
|
5
|
+
useProps($$props);
|
|
6
|
+
const defineProps = useDefineProps($$props);
|
|
7
|
+
var __assign = (this && this.__assign) || function () {
|
|
8
|
+
__assign = Object.assign || function(t) {
|
|
9
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10
|
+
s = arguments[i];
|
|
11
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
12
|
+
t[p] = s[p];
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
};
|
|
16
|
+
return __assign.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
var object = defineProps().object;
|
|
19
|
+
var component = object._component;
|
|
20
|
+
var parseNumericStyleValue = function (value, object) {
|
|
21
|
+
if (value === undefined || value === null) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
if (typeof value === 'number') {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
if (typeof value === 'string') {
|
|
28
|
+
// Check if it contains dynamic references
|
|
29
|
+
if (value.includes('{')) {
|
|
30
|
+
// Parse dynamic value and convert to number
|
|
31
|
+
var parsed_1 = parseDynamicValue(value, object);
|
|
32
|
+
return computed(function () {
|
|
33
|
+
var str = parsed_1();
|
|
34
|
+
var num = parseFloat(str);
|
|
35
|
+
return isNaN(num) ? 0 : num;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// Simple string number, convert directly
|
|
40
|
+
var num = parseFloat(value);
|
|
41
|
+
return isNaN(num) ? undefined : num;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return value;
|
|
45
|
+
};
|
|
46
|
+
var getComponentStyle = function (component) {
|
|
47
|
+
if (!component.style) {
|
|
48
|
+
return {};
|
|
49
|
+
}
|
|
50
|
+
var style = component.style;
|
|
51
|
+
var result = {};
|
|
52
|
+
// Map fill to color (shortcut property)
|
|
53
|
+
// fill can be a string (hex color) or a dynamic string
|
|
54
|
+
if (style.fill !== undefined) {
|
|
55
|
+
if (typeof style.fill === 'string' && style.fill.includes('{')) {
|
|
56
|
+
result.color = parseDynamicValue(style.fill, object);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
result.color = style.fill;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Map fontSize to size (shortcut property)
|
|
63
|
+
// fontSize can be number or string (with dynamic references)
|
|
64
|
+
if (style.fontSize !== undefined) {
|
|
65
|
+
var fontSizeValue = parseNumericStyleValue(style.fontSize, object);
|
|
66
|
+
if (fontSizeValue !== undefined) {
|
|
67
|
+
result.size = fontSizeValue;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// Map fontFamily (shortcut property)
|
|
71
|
+
if (style.fontFamily !== undefined) {
|
|
72
|
+
if (typeof style.fontFamily === 'string' && style.fontFamily.includes('{')) {
|
|
73
|
+
result.fontFamily = parseDynamicValue(style.fontFamily, object);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
result.fontFamily = style.fontFamily;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Build style object for PixiJS Text properties
|
|
80
|
+
var textStyle = {};
|
|
81
|
+
// Font style properties
|
|
82
|
+
if (style.fontStyle !== undefined) {
|
|
83
|
+
if (typeof style.fontStyle === 'string' && style.fontStyle.includes('{')) {
|
|
84
|
+
textStyle.fontStyle = parseDynamicValue(style.fontStyle, object);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
textStyle.fontStyle = style.fontStyle;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (style.fontWeight !== undefined) {
|
|
91
|
+
if (typeof style.fontWeight === 'string' && style.fontWeight.includes('{')) {
|
|
92
|
+
textStyle.fontWeight = parseDynamicValue(style.fontWeight, object);
|
|
93
|
+
}
|
|
94
|
+
else if (typeof style.fontWeight === 'number') {
|
|
95
|
+
textStyle.fontWeight = style.fontWeight;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
textStyle.fontWeight = style.fontWeight;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Stroke properties
|
|
102
|
+
if (style.stroke !== undefined) {
|
|
103
|
+
if (typeof style.stroke === 'string' && style.stroke.includes('{')) {
|
|
104
|
+
textStyle.stroke = parseDynamicValue(style.stroke, object);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
textStyle.stroke = style.stroke;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// Opacity (can be number or string)
|
|
111
|
+
if (style.opacity !== undefined) {
|
|
112
|
+
var opacityValue = parseNumericStyleValue(style.opacity, object);
|
|
113
|
+
if (opacityValue !== undefined) {
|
|
114
|
+
textStyle.opacity = opacityValue;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// Word wrap
|
|
118
|
+
if (style.wordWrap !== undefined) {
|
|
119
|
+
textStyle.wordWrap = style.wordWrap;
|
|
120
|
+
}
|
|
121
|
+
// Text alignment
|
|
122
|
+
if (style.align !== undefined) {
|
|
123
|
+
if (typeof style.align === 'string' && style.align.includes('{')) {
|
|
124
|
+
textStyle.align = parseDynamicValue(style.align, object);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
textStyle.align = style.align;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Only add style prop if there are style properties
|
|
131
|
+
if (Object.keys(textStyle).length > 0) {
|
|
132
|
+
result.style = textStyle;
|
|
133
|
+
}
|
|
134
|
+
return result;
|
|
135
|
+
};
|
|
136
|
+
let $this = h(Text, { text: parseDynamicValue(component.value, object), ...getComponentStyle(component) });
|
|
137
|
+
return $this
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export { component as default };
|
|
141
|
+
//# sourceMappingURL=index51.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index51.js","sources":["../src/components/dynamics/text.ce"],"sourcesContent":["<Text text={@parseDynamicValue(@component.@value, @object)} ...getComponentStyle(component) />\n\n<script>\nimport { computed } from \"canvasengine\";\nimport { parseDynamicValue } from \"./parse-value\";\n\nconst { object } = defineProps();\nconst component = object._component;\n\n/**\n * Parses a numeric style value that can be a number or a string\n * \n * If the value is a string, it may contain dynamic references like {hp}\n * which need to be parsed using parseDynamicValue. If it's a number,\n * it's returned as-is wrapped in a computed.\n * \n * @param value - Numeric value (number or string)\n * @param object - Object to resolve dynamic references from\n * @returns Computed signal with the numeric value\n */\nconst parseNumericStyleValue = (value, object) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n \n if (typeof value === 'number') {\n return value;\n }\n \n if (typeof value === 'string') {\n // Check if it contains dynamic references\n if (value.includes('{')) {\n // Parse dynamic value and convert to number\n const parsed = parseDynamicValue(value, object);\n return computed(() => {\n const str = parsed();\n const num = parseFloat(str);\n return isNaN(num) ? 0 : num;\n });\n } else {\n // Simple string number, convert directly\n const num = parseFloat(value);\n return isNaN(num) ? undefined : num;\n }\n }\n \n return value;\n};\n\n/**\n * Maps component style properties to Canvas Engine Text component props\n * \n * Converts TextComponentOptions from the server to the format expected\n * by the Canvas Engine Text component. Supports all text styling properties\n * including fill, fontSize, fontFamily, fontStyle, fontWeight, stroke,\n * opacity, wordWrap, and align. Also supports dynamic values (number | string)\n * for numeric properties like fontSize and opacity.\n * \n * @param component - Component definition with style property\n * @returns Object with Text component props\n * \n * @example\n * ```ts\n * // Component with style\n * const component = {\n * style: {\n * fill: '#000000',\n * fontSize: 20,\n * fontFamily: 'Arial',\n * fontWeight: 'bold'\n * }\n * };\n * \n * const props = getComponentStyle(component);\n * // Returns: { color: '#000000', size: 20, fontFamily: 'Arial', style: { fontWeight: 'bold' } }\n * \n * // Component with dynamic fontSize\n * const component2 = {\n * style: {\n * fill: '#000000',\n * fontSize: '{hp}', // Will be resolved from object.hp\n * opacity: '0.8'\n * }\n * };\n * ```\n */\nconst getComponentStyle = (component) => {\n if (!component.style) {\n return {};\n }\n\n const style = component.style;\n const result = {};\n\n // Map fill to color (shortcut property)\n // fill can be a string (hex color) or a dynamic string\n if (style.fill !== undefined) {\n if (typeof style.fill === 'string' && style.fill.includes('{')) {\n result.color = parseDynamicValue(style.fill, object);\n } else {\n result.color = style.fill;\n }\n }\n\n // Map fontSize to size (shortcut property)\n // fontSize can be number or string (with dynamic references)\n if (style.fontSize !== undefined) {\n const fontSizeValue = parseNumericStyleValue(style.fontSize, object);\n if (fontSizeValue !== undefined) {\n result.size = fontSizeValue;\n }\n }\n\n // Map fontFamily (shortcut property)\n if (style.fontFamily !== undefined) {\n if (typeof style.fontFamily === 'string' && style.fontFamily.includes('{')) {\n result.fontFamily = parseDynamicValue(style.fontFamily, object);\n } else {\n result.fontFamily = style.fontFamily;\n }\n }\n\n // Build style object for PixiJS Text properties\n const textStyle = {};\n\n // Font style properties\n if (style.fontStyle !== undefined) {\n if (typeof style.fontStyle === 'string' && style.fontStyle.includes('{')) {\n textStyle.fontStyle = parseDynamicValue(style.fontStyle, object);\n } else {\n textStyle.fontStyle = style.fontStyle;\n }\n }\n\n if (style.fontWeight !== undefined) {\n if (typeof style.fontWeight === 'string' && style.fontWeight.includes('{')) {\n textStyle.fontWeight = parseDynamicValue(style.fontWeight, object);\n } else if (typeof style.fontWeight === 'number') {\n textStyle.fontWeight = style.fontWeight;\n } else {\n textStyle.fontWeight = style.fontWeight;\n }\n }\n\n // Stroke properties\n if (style.stroke !== undefined) {\n if (typeof style.stroke === 'string' && style.stroke.includes('{')) {\n textStyle.stroke = parseDynamicValue(style.stroke, object);\n } else {\n textStyle.stroke = style.stroke;\n }\n }\n\n // Opacity (can be number or string)\n if (style.opacity !== undefined) {\n const opacityValue = parseNumericStyleValue(style.opacity, object);\n if (opacityValue !== undefined) {\n textStyle.opacity = opacityValue;\n }\n }\n\n // Word wrap\n if (style.wordWrap !== undefined) {\n textStyle.wordWrap = style.wordWrap;\n }\n\n // Text alignment\n if (style.align !== undefined) {\n if (typeof style.align === 'string' && style.align.includes('{')) {\n textStyle.align = parseDynamicValue(style.align, object);\n } else {\n textStyle.align = style.align;\n }\n }\n\n // Only add style prop if there are style properties\n if (Object.keys(textStyle).length > 0) {\n result.style = textStyle;\n }\n\n return result;\n}\n</script>"],"names":[],"mappings":";;;AAOqB,SAAS,SAAS,CAAC,OAAO,EAAE;AACjD,QAAuB,QAAQ,CAAC,OAAO;AACvC,QAAQ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAClD,QAAQ,IAAI,QAAQ,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,YAAY;AAC9D,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE;AAC5C,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;AAC5B,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAA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
4
|
+
// biome-ignore lint:
|
|
5
|
+
errorUtil.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
6
|
+
})(errorUtil || (errorUtil = {}));
|
|
7
|
+
|
|
8
|
+
export { errorUtil };
|
|
9
|
+
//# sourceMappingURL=index52.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index52.js","sources":["../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js"],"sourcesContent":["export var errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n // biome-ignore lint:\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message?.message;\n})(errorUtil || (errorUtil = {}));\n"],"names":[],"mappings":"AAAU,IAAC;AACX,CAAC,UAAU,SAAS,EAAE;AACtB,IAAI,SAAS,CAAC,QAAQ,GAAG,CAAC,OAAO,KAAK,OAAO,OAAO,KAAK,QAAQ,GAAG,EAAE,OAAO,EAAE,GAAG,OAAO,IAAI,EAAE;AAC/F;AACA,IAAI,SAAS,CAAC,QAAQ,GAAG,CAAC,OAAO,KAAK,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,OAAO,EAAE,OAAO;AAC9F,CAAC,EAAE,SAAS,KAAK,SAAS,GAAG,EAAE,CAAC,CAAC;;;;","x_google_ignoreList":[0]}
|
package/dist/index53.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed } from 'canvasengine';
|
|
2
|
+
|
|
3
|
+
const parseDynamicValue = (value, object) => {
|
|
4
|
+
if (typeof value !== "string") {
|
|
5
|
+
return computed(() => String(value ?? ""));
|
|
6
|
+
}
|
|
7
|
+
const pattern = /\{([^}]+)\}/g;
|
|
8
|
+
const matches = [];
|
|
9
|
+
let match;
|
|
10
|
+
while ((match = pattern.exec(value)) !== null) {
|
|
11
|
+
matches.push({
|
|
12
|
+
property: match[1],
|
|
13
|
+
fullMatch: match[0],
|
|
14
|
+
index: match.index
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (matches.length === 0) {
|
|
18
|
+
return computed(() => value);
|
|
19
|
+
}
|
|
20
|
+
return computed(() => {
|
|
21
|
+
let result = value;
|
|
22
|
+
for (let i = matches.length - 1; i >= 0; i--) {
|
|
23
|
+
const { property, fullMatch } = matches[i];
|
|
24
|
+
let propertyValue = "";
|
|
25
|
+
try {
|
|
26
|
+
const propertyPath = property.split(".");
|
|
27
|
+
let currentValue = object;
|
|
28
|
+
for (let j = 0; j < propertyPath.length; j++) {
|
|
29
|
+
const prop = propertyPath[j];
|
|
30
|
+
if (typeof currentValue === "function") {
|
|
31
|
+
currentValue = currentValue();
|
|
32
|
+
}
|
|
33
|
+
if (currentValue && typeof currentValue === "object" && prop in currentValue) {
|
|
34
|
+
currentValue = currentValue[prop];
|
|
35
|
+
} else {
|
|
36
|
+
currentValue = void 0;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (typeof currentValue === "function") {
|
|
41
|
+
currentValue = currentValue();
|
|
42
|
+
}
|
|
43
|
+
propertyValue = currentValue != null ? String(currentValue) : "";
|
|
44
|
+
} catch (error) {
|
|
45
|
+
propertyValue = "";
|
|
46
|
+
}
|
|
47
|
+
result = result.replace(fullMatch, propertyValue);
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { parseDynamicValue };
|
|
54
|
+
//# sourceMappingURL=index53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index53.js","sources":["../src/components/dynamics/parse-value.ts"],"sourcesContent":["import { computed } from \"canvasengine\";\n\ninterface MatchResult {\n property: string;\n fullMatch: string;\n index: number;\n}\n\nexport const parseDynamicValue = (value: any, object?: any) => {\n if (typeof value !== 'string') {\n return computed(() => String(value ?? ''));\n }\n\n // Find all dynamic references like {propertyName}\n const pattern = /\\{([^}]+)\\}/g;\n const matches: MatchResult[] = [];\n let match;\n \n while ((match = pattern.exec(value)) !== null) {\n matches.push({\n property: match[1],\n fullMatch: match[0],\n index: match.index!\n });\n }\n\n // If no dynamic references found, return simple computed\n if (matches.length === 0) {\n return computed(() => value);\n }\n\n // Create computed that tracks all referenced signals\n return computed(() => {\n let result = value;\n \n // Replace from end to start to preserve indices\n for (let i = matches.length - 1; i >= 0; i--) {\n const { property, fullMatch } = matches[i];\n \n // Try to access the property from the object\n // Support nested properties like {param.maxHp}\n let propertyValue = '';\n try {\n const propertyPath = property.split('.');\n let currentValue = object;\n \n for (let j = 0; j < propertyPath.length; j++) {\n const prop = propertyPath[j];\n \n // Check if currentValue is a signal (function) and call it\n if (typeof currentValue === 'function') {\n currentValue = currentValue();\n }\n \n // Access the property\n if (currentValue && typeof currentValue === 'object' && prop in currentValue) {\n currentValue = currentValue[prop];\n } else {\n currentValue = undefined;\n break;\n }\n }\n \n // If the final value is a signal, call it\n if (typeof currentValue === 'function') {\n currentValue = currentValue();\n }\n \n propertyValue = currentValue != null ? String(currentValue) : '';\n } catch (error) {\n // If property doesn't exist or can't be accessed, use empty string\n propertyValue = '';\n }\n \n result = result.replace(fullMatch, propertyValue);\n }\n \n return result;\n });\n};\n"],"names":[],"mappings":";;AAQO,MAAM,iBAAA,GAAoB,CAAC,KAAA,EAAY,MAAA,KAAiB;AAC3D,EAAA,IAAI,OAAO,UAAU,QAAA,EAAU;AAC3B,IAAA,OAAO,QAAA,CAAS,MAAM,MAAA,CAAO,KAAA,IAAS,EAAE,CAAC,CAAA;AAAA,EAC7C;AAGA,EAAA,MAAM,OAAA,GAAU,cAAA;AAChB,EAAA,MAAM,UAAyB,EAAC;AAChC,EAAA,IAAI,KAAA;AAEJ,EAAA,OAAA,CAAQ,KAAA,GAAQ,OAAA,CAAQ,IAAA,CAAK,KAAK,OAAO,IAAA,EAAM;AAC3C,IAAA,OAAA,CAAQ,IAAA,CAAK;AAAA,MACT,QAAA,EAAU,MAAM,CAAC,CAAA;AAAA,MAC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,GAAI,EAAA;AAAA,MAClE,SAAS,KAAA,EAAO;AAEZ,QAAA,aAAA,GAAgB,EAAA;AAAA,MACpB;AAEA,MAAA,MAAA,GAAS,MAAA,CAAO,OAAA,CAAQ,SAAA,EAAW,aAAa,CAAA;AAAA,IACpD;AAEA,IAAA,OAAO,MAAA;AAAA,EACX,CAAC,CAAA;AACL;;;;"}
|
package/dist/index6.js
CHANGED
package/dist/index6.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index6.js","sources":["../src/core/inject.ts"],"sourcesContent":["import { Context, inject as injector } from \"@signe/di\";\n\nexport let context: Context | null = null\n\nexport function inject<T>(service: (new (...args: any[]) => T) | string, _context?: Context): T {\n const c = _context ?? context\n if (!c) throw new Error(\"Context is not set. use setInject() to set the context\");\n return injector(c, service);\n}\n\nexport function setInject(_context: Context) {\n context = _context;\n}\n\nexport function clearInject() {\n context = null\n}"],"names":["injector"],"mappings":";;AAEO,IAAI,
|
|
1
|
+
{"version":3,"file":"index6.js","sources":["../src/core/inject.ts"],"sourcesContent":["import { Context, inject as injector } from \"@signe/di\";\n\nexport let context: Context | null = null\n\nexport function inject<T>(service: (new (...args: any[]) => T) | string, _context?: Context): T {\n const c = _context ?? context\n if (!c) throw new Error(\"Context is not set. use setInject() to set the context\");\n return injector(c, service);\n}\n\nexport function setInject(_context: Context) {\n context = _context;\n}\n\nexport function clearInject() {\n context = null\n}"],"names":["injector"],"mappings":";;AAEO,IAAI,OAAA,GAA0B;AAE9B,SAAS,MAAA,CAAU,SAA+C,QAAA,EAAuB;AAC5F,EAAA,MAAM,IAAI,QAAA,IAAY,OAAA;AACtB,EAAA,IAAI,CAAC,CAAA,EAAG,MAAM,IAAI,MAAM,wDAAwD,CAAA;AAChF,EAAA,OAAOA,QAAA,CAAS,GAAG,OAAO,CAAA;AAC9B;AAEO,SAAS,UAAU,QAAA,EAAmB;AACzC,EAAA,OAAA,GAAU,QAAA;AACd;AAEO,SAAS,WAAA,GAAc;AAC1B,EAAA,OAAA,GAAU,IAAA;AACd;;;;"}
|
package/dist/index7.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject } from './
|
|
1
|
+
import { inject } from './index18.js';
|
|
2
2
|
import { UpdateMapToken } from '@rpgjs/common';
|
|
3
3
|
|
|
4
4
|
const LoadMapToken = "LoadMapToken";
|
|
@@ -6,11 +6,14 @@ class LoadMapService {
|
|
|
6
6
|
constructor(context, options) {
|
|
7
7
|
this.context = context;
|
|
8
8
|
this.options = options;
|
|
9
|
+
if (context["side"] === "server") {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
9
12
|
this.updateMapService = inject(context, UpdateMapToken);
|
|
10
13
|
}
|
|
11
14
|
async load(mapId) {
|
|
12
15
|
const map = await this.options(mapId.replace("map-", ""));
|
|
13
|
-
await this.updateMapService.update(
|
|
16
|
+
await this.updateMapService.update(map);
|
|
14
17
|
return map;
|
|
15
18
|
}
|
|
16
19
|
}
|
|
@@ -18,7 +21,12 @@ function provideLoadMap(options) {
|
|
|
18
21
|
return [
|
|
19
22
|
{
|
|
20
23
|
provide: UpdateMapToken,
|
|
21
|
-
useFactory: (context) =>
|
|
24
|
+
useFactory: (context) => {
|
|
25
|
+
if (context["side"] === "client") {
|
|
26
|
+
console.warn("UpdateMapToken is not overridden");
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
22
30
|
},
|
|
23
31
|
{
|
|
24
32
|
provide: LoadMapToken,
|
package/dist/index7.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index7.js","sources":["../src/services/loadMap.ts"],"sourcesContent":["import { Context, inject } from \"@signe/di\";\nimport { UpdateMapToken, UpdateMapService } from \"@rpgjs/common\";\n\nexport const LoadMapToken = 'LoadMapToken'\n\nexport type LoadMapOptions = (mapId: string) => Promise<
|
|
1
|
+
{"version":3,"file":"index7.js","sources":["../src/services/loadMap.ts"],"sourcesContent":["import { Context, inject } from \"@signe/di\";\nimport { UpdateMapToken, UpdateMapService } from \"@rpgjs/common\";\n\nexport const LoadMapToken = 'LoadMapToken'\n\n/**\n * Represents the structure of map data that should be returned by the load map callback.\n * This interface defines all the properties that can be provided when loading a custom map.\n * \n * @interface MapData\n */\ntype MapData = {\n /** Raw map data that will be passed to the map component */\n data: any;\n /** CanvasEngine component that will render the map */\n component: any;\n /** Optional map width in pixels, used for viewport calculations */\n width?: number;\n /** Optional map height in pixels, used for viewport calculations */\n height?: number;\n /** Optional map events data (NPCs, interactive objects, etc.) */\n events?: any;\n /** Optional map identifier, defaults to the mapId parameter if not provided */\n id?: string;\n}\n\n/**\n * Callback function type for loading map data.\n * This function receives a map ID and should return either a MapData object directly\n * or a Promise that resolves to a MapData object.\n * \n * @callback LoadMapOptions\n * @param {string} mapId - The identifier of the map to load\n * @returns {Promise<MapData> | MapData} The map data object or a promise resolving to it\n */\nexport type LoadMapOptions = (mapId: string) => Promise<MapData> | MapData \n\nexport class LoadMapService {\n private updateMapService: UpdateMapService;\n\n constructor(private context: Context, private options: LoadMapOptions) {\n if (context['side'] === 'server') {\n return\n }\n this.updateMapService = inject(context, UpdateMapToken);\n }\n\n async load(mapId: string) {\n const map = await this.options(mapId.replace('map-', ''))\n await this.updateMapService.update(map);\n return map;\n }\n}\n\n/**\n * Creates a dependency injection configuration for custom map loading on the client side.\n * \n * This function allows you to customize how maps are loaded and displayed by providing\n * a callback that defines custom map data and rendering components. It's designed to work\n * with the RPG-JS dependency injection system and enables integration of custom map formats\n * like Tiled TMX files or any other map data structure.\n * \n * The function sets up the necessary service providers for map loading, including:\n * - UpdateMapToken: Handles map updates in the client context\n * - LoadMapToken: Provides the LoadMapService with your custom loading logic\n * \n * **Design Concept:**\n * The function follows the provider pattern, creating a modular way to inject custom\n * map loading behavior into the RPG-JS client engine. It separates the concern of\n * map data fetching from map rendering, allowing developers to focus on their specific\n * map format while leveraging the engine's rendering capabilities.\n * \n * @param {LoadMapOptions} options - Callback function that handles map loading logic\n * @returns {Array<Object>} Array of dependency injection provider configurations\n * \n * @example\n * ```typescript\n * import { provideLoadMap } from '@rpgjs/client'\n * import { createModule } from '@rpgjs/common'\n * import MyTiledMapComponent from './MyTiledMapComponent.ce'\n * \n * // Basic usage with JSON map data\n * export function provideCustomMap() {\n * return createModule(\"CustomMap\", [\n * provideLoadMap(async (mapId) => {\n * const response = await fetch(`/maps/${mapId}.json`)\n * const mapData = await response.json()\n * \n * return {\n * data: mapData,\n * component: MyTiledMapComponent,\n * width: mapData.width,\n * height: mapData.height,\n * events: mapData.events\n * }\n * })\n * ])\n * }\n * \n * // Advanced usage with Tiled TMX files\n * export function provideTiledMap() {\n * return createModule(\"TiledMap\", [\n * provideLoadMap(async (mapId) => {\n * // Load TMX file\n * const tmxResponse = await fetch(`/tiled/${mapId}.tmx`)\n * const tmxData = await tmxResponse.text()\n * \n * // Parse TMX data (using a TMX parser)\n * const parsedMap = parseTMX(tmxData)\n * \n * return {\n * data: parsedMap,\n * component: TiledMapRenderer,\n * width: parsedMap.width * parsedMap.tilewidth,\n * height: parsedMap.height * parsedMap.tileheight,\n * events: parsedMap.objectGroups?.find(g => g.name === 'events')?.objects\n * }\n * })\n * ])\n * }\n * \n * // Synchronous usage for static maps\n * export function provideStaticMap() {\n * return createModule(\"StaticMap\", [\n * provideLoadMap((mapId) => {\n * const staticMaps = {\n * 'town': { tiles: [...], npcs: [...] },\n * 'dungeon': { tiles: [...], monsters: [...] }\n * }\n * \n * return {\n * data: staticMaps[mapId],\n * component: StaticMapComponent,\n * width: 800,\n * height: 600\n * }\n * })\n * ])\n * }\n * ```\n * \n * @since 4.0.0\n * @see {@link LoadMapOptions} for callback function signature\n * @see {@link MapData} for return data structure\n */\nexport function provideLoadMap(options: LoadMapOptions) {\n return [\n {\n provide: UpdateMapToken,\n useFactory: (context: Context) => {\n if (context['side'] === 'client') {\n console.warn('UpdateMapToken is not overridden')\n }\n return\n },\n },\n {\n provide: LoadMapToken,\n useFactory: (context: Context) => new LoadMapService(context, options),\n },\n ];\n}\n"],"names":[],"mappings":";;;AAGO,MAAM,YAAA,GAAe;AAkCrB,MAAM,cAAA,CAAe;AAAA,EAG1B,WAAA,CAAoB,SAA0B,OAAA,EAAyB;AAAnD,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAA0B,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAC5C,IAAA,IAAI,OAAA,CAAQ,MAAM,CAAA,KAAM,QAAA,EAAU;AAChC,MAAA;AAAA,IACF;AACA,IAAA,IAAA,CAAK,gBAAA,GAAmB,MAAA,CAAO,OAAA,EAAS,cAAc,CAAA;AAAA,EACxD;AAAA,EAEA,MAAM,KAAK,KAAA,EAAe;AACxB,IAAA,MAAM,GAAA,GAAM,MAAM,IAAA,CAAK,OAAA,CAAQ,MAAM,OAAA,CAAQ,MAAA,EAAQ,EAAE,CAAC,CAAA;AACxD,IAAA,MAAM,IAAA,CAAK,gBAAA,CAAiB,MAAA,CAAO,GAAG,CAAA;AACtC,IAAA,OAAO,GAAA;AAAA,EACT;AACF;AA6FO,SAAS,eAAe,OAAA,EAAyB;AACtD,EAAA,OAAO;AAAA,IACL;AAAA,MACE,OAAA,EAAS,cAAA;AAAA,MACT,UAAA,EAAY,CAAC,OAAA,KAAqB;AAChC,QAAA,IAAI,OAAA,CAAQ,MAAM,CAAA,KAAM,QAAA,EAAU;AAChC,UAAA,OAAA,CAAQ,KAAK,kCAAkC,CAAA;AAAA,QACjD;AACA,QAAA;AAAA,MACF;AAAA,KACF;AAAA,IACA;AAAA,MACE,OAAA,EAAS,YAAA;AAAA,MACT,YAAY,CAAC,OAAA,KAAqB,IAAI,cAAA,CAAe,SAAS,OAAO;AAAA;AACvE,GACF;AACF;;;;"}
|