@yugoo-design/dsh-design-studio-dsh 0.1.2 → 0.2.2

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.
Files changed (56) hide show
  1. package/README.md +438 -3
  2. package/lib/authoring/panel-components.json +10790 -0
  3. package/lib/authoring/studio-creators/material.json +1 -0
  4. package/lib/authoring-agent-vc786tS0.js +648 -0
  5. package/lib/authoring-agent.d.ts +24 -0
  6. package/lib/authoring-agent.js +2 -0
  7. package/lib/authoring-agent.types-0S0xnlDW.d.ts +87 -0
  8. package/lib/authoring-entry.d.ts +20 -0
  9. package/lib/authoring-entry.js +77 -0
  10. package/lib/authoring-host-m8-GmXIx.js +348 -0
  11. package/lib/authoring-host.d.ts +5 -0
  12. package/lib/authoring-host.js +2 -0
  13. package/lib/authoring-host.types-BZt9l0xK.d.ts +77 -0
  14. package/lib/authoring-reference-store.d.ts +39 -0
  15. package/lib/authoring-reference-store.js +385 -0
  16. package/lib/authoring-service-WClXJGik.js +347 -0
  17. package/lib/authoring-service.d.ts +121 -0
  18. package/lib/authoring-service.js +2 -0
  19. package/lib/authoring-session.d.ts +5 -0
  20. package/lib/authoring-session.js +204 -0
  21. package/lib/authoring-session.types-C6HosIWU.d.ts +58 -0
  22. package/lib/authoring-sources-BzRuEuub.d.ts +17 -0
  23. package/lib/authoring-sources.d.ts +2 -0
  24. package/lib/authoring-sources.js +95 -0
  25. package/lib/authoring-workbench.d.ts +15 -0
  26. package/lib/authoring-workbench.js +782 -0
  27. package/lib/authoring.page-rpc-CYYWsmxc.d.ts +30 -0
  28. package/lib/authoring.page-rpc.d.ts +2 -0
  29. package/lib/authoring.page-rpc.js +55 -0
  30. package/lib/authoring.remote-client.d.ts +2557 -0
  31. package/lib/authoring.remote-client.js +435 -0
  32. package/lib/client-adapter-BmIzQcMT.d.ts +65 -0
  33. package/lib/client-adapter.d.ts +2 -64
  34. package/lib/client.js +1 -2
  35. package/lib/css-assets/dsh-design-studio-page/9178281a0695f79ff8bff8eca529231b67f896dc1c12c8dbaaad24b32dd3fc07.eot +0 -0
  36. package/lib/css-assets/dsh-design-studio-page/b366faf39f6bcc48f10b10f2860e5ebe57091cb2a15beeed8a0977e24560bbba.svg +224 -0
  37. package/lib/css-assets/dsh-design-studio-page/manifest.json +20 -0
  38. package/lib/index.js +4 -105
  39. package/lib/kit-files-DKBlBOG8.js +159 -0
  40. package/lib/page-client.js +4 -23849
  41. package/lib/page-path-BkPiqrUH.d.ts +25 -0
  42. package/lib/page-path.d.ts +2 -2
  43. package/lib/page-path.js +70 -2
  44. package/lib/page-rpc-DXbf4seT.d.ts +24 -0
  45. package/lib/page-rpc.d.ts +2 -15
  46. package/lib/page-rpc.js +9 -4
  47. package/lib/page.d.ts +5 -3
  48. package/lib/page.js +219 -2
  49. package/lib/remote-method-ab_lHwWN.js +16 -0
  50. package/lib/typert.host.d.ts +827 -2
  51. package/lib/typert.host.js +2 -1
  52. package/lib/typert.remote-client-CWz-anTr.d.ts +37 -0
  53. package/lib/typert.remote-client.d.ts +1 -36
  54. package/licenses/dsh-distribution.json +8644 -149
  55. package/package.json +73 -10
  56. package/lib/page-path-wn8e_fid.d.ts +0 -14
@@ -0,0 +1,30 @@
1
+ import { r as StudioAuthoringReference, t as StudioAuthoringObservation } from "./authoring-agent.types-0S0xnlDW.js";
2
+ import { o as StudioSessionStart, r as StudioSessionPrepared } from "./authoring-session.types-C6HosIWU.js";
3
+ import { a as StudioPreparedLocator } from "./authoring-host.types-BZt9l0xK.js";
4
+ import { t as StudioPageFetch } from "./page-rpc-DXbf4seT.js";
5
+ import { StudioContentClient, StudioInstanceClient } from "@yugoo-design/dsh-design-studio-ui";
6
+ //#region src/authoring.page-rpc.d.ts
7
+ type StudioAuthoringAddress = Pick<StudioAuthoringReference, 'sessionId' | 'epoch'>;
8
+ type StudioPageAuthoringStart = Omit<StudioSessionStart, 'signal' | 'onPrepared'>;
9
+ interface StudioPageAuthoringClient {
10
+ readonly instances: StudioInstanceClient;
11
+ readonly content?: StudioContentClient;
12
+ start(request: StudioPageAuthoringStart): Promise<StudioAuthoringReference>;
13
+ resume(request: StudioPageAuthoringStart & {
14
+ readonly previous: StudioAuthoringAddress;
15
+ readonly explicit: true;
16
+ }): Promise<StudioAuthoringReference>;
17
+ observe(address: StudioAuthoringAddress): Promise<StudioAuthoringObservation>;
18
+ cancel(address: StudioAuthoringAddress, options: {
19
+ readonly expectedTurn: number | null;
20
+ }): Promise<StudioAuthoringObservation>;
21
+ readPrepared(address: StudioAuthoringAddress | StudioPreparedLocator): Promise<StudioSessionPrepared | undefined>;
22
+ listReferences(): Promise<readonly StudioAuthoringReference[]>;
23
+ }
24
+ /** An explicit native SessionId locator; this browser value never substitutes for Host lookup. */
25
+ declare function createSameOriginStudioAuthoringClient(options: {
26
+ readonly agentId: string;
27
+ readonly fetch?: StudioPageFetch;
28
+ }): StudioPageAuthoringClient;
29
+ //#endregion
30
+ export { createSameOriginStudioAuthoringClient as i, StudioPageAuthoringClient as n, StudioPageAuthoringStart as r, StudioAuthoringAddress as t };
@@ -0,0 +1,2 @@
1
+ import { i as createSameOriginStudioAuthoringClient, n as StudioPageAuthoringClient, r as StudioPageAuthoringStart, t as StudioAuthoringAddress } from "./authoring.page-rpc-CYYWsmxc.js";
2
+ export { StudioAuthoringAddress, StudioPageAuthoringClient, StudioPageAuthoringStart, createSameOriginStudioAuthoringClient };
@@ -0,0 +1,55 @@
1
+ import { STUDIO_AUTHORING_REMOTE, STUDIO_AUTHORING_RPC_SCHEMAS } from "./authoring.remote-client.js";
2
+ import { callStudioRemote } from "./page-rpc.js";
3
+ //#region src/authoring.page-rpc.ts
4
+ /** An explicit native SessionId locator; this browser value never substitutes for Host lookup. */
5
+ function createSameOriginStudioAuthoringClient(options) {
6
+ const agentId = STUDIO_AUTHORING_REMOTE.descriptors[0].parameters[0].codec.create().parse(options.agentId);
7
+ const fetch = options.fetch ?? ((input, init) => globalThis.fetch(input, init));
8
+ const call = async (method, input) => {
9
+ const descriptor = STUDIO_AUTHORING_REMOTE.descriptors.find((item) => item.method === method);
10
+ const spec = STUDIO_AUTHORING_RPC_SCHEMAS[method];
11
+ const request = spec.request?.parse(input);
12
+ if (spec.request === void 0 && input !== void 0) throw new Error(`studioAuthoring/${method}: no request argument is accepted`);
13
+ const result = await callStudioRemote(descriptor, {
14
+ agentId,
15
+ ...request === void 0 ? {} : { request }
16
+ }, fetch);
17
+ if (!result.ok) throw new Error(`studioAuthoring/${method}: ${result.error.message ?? result.error.code ?? "request failed"}`);
18
+ return result.value;
19
+ };
20
+ const instances = Object.freeze({
21
+ list: (input) => call("list", input),
22
+ read: (input) => call("read", input),
23
+ create: (input) => call("create", input),
24
+ importSources: (input) => call("importSources", input),
25
+ copy: (input) => call("copy", input),
26
+ editCurrent: (input) => call("editCurrent", input),
27
+ rename: (input) => call("rename", input),
28
+ remove: (input) => call("remove", input),
29
+ readFile: (input) => call("readFile", input),
30
+ saveFile: (input) => call("saveFile", input),
31
+ prepareChanges: (input) => call("prepareChanges", input),
32
+ saveChanges: (input) => call("saveChanges", input),
33
+ updateMounts: (input) => call("updateMounts", input),
34
+ preview: ({ locale: _locale, ...request }) => call("preview", request)
35
+ });
36
+ const content = Object.freeze({
37
+ export: (input) => call("exportContentArchive", input),
38
+ readArchive: (input) => call("readArchive", input)
39
+ });
40
+ return Object.freeze({
41
+ instances,
42
+ content,
43
+ start: (request) => call("start", request),
44
+ resume: (request) => call("resume", request),
45
+ observe: (address) => call("observe", address),
46
+ cancel: async (address, input) => call("cancel", {
47
+ ...STUDIO_AUTHORING_RPC_SCHEMAS.observe.request.parse(address),
48
+ ...STUDIO_AUTHORING_RPC_SCHEMAS.cancel.request.pick({ expectedTurn: true }).parse(input)
49
+ }),
50
+ readPrepared: async (address) => (await call("readPrepared", address)).prepared,
51
+ listReferences: () => call("listReferences")
52
+ });
53
+ }
54
+ //#endregion
55
+ export { createSameOriginStudioAuthoringClient };