@kosdev-code/kos-ui-sdk 0.1.0-next.911 → 0.1.0-next.937
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/.kos.json +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +10 -46
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-reload-aware.d.ts +6 -4
- package/core/core/decorators/kos-reload-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts +3 -1
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +13 -35
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +21 -10
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +28 -28
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +4 -2
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +3 -12
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/kosCore.d.ts +15 -0
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +5 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/model/kos-model-component-factory.d.ts +1 -1
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/kos-service-request-manager.d.ts +7 -2
- package/core/core/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +2 -2
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/model/service-response-store.d.ts +2 -1
- package/core/core/model/service-response-store.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +13 -4
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +0 -4
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/util/model-utils.d.ts.map +1 -1
- package/{index-YzHb2lnB.js → index-Csq0zQtb.js} +358 -647
- package/index-Csq0zQtb.js.map +1 -0
- package/{index-CRb8ucfF.cjs → index-D52vEGXT.cjs} +287 -576
- package/index-D52vEGXT.cjs.map +1 -0
- package/index.cjs +310 -36
- package/index.cjs.map +1 -1
- package/index.js +375 -101
- package/index.js.map +1 -1
- package/models/utils/services/kos/daily/service.d.ts +1 -1
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/daily/service.d.ts +1 -1
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/package.json +3 -3
- package/testing.cjs +1 -1
- package/testing.js +1 -1
- package/index-CRb8ucfF.cjs.map +0 -1
- package/index-YzHb2lnB.js.map +0 -1
package/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const service$8 = require("./index-
|
|
3
|
+
const service$8 = require("./index-D52vEGXT.cjs");
|
|
4
4
|
const mobx = require("mobx");
|
|
5
5
|
const log$s = require("loglevel");
|
|
6
6
|
const dateFns = require("date-fns");
|
|
@@ -26,6 +26,279 @@ const _registry = {};
|
|
|
26
26
|
function registerApiLevels(levels) {
|
|
27
27
|
Object.assign(_registry, levels);
|
|
28
28
|
}
|
|
29
|
+
function once(eventType, callback) {
|
|
30
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
31
|
+
subscription.unsubscribe();
|
|
32
|
+
callback(msg);
|
|
33
|
+
});
|
|
34
|
+
return subscription.unsubscribe;
|
|
35
|
+
}
|
|
36
|
+
function waitFor(eventType, timeout) {
|
|
37
|
+
return new Promise((resolve, reject) => {
|
|
38
|
+
let timeoutId = null;
|
|
39
|
+
const unsubscribe = once(eventType, (msg) => {
|
|
40
|
+
if (timeoutId) {
|
|
41
|
+
clearTimeout(timeoutId);
|
|
42
|
+
}
|
|
43
|
+
resolve(msg);
|
|
44
|
+
});
|
|
45
|
+
if (timeout) {
|
|
46
|
+
timeoutId = setTimeout(() => {
|
|
47
|
+
unsubscribe();
|
|
48
|
+
reject(new Error(`Timeout waiting for event: ${eventType}`));
|
|
49
|
+
}, timeout);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function waitForAll(eventTypes, timeout) {
|
|
54
|
+
const promises = eventTypes.map(
|
|
55
|
+
(eventType) => waitFor(eventType, timeout)
|
|
56
|
+
);
|
|
57
|
+
return Promise.all(promises);
|
|
58
|
+
}
|
|
59
|
+
function race(eventTypes, timeout) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
const unsubscribers = [];
|
|
62
|
+
let timeoutId = null;
|
|
63
|
+
let resolved = false;
|
|
64
|
+
const cleanup = () => {
|
|
65
|
+
unsubscribers.forEach((unsub) => unsub());
|
|
66
|
+
if (timeoutId) {
|
|
67
|
+
clearTimeout(timeoutId);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
eventTypes.forEach((eventType) => {
|
|
71
|
+
const unsubscribe = once(eventType, (msg) => {
|
|
72
|
+
if (!resolved) {
|
|
73
|
+
resolved = true;
|
|
74
|
+
cleanup();
|
|
75
|
+
resolve({ eventType, data: msg });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
unsubscribers.push(unsubscribe);
|
|
79
|
+
});
|
|
80
|
+
if (timeout) {
|
|
81
|
+
timeoutId = setTimeout(() => {
|
|
82
|
+
if (!resolved) {
|
|
83
|
+
resolved = true;
|
|
84
|
+
cleanup();
|
|
85
|
+
reject(
|
|
86
|
+
new Error(`Timeout waiting for any event: ${eventTypes.join(", ")}`)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}, timeout);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function filter(eventType, predicate, callback) {
|
|
94
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
95
|
+
if (msg && predicate(msg)) {
|
|
96
|
+
callback(msg);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return subscription.unsubscribe;
|
|
100
|
+
}
|
|
101
|
+
function map(eventType, transform, callback) {
|
|
102
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
103
|
+
if (msg) {
|
|
104
|
+
const transformed = transform(msg);
|
|
105
|
+
callback(transformed);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return subscription.unsubscribe;
|
|
109
|
+
}
|
|
110
|
+
function debounce$1(eventType, delay, callback) {
|
|
111
|
+
let timeoutId = null;
|
|
112
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
113
|
+
if (timeoutId) {
|
|
114
|
+
clearTimeout(timeoutId);
|
|
115
|
+
}
|
|
116
|
+
timeoutId = setTimeout(() => {
|
|
117
|
+
callback(msg);
|
|
118
|
+
}, delay);
|
|
119
|
+
});
|
|
120
|
+
return () => {
|
|
121
|
+
if (timeoutId) {
|
|
122
|
+
clearTimeout(timeoutId);
|
|
123
|
+
}
|
|
124
|
+
subscription.unsubscribe();
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
function throttle(eventType, interval, callback) {
|
|
128
|
+
let lastEmit = 0;
|
|
129
|
+
let pendingTimeout = null;
|
|
130
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
131
|
+
const now = Date.now();
|
|
132
|
+
const timeSinceLastEmit = now - lastEmit;
|
|
133
|
+
if (timeSinceLastEmit >= interval) {
|
|
134
|
+
lastEmit = now;
|
|
135
|
+
callback(msg);
|
|
136
|
+
} else if (!pendingTimeout) {
|
|
137
|
+
pendingTimeout = setTimeout(() => {
|
|
138
|
+
lastEmit = Date.now();
|
|
139
|
+
callback(msg);
|
|
140
|
+
pendingTimeout = null;
|
|
141
|
+
}, interval - timeSinceLastEmit);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return () => {
|
|
145
|
+
if (pendingTimeout) {
|
|
146
|
+
clearTimeout(pendingTimeout);
|
|
147
|
+
}
|
|
148
|
+
subscription.unsubscribe();
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function buffer(eventType, bufferTime, callback) {
|
|
152
|
+
let buffer2 = [];
|
|
153
|
+
let timeoutId = null;
|
|
154
|
+
const flush = () => {
|
|
155
|
+
if (buffer2.length > 0) {
|
|
156
|
+
callback([...buffer2]);
|
|
157
|
+
buffer2 = [];
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
161
|
+
if (msg) {
|
|
162
|
+
buffer2.push(msg);
|
|
163
|
+
if (!timeoutId) {
|
|
164
|
+
timeoutId = setTimeout(() => {
|
|
165
|
+
flush();
|
|
166
|
+
timeoutId = null;
|
|
167
|
+
}, bufferTime);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return () => {
|
|
172
|
+
if (timeoutId) {
|
|
173
|
+
clearTimeout(timeoutId);
|
|
174
|
+
flush();
|
|
175
|
+
}
|
|
176
|
+
subscription.unsubscribe();
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function replay(eventType, bufferSize = 1) {
|
|
180
|
+
const buffer2 = [];
|
|
181
|
+
service$8.subscribe(eventType, (msg) => {
|
|
182
|
+
if (msg) {
|
|
183
|
+
buffer2.push(msg);
|
|
184
|
+
if (buffer2.length > bufferSize) {
|
|
185
|
+
buffer2.shift();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return {
|
|
190
|
+
subscribe: (callback) => {
|
|
191
|
+
buffer2.forEach((event) => callback(event));
|
|
192
|
+
return service$8.subscribe(eventType, callback);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
function merge(eventTypes, callback) {
|
|
197
|
+
const subscriptions = eventTypes.map(
|
|
198
|
+
(eventType) => service$8.subscribe(eventType, (msg) => {
|
|
199
|
+
if (msg) {
|
|
200
|
+
callback(eventType, msg);
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
);
|
|
204
|
+
return () => {
|
|
205
|
+
subscriptions.forEach((sub2) => sub2.unsubscribe());
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function stateMachine(initialState, transitions) {
|
|
209
|
+
let currentState = initialState;
|
|
210
|
+
const subscriptions = [];
|
|
211
|
+
const allEvents = /* @__PURE__ */ new Set();
|
|
212
|
+
Object.values(transitions).forEach((stateTransitions) => {
|
|
213
|
+
Object.keys(stateTransitions).forEach((event) => {
|
|
214
|
+
allEvents.add(event);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
allEvents.forEach((eventType) => {
|
|
218
|
+
const { unsubscribe } = service$8.subscribe(eventType, (msg) => {
|
|
219
|
+
const stateTransitions = transitions[currentState];
|
|
220
|
+
if (stateTransitions && stateTransitions[eventType]) {
|
|
221
|
+
const nextState = stateTransitions[eventType](msg);
|
|
222
|
+
currentState = nextState;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
subscriptions.push(unsubscribe);
|
|
226
|
+
});
|
|
227
|
+
return {
|
|
228
|
+
get state() {
|
|
229
|
+
return currentState;
|
|
230
|
+
},
|
|
231
|
+
unsubscribe: () => {
|
|
232
|
+
subscriptions.forEach((unsub) => unsub());
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function request(requestEvent, responseEvent, request2, timeout) {
|
|
237
|
+
const responsePromise = waitFor(responseEvent, timeout);
|
|
238
|
+
service$8.publish(requestEvent, request2);
|
|
239
|
+
return responsePromise;
|
|
240
|
+
}
|
|
241
|
+
async function* eventIterator(eventType) {
|
|
242
|
+
const queue = [];
|
|
243
|
+
const waiters = [];
|
|
244
|
+
const subscription = service$8.subscribe(eventType, (msg) => {
|
|
245
|
+
if (msg) {
|
|
246
|
+
if (waiters.length > 0) {
|
|
247
|
+
const waiter = waiters.shift();
|
|
248
|
+
waiter(msg);
|
|
249
|
+
} else {
|
|
250
|
+
queue.push(msg);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
try {
|
|
255
|
+
while (true) {
|
|
256
|
+
if (queue.length > 0) {
|
|
257
|
+
yield queue.shift();
|
|
258
|
+
} else {
|
|
259
|
+
yield await new Promise((resolve) => {
|
|
260
|
+
waiters.push(resolve);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} finally {
|
|
265
|
+
subscription.unsubscribe();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const EventBusFunctional = {
|
|
269
|
+
once,
|
|
270
|
+
waitFor,
|
|
271
|
+
waitForAll,
|
|
272
|
+
race,
|
|
273
|
+
filter,
|
|
274
|
+
map,
|
|
275
|
+
debounce: debounce$1,
|
|
276
|
+
throttle,
|
|
277
|
+
buffer,
|
|
278
|
+
replay,
|
|
279
|
+
merge,
|
|
280
|
+
stateMachine,
|
|
281
|
+
request,
|
|
282
|
+
eventIterator
|
|
283
|
+
};
|
|
284
|
+
const eventBus_functional = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
285
|
+
__proto__: null,
|
|
286
|
+
EventBusFunctional,
|
|
287
|
+
buffer,
|
|
288
|
+
debounce: debounce$1,
|
|
289
|
+
eventIterator,
|
|
290
|
+
filter,
|
|
291
|
+
map,
|
|
292
|
+
merge,
|
|
293
|
+
once,
|
|
294
|
+
race,
|
|
295
|
+
replay,
|
|
296
|
+
request,
|
|
297
|
+
stateMachine,
|
|
298
|
+
throttle,
|
|
299
|
+
waitFor,
|
|
300
|
+
waitForAll
|
|
301
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
29
302
|
const convertFileSizeRaw = (bytes, decimals = 0) => {
|
|
30
303
|
if (!+bytes)
|
|
31
304
|
return {
|
|
@@ -178,7 +451,7 @@ function kosLoggerAware(options) {
|
|
|
178
451
|
loggerProperty,
|
|
179
452
|
loggerContext
|
|
180
453
|
};
|
|
181
|
-
const getModelType = () => target.prototype[service$8.
|
|
454
|
+
const getModelType = () => target.prototype.modelTypeId ?? target.prototype[service$8.KosViewModelSymbol]?.type;
|
|
182
455
|
let sharedLogger;
|
|
183
456
|
Object.defineProperty(target.prototype, loggerProperty, {
|
|
184
457
|
get() {
|
|
@@ -410,13 +683,14 @@ function injectViewModelEffects(instance, typeId) {
|
|
|
410
683
|
function injectViewModelStateMachine(instance, typeId) {
|
|
411
684
|
const fsmSetup = instance[service$8.StateMachineSetup];
|
|
412
685
|
if (!fsmSetup) return;
|
|
413
|
-
const { config } = fsmSetup;
|
|
414
|
-
if (
|
|
686
|
+
const { config, initializeAtExplicit } = fsmSetup;
|
|
687
|
+
if (initializeAtExplicit && config.initializeAt !== service$8.DependencyLifecycle.INIT) {
|
|
415
688
|
console.warn(
|
|
416
689
|
`[kosViewModel] ViewModel "${typeId}" has @kosStateMachine with initializeAt: ${config.initializeAt}. ViewModels do not have lifecycle phases, so the FSM will initialize immediately. Consider removing initializeAt or using @kosModel if lifecycle-aware FSM initialization is required.`
|
|
417
690
|
);
|
|
418
691
|
}
|
|
419
692
|
service$8.injectStateMachineSupport(instance);
|
|
693
|
+
service$8.initializeStateMachine(instance, config.initializeAt);
|
|
420
694
|
}
|
|
421
695
|
function makeSafeObservable(instance) {
|
|
422
696
|
try {
|
|
@@ -1615,10 +1889,10 @@ let ConfigBeanModelImpl = class {
|
|
|
1615
1889
|
* @see modifyConfigBeanService
|
|
1616
1890
|
*/
|
|
1617
1891
|
async updateConfigBean() {
|
|
1618
|
-
const
|
|
1892
|
+
const request2 = mapConfigBeanModelToDto(this);
|
|
1619
1893
|
await this._modifyConfigBean(
|
|
1620
1894
|
this.path,
|
|
1621
|
-
|
|
1895
|
+
request2,
|
|
1622
1896
|
this.serviceBasePath,
|
|
1623
1897
|
this.destinationAddress
|
|
1624
1898
|
);
|
|
@@ -2744,7 +3018,7 @@ let KosConfigPropertyImpl = class {
|
|
|
2744
3018
|
const result = this.regionInfo.convert(Number(_val), backend, display);
|
|
2745
3019
|
return result;
|
|
2746
3020
|
}
|
|
2747
|
-
return _val
|
|
3021
|
+
return _val ?? "";
|
|
2748
3022
|
}
|
|
2749
3023
|
/**
|
|
2750
3024
|
* @internal
|
|
@@ -3494,7 +3768,7 @@ let StatePropModelImpl = class {
|
|
|
3494
3768
|
__decorateClass$w([
|
|
3495
3769
|
kosDependency({
|
|
3496
3770
|
modelType: StateBean.type,
|
|
3497
|
-
id:
|
|
3771
|
+
id: `${StateBean.type}-${PATH_PROP}`,
|
|
3498
3772
|
options: { path: PATH_PROP }
|
|
3499
3773
|
})
|
|
3500
3774
|
], StatePropModelImpl.prototype, "stateBean", 2);
|
|
@@ -4825,43 +5099,43 @@ TokenStream.prototype.unescape = function(v) {
|
|
|
4825
5099
|
if (index2 < 0) {
|
|
4826
5100
|
return v;
|
|
4827
5101
|
}
|
|
4828
|
-
var
|
|
5102
|
+
var buffer2 = v.substring(0, index2);
|
|
4829
5103
|
while (index2 >= 0) {
|
|
4830
5104
|
var c = v.charAt(++index2);
|
|
4831
5105
|
switch (c) {
|
|
4832
5106
|
case "'":
|
|
4833
|
-
|
|
5107
|
+
buffer2 += "'";
|
|
4834
5108
|
break;
|
|
4835
5109
|
case '"':
|
|
4836
|
-
|
|
5110
|
+
buffer2 += '"';
|
|
4837
5111
|
break;
|
|
4838
5112
|
case "\\":
|
|
4839
|
-
|
|
5113
|
+
buffer2 += "\\";
|
|
4840
5114
|
break;
|
|
4841
5115
|
case "/":
|
|
4842
|
-
|
|
5116
|
+
buffer2 += "/";
|
|
4843
5117
|
break;
|
|
4844
5118
|
case "b":
|
|
4845
|
-
|
|
5119
|
+
buffer2 += "\b";
|
|
4846
5120
|
break;
|
|
4847
5121
|
case "f":
|
|
4848
|
-
|
|
5122
|
+
buffer2 += "\f";
|
|
4849
5123
|
break;
|
|
4850
5124
|
case "n":
|
|
4851
|
-
|
|
5125
|
+
buffer2 += "\n";
|
|
4852
5126
|
break;
|
|
4853
5127
|
case "r":
|
|
4854
|
-
|
|
5128
|
+
buffer2 += "\r";
|
|
4855
5129
|
break;
|
|
4856
5130
|
case "t":
|
|
4857
|
-
|
|
5131
|
+
buffer2 += " ";
|
|
4858
5132
|
break;
|
|
4859
5133
|
case "u":
|
|
4860
5134
|
var codePoint = v.substring(index2 + 1, index2 + 5);
|
|
4861
5135
|
if (!codePointPattern.test(codePoint)) {
|
|
4862
5136
|
this.parseError("Illegal escape sequence: \\u" + codePoint);
|
|
4863
5137
|
}
|
|
4864
|
-
|
|
5138
|
+
buffer2 += String.fromCharCode(parseInt(codePoint, 16));
|
|
4865
5139
|
index2 += 4;
|
|
4866
5140
|
break;
|
|
4867
5141
|
default:
|
|
@@ -4869,10 +5143,10 @@ TokenStream.prototype.unescape = function(v) {
|
|
|
4869
5143
|
}
|
|
4870
5144
|
++index2;
|
|
4871
5145
|
var backslash = v.indexOf("\\", index2);
|
|
4872
|
-
|
|
5146
|
+
buffer2 += v.substring(index2, backslash < 0 ? v.length : backslash);
|
|
4873
5147
|
index2 = backslash;
|
|
4874
5148
|
}
|
|
4875
|
-
return
|
|
5149
|
+
return buffer2;
|
|
4876
5150
|
};
|
|
4877
5151
|
TokenStream.prototype.isComment = function() {
|
|
4878
5152
|
var c = this.expression.charAt(this.pos);
|
|
@@ -9608,26 +9882,26 @@ class ScrollingImageRenderer extends Canvas2DRendererBase {
|
|
|
9608
9882
|
break;
|
|
9609
9883
|
}
|
|
9610
9884
|
let isOffScreen = false;
|
|
9611
|
-
const
|
|
9885
|
+
const buffer2 = 1;
|
|
9612
9886
|
switch (direction) {
|
|
9613
9887
|
case "left": {
|
|
9614
9888
|
const xPosLeft = width - this.position;
|
|
9615
|
-
isOffScreen = xPosLeft < -drawWidth -
|
|
9889
|
+
isOffScreen = xPosLeft < -drawWidth - buffer2;
|
|
9616
9890
|
break;
|
|
9617
9891
|
}
|
|
9618
9892
|
case "right": {
|
|
9619
9893
|
const xPosRight = -drawWidth + this.position;
|
|
9620
|
-
isOffScreen = xPosRight > width +
|
|
9894
|
+
isOffScreen = xPosRight > width + buffer2;
|
|
9621
9895
|
break;
|
|
9622
9896
|
}
|
|
9623
9897
|
case "up": {
|
|
9624
9898
|
const yPosUp = height - this.position;
|
|
9625
|
-
isOffScreen = yPosUp < -drawHeight -
|
|
9899
|
+
isOffScreen = yPosUp < -drawHeight - buffer2;
|
|
9626
9900
|
break;
|
|
9627
9901
|
}
|
|
9628
9902
|
case "down": {
|
|
9629
9903
|
const yPosDown = -drawHeight + this.position;
|
|
9630
|
-
isOffScreen = yPosDown > height +
|
|
9904
|
+
isOffScreen = yPosDown > height + buffer2;
|
|
9631
9905
|
break;
|
|
9632
9906
|
}
|
|
9633
9907
|
}
|
|
@@ -9943,26 +10217,26 @@ class ScrollingTextRenderer extends Canvas2DRendererBase {
|
|
|
9943
10217
|
checkScrollCompletion(width, height, direction) {
|
|
9944
10218
|
if (!this.isPlaying) return;
|
|
9945
10219
|
let isOffScreen = false;
|
|
9946
|
-
const
|
|
10220
|
+
const buffer2 = 1;
|
|
9947
10221
|
switch (direction) {
|
|
9948
10222
|
case "left": {
|
|
9949
10223
|
const xPosLeft = width - this.position;
|
|
9950
|
-
isOffScreen = xPosLeft < -this.textWidth -
|
|
10224
|
+
isOffScreen = xPosLeft < -this.textWidth - buffer2;
|
|
9951
10225
|
break;
|
|
9952
10226
|
}
|
|
9953
10227
|
case "right": {
|
|
9954
10228
|
const xPosRight = -this.textWidth + this.position;
|
|
9955
|
-
isOffScreen = xPosRight > width +
|
|
10229
|
+
isOffScreen = xPosRight > width + buffer2;
|
|
9956
10230
|
break;
|
|
9957
10231
|
}
|
|
9958
10232
|
case "up": {
|
|
9959
10233
|
const yPosUp = height - this.position;
|
|
9960
|
-
isOffScreen = yPosUp < -this.textHeight -
|
|
10234
|
+
isOffScreen = yPosUp < -this.textHeight - buffer2;
|
|
9961
10235
|
break;
|
|
9962
10236
|
}
|
|
9963
10237
|
case "down": {
|
|
9964
10238
|
const yPosDown = -this.textHeight + this.position;
|
|
9965
|
-
isOffScreen = yPosDown > height +
|
|
10239
|
+
isOffScreen = yPosDown > height + buffer2;
|
|
9966
10240
|
break;
|
|
9967
10241
|
}
|
|
9968
10242
|
}
|
|
@@ -12300,7 +12574,7 @@ const updateRegion = async (region) => {
|
|
|
12300
12574
|
regionInfo.updateProperty(region);
|
|
12301
12575
|
};
|
|
12302
12576
|
async function getKosServiceApi() {
|
|
12303
|
-
const { default: API } = await Promise.resolve().then(() => require("./index-
|
|
12577
|
+
const { default: API } = await Promise.resolve().then(() => require("./index-D52vEGXT.cjs")).then((n) => n.service);
|
|
12304
12578
|
return API;
|
|
12305
12579
|
}
|
|
12306
12580
|
function kosServiceRequest$7(params2) {
|
|
@@ -13521,10 +13795,10 @@ const useContextModelHierarchy = (props) => {
|
|
|
13521
13795
|
`useContextModelHierarchy must be used within a KosModelCollectionProvider`
|
|
13522
13796
|
);
|
|
13523
13797
|
}
|
|
13524
|
-
const
|
|
13798
|
+
const filter2 = props?.filter || DEFAULT_FILTER;
|
|
13525
13799
|
const filteredModels = React.useMemo(
|
|
13526
|
-
() => context.models.filter(
|
|
13527
|
-
[context.models,
|
|
13800
|
+
() => context.models.filter(filter2),
|
|
13801
|
+
[context.models, filter2]
|
|
13528
13802
|
);
|
|
13529
13803
|
return filteredModels;
|
|
13530
13804
|
};
|
|
@@ -15931,7 +16205,6 @@ exports.EXTENSION_CANVAS_RENDERER = service$8.EXTENSION_CANVAS_RENDERER;
|
|
|
15931
16205
|
exports.EXTENSION_FEATURE_FLAG_RESOLVER = service$8.EXTENSION_FEATURE_FLAG_RESOLVER;
|
|
15932
16206
|
exports.EXTENSION_FUTURE_LIFECYCLE_WRAPPER = service$8.EXTENSION_FUTURE_LIFECYCLE_WRAPPER;
|
|
15933
16207
|
exports.EventBus = service$8.eventBus;
|
|
15934
|
-
exports.EventBusFunctional = service$8.eventBus_functional;
|
|
15935
16208
|
exports.EventBusState = service$8.eventBus_state;
|
|
15936
16209
|
exports.ExtensionException = service$8.ExtensionException;
|
|
15937
16210
|
exports.ExtensionManager = service$8.ExtensionManager;
|
|
@@ -16180,6 +16453,7 @@ exports.EVENT_TROUBLE_REMOVED = EVENT_TROUBLE_REMOVED;
|
|
|
16180
16453
|
exports.EXTENSION_TROUBLE_DATA_MAPPER = EXTENSION_TROUBLE_DATA_MAPPER;
|
|
16181
16454
|
exports.EXTENSION_TROUBLE_MAPPER = EXTENSION_TROUBLE_MAPPER;
|
|
16182
16455
|
exports.ErrorBoundaryWithFallback = ErrorBoundary;
|
|
16456
|
+
exports.EventBusFunctional = eventBus_functional;
|
|
16183
16457
|
exports.FUTURE_CONTAINER_MODEL_TYPE = FUTURE_CONTAINER_MODEL_TYPE;
|
|
16184
16458
|
exports.FUTURE_MODEL_TYPE = FUTURE_MODEL_TYPE;
|
|
16185
16459
|
exports.FUTURE_NOT_ASSIGNED = FUTURE_NOT_ASSIGNED;
|