@40rty/ams-sdk 0.5.25 → 0.5.26

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.js CHANGED
@@ -5223,7 +5223,9 @@ var BoardEditSchema = z45.discriminatedUnion("op", [
5223
5223
  z45.object({ op: z45.literal("fact.set"), label, value }),
5224
5224
  z45.object({ op: z45.literal("fact.clear"), label }),
5225
5225
  z45.object({ op: z45.literal("item.add"), ref }),
5226
- z45.object({ op: z45.literal("item.remove"), ref })
5226
+ z45.object({ op: z45.literal("item.remove"), ref }),
5227
+ /** What the member is called on the board: every entry they added, and the member list, show it. */
5228
+ z45.object({ op: z45.literal("name.set"), name: z45.string().trim().min(1).max(BOARD_NAME_MAX) })
5227
5229
  ]);
5228
5230
  var BoardShareSchema = z45.object({
5229
5231
  title: z45.string().trim().max(BOARD_TITLE_MAX),
@@ -5251,6 +5253,13 @@ function previewBoardEdit(board, edit, now) {
5251
5253
  return board.items.some((i) => i.ref === edit.ref) ? board : { ...board, items: [...board.items, { ref: edit.ref, by, mine: true, at: now }] };
5252
5254
  case "item.remove":
5253
5255
  return { ...board, items: board.items.filter((i) => i.ref !== edit.ref) };
5256
+ case "name.set":
5257
+ return {
5258
+ ...board,
5259
+ members: board.members.map((m) => m.you ? { ...m, name: edit.name } : m),
5260
+ facts: board.facts.map((f) => f.mine ? { ...f, by: edit.name } : f),
5261
+ items: board.items.map((i) => i.mine ? { ...i, by: edit.name } : i)
5262
+ };
5254
5263
  }
5255
5264
  }
5256
5265
 
@@ -13513,7 +13522,7 @@ function useContentActions() {
13513
13522
  import { useEffect as useEffect19, useState as useState19 } from "react";
13514
13523
 
13515
13524
  // package.json
13516
- var version = "0.5.25";
13525
+ var version = "0.5.26";
13517
13526
 
13518
13527
  // src/host/host-modules.ts
13519
13528
  import * as react from "react";
@@ -5442,6 +5442,15 @@ export declare const HOST_MODULES: {
5442
5442
  }, {
5443
5443
  op: "item.remove";
5444
5444
  ref: string;
5445
+ }>, zod.ZodObject<{
5446
+ op: zod.ZodLiteral<"name.set">;
5447
+ name: zod.ZodString;
5448
+ }, "strip", zod.ZodTypeAny, {
5449
+ op: "name.set";
5450
+ name: string;
5451
+ }, {
5452
+ op: "name.set";
5453
+ name: string;
5445
5454
  }>]>;
5446
5455
  BoardShareSchema: zod.ZodObject<{
5447
5456
  title: zod.ZodString;
@@ -373,6 +373,15 @@ export declare const BoardEditSchema: z.ZodDiscriminatedUnion<"op", [z.ZodObject
373
373
  }, {
374
374
  op: "item.remove";
375
375
  ref: string;
376
+ }>, z.ZodObject<{
377
+ op: z.ZodLiteral<"name.set">;
378
+ name: z.ZodString;
379
+ }, "strip", z.ZodTypeAny, {
380
+ op: "name.set";
381
+ name: string;
382
+ }, {
383
+ op: "name.set";
384
+ name: string;
376
385
  }>]>;
377
386
  export type BoardEdit = z.infer<typeof BoardEditSchema>;
378
387
  /** What the sharer chooses to put on the board when they share: only these facts and items leave their session. */
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "react": "^18.3.0 || ^19.0.0",
27
27
  "react-dom": "^18.3.0 || ^19.0.0"
28
28
  },
29
- "version": "0.5.25",
29
+ "version": "0.5.26",
30
30
  "homepage": "https://docs.40rty.ai",
31
31
  "license": "UNLICENSED",
32
32
  "engines": {