@nanoforge-dev/editor 0.0.2-beta.d5ae009 → 0.0.2-beta.ddbefdc
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/client/_app/immutable/assets/{0.CjGIZXZs.css → 0.PlL6w-dg.css} +1 -1
- package/dist/client/_app/immutable/assets/0.PlL6w-dg.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.PlL6w-dg.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/BW1UW6Hp.js +1 -0
- package/dist/client/_app/immutable/chunks/BW1UW6Hp.js.br +0 -0
- package/dist/client/_app/immutable/chunks/BW1UW6Hp.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/C1k-YaT9.js +293 -0
- package/dist/client/_app/immutable/chunks/C1k-YaT9.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C1k-YaT9.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{FP7xnvT4.js → C8VsmuzL.js} +1 -1
- package/dist/client/_app/immutable/chunks/C8VsmuzL.js.br +0 -0
- package/dist/client/_app/immutable/chunks/C8VsmuzL.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CUEbnJ91.js +6 -0
- package/dist/client/_app/immutable/chunks/CUEbnJ91.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CUEbnJ91.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{CT3UgqBA.js → xJ1-16vC.js} +1 -1
- package/dist/client/_app/immutable/chunks/xJ1-16vC.js.br +0 -0
- package/dist/client/_app/immutable/chunks/xJ1-16vC.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/{MAzZK5cV.js → y9jahtbD.js} +1 -1
- package/dist/client/_app/immutable/chunks/y9jahtbD.js.br +0 -0
- package/dist/client/_app/immutable/chunks/y9jahtbD.js.gz +0 -0
- package/dist/client/_app/immutable/entry/{app.D7Qhroat.js → app.qM3aoeOi.js} +2 -2
- package/dist/client/_app/immutable/entry/app.qM3aoeOi.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.qM3aoeOi.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.CDMZxkmh.js +1 -0
- package/dist/client/_app/immutable/entry/start.CDMZxkmh.js.br +0 -0
- package/dist/client/_app/immutable/entry/start.CDMZxkmh.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{1.D2petaCJ.js → 1.D-XWgJOb.js} +1 -1
- package/dist/client/_app/immutable/nodes/1.D-XWgJOb.js.br +2 -0
- package/dist/client/_app/immutable/nodes/1.D-XWgJOb.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.DkYlNzbR.js +6 -0
- package/dist/client/_app/immutable/nodes/10.DkYlNzbR.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.DkYlNzbR.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.D2mbM0C2.js +1 -0
- package/dist/client/_app/immutable/nodes/2.D2mbM0C2.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.D2mbM0C2.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/{9.BGu6EfS2.js → 9.BrWnGfyr.js} +1 -1
- package/dist/client/_app/immutable/nodes/9.BrWnGfyr.js.br +0 -0
- package/dist/client/_app/immutable/nodes/9.BrWnGfyr.js.gz +0 -0
- package/dist/client/_app/version.json +1 -1
- package/dist/client/_app/version.json.br +0 -0
- package/dist/client/_app/version.json.gz +0 -0
- package/dist/server/chunks/{0-D3qhveQr.js → 0-CaJWcpu3.js} +3 -3
- package/dist/server/chunks/{0-D3qhveQr.js.map → 0-CaJWcpu3.js.map} +1 -1
- package/dist/server/chunks/{1-DC3uFVBV.js → 1-na9Uh1hG.js} +5 -5
- package/dist/server/chunks/{1-DC3uFVBV.js.map → 1-na9Uh1hG.js.map} +1 -1
- package/dist/server/chunks/{10-BVrMXTW8.js → 10-Dh1abrew.js} +8 -8
- package/dist/server/chunks/{10-BVrMXTW8.js.map → 10-Dh1abrew.js.map} +1 -1
- package/dist/server/chunks/{2-DX6ErPQr.js → 2-BM68e_rU.js} +7 -7
- package/dist/server/chunks/{2-DX6ErPQr.js.map → 2-BM68e_rU.js.map} +1 -1
- package/dist/server/chunks/{3-BFIclw2U.js → 3-CtfjP4uZ.js} +2 -2
- package/dist/server/chunks/{3-BFIclw2U.js.map → 3-CtfjP4uZ.js.map} +1 -1
- package/dist/server/chunks/{4-Cim4b7CK.js → 4-DP-_gDay.js} +2 -2
- package/dist/server/chunks/{4-Cim4b7CK.js.map → 4-DP-_gDay.js.map} +1 -1
- package/dist/server/chunks/{5-DQ3o1uwg.js → 5-610NKQc3.js} +2 -2
- package/dist/server/chunks/{5-DQ3o1uwg.js.map → 5-610NKQc3.js.map} +1 -1
- package/dist/server/chunks/{6-CadULKrR.js → 6-Dl_h_OyU.js} +2 -2
- package/dist/server/chunks/{6-CadULKrR.js.map → 6-Dl_h_OyU.js.map} +1 -1
- package/dist/server/chunks/{7-CxjbU6zP.js → 7-BUEKgK7m.js} +2 -2
- package/dist/server/chunks/{7-CxjbU6zP.js.map → 7-BUEKgK7m.js.map} +1 -1
- package/dist/server/chunks/{8-D8RKzhKE.js → 8-s07Rj2Zo.js} +2 -2
- package/dist/server/chunks/{8-D8RKzhKE.js.map → 8-s07Rj2Zo.js.map} +1 -1
- package/dist/server/chunks/{9-C-mS2ReE.js → 9-DkqE8li9.js} +8 -8
- package/dist/server/chunks/{9-C-mS2ReE.js.map → 9-DkqE8li9.js.map} +1 -1
- package/dist/server/chunks/{_page.svelte-CF_EqiqV.js → _page.svelte-1bR7bJ2y.js} +5 -5
- package/dist/server/chunks/_page.svelte-1bR7bJ2y.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-ByqpfNPC.js → _page.svelte-B_0YFORc.js} +6 -6
- package/dist/server/chunks/_page.svelte-B_0YFORc.js.map +1 -0
- package/dist/server/chunks/{_page.svelte-C1HyEKjK.js → _page.svelte-BmrR5-n-.js} +89 -26
- package/dist/server/chunks/_page.svelte-BmrR5-n-.js.map +1 -0
- package/dist/server/chunks/{_server.ts-DvvWYqRd.js → _server.ts-DlC2sxcm.js} +2 -2
- package/dist/server/chunks/{_server.ts-DvvWYqRd.js.map → _server.ts-DlC2sxcm.js.map} +1 -1
- package/dist/server/chunks/{_server.ts-DFC8ij6-.js → _server.ts-a-I4s4R9.js} +2 -2
- package/dist/server/chunks/{_server.ts-DFC8ij6-.js.map → _server.ts-a-I4s4R9.js.map} +1 -1
- package/dist/server/chunks/{client-DhMlbh2c.js → client-BkmWBFaS.js} +2 -2
- package/dist/server/chunks/{client-DhMlbh2c.js.map → client-BkmWBFaS.js.map} +1 -1
- package/dist/server/chunks/{error-Df0LgzGi.js → error-BGQyviUk.js} +105 -50
- package/dist/server/chunks/error-BGQyviUk.js.map +1 -0
- package/dist/server/chunks/{error.svelte-DM_iE9zL.js → error.svelte-T6M8Vz4W.js} +2 -2
- package/dist/server/chunks/{error.svelte-DM_iE9zL.js.map → error.svelte-T6M8Vz4W.js.map} +1 -1
- package/dist/server/chunks/{hooks.server-CKcZoYoT.js → hooks.server-Bb56FM49.js} +2 -2
- package/dist/server/chunks/{hooks.server-CKcZoYoT.js.map → hooks.server-Bb56FM49.js.map} +1 -1
- package/dist/server/chunks/{internal2-CRbvkWND.js → internal2-CeV_cIh4.js} +3 -3
- package/dist/server/chunks/{internal2-CRbvkWND.js.map → internal2-CeV_cIh4.js.map} +1 -1
- package/dist/server/chunks/{logo-C422_TRA.js → logo-Cit4wZkS.js} +2 -2
- package/dist/server/chunks/logo-Cit4wZkS.js.map +1 -0
- package/dist/server/chunks/{project-loader-3ZC0fkGL.js → project-loader-BSqYC-7k.js} +3 -3
- package/dist/server/chunks/{project-loader-3ZC0fkGL.js.map → project-loader-BSqYC-7k.js.map} +1 -1
- package/dist/server/chunks/{request-handler-DIqttORJ.js → request-handler-guINVc1G.js} +3 -3
- package/dist/server/chunks/request-handler-guINVc1G.js.map +1 -0
- package/dist/server/chunks/{schemas-iHhaE-aY.js → schemas-DbJHhqwa.js} +6 -25
- package/dist/server/chunks/schemas-DbJHhqwa.js.map +1 -0
- package/dist/server/chunks/{state-DHSP_spt.js → state-DpIO_6NS.js} +2 -2
- package/dist/server/chunks/{state-DHSP_spt.js.map → state-DpIO_6NS.js.map} +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/manifest.js +18 -18
- package/dist/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/_app/immutable/assets/0.CjGIZXZs.css.br +0 -0
- package/dist/client/_app/immutable/assets/0.CjGIZXZs.css.gz +0 -0
- package/dist/client/_app/immutable/chunks/CBO6kAED.js +0 -293
- package/dist/client/_app/immutable/chunks/CBO6kAED.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CBO6kAED.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/CT3UgqBA.js.br +0 -0
- package/dist/client/_app/immutable/chunks/CT3UgqBA.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DEqe37pD.js +0 -6
- package/dist/client/_app/immutable/chunks/DEqe37pD.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DEqe37pD.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/DNftsqR1.js +0 -1
- package/dist/client/_app/immutable/chunks/DNftsqR1.js.br +0 -0
- package/dist/client/_app/immutable/chunks/DNftsqR1.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/FP7xnvT4.js.br +0 -0
- package/dist/client/_app/immutable/chunks/FP7xnvT4.js.gz +0 -0
- package/dist/client/_app/immutable/chunks/MAzZK5cV.js.br +0 -0
- package/dist/client/_app/immutable/chunks/MAzZK5cV.js.gz +0 -0
- package/dist/client/_app/immutable/entry/app.D7Qhroat.js.br +0 -0
- package/dist/client/_app/immutable/entry/app.D7Qhroat.js.gz +0 -0
- package/dist/client/_app/immutable/entry/start.Di1N-dwj.js +0 -1
- package/dist/client/_app/immutable/entry/start.Di1N-dwj.js.br +0 -1
- package/dist/client/_app/immutable/entry/start.Di1N-dwj.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/1.D2petaCJ.js.br +0 -1
- package/dist/client/_app/immutable/nodes/1.D2petaCJ.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/10.C4HJc4cu.js +0 -6
- package/dist/client/_app/immutable/nodes/10.C4HJc4cu.js.br +0 -0
- package/dist/client/_app/immutable/nodes/10.C4HJc4cu.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/2.DnluJ7u1.js +0 -1
- package/dist/client/_app/immutable/nodes/2.DnluJ7u1.js.br +0 -0
- package/dist/client/_app/immutable/nodes/2.DnluJ7u1.js.gz +0 -0
- package/dist/client/_app/immutable/nodes/9.BGu6EfS2.js.br +0 -0
- package/dist/client/_app/immutable/nodes/9.BGu6EfS2.js.gz +0 -0
- package/dist/server/chunks/_page.svelte-ByqpfNPC.js.map +0 -1
- package/dist/server/chunks/_page.svelte-C1HyEKjK.js.map +0 -1
- package/dist/server/chunks/_page.svelte-CF_EqiqV.js.map +0 -1
- package/dist/server/chunks/error-Df0LgzGi.js.map +0 -1
- package/dist/server/chunks/logo-C422_TRA.js.map +0 -1
- package/dist/server/chunks/request-handler-DIqttORJ.js.map +0 -1
- package/dist/server/chunks/schemas-iHhaE-aY.js.map +0 -1
- /package/dist/client/_app/immutable/nodes/{0.CW6BAtSC.js → 0.Dd5fG40d.js} +0 -0
- /package/dist/client/_app/immutable/nodes/{0.CW6BAtSC.js.br → 0.Dd5fG40d.js.br} +0 -0
- /package/dist/client/_app/immutable/nodes/{0.CW6BAtSC.js.gz → 0.Dd5fG40d.js.gz} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Ct as clsx, D as ensure_array_like, M as get$1$1, N as getAllContexts, P as getContext, R as hasContext, St as writable, X as mount, a as ATTACHMENT_KEY, ct as setContext, dt as spread_props, g as bind_props, gt as tick, h as attributes, k as escape_html, ot as run, r as on, tt as props_id, w as derived, y as clsx$1, yt as unmount } from "./events-Bhh2w-5S.js";
|
|
2
|
-
import { G as noop$1, J as parse } from "./internal2-
|
|
2
|
+
import { G as noop$1, J as parse } from "./internal2-CeV_cIh4.js";
|
|
3
3
|
import { t as app } from "./app-DUeJj5RD.js";
|
|
4
4
|
import { n as SESSION_PROJECT_HEADER, t as Exception } from "./const-Dy5RfQqP.js";
|
|
5
5
|
import { r as formatFrom, t as HttpClient } from "./format-DGOlJxF5.js";
|
|
6
|
-
import { a as resolve, i as invalidateAll, n as applyAction, r as goto } from "./client-
|
|
6
|
+
import { a as resolve, i as invalidateAll, n as applyAction, r as goto } from "./client-BkmWBFaS.js";
|
|
7
7
|
import { A as resolveQueryBoolean, I as timeUntilStale, L as timeoutManager, N as shallowEqualObjects, O as pendingThenable, R as toast, T as notifyManager, _ as getIsRestoringContext, c as SvelteMap, f as createSubscriber, h as focusManager, j as resolveStaleTime, k as replaceData, l as SvelteSet, m as fetchState, n as Loader_circle, p as environmentManager, s as Subscribable, t as Icon, v as getQueryClientContext, w as noop$2, x as isValidTimeout } from "./loader-circle-CFNm9vip.js";
|
|
8
8
|
//#region node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
9
9
|
/**
|
|
@@ -4665,21 +4665,24 @@ var getActionClient = (projectId) => {
|
|
|
4665
4665
|
};
|
|
4666
4666
|
};
|
|
4667
4667
|
var noProjectActions = getActionClient();
|
|
4668
|
-
var
|
|
4668
|
+
var componentTransformer = (component) => ({
|
|
4669
4669
|
id: component.manifest.id,
|
|
4670
4670
|
name: component.manifest.name,
|
|
4671
4671
|
path: component.save.path,
|
|
4672
4672
|
params: component.manifest.params
|
|
4673
|
-
})
|
|
4674
|
-
var
|
|
4673
|
+
});
|
|
4674
|
+
var componentsTransformer = (components) => components.map(componentTransformer);
|
|
4675
|
+
var systemTransformer = (system) => ({
|
|
4675
4676
|
id: system.manifest.id,
|
|
4676
4677
|
name: system.manifest.name,
|
|
4677
4678
|
path: system.save.path
|
|
4678
|
-
})
|
|
4679
|
-
var
|
|
4679
|
+
});
|
|
4680
|
+
var systemsTransformer = (systems) => systems.map(systemTransformer);
|
|
4681
|
+
var libraryTransformer = (lib) => ({
|
|
4680
4682
|
id: lib.path,
|
|
4681
4683
|
name: lib.name
|
|
4682
|
-
})
|
|
4684
|
+
});
|
|
4685
|
+
var librariesTransformer = (save) => save.libraries.map(libraryTransformer);
|
|
4683
4686
|
var scenesTransformer = (save) => [{
|
|
4684
4687
|
id: "default",
|
|
4685
4688
|
name: "Default Scene",
|
|
@@ -4778,16 +4781,23 @@ var ComponentManager = class {
|
|
|
4778
4781
|
get data() {
|
|
4779
4782
|
return get$1$1(_storage$12);
|
|
4780
4783
|
}
|
|
4781
|
-
|
|
4782
|
-
const
|
|
4783
|
-
const
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
});
|
|
4789
|
-
|
|
4790
|
-
|
|
4784
|
+
async create(name) {
|
|
4785
|
+
const { actions, fs } = useProject();
|
|
4786
|
+
const component = await actions.package.createComponent({ componentName: name });
|
|
4787
|
+
this._add(componentTransformer(component));
|
|
4788
|
+
await (await fs.getDirectory()).readdir(true);
|
|
4789
|
+
}
|
|
4790
|
+
async import(names) {
|
|
4791
|
+
const { actions, ecs, fs } = useProject();
|
|
4792
|
+
await actions.package.addComponents({ componentNames: names });
|
|
4793
|
+
await this.sync();
|
|
4794
|
+
await ecs.components.sync();
|
|
4795
|
+
await (await fs.getDirectory()).readdir(true);
|
|
4796
|
+
}
|
|
4797
|
+
async sync() {
|
|
4798
|
+
const { actions } = useProject();
|
|
4799
|
+
const components = await actions.package.getComponents();
|
|
4800
|
+
_storage$12.set(componentsTransformer(components));
|
|
4791
4801
|
}
|
|
4792
4802
|
get(id) {
|
|
4793
4803
|
const component = get$1$1(_storage$12).find((component) => component.id === id);
|
|
@@ -4806,6 +4816,11 @@ var ComponentManager = class {
|
|
|
4806
4816
|
_subscriptions$6.set(subscriptions);
|
|
4807
4817
|
}
|
|
4808
4818
|
}
|
|
4819
|
+
_add(component) {
|
|
4820
|
+
const components = get$1$1(_storage$12);
|
|
4821
|
+
components.push(component);
|
|
4822
|
+
_storage$12.set(components);
|
|
4823
|
+
}
|
|
4809
4824
|
_subscribe(id, handle) {
|
|
4810
4825
|
setTimeout(() => {
|
|
4811
4826
|
const subscriptions = get$1$1(_subscriptions$6);
|
|
@@ -4957,6 +4972,7 @@ var ComponentParamManager = class {
|
|
|
4957
4972
|
component;
|
|
4958
4973
|
_store;
|
|
4959
4974
|
_valuesStore;
|
|
4975
|
+
_storageResolvable;
|
|
4960
4976
|
static reset() {
|
|
4961
4977
|
_storage$8.set({});
|
|
4962
4978
|
_valueStorage.set({});
|
|
@@ -4965,9 +4981,9 @@ var ComponentParamManager = class {
|
|
|
4965
4981
|
}
|
|
4966
4982
|
constructor(component, params) {
|
|
4967
4983
|
this.component = component;
|
|
4968
|
-
|
|
4969
|
-
this._store = resolveStore(_storage$8,
|
|
4970
|
-
this._valuesStore = resolveStore(_valueStorage,
|
|
4984
|
+
this._storageResolvable = `${this.component.manager.entity.manager.scene.id}/${this.component.manager.entity.id}/${this.component.id}`;
|
|
4985
|
+
this._store = resolveStore(_storage$8, this._storageResolvable, get$1$1(component.store).params);
|
|
4986
|
+
this._valuesStore = resolveStore(_valueStorage, this._storageResolvable, params);
|
|
4971
4987
|
this._listen();
|
|
4972
4988
|
}
|
|
4973
4989
|
get store() {
|
|
@@ -4990,10 +5006,11 @@ var ComponentParamManager = class {
|
|
|
4990
5006
|
...param,
|
|
4991
5007
|
value: void 0
|
|
4992
5008
|
} : param));
|
|
5009
|
+
const fullId = `${this._storageResolvable}/${id}`;
|
|
4993
5010
|
const subscriptions = get$1$1(_subscriptions$4);
|
|
4994
|
-
if (subscriptions[
|
|
4995
|
-
subscriptions[
|
|
4996
|
-
subscriptions[
|
|
5011
|
+
if (subscriptions[fullId]) {
|
|
5012
|
+
subscriptions[fullId]();
|
|
5013
|
+
subscriptions[fullId] = null;
|
|
4997
5014
|
_subscriptions$4.set(subscriptions);
|
|
4998
5015
|
}
|
|
4999
5016
|
}
|
|
@@ -5006,9 +5023,10 @@ var ComponentParamManager = class {
|
|
|
5006
5023
|
}
|
|
5007
5024
|
_subscribe(id, handle) {
|
|
5008
5025
|
setTimeout(() => {
|
|
5026
|
+
const fullId = `${this._storageResolvable}/${id}`;
|
|
5009
5027
|
const subscriptions = get$1$1(_subscriptions$4);
|
|
5010
|
-
if (subscriptions[
|
|
5011
|
-
subscriptions[
|
|
5028
|
+
if (subscriptions[fullId]) return;
|
|
5029
|
+
subscriptions[fullId] = handle.value.subscribe((param) => this._update(id, param));
|
|
5012
5030
|
_subscriptions$4.set(subscriptions);
|
|
5013
5031
|
}, 0);
|
|
5014
5032
|
}
|
|
@@ -5048,6 +5066,7 @@ var _listener$3 = writable();
|
|
|
5048
5066
|
var EntityComponentManager = class {
|
|
5049
5067
|
entity;
|
|
5050
5068
|
_store;
|
|
5069
|
+
_storageResolvable;
|
|
5051
5070
|
static reset() {
|
|
5052
5071
|
_storage$7.set({});
|
|
5053
5072
|
resetSubscriptions(_subscriptions$3);
|
|
@@ -5055,8 +5074,8 @@ var EntityComponentManager = class {
|
|
|
5055
5074
|
}
|
|
5056
5075
|
constructor(entity, components) {
|
|
5057
5076
|
this.entity = entity;
|
|
5058
|
-
|
|
5059
|
-
this._store = resolveStore(_storage$7,
|
|
5077
|
+
this._storageResolvable = `${this.entity.manager.scene.id}/${this.entity.id}`;
|
|
5078
|
+
this._store = resolveStore(_storage$7, this._storageResolvable, components);
|
|
5060
5079
|
this._listen();
|
|
5061
5080
|
}
|
|
5062
5081
|
get store() {
|
|
@@ -5085,10 +5104,11 @@ var EntityComponentManager = class {
|
|
|
5085
5104
|
if (key !== id) newComponents[key] = params;
|
|
5086
5105
|
});
|
|
5087
5106
|
this._store.set(newComponents);
|
|
5107
|
+
const fullId = `${this._storageResolvable}/${id}`;
|
|
5088
5108
|
const subscriptions = get$1$1(_subscriptions$3);
|
|
5089
|
-
if (subscriptions[
|
|
5090
|
-
subscriptions[
|
|
5091
|
-
subscriptions[
|
|
5109
|
+
if (subscriptions[fullId]) {
|
|
5110
|
+
subscriptions[fullId]();
|
|
5111
|
+
subscriptions[fullId] = null;
|
|
5092
5112
|
_subscriptions$3.set(subscriptions);
|
|
5093
5113
|
}
|
|
5094
5114
|
}
|
|
@@ -5106,9 +5126,10 @@ var EntityComponentManager = class {
|
|
|
5106
5126
|
}
|
|
5107
5127
|
_subscribe(id, handle) {
|
|
5108
5128
|
setTimeout(() => {
|
|
5129
|
+
const fullId = `${this._storageResolvable}/${id}`;
|
|
5109
5130
|
const subscriptions = get$1$1(_subscriptions$3);
|
|
5110
|
-
if (subscriptions[
|
|
5111
|
-
subscriptions[
|
|
5131
|
+
if (subscriptions[fullId]) return;
|
|
5132
|
+
subscriptions[fullId] = handle.params.values.subscribe((params) => this._update(id, params));
|
|
5112
5133
|
_subscriptions$3.set(subscriptions);
|
|
5113
5134
|
}, 0);
|
|
5114
5135
|
}
|
|
@@ -5216,19 +5237,21 @@ var SceneEntityManager = class {
|
|
|
5216
5237
|
delete(id) {
|
|
5217
5238
|
const entities = get$1$1(this._store);
|
|
5218
5239
|
this._store.set(entities.filter((entity) => entity.id !== id));
|
|
5240
|
+
const fullId = `${this.scene.id}/${id}`;
|
|
5219
5241
|
const subscriptions = get$1$1(_subscriptions$2);
|
|
5220
|
-
if (subscriptions[
|
|
5221
|
-
subscriptions[
|
|
5222
|
-
subscriptions[
|
|
5242
|
+
if (subscriptions[fullId]) {
|
|
5243
|
+
subscriptions[fullId]();
|
|
5244
|
+
subscriptions[fullId] = null;
|
|
5223
5245
|
_subscriptions$2.set(subscriptions);
|
|
5224
5246
|
}
|
|
5225
5247
|
if (this.selectedData?.id === id) this.selected = void 0;
|
|
5226
5248
|
}
|
|
5227
5249
|
_subscribe(id, handle) {
|
|
5228
5250
|
setTimeout(() => {
|
|
5251
|
+
const fullId = `${this.scene.id}/${id}`;
|
|
5229
5252
|
const subscriptions = get$1$1(_subscriptions$2);
|
|
5230
|
-
if (subscriptions[
|
|
5231
|
-
subscriptions[
|
|
5253
|
+
if (subscriptions[fullId]) return;
|
|
5254
|
+
subscriptions[fullId] = handle.store.subscribe((entity) => this._update(id, entity));
|
|
5232
5255
|
_subscriptions$2.set(subscriptions);
|
|
5233
5256
|
}, 0);
|
|
5234
5257
|
}
|
|
@@ -5511,16 +5534,23 @@ var SystemManager = class {
|
|
|
5511
5534
|
get data() {
|
|
5512
5535
|
return get$1$1(_storage);
|
|
5513
5536
|
}
|
|
5514
|
-
|
|
5515
|
-
const
|
|
5516
|
-
const
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
});
|
|
5522
|
-
|
|
5523
|
-
|
|
5537
|
+
async create(name) {
|
|
5538
|
+
const { actions, fs } = useProject();
|
|
5539
|
+
const system = await actions.package.createSystem({ systemName: name });
|
|
5540
|
+
this._add(systemTransformer(system));
|
|
5541
|
+
await (await fs.getDirectory()).readdir(true);
|
|
5542
|
+
}
|
|
5543
|
+
async import(names) {
|
|
5544
|
+
const { actions, ecs, fs } = useProject();
|
|
5545
|
+
await actions.package.addSystems({ systemNames: names });
|
|
5546
|
+
await this.sync();
|
|
5547
|
+
await ecs.components.sync();
|
|
5548
|
+
await (await fs.getDirectory()).readdir(true);
|
|
5549
|
+
}
|
|
5550
|
+
async sync() {
|
|
5551
|
+
const { actions } = useProject();
|
|
5552
|
+
const systems = await actions.package.getSystems();
|
|
5553
|
+
_storage.set(systemsTransformer(systems));
|
|
5524
5554
|
}
|
|
5525
5555
|
get(id) {
|
|
5526
5556
|
const system = get$1$1(_storage).find((system) => system.id === id);
|
|
@@ -5539,6 +5569,11 @@ var SystemManager = class {
|
|
|
5539
5569
|
_subscriptions.set(subscriptions);
|
|
5540
5570
|
}
|
|
5541
5571
|
}
|
|
5572
|
+
_add(system) {
|
|
5573
|
+
const systems = get$1$1(_storage);
|
|
5574
|
+
systems.push(system);
|
|
5575
|
+
_storage.set(systems);
|
|
5576
|
+
}
|
|
5542
5577
|
_subscribe(id, handle) {
|
|
5543
5578
|
setTimeout(() => {
|
|
5544
5579
|
const subscriptions = get$1$1(_subscriptions);
|
|
@@ -6200,6 +6235,7 @@ var SyncFileSystem = class {
|
|
|
6200
6235
|
}
|
|
6201
6236
|
async init() {
|
|
6202
6237
|
await this.treeCache?.init();
|
|
6238
|
+
await (await this.getDirectory()).readdir(true);
|
|
6203
6239
|
}
|
|
6204
6240
|
async getFile(path) {
|
|
6205
6241
|
return new SfsFile(this, await this.cache.fileExist(path) ? await this.cache.getFile(path, false) : null, path);
|
|
@@ -14909,6 +14945,25 @@ function Select($$renderer, $$props) {
|
|
|
14909
14945
|
});
|
|
14910
14946
|
});
|
|
14911
14947
|
}
|
|
14948
|
+
function Loading_button($$renderer, $$props) {
|
|
14949
|
+
let { loading = false, disabled, children, $$slots, $$events, ...restProps } = $$props;
|
|
14950
|
+
Button($$renderer, spread_props([
|
|
14951
|
+
{ disabled: disabled || loading },
|
|
14952
|
+
restProps,
|
|
14953
|
+
{
|
|
14954
|
+
children: ($$renderer) => {
|
|
14955
|
+
if (loading) {
|
|
14956
|
+
$$renderer.push("<!--[0-->");
|
|
14957
|
+
Spinner($$renderer, {});
|
|
14958
|
+
} else $$renderer.push("<!--[-1-->");
|
|
14959
|
+
$$renderer.push(`<!--]--> `);
|
|
14960
|
+
children?.($$renderer);
|
|
14961
|
+
$$renderer.push(`<!---->`);
|
|
14962
|
+
},
|
|
14963
|
+
$$slots: { default: true }
|
|
14964
|
+
}
|
|
14965
|
+
]));
|
|
14966
|
+
}
|
|
14912
14967
|
var handleError = (error, context) => {
|
|
14913
14968
|
const message = `Failed to ${context ?? "execute"}`;
|
|
14914
14969
|
if (error instanceof Exception) {
|
|
@@ -14933,6 +14988,6 @@ var runSafe = async (context, cb, fallback) => {
|
|
|
14933
14988
|
return null;
|
|
14934
14989
|
};
|
|
14935
14990
|
//#endregion
|
|
14936
|
-
export {
|
|
14991
|
+
export { createBitsAttrs as $, Portal as A, Separator as B, MenuMenuState as C, PLException as D, PLErrors as E, Scroll_lock as F, Text_selection_layer as G, StyleToObject as H, Select as I, boolToStr as J, attachRef as K, Select_content as L, ProjectCache as M, ProjectLoader as N, Popper_layer as O, RovingFocusGroup as P, cn as Q, Select_item as R, MenuItemState as S, MenuSeparatorState as T, Switch as U, Spinner as V, Switch_thumb as W, boxWith as X, boolToTrueOrUndef as Y, capitalize as Z, Floating_layer_anchor as _, useId as _t, Card_content as a, getDataOpenClosed as at, Loading_button as b, tv as bt, Card_title as c, getFloatingContentCSSVars as ct, DOMContext as d, mergeProps as dt, createId as et, Dismissible_layer as f, noop as ft, Floating_layer as g, useDebounce as gt, FloatingArrowState as h, toastError as ht, Card as i, getConfig as it, PresenceManager as j, Popper_layer_force_mount as k, Context as l, isElement$1 as lt, Escape_layer as m, simpleBox as mt, Button as n, deserialize as nt, Card_description as o, getDataTransitionAttrs as ot, DropdownMenuTriggerState as p, runSafe as pt, boolToEmptyStrOrUndef as q, CONTEXT_MENU_TRIGGER_ATTR as r, enhance as rt, Card_header as s, getDocument as st, AnimationsComplete as t, createQuery as tt, ContextMenuTriggerState as u, isFocusVisible as ut, Focus_scope as v, useProject as vt, MenuRootState as w, MenuContentState as x, IsMounted as y, watch as yt, Select_trigger as z };
|
|
14937
14992
|
|
|
14938
|
-
//# sourceMappingURL=error-
|
|
14993
|
+
//# sourceMappingURL=error-BGQyviUk.js.map
|