@telemetryos/sdk 1.7.5 → 1.8.0

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/react.cjs CHANGED
@@ -472,4 +472,4 @@ React keys must be passed directly to JSX without using spread:
472
472
  border-color: hsl(var(--primary));
473
473
  color: hsl(var(--primary-foreground));
474
474
  }
475
- `;let J=!1;function ce(){if(J||typeof document>"u")return;const n=document.createElement("style");n.setAttribute("data-telemetryos-sdk",""),n.textContent=ie,document.head.appendChild(n),J=!0}ce();function ue({children:n}){const t=()=>{const s=window.matchMedia("(prefers-color-scheme: dark)"),o=m=>{let p;m==="system"?p=s.matches:p=m!=="light",p?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},c=_.environment().subscribeColorScheme(o);c.catch(console.error);const f=()=>{_.environment().getColorScheme().then(o).catch(console.error)};return s.addEventListener("change",f),()=>{c.then(()=>_.environment().unsubscribeColorScheme(o)).catch(console.error),s.removeEventListener("change",f)}};return d.useEffect(t,[]),i.jsx("div",{className:"settings__container",children:n})}function le({children:n}){return i.jsx("div",{className:"settings__box",children:n})}function de({children:n}){return i.jsx("div",{className:"settings__heading",children:n})}function fe(){return i.jsx("hr",{className:"settings__divider"})}function pe({children:n}){return i.jsx("label",{className:"settings__field",children:n})}function ge({children:n}){return i.jsx("div",{className:"settings__label",children:n})}function me({children:n}){return i.jsx("div",{className:"settings__hint",children:n})}function be({children:n}){return i.jsx("div",{className:"settings__error",children:n})}function he({children:n}){return i.jsx("div",{className:"settings__input-frame",children:n})}function _e({children:n}){return i.jsx("div",{className:"settings__textarea-frame",children:n})}function xe({children:n}){return i.jsx("div",{className:"settings__select-frame",children:n})}function ve({children:n}){return i.jsx("div",{className:"settings__slider-frame",children:n})}function Se({children:n}){return i.jsx("div",{className:"settings__slider-ruler",children:n})}function ke({children:n}){return i.jsx("div",{className:"settings__color-frame",children:n})}function ye({children:n}){return i.jsx("label",{className:"settings__switch-frame",children:n})}function Ee({children:n}){return i.jsx("span",{className:"settings__switch-label",children:n})}function we({children:n}){return i.jsx("label",{className:"settings__checkbox-frame",children:n})}function Re({children:n}){return i.jsx("span",{className:"settings__checkbox-label",children:n})}function Te({children:n}){return i.jsx("label",{className:"settings__radio-frame",children:n})}function je({children:n}){return i.jsx("span",{className:"settings__radio-label",children:n})}function Ne({children:n}){return i.jsx("div",{className:"settings__button-frame",children:n})}function v(n,t,s,o=0){var c;const[f,m]=d.useState(!0),[p]=d.useState(s),[S,j]=d.useState(void 0),[g,k]=d.useState(void 0);return d.useEffect(()=>{const b=h=>{j(y=>JSON.stringify(y)===JSON.stringify(h)?y:h),m(!1)};return n.subscribe(t,b).catch(console.error),()=>{n.unsubscribe(t,b).catch(console.error)}},[n,t]),d.useEffect(()=>{if(typeof g<"u"){const b=setTimeout(()=>{n.set(t,g)},o);return()=>clearTimeout(b)}},[g,n,t,o]),d.useEffect(()=>{if(JSON.stringify(g)===JSON.stringify(S)){const b=setTimeout(()=>{k(void 0)},500);return()=>clearTimeout(b)}},[g,S]),[f,(c=g??S)!==null&&c!==void 0?c:p,k]}function Ae(n,t){return(s,o=250)=>v(s,n,t,o)}function Oe(n,t){return(s=250)=>{const o=d.useMemo(()=>_.store().instance,[]);return v(o,n,t,s)}}function Ce(n,t){return(s=250)=>{const o=d.useMemo(()=>_.store().application,[]);return v(o,n,t,s)}}function Pe(n,t){return(s=250)=>{const o=d.useMemo(()=>_.store().device,[]);return v(o,n,t,s)}}function Fe(n,t,s){return(o=250)=>{const c=d.useMemo(()=>_.store().shared(s),[]);return v(c,n,t,o)}}function Le(n){const t=()=>{document.documentElement.style.fontSize=`calc(1vmax * ${n})`};d.useEffect(t,[n])}function ze(){const[n,t]=d.useState(()=>window.innerWidth/window.innerHeight),s=()=>{const o=()=>{t(window.innerWidth/window.innerHeight)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)};return d.useEffect(s,[]),n}function Ue(n,t){return{uiWidthFactor:Math.min(t,1)/n,uiHeightFactor:Math.max(t,1)/n}}exports.SettingsBox=le;exports.SettingsButtonFrame=Ne;exports.SettingsCheckboxFrame=we;exports.SettingsCheckboxLabel=Re;exports.SettingsColorFrame=ke;exports.SettingsContainer=ue;exports.SettingsDivider=fe;exports.SettingsError=be;exports.SettingsField=pe;exports.SettingsHeading=de;exports.SettingsHint=me;exports.SettingsInputFrame=he;exports.SettingsLabel=ge;exports.SettingsRadioFrame=Te;exports.SettingsRadioLabel=je;exports.SettingsSelectFrame=xe;exports.SettingsSliderFrame=ve;exports.SettingsSliderRuler=Se;exports.SettingsSwitchFrame=ye;exports.SettingsSwitchLabel=Ee;exports.SettingsTextAreaFrame=_e;exports.createUseApplicationStoreState=Ce;exports.createUseDeviceStoreState=Pe;exports.createUseInstanceStoreState=Oe;exports.createUseSharedStoreState=Fe;exports.createUseStoreState=Ae;exports.useStoreState=v;exports.useUiAspectRatio=ze;exports.useUiResponsiveFactors=Ue;exports.useUiScaleToSetRem=Le;
475
+ `;let J=!1;function ce(){if(J||typeof document>"u")return;const n=document.createElement("style");n.setAttribute("data-telemetryos-sdk",""),n.textContent=ie,document.head.appendChild(n),J=!0}ce();function ue({children:n}){const t=()=>{const s=window.matchMedia("(prefers-color-scheme: dark)"),o=m=>{let p;m==="system"?p=s.matches:p=m!=="light",p?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},c=_.environment().subscribeColorScheme(o);c.catch(console.error);const f=()=>{_.environment().getColorScheme().then(o).catch(console.error)};return s.addEventListener("change",f),()=>{c.then(()=>_.environment().unsubscribeColorScheme(o)).catch(console.error),s.removeEventListener("change",f)}};return d.useEffect(t,[]),i.jsx("div",{className:"settings__container",children:n})}function le({children:n}){return i.jsx("div",{className:"settings__box",children:n})}function de({children:n}){return i.jsx("div",{className:"settings__heading",children:n})}function fe(){return i.jsx("hr",{className:"settings__divider"})}function pe({children:n}){return i.jsx("label",{className:"settings__field",children:n})}function ge({children:n}){return i.jsx("div",{className:"settings__label",children:n})}function me({children:n}){return i.jsx("div",{className:"settings__hint",children:n})}function be({children:n}){return i.jsx("div",{className:"settings__error",children:n})}function he({children:n}){return i.jsx("div",{className:"settings__input-frame",children:n})}function _e({children:n}){return i.jsx("div",{className:"settings__textarea-frame",children:n})}function xe({children:n}){return i.jsx("div",{className:"settings__select-frame",children:n})}function ve({children:n}){return i.jsx("div",{className:"settings__slider-frame",children:n})}function Se({children:n}){return i.jsx("div",{className:"settings__slider-ruler",children:n})}function ke({children:n}){return i.jsx("div",{className:"settings__color-frame",children:n})}function ye({children:n}){return i.jsx("label",{className:"settings__switch-frame",children:n})}function Ee({children:n}){return i.jsx("span",{className:"settings__switch-label",children:n})}function we({children:n}){return i.jsx("label",{className:"settings__checkbox-frame",children:n})}function Re({children:n}){return i.jsx("span",{className:"settings__checkbox-label",children:n})}function Te({children:n}){return i.jsx("label",{className:"settings__radio-frame",children:n})}function je({children:n}){return i.jsx("span",{className:"settings__radio-label",children:n})}function Ne({children:n}){return i.jsx("div",{className:"settings__button-frame",children:n})}function v(n,t,s,o=0){var c;const[f,m]=d.useState(!0),[p]=d.useState(s),[S,j]=d.useState(void 0),[g,k]=d.useState(void 0);return d.useEffect(()=>{const b=h=>{j(y=>JSON.stringify(y)===JSON.stringify(h)?y:h),m(!1)};return n.subscribe(t,b).catch(console.error),()=>{n.unsubscribe(t,b).catch(console.error)}},[n,t]),d.useEffect(()=>{if(typeof g<"u"){const b=setTimeout(()=>{n.set(t,g)},o);return()=>clearTimeout(b)}},[g,n,t,o]),d.useEffect(()=>{if(JSON.stringify(g)===JSON.stringify(S)){const b=setTimeout(()=>{k(void 0)},500);return()=>clearTimeout(b)}},[g,S]),[f,(c=g??S)!==null&&c!==void 0?c:p,k]}function Ae(n,t){return(s,o=0)=>v(s,n,t,o)}function Oe(n,t){return(s=0)=>{const o=d.useMemo(()=>_.store().instance,[]);return v(o,n,t,s)}}function Ce(n,t){return(s=0)=>{const o=d.useMemo(()=>_.store().application,[]);return v(o,n,t,s)}}function Pe(n,t){return(s=0)=>{const o=d.useMemo(()=>_.store().device,[]);return v(o,n,t,s)}}function Fe(n,t,s){return(o=0)=>{const c=d.useMemo(()=>_.store().shared(s),[]);return v(c,n,t,o)}}function Le(n){const t=()=>{document.documentElement.style.fontSize=`calc(1vmax * ${n})`};d.useEffect(t,[n])}function ze(){const[n,t]=d.useState(()=>window.innerWidth/window.innerHeight),s=()=>{const o=()=>{t(window.innerWidth/window.innerHeight)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)};return d.useEffect(s,[]),n}function Ue(n,t){return{uiWidthFactor:Math.min(t,1)/n,uiHeightFactor:Math.max(t,1)/n}}exports.SettingsBox=le;exports.SettingsButtonFrame=Ne;exports.SettingsCheckboxFrame=we;exports.SettingsCheckboxLabel=Re;exports.SettingsColorFrame=ke;exports.SettingsContainer=ue;exports.SettingsDivider=fe;exports.SettingsError=be;exports.SettingsField=pe;exports.SettingsHeading=de;exports.SettingsHint=me;exports.SettingsInputFrame=he;exports.SettingsLabel=ge;exports.SettingsRadioFrame=Te;exports.SettingsRadioLabel=je;exports.SettingsSelectFrame=xe;exports.SettingsSliderFrame=ve;exports.SettingsSliderRuler=Se;exports.SettingsSwitchFrame=ye;exports.SettingsSwitchLabel=Ee;exports.SettingsTextAreaFrame=_e;exports.createUseApplicationStoreState=Ce;exports.createUseDeviceStoreState=Pe;exports.createUseInstanceStoreState=Oe;exports.createUseSharedStoreState=Fe;exports.createUseStoreState=Ae;exports.useStoreState=v;exports.useUiAspectRatio=ze;exports.useUiResponsiveFactors=Ue;exports.useUiScaleToSetRem=Le;
package/dist/react.js CHANGED
@@ -842,28 +842,28 @@ function E(e, t, s, o = 0) {
842
842
  }, [p, x]), [d, (c = p ?? x) !== null && c !== void 0 ? c : f, v];
843
843
  }
844
844
  function In(e, t) {
845
- return (s, o = 250) => E(s, e, t, o);
845
+ return (s, o = 0) => E(s, e, t, o);
846
846
  }
847
847
  function Yn(e, t) {
848
- return (s = 250) => {
848
+ return (s = 0) => {
849
849
  const o = j(() => N().instance, []);
850
850
  return E(o, e, t, s);
851
851
  };
852
852
  }
853
853
  function Un(e, t) {
854
- return (s = 250) => {
854
+ return (s = 0) => {
855
855
  const o = j(() => N().application, []);
856
856
  return E(o, e, t, s);
857
857
  };
858
858
  }
859
859
  function $n(e, t) {
860
- return (s = 250) => {
860
+ return (s = 0) => {
861
861
  const o = j(() => N().device, []);
862
862
  return E(o, e, t, s);
863
863
  };
864
864
  }
865
865
  function Dn(e, t, s) {
866
- return (o = 250) => {
866
+ return (o = 0) => {
867
867
  const c = j(() => N().shared(s), []);
868
868
  return E(c, e, t, o);
869
869
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telemetryos/sdk",
3
- "version": "1.7.5",
3
+ "version": "1.8.0",
4
4
  "description": "The official TelemetryOS application API package. Use it to build applications that run on the TelemetryOS platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -42,7 +42,7 @@
42
42
  "license": "",
43
43
  "repository": "github:TelemetryTV/Application-API",
44
44
  "dependencies": {
45
- "@telemetryos/root-sdk": "^1.7.5",
45
+ "@telemetryos/root-sdk": "^1.8.0",
46
46
  "zod": "^3.24.4"
47
47
  },
48
48
  "peerDependencies": {