@joycostudio/studio 0.2.0 → 0.2.1
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/{chunk-ZPKMVZ67.js → chunk-BBS4RC6N.js} +19 -25
- package/dist/chunk-BBS4RC6N.js.map +1 -0
- package/dist/{chunk-OEJWPWYJ.js → chunk-C6BT4KJA.js} +3 -3
- package/dist/{chunk-OEJWPWYJ.js.map → chunk-C6BT4KJA.js.map} +1 -1
- package/dist/chunk-SN5V6C26.js +28 -0
- package/dist/chunk-SN5V6C26.js.map +1 -0
- package/dist/cli.js +68 -32
- package/dist/cli.js.map +1 -1
- package/dist/client.js +3 -2
- package/dist/index.js +1 -1
- package/dist/next.js +3 -2
- package/dist/next.js.map +1 -1
- package/dist/react.js +8 -2
- package/dist/react.js.map +1 -1
- package/dist/runtime.d.ts +4 -1
- package/dist/runtime.js +42 -18
- package/dist/runtime.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZPKMVZ67.js.map +0 -1
package/dist/client.js
CHANGED
package/dist/index.js
CHANGED
package/dist/next.js
CHANGED
package/dist/next.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/next.ts"],"sourcesContent":["import { createStudio as createClient, type StudioOptions } from './client/studio'\n\n/** Next.js replaces this public environment variable in browser bundles. */\nexport function createStudio(config: StudioOptions, options: Pick<StudioOptions, 'runtime'> = {}) {\n return createClient(config, {\n runtime:\n options.runtime ??\n config.runtime ??\n (process.env.NODE_ENV === 'development' && (process.env.NEXT_PUBLIC_STUDIO_RUNTIME || false)),\n })\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/next.ts"],"sourcesContent":["import { createStudio as createClient, type StudioOptions } from './client/studio'\n\n/** Next.js replaces this public environment variable in browser bundles. */\nexport function createStudio(config: StudioOptions, options: Pick<StudioOptions, 'runtime'> = {}) {\n return createClient(config, {\n runtime:\n options.runtime ??\n config.runtime ??\n (process.env.NODE_ENV === 'development' && (process.env.NEXT_PUBLIC_STUDIO_RUNTIME || false)),\n })\n}\n"],"mappings":";;;;;;;AAGO,SAASA,cAAa,QAAuB,UAA0C,CAAC,GAAG;AAChG,SAAO,aAAa,QAAQ;AAAA,IAC1B,SACE,QAAQ,WACR,OAAO,YACN,QAAQ,IAAI,aAAa,kBAAkB,QAAQ,IAAI,8BAA8B;AAAA,EAC1F,CAAC;AACH;","names":["createStudio"]}
|
package/dist/react.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { useEffect as useEffect6, useRef as useRef3, useState as useState10 } from "react";
|
|
15
15
|
|
|
16
16
|
// package.json
|
|
17
|
-
var version = "0.2.
|
|
17
|
+
var version = "0.2.1";
|
|
18
18
|
|
|
19
19
|
// src/client/studio.ts
|
|
20
20
|
import { button } from "@joycostudio/xyz/debug";
|
|
@@ -531,7 +531,13 @@ function Inspector({
|
|
|
531
531
|
const title = definition.title ?? definition.id;
|
|
532
532
|
void ui.inline(container.current, { title }).then((host) => {
|
|
533
533
|
if (disposed || !container.current) return host.dispose();
|
|
534
|
-
|
|
534
|
+
let bound;
|
|
535
|
+
try {
|
|
536
|
+
bound = bindDebugSchema(host, { schema: () => handle.controls() });
|
|
537
|
+
} catch (cause) {
|
|
538
|
+
host.dispose();
|
|
539
|
+
return console.error(`[studio] could not draw the "${definition.id}" controls:`, cause);
|
|
540
|
+
}
|
|
535
541
|
const root = container.current.getRootNode();
|
|
536
542
|
if (root instanceof ShadowRoot) void ui.adoptStyles(root);
|
|
537
543
|
const unsubscribe = handle.subscribe(() => bound.refresh());
|