@noya-app/noya-api-client-react 0.1.50 → 0.1.51

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/index.mjs CHANGED
@@ -10422,8 +10422,12 @@ var createHash = (value, options) => hash(value, { ...options, ignoreUndefinedPr
10422
10422
  // ../state-manager/src/GitManager.ts
10423
10423
  import { Observable as Observable9 } from "@noya-app/observable";
10424
10424
 
10425
- // ../state-manager/src/IOManager.ts
10425
+ // ../state-manager/src/ImagePickerManager.ts
10426
10426
  import { Observable as Observable10 } from "@noya-app/observable";
10427
+ import { uuid as uuid6 } from "@noya-app/noya-utils";
10428
+
10429
+ // ../state-manager/src/IOManager.ts
10430
+ import { Observable as Observable11 } from "@noya-app/observable";
10427
10431
 
10428
10432
  // ../state-manager/src/jwt.ts
10429
10433
  function base64UrlEncode(str) {
@@ -10526,17 +10530,17 @@ var jwt;
10526
10530
 
10527
10531
  // ../state-manager/src/MenuManager.ts
10528
10532
  import { isDeepEqual as isDeepEqual4 } from "@noya-app/noya-utils";
10529
- import { Observable as Observable11 } from "@noya-app/observable";
10533
+ import { Observable as Observable12 } from "@noya-app/observable";
10530
10534
 
10531
10535
  // ../state-manager/src/NoyaManager.ts
10532
- import { uuid as uuid13 } from "@noya-app/noya-utils";
10533
- import { Observable as Observable22, set as set3 } from "@noya-app/observable";
10536
+ import { uuid as uuid14 } from "@noya-app/noya-utils";
10537
+ import { Observable as Observable23, set as set3 } from "@noya-app/observable";
10534
10538
 
10535
10539
  // ../noya-pipeline/src/graphToTasks.ts
10536
10540
  import { get as get3 } from "@noya-app/observable";
10537
10541
 
10538
10542
  // ../noya-pipeline/src/state.ts
10539
- import { uuid as uuid6 } from "@noya-app/noya-utils";
10543
+ import { uuid as uuid7 } from "@noya-app/noya-utils";
10540
10544
  var rectSchema = Type.Object({
10541
10545
  x: Type.Number(),
10542
10546
  y: Type.Number(),
@@ -10635,38 +10639,38 @@ var pipelineSchema = Type.Object(
10635
10639
  );
10636
10640
 
10637
10641
  // ../state-manager/src/PipelineManager.ts
10638
- import { Observable as Observable12 } from "@noya-app/observable";
10642
+ import { Observable as Observable13 } from "@noya-app/observable";
10639
10643
 
10640
10644
  // ../state-manager/src/PublishingManager.ts
10641
- import { Observable as Observable13 } from "@noya-app/observable";
10645
+ import { Observable as Observable14 } from "@noya-app/observable";
10642
10646
 
10643
10647
  // ../state-manager/src/ResourceManager.ts
10644
- import { isDeepEqual as isDeepEqual5, uuid as uuid7 } from "@noya-app/noya-utils";
10645
- import { Observable as Observable14 } from "@noya-app/observable";
10648
+ import { isDeepEqual as isDeepEqual5, uuid as uuid8 } from "@noya-app/noya-utils";
10649
+ import { Observable as Observable15 } from "@noya-app/observable";
10646
10650
 
10647
10651
  // ../state-manager/src/SandboxManager.ts
10648
- import { Observable as Observable15 } from "@noya-app/observable";
10652
+ import { Observable as Observable16 } from "@noya-app/observable";
10649
10653
 
10650
10654
  // ../state-manager/src/rpcManager.ts
10651
- import { uuid as uuid8 } from "@noya-app/noya-utils";
10652
- import { Observable as Observable16 } from "@noya-app/observable";
10655
+ import { uuid as uuid9 } from "@noya-app/noya-utils";
10656
+ import { Observable as Observable17 } from "@noya-app/observable";
10653
10657
 
10654
10658
  // ../state-manager/src/SecretManager.ts
10655
- import { Observable as Observable17 } from "@noya-app/observable";
10659
+ import { Observable as Observable18 } from "@noya-app/observable";
10656
10660
 
10657
10661
  // ../state-manager/src/TaskManager.ts
10658
- import { Observable as Observable18 } from "@noya-app/observable";
10662
+ import { Observable as Observable19 } from "@noya-app/observable";
10659
10663
 
10660
10664
  // ../state-manager/src/TranscriptionManager.ts
10661
10665
  import { Base64 as Base643 } from "@noya-app/noya-utils";
10662
- import { Observable as Observable19 } from "@noya-app/observable";
10666
+ import { Observable as Observable20 } from "@noya-app/observable";
10663
10667
 
10664
10668
  // ../state-manager/src/UserManager.ts
10665
- import { Observable as Observable21 } from "@noya-app/observable";
10669
+ import { Observable as Observable22 } from "@noya-app/observable";
10666
10670
 
10667
10671
  // ../state-manager/src/sync/clientId.ts
10668
- import { uuid as uuid9 } from "@noya-app/noya-utils";
10669
- import { Observable as Observable20 } from "@noya-app/observable";
10672
+ import { uuid as uuid10 } from "@noya-app/noya-utils";
10673
+ import { Observable as Observable21 } from "@noya-app/observable";
10670
10674
 
10671
10675
  // ../state-manager/src/sync/defaultNames.ts
10672
10676
  import { upperFirst } from "@noya-app/noya-utils";
@@ -10739,9 +10743,9 @@ function getClientAnimalFromName(name) {
10739
10743
  var CLIENT_ID_STORAGE_KEY = "noya-client-id";
10740
10744
  var CLIENT_NAME_STORAGE_KEY = "noya-client-name";
10741
10745
  var CLIENT_IMAGE_STORAGE_KEY = "noya-client-image";
10742
- var clientId$ = new Observable20(void 0);
10743
- var clientName$ = new Observable20(void 0);
10744
- var clientImage$ = new Observable20(void 0);
10746
+ var clientId$ = new Observable21(void 0);
10747
+ var clientName$ = new Observable21(void 0);
10748
+ var clientImage$ = new Observable21(void 0);
10745
10749
  var safeGetItem = (key) => {
10746
10750
  try {
10747
10751
  return typeof localStorage !== "undefined" ? localStorage.getItem(key) : null;
@@ -10762,7 +10766,7 @@ if (typeof window !== "undefined") {
10762
10766
  if (storedClientId) {
10763
10767
  clientId$.set(storedClientId);
10764
10768
  } else {
10765
- const newClientId = uuid9();
10769
+ const newClientId = uuid10();
10766
10770
  safeSetItem(CLIENT_ID_STORAGE_KEY, newClientId);
10767
10771
  clientId$.set(newClientId);
10768
10772
  }
@@ -10785,13 +10789,13 @@ if (typeof window !== "undefined") {
10785
10789
  }
10786
10790
 
10787
10791
  // ../state-manager/src/sync/syncUtils.ts
10788
- import { uuid as uuid10 } from "@noya-app/noya-utils";
10792
+ import { uuid as uuid11 } from "@noya-app/noya-utils";
10789
10793
 
10790
10794
  // ../state-manager/src/sync/localRpcHelpers.ts
10791
- import { Base64 as Base644, uuid as uuid11 } from "@noya-app/noya-utils";
10795
+ import { Base64 as Base644, uuid as uuid12 } from "@noya-app/noya-utils";
10792
10796
 
10793
10797
  // ../state-manager/src/sync/localStorageSync.ts
10794
- import { uuid as uuid12 } from "@noya-app/noya-utils";
10798
+ import { uuid as uuid13 } from "@noya-app/noya-utils";
10795
10799
 
10796
10800
  // ../noya-keymap/src/hooks.ts
10797
10801
  import { useEffect as useEffect2, useRef as useRef2 } from "react";
@@ -10918,7 +10922,7 @@ import { useEffect as useEffect18 } from "react";
10918
10922
 
10919
10923
  // ../noya-multiplayer-react/src/NoyaStateContext.tsx
10920
10924
  import {
10921
- Observable as Observable23
10925
+ Observable as Observable24
10922
10926
  } from "@noya-app/observable";
10923
10927
 
10924
10928
  // ../noya-react-utils/src/components/AutoSizer.tsx
@@ -11328,7 +11332,7 @@ import React35 from "react";
11328
11332
  import { createRoot } from "react-dom/client";
11329
11333
 
11330
11334
  // ../noya-multiplayer-react/src/inspector/StateInspector.tsx
11331
- import { Base64 as Base645, memoize, uuid as uuid14 } from "@noya-app/noya-utils";
11335
+ import { Base64 as Base645, memoize, uuid as uuid15 } from "@noya-app/noya-utils";
11332
11336
  import React34, {
11333
11337
  useCallback as useCallback12,
11334
11338
  useEffect as useEffect14,
@@ -14379,6 +14383,7 @@ var StateInspector = memoGeneric(function StateInspector2({
14379
14383
  anchor = "right",
14380
14384
  unstyled = false,
14381
14385
  advanced = false,
14386
+ defaultCollapsed = false,
14382
14387
  ...props
14383
14388
  }) {
14384
14389
  const {
@@ -14408,7 +14413,7 @@ var StateInspector = memoGeneric(function StateInspector2({
14408
14413
  const serverSimulationLogsContainerRef = React34.useRef(null);
14409
14414
  const [showInspector, setShowInspector] = useLocalStorageState(
14410
14415
  "noya-multiplayer-react-show-inspector",
14411
- true
14416
+ !defaultCollapsed
14412
14417
  );
14413
14418
  const [showEvents, setShowEvents] = useLocalStorageState(
14414
14419
  "noya-multiplayer-react-show-events",
@@ -14857,7 +14862,7 @@ var StateInspector = memoGeneric(function StateInspector2({
14857
14862
  {
14858
14863
  theme: theme3,
14859
14864
  onClick: async () => {
14860
- const path2 = prompt("Enter directory path") || uuid14();
14865
+ const path2 = prompt("Enter directory path") || uuid15();
14861
14866
  await resourceManager.createResource({
14862
14867
  type: "directory",
14863
14868
  path: path2
@@ -14873,7 +14878,7 @@ var StateInspector = memoGeneric(function StateInspector2({
14873
14878
  const file = await uploadFile();
14874
14879
  resourceManager.createResource({
14875
14880
  type: "asset",
14876
- path: file.name || uuid14(),
14881
+ path: file.name || uuid15(),
14877
14882
  asset: {
14878
14883
  content: Base645.encode(await file.arrayBuffer()),
14879
14884
  contentType: file.type,
@@ -15167,7 +15172,7 @@ function useActivityEventsForManager(streamFilter, activityEventsManager) {
15167
15172
  }
15168
15173
 
15169
15174
  // ../noya-multiplayer-react/src/components/UserPointersOverlay.tsx
15170
- import { Observable as Observable24 } from "@noya-app/observable";
15175
+ import { Observable as Observable25 } from "@noya-app/observable";
15171
15176
  import React38, { useEffect as useEffect19, useMemo as useMemo12, useState as useState19 } from "react";
15172
15177
  function shouldShow(hideAfter, updatedAt) {
15173
15178
  return !!updatedAt && Date.now() - updatedAt < hideAfter;
@@ -15181,7 +15186,7 @@ var UserPointerInternal = memoGeneric(function UserPointerInternal2({
15181
15186
  const observable = useMemo12(() => {
15182
15187
  const metadata$ = sharedConnectionDataManager.metadata$.observePath([user.connectionId]).throttle(50);
15183
15188
  const data$ = sharedConnectionDataManager.data$.observePath([user.connectionId]).throttle(50);
15184
- return Observable24.combine([metadata$, data$], ([metadata2, data2]) => {
15189
+ return Observable25.combine([metadata$, data$], ([metadata2, data2]) => {
15185
15190
  return { metadata: metadata2, data: data2 };
15186
15191
  });
15187
15192
  }, [sharedConnectionDataManager, user.connectionId]);