@vincentt-xr/sdk 2.0.0-alpha.16 → 2.0.0-alpha.18

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 (78) hide show
  1. package/GROUNDING.md +224 -1
  2. package/components.json +144 -0
  3. package/dist/{CanonicalHeadFrame-vn-jM9fG.js → CanonicalHeadFrame-CQe2YX9a.js} +3 -3
  4. package/dist/{DebuggerUI-DDpU-nBF.js → DebuggerUI-CKYrYmod.js} +1 -1
  5. package/dist/{FaceRetouch-D2xH5OpW.js → FaceRetouch-l7y4oZBu.js} +4 -4
  6. package/dist/Scenes-BX0bR1j4.js +44 -0
  7. package/dist/Scenes-Dtt8UGE8.cjs +1 -0
  8. package/dist/{TextLabel-DPJBtkUS.cjs → TextLabel-C-AibH5A.cjs} +1 -1
  9. package/dist/{TextLabel--skGFws8.js → TextLabel-fEF1o3wE.js} +1 -1
  10. package/dist/audio/AudioPlayer.d.ts +2 -1
  11. package/dist/{bodyMaskMaterial-C3aXItLo.js → bodyMaskMaterial-BOdSJUEM.js} +1 -1
  12. package/dist/{cache-C85JjyZA.js → cache-Mu-VO_6E.js} +2 -2
  13. package/dist/components/Button/index.d.ts +23 -0
  14. package/dist/components/Button/safeLink.d.ts +6 -0
  15. package/dist/components/HtmlRegion/index.d.ts +8 -0
  16. package/dist/components/Model/index.d.ts +16 -0
  17. package/dist/components/Object3D/index.d.ts +13 -0
  18. package/dist/components/ScreenImage/types.d.ts +2 -2
  19. package/dist/components/ScreenText/types.d.ts +2 -1
  20. package/dist/components/ThemeProvider/index.d.ts +24 -0
  21. package/dist/components/index.d.ts +4 -0
  22. package/dist/{contexts-B5GODwuV.js → contexts-Cl-4dUOI.js} +2 -2
  23. package/dist/debug-ui/media-source.js +1 -1
  24. package/dist/debug-ui.cjs +1 -1
  25. package/dist/debug-ui.js +11 -11
  26. package/dist/{drawNormalizedCrop-BLfB484W.js → drawNormalizedCrop-D606u5-F.js} +5 -5
  27. package/dist/editor-defs/definitions.d.ts +2 -0
  28. package/dist/editor-defs/index.d.ts +3 -0
  29. package/dist/editor-defs/types.d.ts +54 -0
  30. package/dist/editor-sample/sample.d.ts +15 -0
  31. package/dist/editor-scenes.cjs +1 -0
  32. package/dist/editor-scenes.js +59 -0
  33. package/dist/entries/core.d.ts +12 -0
  34. package/dist/entries/editor-scenes.d.ts +8 -0
  35. package/dist/face-effects.js +17 -17
  36. package/dist/{getFaceInfo-D_tCSQC7.js → getFaceInfo-Mt44zlej.js} +1 -1
  37. package/dist/{index-B9DdHE4u.js → index-B0EYdofX.js} +1 -1
  38. package/dist/{index-jkUdoklh.cjs → index-B5X4N2tc.cjs} +3 -3
  39. package/dist/{index-CTqQJj5p.js → index-BDxJWWyy.js} +85 -85
  40. package/dist/{index-nRQNXOVk.cjs → index-BkjRuUdW.cjs} +1 -1
  41. package/dist/{index-DlP4xxaT.js → index-Bn72laBn.js} +4 -4
  42. package/dist/{index-D10O6vqR.js → index-CbBCl2ZU.js} +2 -2
  43. package/dist/{index-CNt8esFO.js → index-CicO_Tnw.js} +1 -1
  44. package/dist/{index-YI3Yidg_.js → index-D5NbXaCn.js} +5 -5
  45. package/dist/{index-DJkmBF-0.js → index-DN_eHnag.js} +203 -197
  46. package/dist/instructions.cjs +1 -1
  47. package/dist/instructions.js +8 -8
  48. package/dist/{internal-TD4QhIry.js → internal-BoFDq5hC.js} +3 -3
  49. package/dist/internal.js +2 -2
  50. package/dist/{landmarks-vLy5QKt6.js → landmarks-C3LvDhMt.js} +1 -1
  51. package/dist/low-level.js +17 -17
  52. package/dist/main.cjs +1 -1
  53. package/dist/main.js +932 -746
  54. package/dist/particles.js +5 -5
  55. package/dist/product.js +2 -2
  56. package/dist/{providers-DmJlgrDD.js → providers-Bxt_MfPK.js} +3 -3
  57. package/dist/{renderGroups-BcQYy_J2.js → renderGroups-uYPzUa66.js} +1 -1
  58. package/dist/{renderPasses-DIPTIU_x.js → renderPasses-C0wu5Cwg.js} +4 -4
  59. package/dist/scene-object.cjs +1 -1
  60. package/dist/scene-object.js +2 -2
  61. package/dist/scenes/Scenes.d.ts +44 -0
  62. package/dist/scenes/edit.d.ts +37 -0
  63. package/dist/{segmentation-CZs5aVvY.js → segmentation-DccvYBBO.js} +9 -9
  64. package/dist/{selectors-K5JKCWxw.js → selectors-J06V0eDb.js} +1 -1
  65. package/dist/{session-DHBNTyJJ.js → session-CYiWfcvz.js} +1 -1
  66. package/dist/tracking.js +25 -25
  67. package/dist/{trigger-BwZ81ENx.js → trigger-CQviD4xp.js} +155 -155
  68. package/dist/{useBodies-BMKHXAOL.js → useBodies-DOuwRuew.js} +2 -2
  69. package/dist/{useEditOverrides-DpPTA6BW.js → useEditOverrides-BBkK8cN2.js} +1 -0
  70. package/dist/useEditOverrides-CgapHJzA.cjs +1 -0
  71. package/dist/{useFaceInfo-BNVdnprN.js → useFaceInfo-XUGYTdfN.js} +4 -4
  72. package/dist/{useFaceResultReader-B15wn6RB.js → useFaceResultReader-D8wXbF1L.js} +1 -1
  73. package/dist/{useIrisTracking-CYm-KDIZ.js → useIrisTracking-B0uLWgNE.js} +10 -10
  74. package/dist/{useXRCapabilities-ClWlG5_Y.js → useXRCapabilities-DPUOvpdf.js} +1 -1
  75. package/dist/utils/useEditOverrides.d.ts +1 -0
  76. package/package.json +11 -2
  77. package/settings.json +2 -1
  78. package/dist/useEditOverrides-C8Kzr6M7.cjs +0 -1
@@ -1,7 +1,7 @@
1
1
  import { useFrame as S } from "@react-three/fiber";
2
2
  import { useState as g, useRef as f, useCallback as M, useId as h, useEffect as j } from "react";
3
- import { f as p, g as C, h as E, X as m, j as I } from "./index-CTqQJj5p.js";
4
- import { u as v } from "./landmarks-vLy5QKt6.js";
3
+ import { f as p, g as C, h as E, X as m, j as I } from "./index-BDxJWWyy.js";
4
+ import { u as v } from "./landmarks-C3LvDhMt.js";
5
5
  const X = (t, o) => {
6
6
  var r;
7
7
  for (let n = 0; n < m.body.max; n += 1)
@@ -36,5 +36,6 @@ function d(t, r, s) {
36
36
  return i ?? t;
37
37
  }
38
38
  export {
39
+ b as e,
39
40
  d as u
40
41
  };
@@ -0,0 +1 @@
1
+ "use strict";const y=require("react"),b="__VCT_EDIT_OVERRIDES__";function l(){const t=globalThis[b];return t&&typeof t.subscribe=="function"&&typeof t.version=="function"&&typeof t.get=="function"?t:void 0}const O=()=>()=>{},f=()=>0,d=t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null);function E(t,r,s){let e=t;for(let n=0;n<r.length-1;n+=1){const i=e[r[n]];if(!d(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=l();if(y.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};E(u,o.split("."),n[o])&&(i=u)}return i??t}exports.editStore=l;exports.useEditOverrides=g;
@@ -1,9 +1,9 @@
1
1
  import { useMemo as x, useEffect as h, useCallback as p, useRef as R } from "react";
2
- import { X as E, j as C, f as N, g as _ } from "./index-CTqQJj5p.js";
2
+ import { X as E, j as C, f as N, g as _ } from "./index-BDxJWWyy.js";
3
3
  import { useThree as b } from "@react-three/fiber";
4
- import { g as y } from "./getFaceInfo-D_tCSQC7.js";
5
- import { u as T } from "./useFaceResultReader-B15wn6RB.js";
6
- import { u as S } from "./landmarks-vLy5QKt6.js";
4
+ import { g as y } from "./getFaceInfo-Mt44zlej.js";
5
+ import { u as T } from "./useFaceResultReader-D8wXbF1L.js";
6
+ import { u as S } from "./landmarks-C3LvDhMt.js";
7
7
  const X = ({
8
8
  active: i = !0,
9
9
  holdMs: l = 250,
@@ -1,5 +1,5 @@
1
1
  import { useState as E, useEffect as N } from "react";
2
- import { c as P } from "./getFaceInfo-D_tCSQC7.js";
2
+ import { c as P } from "./getFaceInfo-Mt44zlej.js";
3
3
  const S = (t, i) => t.map((e) => ({
4
4
  landmarks: e,
5
5
  bounds: P(e)
@@ -2,25 +2,25 @@ var Gt = Object.defineProperty;
2
2
  var Xt = (t, e, s) => e in t ? Gt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var m = (t, e, s) => Xt(t, typeof e != "symbol" ? e + "" : e, s);
4
4
  import * as o from "three";
5
- import { t as $, k as kt, n as Te, J as ie, j as Tt, u as Kt, I as Yt, i as Qt, C as Ze } from "./index-CTqQJj5p.js";
6
- import { C as _, b as He, c as $t, d as Zt, a as Jt, e as e0, u as t0 } from "./CanonicalHeadFrame-vn-jM9fG.js";
7
- import { b as s0, a as r0, d as n0, e as a0, t as Ee, c as o0, s as Je } from "./index-CNt8esFO.js";
8
- import { a as i0, g as l0, d as P } from "./getFaceInfo-D_tCSQC7.js";
5
+ import { t as $, k as kt, n as Te, J as ie, j as Tt, u as Kt, I as Yt, i as Qt, C as Ze } from "./index-BDxJWWyy.js";
6
+ import { C as _, b as He, c as $t, d as Zt, a as Jt, e as e0, u as t0 } from "./CanonicalHeadFrame-CQe2YX9a.js";
7
+ import { b as s0, a as r0, d as n0, e as a0, t as Ee, c as o0, s as Je } from "./index-CicO_Tnw.js";
8
+ import { a as i0, g as l0, d as P } from "./getFaceInfo-Mt44zlej.js";
9
9
  import { s as et, a as c0, L as u0, u as d0 } from "./useLandmarkPoseFit-Bmb3h6Mw.js";
10
10
  import { s as h0 } from "./similarityFit-Bbz-R8AY.js";
11
11
  import { C as z } from "./canonicalFace-BHwyCx1c.js";
12
12
  import { b as he, r as f0, a as p0, M as be } from "./renderState-CJNmj5jz.js";
13
13
  import { jsx as k, jsxs as m0, Fragment as g0 } from "react/jsx-runtime";
14
14
  import { useRef as T, useCallback as Nt, useMemo as oe, useState as Oe, useEffect as q, useContext as S0 } from "react";
15
- import { c as Ke } from "./segmentation-CZs5aVvY.js";
15
+ import { c as Ke } from "./segmentation-DccvYBBO.js";
16
16
  import { useThree as Ce, useFrame as Ut } from "@react-three/fiber";
17
17
  import { c as w0 } from "./SkeletonUtils-C2r90MtN.js";
18
- import { T as A0, u as Dt } from "./index-D10O6vqR.js";
18
+ import { T as A0, u as Dt } from "./index-CbBCl2ZU.js";
19
19
  import { R as y0 } from "./uv-DJU_XfmN.js";
20
- import { f as v0, b as R0 } from "./selectors-K5JKCWxw.js";
21
- import { u as M0 } from "./useBodies-BMKHXAOL.js";
22
- import { c as E0, I as b0, u as tt } from "./providers-DmJlgrDD.js";
23
- import { u as C0 } from "./landmarks-vLy5QKt6.js";
20
+ import { f as v0, b as R0 } from "./selectors-J06V0eDb.js";
21
+ import { u as M0 } from "./useBodies-DOuwRuew.js";
22
+ import { c as E0, I as b0, u as tt } from "./providers-Bxt_MfPK.js";
23
+ import { u as C0 } from "./landmarks-C3LvDhMt.js";
24
24
  const x0 = {
25
25
  "body.head": 0,
26
26
  "body.leftShoulder": 11,
@@ -1,5 +1,5 @@
1
1
  import { useRef as m, useState as u, useCallback as E, useEffect as R } from "react";
2
- import { d as g } from "./index-CTqQJj5p.js";
2
+ import { d as g } from "./index-BDxJWWyy.js";
3
3
  const k = (t = {}) => {
4
4
  const { enabled: c = !0, timeoutMs: o, queryPermission: l } = t, f = (t.models ?? []).join("|"), i = m(t.models);
5
5
  i.current = t.models;
@@ -18,6 +18,7 @@ export interface EditOverrideStore {
18
18
  */
19
19
  get(props: object): Readonly<Record<string, unknown>> | undefined;
20
20
  }
21
+ export declare function editStore(): EditOverrideStore | undefined;
21
22
  /**
22
23
  * A prop name, or a dotted path into an object prop (`settings.fillColor`,
23
24
  * `transform.position`): the same keys as the props in `settings.json`, and the keys the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincentt-xr/sdk",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.18",
4
4
  "description": "XR SDK by Vincentt",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,6 +19,7 @@
19
19
  "/dist",
20
20
  "GROUNDING.md",
21
21
  "settings.json",
22
+ "components.json",
22
23
  "docs/api",
23
24
  "docs/examples",
24
25
  "docs/guides",
@@ -64,6 +65,11 @@
64
65
  "import": "./dist/scene-object.js",
65
66
  "require": "./dist/scene-object.cjs"
66
67
  },
68
+ "./editor-scenes": {
69
+ "types": "./dist/entries/editor-scenes.d.ts",
70
+ "import": "./dist/editor-scenes.js",
71
+ "require": "./dist/editor-scenes.cjs"
72
+ },
67
73
  "./internal": {
68
74
  "types": "./dist/entries/internal.d.ts",
69
75
  "import": "./dist/internal.js",
@@ -94,7 +100,8 @@
94
100
  "import": "./dist/debug-ui/default-setting.js",
95
101
  "require": "./dist/debug-ui/default-setting.cjs"
96
102
  },
97
- "./settings.json": "./settings.json"
103
+ "./settings.json": "./settings.json",
104
+ "./components.json": "./components.json"
98
105
  },
99
106
  "peerDependencies": {
100
107
  "@google/model-viewer": "^4.0.0",
@@ -184,6 +191,8 @@
184
191
  "lint:check": "eslint lib --max-warnings 0",
185
192
  "settings:generate": "node scripts/settings-decl.mjs",
186
193
  "settings:check": "node scripts/settings-decl.mjs --check",
194
+ "components:generate": "node scripts/gen-components.mjs",
195
+ "components:check": "node scripts/gen-components.mjs --check",
187
196
  "example:build": "vite build --config example/vite.config.ts",
188
197
  "example:preview": "vite preview --config example/vite.config.ts --outDir dist-example",
189
198
  "release": "commit-and-tag-version"
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.16",
4
+ "version": "2.0.0-alpha.18",
5
5
  "components": {
6
6
  "AudioPlayer": {
7
7
  "element": "sound",
@@ -1547,6 +1547,7 @@
1547
1547
  "visible": { "type": "boolean", "label": "Visible" }
1548
1548
  }
1549
1549
  },
1550
+ "Scene": { "props": { "label": { "type": "text", "label": "Scene name", "maxLength": 60 } } },
1550
1551
  "ScreenImage": {
1551
1552
  "element": "screenImage",
1552
1553
  "props": {
@@ -1 +0,0 @@
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;