@vincentt-xr/sdk 2.0.0-alpha.12 → 2.0.0-alpha.13
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/GROUNDING.md +66 -16
- package/dist/{TextLabel-C6F5xoaz.js → TextLabel--skGFws8.js} +1 -1
- package/dist/{TextLabel-ChZCoB3P.cjs → TextLabel-DPJBtkUS.cjs} +1 -1
- package/dist/components/ScreenImage/ScreenImage.d.ts +1 -1
- package/dist/components/ScreenImage/liveEditable.d.ts +12 -0
- package/dist/components/ScreenImage/types.d.ts +5 -1
- package/dist/components/ScreenText/index.d.ts +1 -1
- package/dist/components/ScreenText/liveEditable.d.ts +6 -0
- package/dist/components/TextLabel/types.d.ts +4 -1
- package/dist/debug-ui.cjs +1 -1
- package/dist/debug-ui.js +2 -2
- package/dist/{index-bL819L-K.js → index-DNzAgQJp.js} +265 -246
- package/dist/{index-BzGLgXJm.cjs → index-F7M58rZ-.cjs} +5 -5
- package/dist/{index-BaNlidsb.js → index-YI3Yidg_.js} +1 -1
- package/dist/{index-Cm3v6Dlg.cjs → index-nRQNXOVk.cjs} +1 -1
- package/dist/instructions.cjs +1 -1
- package/dist/instructions.js +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.js +4 -4
- package/dist/scene-object.cjs +1 -1
- package/dist/scene-object.js +1 -1
- package/dist/useEditOverrides-C8Kzr6M7.cjs +1 -0
- package/dist/useEditOverrides-DpPTA6BW.js +40 -0
- package/dist/utils/useEditOverrides.d.ts +1 -1
- package/package.json +1 -1
- package/settings.json +30 -4
- package/dist/useEditOverrides-BTkPGVjN.js +0 -38
- package/dist/useEditOverrides-C3ZVXuIH.cjs +0 -1
package/dist/main.js
CHANGED
|
@@ -5,19 +5,19 @@ import { j as v, u as Ie, Q as Le, R as Oe, T as Ge, U as qe, V as Be, W as We }
|
|
|
5
5
|
import { az as Bs, Z as Ws, aA as zs, M as Ks, P as Xs, L as Hs, w as $s, Y as js, aB as Vs, av as Zs, aw as Ys, _ as Qs, c as Js, z as er, y as tr, d as sr, k as rr, af as ar, ag as nr, ah as ir, ai as or, n as cr, aj as lr, i as ur, $ as dr, O as mr, ak as pr, a0 as fr, a1 as hr, al as gr, am as Sr, at as yr, p as Tr, A as Mr, ax as Er, r as Rr, K as br, ay as Ar, a6 as Fr, an as Cr, a7 as vr, a8 as kr, a9 as _r, a5 as xr, aa as wr, ab as Pr, a2 as Dr, ac as Ur, ao as Nr, au as Ir, ad as Lr, ap as Or, t as Gr, a3 as qr, a4 as Br, aq as Wr, ar as zr, ae as Kr, as as Xr } from "./index-CTqQJj5p.js";
|
|
6
6
|
import { S as ze } from "./contexts-B5GODwuV.js";
|
|
7
7
|
import { X as $r } from "./contexts-B5GODwuV.js";
|
|
8
|
-
import { S as Vr, T as Zr } from "./TextLabel
|
|
8
|
+
import { S as Vr, T as Zr } from "./TextLabel--skGFws8.js";
|
|
9
9
|
import { jsxs as L, jsx as g, Fragment as re } from "react/jsx-runtime";
|
|
10
10
|
import { useRef as F, useMemo as Z, useEffect as _, useState as x, Suspense as Ke, useCallback as R, forwardRef as Xe, useImperativeHandle as He, useContext as $e, createContext as je, useId as Ve, useSyncExternalStore as Ze } from "react";
|
|
11
11
|
import * as Ye from "three";
|
|
12
12
|
import { MathUtils as Qe, Vector2 as Je, Vector3 as et, DoubleSide as te, RepeatWrapping as Se, LinearFilter as ye } from "three";
|
|
13
|
-
import { D as Qr, H as Jr, G as ea, E as ta, J as sa, K as ra, P as aa, S as na, C as ia, I as oa, L as ca, M as la, F as ua, B as da } from "./index-
|
|
13
|
+
import { D as Qr, H as Jr, G as ea, E as ta, J as sa, K as ra, P as aa, S as na, C as ia, I as oa, L as ca, M as la, F as ua, B as da } from "./index-YI3Yidg_.js";
|
|
14
14
|
import { useThree as tt, useFrame as st } from "@react-three/fiber";
|
|
15
15
|
import { R as rt } from "./uv-DJU_XfmN.js";
|
|
16
16
|
import { c as Fe, b as at } from "./selectors-K5JKCWxw.js";
|
|
17
17
|
import { u as nt, a as it, s as ot, F as ct } from "./drawNormalizedCrop-BLfB484W.js";
|
|
18
18
|
import { d as pa, b as fa, r as ha } from "./drawNormalizedCrop-BLfB484W.js";
|
|
19
|
-
import { S as lt, c as ut } from "./index-
|
|
20
|
-
import { L as Sa, d as ya, R as Ta, a as Ma, e as Ea, b as Ra, f as ba } from "./index-
|
|
19
|
+
import { S as lt, c as ut } from "./index-DNzAgQJp.js";
|
|
20
|
+
import { L as Sa, d as ya, R as Ta, a as Ma, e as Ea, b as Ra, f as ba } from "./index-DNzAgQJp.js";
|
|
21
21
|
import { useTexture as dt } from "@react-three/drei";
|
|
22
22
|
import { a as mt } from "./context-DTxSQvp4.js";
|
|
23
23
|
import { k as Fa, D as Ca, j as va, E as ka, M as _a, h as xa, S as wa, T as Pa, l as Da, g as Ua, n as Na, r as Ia } from "./renderPasses-DIPTIU_x.js";
|
package/dist/scene-object.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-nRQNXOVk.cjs"),t=require("./renderGroups-B0N58SIA.cjs");exports.addComponentToObject=e.addComponentToObject;exports.componentDefaults=e.componentDefaults;exports.createDefaultComponent=e.createDefaultComponent;exports.createDefaultFaceMeshRendererSettings=e.createDefaultFaceMeshRendererSettings;exports.createDefaultMaterialSettings=e.createDefaultMaterialSettings;exports.createDefaultMeshRendererSettings=e.createDefaultMeshRendererSettings;exports.createDefaultScreenImageSettings=e.createDefaultScreenImageSettings;exports.createDefaultScreenShapeSettings=e.createDefaultScreenShapeSettings;exports.createDefaultScreenTextSettings=e.createDefaultScreenTextSettings;exports.createDefaultScreenTransformSettings=e.createDefaultScreenTransformSettings;exports.createDefaultTextureSettings=e.createDefaultTextureSettings;exports.createDefaultTransformSettings=e.createDefaultTransformSettings;exports.createOrderedComponentsSelector=e.createOrderedComponentsSelector;exports.createSceneComponentId=e.createSceneComponentId;exports.createSceneId=e.createSceneId;exports.createSceneObject=e.createSceneObject;exports.createSceneObjectId=e.createSceneObjectId;exports.deleteSceneObject=e.deleteSceneObject;exports.getOrderedComponents=e.getOrderedComponents;exports.getSceneObjectChildren=e.getSceneObjectChildren;exports.moveComponent=e.moveComponent;exports.removeComponent=e.removeComponent;exports.replaceSceneComponent=e.replaceSceneComponent;exports.replaceSceneObject=e.replaceSceneObject;exports.setSceneObjectParent=e.setSceneObjectParent;exports.setSceneObjectParentPreserveWorldTransform=e.setSceneObjectParentPreserveWorldTransform;exports.setSceneObjectVisible=e.setSceneObjectVisible;exports.DEFAULT_RENDER_GROUP_IDS=t.DEFAULT_RENDER_GROUP_IDS;exports.RENDER_GROUP_POLICIES=t.RENDER_GROUP_POLICIES;exports.createRenderPlan=t.createRenderPlan;exports.getDefaultRenderGroupId=t.getDefaultRenderGroupId;exports.migrateToRenderGroups=t.migrateToRenderGroups;exports.moveObjectToGroup=t.moveObjectToGroup;exports.reorderObjectWithinGroup=t.reorderObjectWithinGroup;exports.reorderRenderGroup=t.reorderRenderGroup;exports.validateGroupCompatibility=t.validateGroupCompatibility;
|
package/dist/scene-object.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a, c as r, b as s, d as n, e as c, f as o, g as S, i as l, h as d, j as m, k as p, l as i, q as u, m as f, n as D, o as g, p as O, r as b, s as R, t as j, u as C, v as T, w as G, x as I, y as v, z as P, A as h } from "./index-
|
|
1
|
+
import { a, c as r, b as s, d as n, e as c, f as o, g as S, i as l, h as d, j as m, k as p, l as i, q as u, m as f, n as D, o as g, p as O, r as b, s as R, t as j, u as C, v as T, w as G, x as I, y as v, z as P, A as h } from "./index-YI3Yidg_.js";
|
|
2
2
|
import { D as x, R as _, c as M, g as U, m as y, a as A, r as F, b as L, v as N } from "./renderGroups-BcQYy_J2.js";
|
|
3
3
|
export {
|
|
4
4
|
x as DEFAULT_RENDER_GROUP_IDS,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("react"),y="__VCT_EDIT_OVERRIDES__";function b(){const t=globalThis[y];return t&&typeof t.subscribe=="function"&&typeof t.version=="function"&&typeof t.get=="function"?t:void 0}const O=()=>()=>{},f=()=>0,E=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null);function d(t,r,s){let e=t;for(let n=0;n<r.length-1;n+=1){const i=e[r[n]];if(!E(i))return!1;const o={...i};e[r[n]]=o,e=o}return e[r[r.length-1]]=s,!0}function g(t,r,s){const e=b();if(l.useSyncExternalStore(e?e.subscribe:O,e?e.version:f,f),!e)return t;const n=e.get(t);if(!n)return t;let i=null;for(const o of r){if(!Object.prototype.hasOwnProperty.call(n,o))continue;const c=s==null?void 0:s[o];if(c&&!c(n[o]))continue;const u=i??{...t};d(u,o.split("."),n[o])&&(i=u)}return i??t}exports.useEditOverrides=g;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useSyncExternalStore as l } from "react";
|
|
2
|
+
const y = "__VCT_EDIT_OVERRIDES__";
|
|
3
|
+
function b() {
|
|
4
|
+
const t = globalThis[y];
|
|
5
|
+
return t && typeof t.subscribe == "function" && typeof t.version == "function" && typeof t.get == "function" ? t : void 0;
|
|
6
|
+
}
|
|
7
|
+
const O = () => () => {
|
|
8
|
+
}, f = () => 0, g = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && (Object.getPrototypeOf(t) === Object.prototype || Object.getPrototypeOf(t) === null);
|
|
9
|
+
function E(t, r, s) {
|
|
10
|
+
let e = t;
|
|
11
|
+
for (let n = 0; n < r.length - 1; n += 1) {
|
|
12
|
+
const i = e[r[n]];
|
|
13
|
+
if (!g(i)) return !1;
|
|
14
|
+
const o = { ...i };
|
|
15
|
+
e[r[n]] = o, e = o;
|
|
16
|
+
}
|
|
17
|
+
return e[r[r.length - 1]] = s, !0;
|
|
18
|
+
}
|
|
19
|
+
function d(t, r, s) {
|
|
20
|
+
const e = b();
|
|
21
|
+
if (l(
|
|
22
|
+
e ? e.subscribe : O,
|
|
23
|
+
e ? e.version : f,
|
|
24
|
+
f
|
|
25
|
+
), !e) return t;
|
|
26
|
+
const n = e.get(t);
|
|
27
|
+
if (!n) return t;
|
|
28
|
+
let i = null;
|
|
29
|
+
for (const o of r) {
|
|
30
|
+
if (!Object.prototype.hasOwnProperty.call(n, o)) continue;
|
|
31
|
+
const c = s == null ? void 0 : s[o];
|
|
32
|
+
if (c && !c(n[o])) continue;
|
|
33
|
+
const u = i ?? { ...t };
|
|
34
|
+
E(u, o.split("."), n[o]) && (i = u);
|
|
35
|
+
}
|
|
36
|
+
return i ?? t;
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
d as u
|
|
40
|
+
};
|
|
@@ -30,4 +30,4 @@ export type EditOverrideKey<P> = (keyof P & string) | `${keyof P & string}.${str
|
|
|
30
30
|
* the objects around it are copied, never mutated. Call it with the component's own props
|
|
31
31
|
* object, before destructuring: the store finds the element by that object.
|
|
32
32
|
*/
|
|
33
|
-
export declare function useEditOverrides<P extends object>(props: P, keys: readonly EditOverrideKey<P>[]): P;
|
|
33
|
+
export declare function useEditOverrides<P extends object>(props: P, keys: readonly EditOverrideKey<P>[], accept?: Partial<Record<EditOverrideKey<P>, (value: unknown) => boolean>>): P;
|
package/package.json
CHANGED
package/settings.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "vincentt.settings-decl/1",
|
|
3
3
|
"package": "@vincentt-xr/sdk",
|
|
4
|
-
"version": "2.0.0-alpha.
|
|
4
|
+
"version": "2.0.0-alpha.13",
|
|
5
5
|
"components": {
|
|
6
6
|
"BodyInstruction": {
|
|
7
7
|
"props": {
|
|
@@ -1464,7 +1464,12 @@
|
|
|
1464
1464
|
"label": "Blend mode"
|
|
1465
1465
|
},
|
|
1466
1466
|
"color": { "type": "color", "label": "Tint" },
|
|
1467
|
-
"fit": {
|
|
1467
|
+
"fit": {
|
|
1468
|
+
"type": "enum",
|
|
1469
|
+
"enum": ["cover", "contain", "stretch"],
|
|
1470
|
+
"label": "Fit",
|
|
1471
|
+
"overriddenBy": ["stretchMode"]
|
|
1472
|
+
},
|
|
1468
1473
|
"flipX": { "type": "boolean", "label": "Flip X" },
|
|
1469
1474
|
"flipY": { "type": "boolean", "label": "Flip Y" },
|
|
1470
1475
|
"opacity": {
|
|
@@ -1524,7 +1529,13 @@
|
|
|
1524
1529
|
"label": "Blend mode"
|
|
1525
1530
|
},
|
|
1526
1531
|
"color": { "type": "color", "label": "Tint" },
|
|
1527
|
-
"fit": {
|
|
1532
|
+
"fit": {
|
|
1533
|
+
"type": "enum",
|
|
1534
|
+
"enum": ["cover", "contain", "stretch"],
|
|
1535
|
+
"label": "Fit",
|
|
1536
|
+
"overriddenBy": ["stretchMode"],
|
|
1537
|
+
"supported": true
|
|
1538
|
+
},
|
|
1528
1539
|
"flipX": { "type": "boolean", "label": "Flip X" },
|
|
1529
1540
|
"flipY": { "type": "boolean", "label": "Flip Y" },
|
|
1530
1541
|
"opacity": {
|
|
@@ -1533,10 +1544,17 @@
|
|
|
1533
1544
|
"max": 1,
|
|
1534
1545
|
"step": 0.01,
|
|
1535
1546
|
"unit": "ratio",
|
|
1536
|
-
"label": "Opacity"
|
|
1547
|
+
"label": "Opacity",
|
|
1548
|
+
"supported": true
|
|
1537
1549
|
},
|
|
1538
1550
|
"overlay": { "type": "boolean", "label": "Overlay" },
|
|
1539
1551
|
"renderOrder": { "type": "number", "step": 1, "label": "Render order" },
|
|
1552
|
+
"src": {
|
|
1553
|
+
"type": "asset",
|
|
1554
|
+
"accept": ["image"],
|
|
1555
|
+
"overriddenBy": ["source"],
|
|
1556
|
+
"supported": true
|
|
1557
|
+
},
|
|
1540
1558
|
"transform.enabled": { "type": "boolean", "label": "Enabled" },
|
|
1541
1559
|
"transform.overlay": { "type": "boolean", "label": "Overlay" },
|
|
1542
1560
|
"transform.pivot": {
|
|
@@ -1881,6 +1899,13 @@
|
|
|
1881
1899
|
"unit": "px",
|
|
1882
1900
|
"label": "Stroke width"
|
|
1883
1901
|
},
|
|
1902
|
+
"text": {
|
|
1903
|
+
"type": "text",
|
|
1904
|
+
"maxLength": 500,
|
|
1905
|
+
"multiline": true,
|
|
1906
|
+
"overriddenBy": ["lines"],
|
|
1907
|
+
"supported": true
|
|
1908
|
+
},
|
|
1884
1909
|
"textAlign": { "type": "enum", "enum": ["left", "center", "right"], "label": "Text align" },
|
|
1885
1910
|
"underline": { "type": "boolean", "label": "Underline" },
|
|
1886
1911
|
"verticalAlign": {
|
|
@@ -2035,6 +2060,7 @@
|
|
|
2035
2060
|
"unit": "px",
|
|
2036
2061
|
"label": "Stroke width"
|
|
2037
2062
|
},
|
|
2063
|
+
"text": { "type": "text", "maxLength": 500, "multiline": true, "overriddenBy": ["lines"] },
|
|
2038
2064
|
"textAlign": { "type": "enum", "enum": ["left", "center", "right"], "label": "Text align" },
|
|
2039
2065
|
"underline": { "type": "boolean", "label": "Underline" },
|
|
2040
2066
|
"verticalAlign": {
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useSyncExternalStore as u } from "react";
|
|
2
|
-
const f = "__VCT_EDIT_OVERRIDES__";
|
|
3
|
-
function l() {
|
|
4
|
-
const t = globalThis[f];
|
|
5
|
-
return t && typeof t.subscribe == "function" && typeof t.version == "function" && typeof t.get == "function" ? t : void 0;
|
|
6
|
-
}
|
|
7
|
-
const y = () => () => {
|
|
8
|
-
}, s = () => 0, b = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && (Object.getPrototypeOf(t) === Object.prototype || Object.getPrototypeOf(t) === null);
|
|
9
|
-
function O(t, r, e) {
|
|
10
|
-
let o = t;
|
|
11
|
-
for (let n = 0; n < r.length - 1; n += 1) {
|
|
12
|
-
const c = o[r[n]];
|
|
13
|
-
if (!b(c)) return !1;
|
|
14
|
-
const i = { ...c };
|
|
15
|
-
o[r[n]] = i, o = i;
|
|
16
|
-
}
|
|
17
|
-
return o[r[r.length - 1]] = e, !0;
|
|
18
|
-
}
|
|
19
|
-
function g(t, r) {
|
|
20
|
-
const e = l();
|
|
21
|
-
if (u(
|
|
22
|
-
e ? e.subscribe : y,
|
|
23
|
-
e ? e.version : s,
|
|
24
|
-
s
|
|
25
|
-
), !e) return t;
|
|
26
|
-
const o = e.get(t);
|
|
27
|
-
if (!o) return t;
|
|
28
|
-
let n = null;
|
|
29
|
-
for (const c of r) {
|
|
30
|
-
if (!Object.prototype.hasOwnProperty.call(o, c)) continue;
|
|
31
|
-
const i = n ?? { ...t };
|
|
32
|
-
O(i, c.split("."), o[c]) && (n = i);
|
|
33
|
-
}
|
|
34
|
-
return n ?? t;
|
|
35
|
-
}
|
|
36
|
-
export {
|
|
37
|
-
g as u
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("react"),f="__VCT_EDIT_OVERRIDES__";function l(){const t=globalThis[f];return t&&typeof t.subscribe=="function"&&typeof t.version=="function"&&typeof t.get=="function"?t:void 0}const y=()=>()=>{},s=()=>0,b=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null);function O(t,r,e){let n=t;for(let o=0;o<r.length-1;o+=1){const c=n[r[o]];if(!b(c))return!1;const i={...c};n[r[o]]=i,n=i}return n[r[r.length-1]]=e,!0}function E(t,r){const e=l();if(u.useSyncExternalStore(e?e.subscribe:y,e?e.version:s,s),!e)return t;const n=e.get(t);if(!n)return t;let o=null;for(const c of r){if(!Object.prototype.hasOwnProperty.call(n,c))continue;const i=o??{...t};O(i,c.split("."),n[c])&&(o=i)}return o??t}exports.useEditOverrides=E;
|