@mica-js/editor 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fused-runtime.d.ts +7 -0
- package/dist/fused-runtime.js +1 -1
- package/dist/fused.d.ts +23 -0
- package/dist/fused.js +554 -299
- package/dist/fused.js.map +1 -1
- package/dist/{runtime-DtM7aYdB.js → runtime-hyeAcSP7.js} +40 -10
- package/dist/runtime-hyeAcSP7.js.map +1 -0
- package/dist/style.css +50 -1
- package/dist/{workers-BCTUbUqo.js → workers-Og_Z_xzw.js} +2 -2
- package/dist/{workers-BCTUbUqo.js.map → workers-Og_Z_xzw.js.map} +1 -1
- package/package.json +2 -2
- package/dist/runtime-DtM7aYdB.js.map +0 -1
package/dist/fused-runtime.d.ts
CHANGED
|
@@ -588,6 +588,13 @@ export declare interface IFusedSimulationService {
|
|
|
588
588
|
reset(): Promise<void>;
|
|
589
589
|
/** Releases the models and keeps the captured package bytes for the next load. */
|
|
590
590
|
dispose(): Promise<void>;
|
|
591
|
+
/**
|
|
592
|
+
* Drops cached program artifacts so the next resolution asks the host again.
|
|
593
|
+
*
|
|
594
|
+
* `projectId` omitted means every project; with a `fingerprint`, entries whose cached artifact
|
|
595
|
+
* already carries that fingerprint are kept.
|
|
596
|
+
*/
|
|
597
|
+
invalidatePrograms(projectId?: string, fingerprint?: string): Promise<void>;
|
|
591
598
|
call(instanceId: string, method: string, params: Value): Promise<Value>;
|
|
592
599
|
getState(): IFusedSessionState;
|
|
593
600
|
onDidChangeState(listener: (state: IFusedSessionState) => void): () => void;
|
package/dist/fused-runtime.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { c as toWireFailure, i as isFusedBridgeError, n as FusedBridgeError, o as mapWireFailure, r as fromWireFailure, t as FUSED_WIRE_FAILURE } from "./wire-BDHL5Aj9.js";
|
|
2
|
-
import { _ as fusedModelSinkService, a as createFusedRuntime, c as createModelEventRouter, d as createHostPackageGateway, f as packageLockKey, g as fusedModelChannelService, h as fusedHostResourceService, i as startFusedSimulationGuest, l as createFusedDisplay, m as fusedHostPackageService, n as startFusedDisplayGuest, o as createHostModelRouter, p as fusedDisplayService, r as createViewSession, s as channelKey, t as loadFusedWorkerFactories, u as connectFusedWorkbench, v as fusedSimulationService } from "./runtime-
|
|
2
|
+
import { _ as fusedModelSinkService, a as createFusedRuntime, c as createModelEventRouter, d as createHostPackageGateway, f as packageLockKey, g as fusedModelChannelService, h as fusedHostResourceService, i as startFusedSimulationGuest, l as createFusedDisplay, m as fusedHostPackageService, n as startFusedDisplayGuest, o as createHostModelRouter, p as fusedDisplayService, r as createViewSession, s as channelKey, t as loadFusedWorkerFactories, u as connectFusedWorkbench, v as fusedSimulationService } from "./runtime-hyeAcSP7.js";
|
|
3
3
|
export { FUSED_WIRE_FAILURE, FusedBridgeError, channelKey, connectFusedWorkbench, createFusedDisplay, createFusedRuntime, createHostModelRouter, createHostPackageGateway, createModelEventRouter, createViewSession, fromWireFailure, fusedDisplayService, fusedHostPackageService, fusedHostResourceService, fusedModelChannelService, fusedModelSinkService, fusedSimulationService, isFusedBridgeError, loadFusedWorkerFactories, mapWireFailure, packageLockKey, startFusedDisplayGuest, startFusedSimulationGuest, toWireFailure };
|
package/dist/fused.d.ts
CHANGED
|
@@ -121,6 +121,11 @@ export declare interface IAssetInfo {
|
|
|
121
121
|
export declare interface IAssetProvider {
|
|
122
122
|
select(request: IAssetRequest): Promise<IAssetInfo | undefined>;
|
|
123
123
|
read(assetId: string, signal: AbortSignal): Promise<Uint8Array>;
|
|
124
|
+
/**
|
|
125
|
+
* 写入用户上传的文件并返回可直接绑定的资产。宿主决定命名与替换规则;
|
|
126
|
+
* 未实现时属性面板不提供上传入口。
|
|
127
|
+
*/
|
|
128
|
+
upload?(request: IAssetUploadRequest): Promise<IAssetInfo | undefined>;
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
export declare interface IAssetRequest {
|
|
@@ -129,6 +134,24 @@ export declare interface IAssetRequest {
|
|
|
129
134
|
readonly signal: AbortSignal;
|
|
130
135
|
}
|
|
131
136
|
|
|
137
|
+
export declare interface IAssetUploadRequest {
|
|
138
|
+
readonly kind: 'image' | 'binary' | 'program';
|
|
139
|
+
readonly formats?: readonly string[];
|
|
140
|
+
/** 目标属性的器件位号;宿主据此命名资产,实例没有位号时为 `undefined`。 */
|
|
141
|
+
readonly designator: string | undefined;
|
|
142
|
+
/** 目标属性的名称,与位号一起构成宿主侧的资产名。 */
|
|
143
|
+
readonly property: string;
|
|
144
|
+
/** 上传文件的原始文件名,含扩展名。 */
|
|
145
|
+
readonly name: string;
|
|
146
|
+
readonly bytes: Uint8Array;
|
|
147
|
+
/**
|
|
148
|
+
* 可以原位替换的资产 UUID:当前绑定,且文档里没有其他属性引用它。
|
|
149
|
+
* 宿主复用它时保留 UUID,用户不会为同一个属性积累历史固件。
|
|
150
|
+
*/
|
|
151
|
+
readonly replace: string | undefined;
|
|
152
|
+
readonly signal: AbortSignal;
|
|
153
|
+
}
|
|
154
|
+
|
|
132
155
|
/**
|
|
133
156
|
* A parsed condition. Parsing validates once; `evaluate` is pure and reads keys through the
|
|
134
157
|
* supplied lookup, so callers can evaluate the same condition against several scopes.
|