@kosdev-code/kos-ui-sdk 0.1.0-next.867 → 0.1.0-next.871
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/core/core/services/browser-router.d.ts +1 -0
- package/core/core/services/browser-router.d.ts.map +1 -1
- package/core/util/kos-service-request.d.ts +6 -1
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +2 -0
- package/core/util/service-factory.d.ts.map +1 -1
- package/{index-CvCXisvT.js → index-D64IOwMG.js} +10 -3
- package/index-D64IOwMG.js.map +1 -0
- package/{index-D8aw-T5w.cjs → index-DsRhHHtS.cjs} +10 -3
- package/index-DsRhHHtS.cjs.map +1 -0
- package/index.cjs +48 -21
- package/index.cjs.map +1 -1
- package/index.js +49 -22
- package/index.js.map +1 -1
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +2 -2
- package/models/utils/services/kos/daily/openapi.d.ts +5514 -4341
- package/models/utils/services/kos/daily/service.d.ts +64 -5
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/daily/openapi.d.ts +42 -42
- package/models/utils/services/vfs/daily/service.d.ts +61 -2
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +2 -2
- package/models/utils/services-index.d.ts.map +1 -1
- package/package.json +3 -3
- package/testing.cjs +1 -1
- package/testing.js +1 -1
- package/index-CvCXisvT.js.map +0 -1
- package/index-D8aw-T5w.cjs.map +0 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChildModels, P as ParentModel, O as OptionsRequired, a as CompanionParentModel, b as ContainerAwareSetup, K as KosContextManager, F as FutureContainerSetup, M as MultipleFutureContainerSetup, L as LogConfig, c as LoggerSetup, d as KosLoggerFactory, e as KosModelSymbol, f as ModelEffects, R as ReferenceConfig, T as TroubleAwareSetup, D as DependencyModels, g as DependencyLifecycle, E as ExtensionManager, S as SubscriptionHandlers, h as KosViewModelSymbol, V as ViewModelConfig, i as StateMachineSetup, j as injectStateMachineSupport, k as KosModelVisitor, l as KosCore, s as sendKosMessageResponse, m as KosLog, u as uuid, p as publish, n as subscribe, I as INDEX_RECORD_SYMBOL, o as INDEX_COLLECTION_KEY, q as KosContainerIndexEvents, r as isIndexableItem, t as Kos, v as isKosModel, B as BASE_URL, w as ServiceFactory, x as KosModelRegistrationFactory, y as ObservableData, z as kosAction, A as kosTopicHandler, G as kosModel, H as resolveServiceUrl, J as getKosModelSync, N as isKosModelReady, Q as modelFactory, U as registerExtensionPoint, W as FutureService, X as FutureAliases, Y as whenReady, Z as kosAutoEffect, _ as isKosExecutionContext, $ as KOS_EXECUTION_CONTEXT, a0 as EXTENSION_FUTURE_LIFECYCLE_WRAPPER, a1 as kosObservable, a2 as sendKosHttpMessageResponse, a3 as SingletonKosModelRegistrationFactory, a4 as kosWhen, a5 as destroyKosModel, a6 as KOS_MODEL_ID, a7 as KosModelContainer, a8 as api$9, a9 as KosDataContainer, aa as get, ab as getQueryParams, ac as kosEffect, ad as FutureHandler, ae as resolveKosCompanion, af as createClient, ag as kosFetch, ah as EXTENSION_CANVAS_RENDERER, ai as post, aj as FetchError, ak as KosWsEvents, al as RegistrationManager, am as registerKosModel, an as registerLegacyModel, ao as kosServiceRequest$8, ap as WebSocketTransport, aq as kosComputed, ar as WebSocketEvents, as as modelHookCache, at as isUpdateable, au as KosModelState, av as KosModelEvents, aw as clearModelHookCacheEntry, ax as getKosModel$1 } from "./index-
|
|
2
|
-
import { ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI } from "./index-
|
|
1
|
+
import { C as ChildModels, P as ParentModel, O as OptionsRequired, a as CompanionParentModel, b as ContainerAwareSetup, K as KosContextManager, F as FutureContainerSetup, M as MultipleFutureContainerSetup, L as LogConfig, c as LoggerSetup, d as KosLoggerFactory, e as KosModelSymbol, f as ModelEffects, R as ReferenceConfig, T as TroubleAwareSetup, D as DependencyModels, g as DependencyLifecycle, E as ExtensionManager, S as SubscriptionHandlers, h as KosViewModelSymbol, V as ViewModelConfig, i as StateMachineSetup, j as injectStateMachineSupport, k as KosModelVisitor, l as KosCore, s as sendKosMessageResponse, m as KosLog, u as uuid, p as publish, n as subscribe, I as INDEX_RECORD_SYMBOL, o as INDEX_COLLECTION_KEY, q as KosContainerIndexEvents, r as isIndexableItem, t as Kos, v as isKosModel, B as BASE_URL, w as ServiceFactory, x as KosModelRegistrationFactory, y as ObservableData, z as kosAction, A as kosTopicHandler, G as kosModel, H as resolveServiceUrl, J as getKosModelSync, N as isKosModelReady, Q as modelFactory, U as registerExtensionPoint, W as FutureService, X as FutureAliases, Y as whenReady, Z as kosAutoEffect, _ as isKosExecutionContext, $ as KOS_EXECUTION_CONTEXT, a0 as EXTENSION_FUTURE_LIFECYCLE_WRAPPER, a1 as kosObservable, a2 as sendKosHttpMessageResponse, a3 as SingletonKosModelRegistrationFactory, a4 as kosWhen, a5 as destroyKosModel, a6 as KOS_MODEL_ID, a7 as KosModelContainer, a8 as api$9, a9 as KosDataContainer, aa as get, ab as getQueryParams, ac as kosEffect, ad as FutureHandler, ae as resolveKosCompanion, af as createClient, ag as kosFetch, ah as EXTENSION_CANVAS_RENDERER, ai as post, aj as FetchError, ak as KosWsEvents, al as RegistrationManager, am as registerKosModel, an as registerLegacyModel, ao as kosServiceRequest$8, ap as WebSocketTransport, aq as kosComputed, ar as WebSocketEvents, as as modelHookCache, at as isUpdateable, au as KosModelState, av as KosModelEvents, aw as clearModelHookCacheEntry, ax as getKosModel$1 } from "./index-D64IOwMG.js";
|
|
2
|
+
import { ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI } from "./index-D64IOwMG.js";
|
|
3
3
|
import { action, reaction, autorun, makeAutoObservable, runInAction, observable } from "mobx";
|
|
4
4
|
import { makeAutoObservable as makeAutoObservable2, makeObservable } from "mobx";
|
|
5
5
|
import log$s from "loglevel";
|
|
@@ -3493,7 +3493,8 @@ let BrowserRouterModelImpl = class {
|
|
|
3493
3493
|
id: requestId,
|
|
3494
3494
|
method,
|
|
3495
3495
|
path: url,
|
|
3496
|
-
body: data
|
|
3496
|
+
body: data,
|
|
3497
|
+
headers: payload.headers
|
|
3497
3498
|
};
|
|
3498
3499
|
let status = 200;
|
|
3499
3500
|
const res = {
|
|
@@ -10345,10 +10346,10 @@ let CanvasDispatcherModelImpl = class {
|
|
|
10345
10346
|
}
|
|
10346
10347
|
async handlePatternApplication(req, res) {
|
|
10347
10348
|
const pattern = req.params.pattern;
|
|
10348
|
-
const
|
|
10349
|
-
const rendererModel = this._endpointRenderers.getModel(
|
|
10349
|
+
const endpoint2 = req.params.endpoint;
|
|
10350
|
+
const rendererModel = this._endpointRenderers.getModel(endpoint2);
|
|
10350
10351
|
if (!rendererModel) {
|
|
10351
|
-
res.status?.(404).send({ error: `Endpoint "${
|
|
10352
|
+
res.status?.(404).send({ error: `Endpoint "${endpoint2}" not found` });
|
|
10352
10353
|
return;
|
|
10353
10354
|
}
|
|
10354
10355
|
if (!this._patterns.has(pattern)) {
|
|
@@ -10378,10 +10379,10 @@ let CanvasDispatcherModelImpl = class {
|
|
|
10378
10379
|
res.status?.(400).send({ error: "Invalid color format" });
|
|
10379
10380
|
return;
|
|
10380
10381
|
}
|
|
10381
|
-
const
|
|
10382
|
-
const rendererModel = this._endpointRenderers.getModel(
|
|
10382
|
+
const endpoint2 = req.params.endpoint;
|
|
10383
|
+
const rendererModel = this._endpointRenderers.getModel(endpoint2);
|
|
10383
10384
|
if (!rendererModel) {
|
|
10384
|
-
res.status?.(404).send({ error: `Endpoint "${
|
|
10385
|
+
res.status?.(404).send({ error: `Endpoint "${endpoint2}" not found` });
|
|
10385
10386
|
return;
|
|
10386
10387
|
}
|
|
10387
10388
|
const { r, b, g } = rgb;
|
|
@@ -12176,18 +12177,31 @@ const updateRegion = async (region) => {
|
|
|
12176
12177
|
regionInfo.updateProperty(region);
|
|
12177
12178
|
};
|
|
12178
12179
|
async function getKosServiceApi() {
|
|
12179
|
-
const { default: API } = await import("./index-
|
|
12180
|
+
const { default: API } = await import("./index-D64IOwMG.js").then((n) => n.cJ);
|
|
12180
12181
|
return API;
|
|
12181
12182
|
}
|
|
12182
12183
|
function kosServiceRequest$7(params2) {
|
|
12183
12184
|
return kosServiceRequest$8(params2);
|
|
12184
12185
|
}
|
|
12186
|
+
function endpoint$1(path, method) {
|
|
12187
|
+
return { path, method };
|
|
12188
|
+
}
|
|
12189
|
+
function serviceRequest$1(ep, opts) {
|
|
12190
|
+
return kosServiceRequest$7({
|
|
12191
|
+
path: ep.path,
|
|
12192
|
+
method: ep.method,
|
|
12193
|
+
errorHandler: { strategy: "log", defaultValue: null },
|
|
12194
|
+
...opts
|
|
12195
|
+
});
|
|
12196
|
+
}
|
|
12185
12197
|
const api$7 = createClient();
|
|
12186
12198
|
const service$7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12187
12199
|
__proto__: null,
|
|
12188
12200
|
api: api$7,
|
|
12189
12201
|
default: api$7,
|
|
12190
|
-
|
|
12202
|
+
endpoint: endpoint$1,
|
|
12203
|
+
kosServiceRequest: kosServiceRequest$7,
|
|
12204
|
+
serviceRequest: serviceRequest$1
|
|
12191
12205
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12192
12206
|
function kosServiceRequest$6(params2) {
|
|
12193
12207
|
return kosServiceRequest$8(params2);
|
|
@@ -12222,12 +12236,25 @@ const service$4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
12222
12236
|
function kosServiceRequest$3(params2) {
|
|
12223
12237
|
return kosServiceRequest$8(params2);
|
|
12224
12238
|
}
|
|
12239
|
+
function endpoint(path, method) {
|
|
12240
|
+
return { path, method };
|
|
12241
|
+
}
|
|
12242
|
+
function serviceRequest(ep, opts) {
|
|
12243
|
+
return kosServiceRequest$3({
|
|
12244
|
+
path: ep.path,
|
|
12245
|
+
method: ep.method,
|
|
12246
|
+
errorHandler: { strategy: "log", defaultValue: null },
|
|
12247
|
+
...opts
|
|
12248
|
+
});
|
|
12249
|
+
}
|
|
12225
12250
|
const api$3 = createClient();
|
|
12226
12251
|
const service$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12227
12252
|
__proto__: null,
|
|
12228
12253
|
api: api$3,
|
|
12229
12254
|
default: api$3,
|
|
12230
|
-
|
|
12255
|
+
endpoint,
|
|
12256
|
+
kosServiceRequest: kosServiceRequest$3,
|
|
12257
|
+
serviceRequest
|
|
12231
12258
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12232
12259
|
function kosServiceRequest$2(params2) {
|
|
12233
12260
|
return kosServiceRequest$8(params2);
|
|
@@ -12902,8 +12929,8 @@ GpioChipModelImpl = __decorateClass$2([
|
|
|
12902
12929
|
const GpioChip = GpioChipModelImpl.Registration;
|
|
12903
12930
|
const GPIO_CHIP_PATH = "/api/kos/gpio/chips";
|
|
12904
12931
|
const GPIO_PIN_PATH = "/api/kos/gpio/pins";
|
|
12905
|
-
const gpioServiceRequest = kosServiceRequest$
|
|
12906
|
-
const gpioApi = api$
|
|
12932
|
+
const gpioServiceRequest = kosServiceRequest$4;
|
|
12933
|
+
const gpioApi = api$4;
|
|
12907
12934
|
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
12908
12935
|
__proto__: null,
|
|
12909
12936
|
GPIO_CHIP_PATH,
|
|
@@ -15837,10 +15864,10 @@ export {
|
|
|
15837
15864
|
KOS_EXECUTION_CONTEXT,
|
|
15838
15865
|
KOS_MODEL_ID,
|
|
15839
15866
|
KOS_RECOVERING_SESSION_KEY,
|
|
15840
|
-
service$
|
|
15841
|
-
service$
|
|
15842
|
-
service$
|
|
15843
|
-
service$
|
|
15867
|
+
service$7 as KOS_SERVICE,
|
|
15868
|
+
service$6 as KOS_SERVICE_1_6_5,
|
|
15869
|
+
service$5 as KOS_SERVICE_1_8_1,
|
|
15870
|
+
service$4 as KOS_SERVICE_1_9_X,
|
|
15844
15871
|
KeyValue,
|
|
15845
15872
|
index$c as KeyValueServices,
|
|
15846
15873
|
Kos,
|
|
@@ -15987,10 +16014,10 @@ export {
|
|
|
15987
16014
|
UsbUpdate,
|
|
15988
16015
|
UsbUpdateContainer,
|
|
15989
16016
|
index$3 as UsbUpdateServices,
|
|
15990
|
-
service as VFS_SERVICE,
|
|
15991
|
-
service$
|
|
15992
|
-
service$
|
|
15993
|
-
service
|
|
16017
|
+
service$3 as VFS_SERVICE,
|
|
16018
|
+
service$2 as VFS_SERVICE_1_6_5,
|
|
16019
|
+
service$1 as VFS_SERVICE_1_8_1,
|
|
16020
|
+
service as VFS_SERVICE_1_9_X,
|
|
15994
16021
|
ViewModelConfig,
|
|
15995
16022
|
WS_EVENT_TYPE,
|
|
15996
16023
|
WebSocketEvents,
|