@noya-app/noya-api-client-react 0.1.39 → 0.1.41

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.
@@ -7,12 +7,12 @@
7
7
  CJS Build start
8
8
  ESM Build start
9
9
  DTS Build start
10
- CJS dist/index.js 406.19 KB
11
- CJS dist/index.js.map 1.06 MB
12
- CJS ⚡️ Build success in 377ms
13
- ESM dist/index.mjs 398.23 KB
10
+ ESM dist/index.mjs 398.29 KB
14
11
  ESM dist/index.mjs.map 1.06 MB
15
- ESM ⚡️ Build success in 378ms
16
- DTS ⚡️ Build success in 6073ms
17
- DTS dist/index.d.ts 16.52 KB
18
- DTS dist/index.d.mts 16.52 KB
12
+ ESM ⚡️ Build success in 495ms
13
+ CJS dist/index.js 406.24 KB
14
+ CJS dist/index.js.map 1.06 MB
15
+ CJS ⚡️ Build success in 495ms
16
+ DTS ⚡️ Build success in 8375ms
17
+ DTS dist/index.d.ts 16.88 KB
18
+ DTS dist/index.d.mts 16.88 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @noya-app/noya-api-client-react
2
2
 
3
+ ## 0.1.41
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d743be0]
8
+ - @noya-app/noya-api@0.1.41
9
+
10
+ ## 0.1.40
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [11c73e0]
15
+ - @noya-app/noya-utils@0.1.9
16
+ - @noya-app/noya-api@0.1.40
17
+
3
18
  ## 0.1.39
4
19
 
5
20
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -24,14 +24,8 @@ declare function useNoyaTools(initial?: NoyaAPI.Tool[]): {
24
24
  url: string;
25
25
  description: string | null;
26
26
  updatedAt: string;
27
- theme: any;
28
27
  icon: string | null;
29
- tags: {
30
- toolCount?: number | undefined;
31
- id: string;
32
- name: string;
33
- rank: number;
34
- }[];
28
+ theme: any;
35
29
  assets: string[];
36
30
  slug: string | null;
37
31
  tagline: string | null;
@@ -44,6 +38,12 @@ declare function useNoyaTools(initial?: NoyaAPI.Tool[]): {
44
38
  image: string | null;
45
39
  slug: string | null;
46
40
  } | null;
41
+ tags: {
42
+ toolCount?: number | undefined;
43
+ id: string;
44
+ name: string;
45
+ rank: number;
46
+ }[];
47
47
  }[];
48
48
  loading: boolean;
49
49
  };
@@ -56,14 +56,8 @@ declare function useOptionalNoyaTools(initial?: NoyaAPI.Tool[]): {
56
56
  url: string;
57
57
  description: string | null;
58
58
  updatedAt: string;
59
- theme: any;
60
59
  icon: string | null;
61
- tags: {
62
- toolCount?: number | undefined;
63
- id: string;
64
- name: string;
65
- rank: number;
66
- }[];
60
+ theme: any;
67
61
  assets: string[];
68
62
  slug: string | null;
69
63
  tagline: string | null;
@@ -76,6 +70,12 @@ declare function useOptionalNoyaTools(initial?: NoyaAPI.Tool[]): {
76
70
  image: string | null;
77
71
  slug: string | null;
78
72
  } | null;
73
+ tags: {
74
+ toolCount?: number | undefined;
75
+ id: string;
76
+ name: string;
77
+ rank: number;
78
+ }[];
79
79
  }[];
80
80
  loading: boolean;
81
81
  };
@@ -301,11 +301,11 @@ declare function useRandomImages(): {
301
301
  color: string;
302
302
  };
303
303
  url: string;
304
- source: {
304
+ user: {
305
305
  name: string;
306
306
  url: string;
307
307
  };
308
- user: {
308
+ source: {
309
309
  name: string;
310
310
  url: string;
311
311
  };
@@ -339,8 +339,10 @@ declare function useGeneratedPageNames(): EnhancedGeneratedPageName[];
339
339
  declare function useGeneratedPageComponentNames(): EnhancedGeneratedPageName[];
340
340
  declare function useNoyaSites(): {
341
341
  sites: {
342
+ url?: string | null | undefined;
342
343
  publishedDeploymentId?: string | null | undefined;
343
344
  publishedDeployment?: {
345
+ url?: string | null | undefined;
344
346
  id: string;
345
347
  createdAt: string;
346
348
  fileVersionId: string | null;
@@ -350,8 +352,10 @@ declare function useNoyaSites(): {
350
352
  id: string;
351
353
  subdomain: string | null;
352
354
  createdAt: string;
355
+ workspaceId: string | null;
353
356
  updatedAt: string;
354
357
  deployments: {
358
+ url?: string | null | undefined;
355
359
  id: string;
356
360
  createdAt: string;
357
361
  fileVersionId: string | null;
@@ -363,6 +367,7 @@ declare function useNoyaSites(): {
363
367
  };
364
368
  declare function useNoyaDeployments(): {
365
369
  deployments: {
370
+ url?: string | null | undefined;
366
371
  id: string;
367
372
  createdAt: string;
368
373
  fileVersionId: string | null;
@@ -373,8 +378,10 @@ declare function useNoyaDeployments(): {
373
378
  };
374
379
  declare function useNoyaSite(siteId: string): {
375
380
  site: {
381
+ url?: string | null | undefined;
376
382
  publishedDeploymentId?: string | null | undefined;
377
383
  publishedDeployment?: {
384
+ url?: string | null | undefined;
378
385
  id: string;
379
386
  createdAt: string;
380
387
  fileVersionId: string | null;
@@ -384,8 +391,10 @@ declare function useNoyaSite(siteId: string): {
384
391
  id: string;
385
392
  subdomain: string | null;
386
393
  createdAt: string;
394
+ workspaceId: string | null;
387
395
  updatedAt: string;
388
396
  deployments: {
397
+ url?: string | null | undefined;
389
398
  id: string;
390
399
  createdAt: string;
391
400
  fileVersionId: string | null;
@@ -417,13 +426,13 @@ declare function useNoyaWorkspaces(): {
417
426
  workspaceId: string;
418
427
  userId: string;
419
428
  updatedAt: string;
420
- role: "OWNER" | "ADMIN" | "MEMBER";
421
429
  user: {
422
430
  id: string;
423
431
  name: string | null;
424
432
  email: string | null;
425
433
  image: string | null;
426
434
  };
435
+ role: "OWNER" | "ADMIN" | "MEMBER";
427
436
  }[];
428
437
  }[];
429
438
  loading: boolean;
@@ -438,8 +447,8 @@ declare function useNoyaWorkspaceInvitations(workspaceId: string): {
438
447
  createdAt: string;
439
448
  workspaceId: string;
440
449
  updatedAt: string;
441
- role: "OWNER" | "ADMIN" | "MEMBER";
442
450
  token: string;
451
+ role: "OWNER" | "ADMIN" | "MEMBER";
443
452
  invitedById: string;
444
453
  acceptedAt: string | null;
445
454
  expiresAt: string | null;
@@ -465,8 +474,8 @@ declare function useNoyaTemplates(): {
465
474
  toolId: string;
466
475
  description: string | null;
467
476
  updatedAt: string;
468
- icon: string | null;
469
477
  version: number;
478
+ icon: string | null;
470
479
  access: "private" | "read" | "write";
471
480
  dataCid: string;
472
481
  ownedByFileId: string | null;
package/dist/index.d.ts CHANGED
@@ -24,14 +24,8 @@ declare function useNoyaTools(initial?: NoyaAPI.Tool[]): {
24
24
  url: string;
25
25
  description: string | null;
26
26
  updatedAt: string;
27
- theme: any;
28
27
  icon: string | null;
29
- tags: {
30
- toolCount?: number | undefined;
31
- id: string;
32
- name: string;
33
- rank: number;
34
- }[];
28
+ theme: any;
35
29
  assets: string[];
36
30
  slug: string | null;
37
31
  tagline: string | null;
@@ -44,6 +38,12 @@ declare function useNoyaTools(initial?: NoyaAPI.Tool[]): {
44
38
  image: string | null;
45
39
  slug: string | null;
46
40
  } | null;
41
+ tags: {
42
+ toolCount?: number | undefined;
43
+ id: string;
44
+ name: string;
45
+ rank: number;
46
+ }[];
47
47
  }[];
48
48
  loading: boolean;
49
49
  };
@@ -56,14 +56,8 @@ declare function useOptionalNoyaTools(initial?: NoyaAPI.Tool[]): {
56
56
  url: string;
57
57
  description: string | null;
58
58
  updatedAt: string;
59
- theme: any;
60
59
  icon: string | null;
61
- tags: {
62
- toolCount?: number | undefined;
63
- id: string;
64
- name: string;
65
- rank: number;
66
- }[];
60
+ theme: any;
67
61
  assets: string[];
68
62
  slug: string | null;
69
63
  tagline: string | null;
@@ -76,6 +70,12 @@ declare function useOptionalNoyaTools(initial?: NoyaAPI.Tool[]): {
76
70
  image: string | null;
77
71
  slug: string | null;
78
72
  } | null;
73
+ tags: {
74
+ toolCount?: number | undefined;
75
+ id: string;
76
+ name: string;
77
+ rank: number;
78
+ }[];
79
79
  }[];
80
80
  loading: boolean;
81
81
  };
@@ -301,11 +301,11 @@ declare function useRandomImages(): {
301
301
  color: string;
302
302
  };
303
303
  url: string;
304
- source: {
304
+ user: {
305
305
  name: string;
306
306
  url: string;
307
307
  };
308
- user: {
308
+ source: {
309
309
  name: string;
310
310
  url: string;
311
311
  };
@@ -339,8 +339,10 @@ declare function useGeneratedPageNames(): EnhancedGeneratedPageName[];
339
339
  declare function useGeneratedPageComponentNames(): EnhancedGeneratedPageName[];
340
340
  declare function useNoyaSites(): {
341
341
  sites: {
342
+ url?: string | null | undefined;
342
343
  publishedDeploymentId?: string | null | undefined;
343
344
  publishedDeployment?: {
345
+ url?: string | null | undefined;
344
346
  id: string;
345
347
  createdAt: string;
346
348
  fileVersionId: string | null;
@@ -350,8 +352,10 @@ declare function useNoyaSites(): {
350
352
  id: string;
351
353
  subdomain: string | null;
352
354
  createdAt: string;
355
+ workspaceId: string | null;
353
356
  updatedAt: string;
354
357
  deployments: {
358
+ url?: string | null | undefined;
355
359
  id: string;
356
360
  createdAt: string;
357
361
  fileVersionId: string | null;
@@ -363,6 +367,7 @@ declare function useNoyaSites(): {
363
367
  };
364
368
  declare function useNoyaDeployments(): {
365
369
  deployments: {
370
+ url?: string | null | undefined;
366
371
  id: string;
367
372
  createdAt: string;
368
373
  fileVersionId: string | null;
@@ -373,8 +378,10 @@ declare function useNoyaDeployments(): {
373
378
  };
374
379
  declare function useNoyaSite(siteId: string): {
375
380
  site: {
381
+ url?: string | null | undefined;
376
382
  publishedDeploymentId?: string | null | undefined;
377
383
  publishedDeployment?: {
384
+ url?: string | null | undefined;
378
385
  id: string;
379
386
  createdAt: string;
380
387
  fileVersionId: string | null;
@@ -384,8 +391,10 @@ declare function useNoyaSite(siteId: string): {
384
391
  id: string;
385
392
  subdomain: string | null;
386
393
  createdAt: string;
394
+ workspaceId: string | null;
387
395
  updatedAt: string;
388
396
  deployments: {
397
+ url?: string | null | undefined;
389
398
  id: string;
390
399
  createdAt: string;
391
400
  fileVersionId: string | null;
@@ -417,13 +426,13 @@ declare function useNoyaWorkspaces(): {
417
426
  workspaceId: string;
418
427
  userId: string;
419
428
  updatedAt: string;
420
- role: "OWNER" | "ADMIN" | "MEMBER";
421
429
  user: {
422
430
  id: string;
423
431
  name: string | null;
424
432
  email: string | null;
425
433
  image: string | null;
426
434
  };
435
+ role: "OWNER" | "ADMIN" | "MEMBER";
427
436
  }[];
428
437
  }[];
429
438
  loading: boolean;
@@ -438,8 +447,8 @@ declare function useNoyaWorkspaceInvitations(workspaceId: string): {
438
447
  createdAt: string;
439
448
  workspaceId: string;
440
449
  updatedAt: string;
441
- role: "OWNER" | "ADMIN" | "MEMBER";
442
450
  token: string;
451
+ role: "OWNER" | "ADMIN" | "MEMBER";
443
452
  invitedById: string;
444
453
  acceptedAt: string | null;
445
454
  expiresAt: string | null;
@@ -465,8 +474,8 @@ declare function useNoyaTemplates(): {
465
474
  toolId: string;
466
475
  description: string | null;
467
476
  updatedAt: string;
468
- icon: string | null;
469
477
  version: number;
478
+ icon: string | null;
470
479
  access: "private" | "read" | "write";
471
480
  dataCid: string;
472
481
  ownedByFileId: string | null;
package/dist/index.js CHANGED
@@ -7505,27 +7505,28 @@ var jwt;
7505
7505
  })(jwt || (jwt = {}));
7506
7506
 
7507
7507
  // ../state-manager/src/MenuManager.ts
7508
+ var import_noya_utils6 = require("@noya-app/noya-utils");
7508
7509
  var import_observable8 = require("@noya-app/observable");
7509
7510
 
7510
7511
  // ../state-manager/src/multiplayer.ts
7511
- var import_noya_utils6 = require("@noya-app/noya-utils");
7512
+ var import_noya_utils7 = require("@noya-app/noya-utils");
7512
7513
  var import_observable10 = require("@noya-app/observable");
7513
7514
 
7514
7515
  // ../state-manager/src/stateManager.ts
7515
7516
  var import_observable9 = require("@noya-app/observable");
7516
7517
 
7517
7518
  // ../state-manager/src/multiplayer.ts
7518
- var createHash = (value, options) => (0, import_noya_utils6.hash)(value, { ...options, ignoreUndefinedProperties: true });
7519
+ var createHash = (value, options) => (0, import_noya_utils7.hash)(value, { ...options, ignoreUndefinedProperties: true });
7519
7520
 
7520
7521
  // ../state-manager/src/NoyaManager.ts
7521
- var import_noya_utils10 = require("@noya-app/noya-utils");
7522
+ var import_noya_utils11 = require("@noya-app/noya-utils");
7522
7523
  var import_observable18 = require("@noya-app/observable");
7523
7524
 
7524
7525
  // ../noya-pipeline/src/graphToTasks.ts
7525
7526
  var import_observable11 = require("@noya-app/observable");
7526
7527
 
7527
7528
  // ../noya-pipeline/src/state.ts
7528
- var import_noya_utils7 = require("@noya-app/noya-utils");
7529
+ var import_noya_utils8 = require("@noya-app/noya-utils");
7529
7530
  var rectSchema = Type.Object({
7530
7531
  x: Type.Number(),
7531
7532
  y: Type.Number(),
@@ -7630,11 +7631,11 @@ var import_observable12 = require("@noya-app/observable");
7630
7631
  var import_observable13 = require("@noya-app/observable");
7631
7632
 
7632
7633
  // ../state-manager/src/ResourceManager.ts
7633
- var import_noya_utils8 = require("@noya-app/noya-utils");
7634
+ var import_noya_utils9 = require("@noya-app/noya-utils");
7634
7635
  var import_observable14 = require("@noya-app/observable");
7635
7636
 
7636
7637
  // ../state-manager/src/rpcManager.ts
7637
- var import_noya_utils9 = require("@noya-app/noya-utils");
7638
+ var import_noya_utils10 = require("@noya-app/noya-utils");
7638
7639
  var import_observable15 = require("@noya-app/observable");
7639
7640
 
7640
7641
  // ../state-manager/src/SecretManager.ts
@@ -7653,6 +7654,9 @@ var createMutatorParametersSchema = Type.Object({
7653
7654
  })
7654
7655
  });
7655
7656
 
7657
+ // ../state-manager/src/sync/localRpcHelpers.ts
7658
+ var import_noya_utils12 = require("@noya-app/noya-utils");
7659
+
7656
7660
  // ../noya-keymap/src/hooks.ts
7657
7661
  var import_react4 = require("react");
7658
7662
 
@@ -7763,9 +7767,6 @@ var MenuItemTree = (0, import_tree_visit3.defineTree)((node) => {
7763
7767
  return node.type === "submenu" ? node.items : [];
7764
7768
  });
7765
7769
 
7766
- // ../state-manager/src/sync/parentLocalRpcBridge.ts
7767
- var import_noya_utils11 = require("@noya-app/noya-utils");
7768
-
7769
7770
  // ../noya-multiplayer-react/src/ai.ts
7770
7771
  var import_react60 = require("react");
7771
7772
 
@@ -7952,7 +7953,7 @@ var FileDropTarget = memoGeneric(function FileDropTarget2({ children, onDropFile
7952
7953
  var import_react8 = require("react");
7953
7954
 
7954
7955
  // ../noya-react-utils/src/hooks/useDeepArray.ts
7955
- var import_noya_utils12 = require("@noya-app/noya-utils");
7956
+ var import_noya_utils13 = require("@noya-app/noya-utils");
7956
7957
  var import_react9 = require("react");
7957
7958
  function useJsonMemo(value) {
7958
7959
  const stringified = (0, import_react9.useMemo)(
@@ -7967,7 +7968,7 @@ function useJsonMemo(value) {
7967
7968
  }
7968
7969
 
7969
7970
  // ../noya-react-utils/src/hooks/useDeepState.ts
7970
- var import_noya_utils13 = require("@noya-app/noya-utils");
7971
+ var import_noya_utils14 = require("@noya-app/noya-utils");
7971
7972
  var import_react10 = require("react");
7972
7973
 
7973
7974
  // ../noya-react-utils/src/hooks/useFetch.ts
@@ -7998,7 +7999,7 @@ var import_react17 = require("react");
7998
7999
  var import_react18 = require("react");
7999
8000
 
8000
8001
  // ../noya-react-utils/src/hooks/useShallowArray.ts
8001
- var import_noya_utils14 = require("@noya-app/noya-utils");
8002
+ var import_noya_utils15 = require("@noya-app/noya-utils");
8002
8003
  var import_react19 = require("react");
8003
8004
 
8004
8005
  // ../noya-react-utils/src/hooks/useStableCallback.ts
@@ -8008,7 +8009,7 @@ var import_react20 = require("react");
8008
8009
  var import_react21 = require("react");
8009
8010
 
8010
8011
  // ../noya-react-utils/src/hooks/useUrlHashParameters.ts
8011
- var import_noya_utils15 = require("@noya-app/noya-utils");
8012
+ var import_noya_utils16 = require("@noya-app/noya-utils");
8012
8013
  var import_react22 = require("react");
8013
8014
 
8014
8015
  // ../noya-react-utils/src/hooks/useWindowSize.ts
@@ -8159,7 +8160,7 @@ var import_react55 = __toESM(require("react"));
8159
8160
  var import_client = require("react-dom/client");
8160
8161
 
8161
8162
  // ../noya-multiplayer-react/src/inspector/StateInspector.tsx
8162
- var import_noya_utils16 = require("@noya-app/noya-utils");
8163
+ var import_noya_utils17 = require("@noya-app/noya-utils");
8163
8164
  var import_react54 = __toESM(require("react"));
8164
8165
 
8165
8166
  // ../../node_modules/react-inspector/dist/index.mjs
@@ -11040,7 +11041,7 @@ var StateInspector = memoGeneric(function StateInspector2({
11040
11041
  {
11041
11042
  theme: theme3,
11042
11043
  onClick: async () => {
11043
- const path2 = prompt("Enter directory path") || (0, import_noya_utils16.uuid)();
11044
+ const path2 = prompt("Enter directory path") || (0, import_noya_utils17.uuid)();
11044
11045
  await resourceManager.createResource({
11045
11046
  type: "directory",
11046
11047
  path: path2
@@ -11056,9 +11057,9 @@ var StateInspector = memoGeneric(function StateInspector2({
11056
11057
  const file = await uploadFile();
11057
11058
  resourceManager.createResource({
11058
11059
  type: "asset",
11059
- path: file.name || (0, import_noya_utils16.uuid)(),
11060
+ path: file.name || (0, import_noya_utils17.uuid)(),
11060
11061
  asset: {
11061
- content: import_noya_utils16.Base64.encode(await file.arrayBuffer()),
11062
+ content: import_noya_utils17.Base64.encode(await file.arrayBuffer()),
11062
11063
  contentType: file.type,
11063
11064
  encoding: "base64"
11064
11065
  }
@@ -11243,7 +11244,7 @@ var StateInspector = memoGeneric(function StateInspector2({
11243
11244
  )
11244
11245
  );
11245
11246
  });
11246
- var truncateAsset = (0, import_noya_utils16.memoize)((asset) => {
11247
+ var truncateAsset = (0, import_noya_utils17.memoize)((asset) => {
11247
11248
  if (asset.url.startsWith("data:") || asset.url.startsWith("blob:")) {
11248
11249
  return { ...asset, url: ellipsis(asset.url, 40) };
11249
11250
  }