@optiaxiom/proteus 0.1.1 → 0.1.3

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.
@@ -2605,12 +2605,15 @@ var definitions = {
2605
2605
  title: {
2606
2606
  $ref: "#/definitions/ProteusNode",
2607
2607
  description: "A concise heading that encapsulates the essence of the Proteus document's content or intended action."
2608
+ },
2609
+ titleIcon: {
2610
+ description: "URL or data URI for an icon displayed alongside the title in a block-style header.",
2611
+ type: "string"
2608
2612
  }
2609
2613
  },
2610
2614
  required: [
2611
2615
  "$type",
2612
- "body",
2613
- "title"
2616
+ "body"
2614
2617
  ],
2615
2618
  type: "object"
2616
2619
  },
@@ -2652,6 +2655,9 @@ var definitions = {
2652
2655
  {
2653
2656
  $ref: "#/definitions/ProteusHeading"
2654
2657
  },
2658
+ {
2659
+ $ref: "#/definitions/ProteusIcon"
2660
+ },
2655
2661
  {
2656
2662
  $ref: "#/definitions/ProteusIconCalendar"
2657
2663
  },
@@ -2688,6 +2694,9 @@ var definitions = {
2688
2694
  {
2689
2695
  $ref: "#/definitions/ProteusShow"
2690
2696
  },
2697
+ {
2698
+ $ref: "#/definitions/ProteusSwitch"
2699
+ },
2691
2700
  {
2692
2701
  $ref: "#/definitions/ProteusText"
2693
2702
  },
@@ -2756,6 +2765,25 @@ var definitions = {
2756
2765
  "url"
2757
2766
  ],
2758
2767
  type: "object"
2768
+ },
2769
+ {
2770
+ description: "Client-side component action - collects name/value pairs from a data array and sends as a message",
2771
+ properties: {
2772
+ action: {
2773
+ "const": "message-from",
2774
+ description: "The action type",
2775
+ type: "string"
2776
+ },
2777
+ path: {
2778
+ description: "JSON pointer to an array of objects with name and value fields",
2779
+ type: "string"
2780
+ }
2781
+ },
2782
+ required: [
2783
+ "action",
2784
+ "path"
2785
+ ],
2786
+ type: "object"
2759
2787
  }
2760
2788
  ],
2761
2789
  description: "Handler for user interactions - a server-side tool call, client-side message, or client-side component action"
@@ -5192,6 +5220,199 @@ var definitions = {
5192
5220
  ],
5193
5221
  type: "object"
5194
5222
  },
5223
+ ProteusIcon: {
5224
+ properties: {
5225
+ $type: {
5226
+ "const": "Icon"
5227
+ },
5228
+ alignItems: {
5229
+ $ref: "#/definitions/SprinkleProp_alignItems"
5230
+ },
5231
+ alignSelf: {
5232
+ $ref: "#/definitions/SprinkleProp_alignSelf"
5233
+ },
5234
+ animation: {
5235
+ $ref: "#/definitions/SprinkleProp_animation"
5236
+ },
5237
+ backgroundImage: {
5238
+ $ref: "#/definitions/SprinkleProp_backgroundImage"
5239
+ },
5240
+ bg: {
5241
+ $ref: "#/definitions/SprinkleProp_bg"
5242
+ },
5243
+ border: {
5244
+ $ref: "#/definitions/SprinkleProp_border"
5245
+ },
5246
+ borderB: {
5247
+ $ref: "#/definitions/SprinkleProp_borderB"
5248
+ },
5249
+ borderColor: {
5250
+ $ref: "#/definitions/SprinkleProp_borderColor"
5251
+ },
5252
+ borderL: {
5253
+ $ref: "#/definitions/SprinkleProp_borderL"
5254
+ },
5255
+ borderR: {
5256
+ $ref: "#/definitions/SprinkleProp_borderR"
5257
+ },
5258
+ borderT: {
5259
+ $ref: "#/definitions/SprinkleProp_borderT"
5260
+ },
5261
+ color: {
5262
+ $ref: "#/definitions/SprinkleProp_color"
5263
+ },
5264
+ cursor: {
5265
+ $ref: "#/definitions/SprinkleProp_cursor"
5266
+ },
5267
+ display: {
5268
+ $ref: "#/definitions/SprinkleProp_display"
5269
+ },
5270
+ flex: {
5271
+ $ref: "#/definitions/SprinkleProp_flex"
5272
+ },
5273
+ flexDirection: {
5274
+ $ref: "#/definitions/SprinkleProp_flexDirection"
5275
+ },
5276
+ flexWrap: {
5277
+ $ref: "#/definitions/SprinkleProp_flexWrap"
5278
+ },
5279
+ fontFamily: {
5280
+ $ref: "#/definitions/SprinkleProp_fontFamily"
5281
+ },
5282
+ fontSize: {
5283
+ $ref: "#/definitions/SprinkleProp_fontSize"
5284
+ },
5285
+ fontWeight: {
5286
+ $ref: "#/definitions/SprinkleProp_fontWeight"
5287
+ },
5288
+ gap: {
5289
+ $ref: "#/definitions/SprinkleProp_gap"
5290
+ },
5291
+ gridColumn: {
5292
+ $ref: "#/definitions/SprinkleProp_gridColumn"
5293
+ },
5294
+ gridTemplateColumns: {
5295
+ $ref: "#/definitions/SprinkleProp_gridTemplateColumns"
5296
+ },
5297
+ h: {
5298
+ $ref: "#/definitions/SprinkleProp_h"
5299
+ },
5300
+ justifyContent: {
5301
+ $ref: "#/definitions/SprinkleProp_justifyContent"
5302
+ },
5303
+ justifyItems: {
5304
+ $ref: "#/definitions/SprinkleProp_justifyItems"
5305
+ },
5306
+ m: {
5307
+ $ref: "#/definitions/SprinkleProp_m"
5308
+ },
5309
+ maxH: {
5310
+ $ref: "#/definitions/SprinkleProp_maxH"
5311
+ },
5312
+ maxW: {
5313
+ $ref: "#/definitions/SprinkleProp_maxW"
5314
+ },
5315
+ mb: {
5316
+ $ref: "#/definitions/SprinkleProp_mb"
5317
+ },
5318
+ ml: {
5319
+ $ref: "#/definitions/SprinkleProp_ml"
5320
+ },
5321
+ mr: {
5322
+ $ref: "#/definitions/SprinkleProp_mr"
5323
+ },
5324
+ mt: {
5325
+ $ref: "#/definitions/SprinkleProp_mt"
5326
+ },
5327
+ mx: {
5328
+ $ref: "#/definitions/SprinkleProp_mx"
5329
+ },
5330
+ my: {
5331
+ $ref: "#/definitions/SprinkleProp_my"
5332
+ },
5333
+ objectFit: {
5334
+ $ref: "#/definitions/SprinkleProp_objectFit"
5335
+ },
5336
+ overflow: {
5337
+ $ref: "#/definitions/SprinkleProp_overflow"
5338
+ },
5339
+ overflowX: {
5340
+ $ref: "#/definitions/SprinkleProp_overflowX"
5341
+ },
5342
+ overflowY: {
5343
+ $ref: "#/definitions/SprinkleProp_overflowY"
5344
+ },
5345
+ p: {
5346
+ $ref: "#/definitions/SprinkleProp_p"
5347
+ },
5348
+ pb: {
5349
+ $ref: "#/definitions/SprinkleProp_pb"
5350
+ },
5351
+ pl: {
5352
+ $ref: "#/definitions/SprinkleProp_pl"
5353
+ },
5354
+ placeItems: {
5355
+ $ref: "#/definitions/SprinkleProp_placeItems"
5356
+ },
5357
+ pointerEvents: {
5358
+ $ref: "#/definitions/SprinkleProp_pointerEvents"
5359
+ },
5360
+ pr: {
5361
+ $ref: "#/definitions/SprinkleProp_pr"
5362
+ },
5363
+ pt: {
5364
+ $ref: "#/definitions/SprinkleProp_pt"
5365
+ },
5366
+ px: {
5367
+ $ref: "#/definitions/SprinkleProp_px"
5368
+ },
5369
+ py: {
5370
+ $ref: "#/definitions/SprinkleProp_py"
5371
+ },
5372
+ rounded: {
5373
+ $ref: "#/definitions/SprinkleProp_rounded"
5374
+ },
5375
+ shadow: {
5376
+ $ref: "#/definitions/SprinkleProp_shadow"
5377
+ },
5378
+ size: {
5379
+ $ref: "#/definitions/SprinkleProp_size"
5380
+ },
5381
+ textAlign: {
5382
+ $ref: "#/definitions/SprinkleProp_textAlign"
5383
+ },
5384
+ textTransform: {
5385
+ $ref: "#/definitions/SprinkleProp_textTransform"
5386
+ },
5387
+ transition: {
5388
+ $ref: "#/definitions/SprinkleProp_transition"
5389
+ },
5390
+ w: {
5391
+ $ref: "#/definitions/SprinkleProp_w"
5392
+ },
5393
+ whiteSpace: {
5394
+ $ref: "#/definitions/SprinkleProp_whiteSpace"
5395
+ },
5396
+ z: {
5397
+ $ref: "#/definitions/SprinkleProp_z"
5398
+ },
5399
+ src: {
5400
+ anyOf: [
5401
+ {
5402
+ $ref: "#/definitions/ProteusValue"
5403
+ },
5404
+ {
5405
+ type: "string"
5406
+ }
5407
+ ],
5408
+ description: "The icon source URL"
5409
+ }
5410
+ },
5411
+ required: [
5412
+ "$type"
5413
+ ],
5414
+ type: "object"
5415
+ },
5195
5416
  ProteusIconCalendar: {
5196
5417
  properties: {
5197
5418
  $type: {
@@ -7074,6 +7295,220 @@ var definitions = {
7074
7295
  ],
7075
7296
  type: "object"
7076
7297
  },
7298
+ ProteusSwitch: {
7299
+ examples: [
7300
+ {
7301
+ $type: "Switch",
7302
+ name: "field_name"
7303
+ }
7304
+ ],
7305
+ properties: {
7306
+ $type: {
7307
+ "const": "Switch"
7308
+ },
7309
+ alignItems: {
7310
+ $ref: "#/definitions/SprinkleProp_alignItems"
7311
+ },
7312
+ alignSelf: {
7313
+ $ref: "#/definitions/SprinkleProp_alignSelf"
7314
+ },
7315
+ animation: {
7316
+ $ref: "#/definitions/SprinkleProp_animation"
7317
+ },
7318
+ backgroundImage: {
7319
+ $ref: "#/definitions/SprinkleProp_backgroundImage"
7320
+ },
7321
+ bg: {
7322
+ $ref: "#/definitions/SprinkleProp_bg"
7323
+ },
7324
+ border: {
7325
+ $ref: "#/definitions/SprinkleProp_border"
7326
+ },
7327
+ borderB: {
7328
+ $ref: "#/definitions/SprinkleProp_borderB"
7329
+ },
7330
+ borderColor: {
7331
+ $ref: "#/definitions/SprinkleProp_borderColor"
7332
+ },
7333
+ borderL: {
7334
+ $ref: "#/definitions/SprinkleProp_borderL"
7335
+ },
7336
+ borderR: {
7337
+ $ref: "#/definitions/SprinkleProp_borderR"
7338
+ },
7339
+ borderT: {
7340
+ $ref: "#/definitions/SprinkleProp_borderT"
7341
+ },
7342
+ children: {
7343
+ $ref: "#/definitions/ProteusNode"
7344
+ },
7345
+ color: {
7346
+ $ref: "#/definitions/SprinkleProp_color"
7347
+ },
7348
+ cursor: {
7349
+ $ref: "#/definitions/SprinkleProp_cursor"
7350
+ },
7351
+ description: {
7352
+ $ref: "#/definitions/ProteusNode",
7353
+ description: "Add secondary text after the label."
7354
+ },
7355
+ display: {
7356
+ $ref: "#/definitions/SprinkleProp_display"
7357
+ },
7358
+ flex: {
7359
+ $ref: "#/definitions/SprinkleProp_flex"
7360
+ },
7361
+ flexDirection: {
7362
+ $ref: "#/definitions/SprinkleProp_flexDirection"
7363
+ },
7364
+ flexWrap: {
7365
+ $ref: "#/definitions/SprinkleProp_flexWrap"
7366
+ },
7367
+ fontFamily: {
7368
+ $ref: "#/definitions/SprinkleProp_fontFamily"
7369
+ },
7370
+ fontSize: {
7371
+ $ref: "#/definitions/SprinkleProp_fontSize"
7372
+ },
7373
+ fontWeight: {
7374
+ $ref: "#/definitions/SprinkleProp_fontWeight"
7375
+ },
7376
+ gap: {
7377
+ $ref: "#/definitions/SprinkleProp_gap"
7378
+ },
7379
+ gridColumn: {
7380
+ $ref: "#/definitions/SprinkleProp_gridColumn"
7381
+ },
7382
+ gridTemplateColumns: {
7383
+ $ref: "#/definitions/SprinkleProp_gridTemplateColumns"
7384
+ },
7385
+ h: {
7386
+ $ref: "#/definitions/SprinkleProp_h"
7387
+ },
7388
+ justifyContent: {
7389
+ $ref: "#/definitions/SprinkleProp_justifyContent"
7390
+ },
7391
+ justifyItems: {
7392
+ $ref: "#/definitions/SprinkleProp_justifyItems"
7393
+ },
7394
+ m: {
7395
+ $ref: "#/definitions/SprinkleProp_m"
7396
+ },
7397
+ maxH: {
7398
+ $ref: "#/definitions/SprinkleProp_maxH"
7399
+ },
7400
+ maxW: {
7401
+ $ref: "#/definitions/SprinkleProp_maxW"
7402
+ },
7403
+ mb: {
7404
+ $ref: "#/definitions/SprinkleProp_mb"
7405
+ },
7406
+ ml: {
7407
+ $ref: "#/definitions/SprinkleProp_ml"
7408
+ },
7409
+ mr: {
7410
+ $ref: "#/definitions/SprinkleProp_mr"
7411
+ },
7412
+ mt: {
7413
+ $ref: "#/definitions/SprinkleProp_mt"
7414
+ },
7415
+ mx: {
7416
+ $ref: "#/definitions/SprinkleProp_mx"
7417
+ },
7418
+ my: {
7419
+ $ref: "#/definitions/SprinkleProp_my"
7420
+ },
7421
+ name: {
7422
+ anyOf: [
7423
+ {
7424
+ type: "string"
7425
+ },
7426
+ {
7427
+ $ref: "#/definitions/ProteusValue"
7428
+ }
7429
+ ],
7430
+ description: "The name of the form control element."
7431
+ },
7432
+ objectFit: {
7433
+ $ref: "#/definitions/SprinkleProp_objectFit"
7434
+ },
7435
+ overflow: {
7436
+ $ref: "#/definitions/SprinkleProp_overflow"
7437
+ },
7438
+ overflowX: {
7439
+ $ref: "#/definitions/SprinkleProp_overflowX"
7440
+ },
7441
+ overflowY: {
7442
+ $ref: "#/definitions/SprinkleProp_overflowY"
7443
+ },
7444
+ p: {
7445
+ $ref: "#/definitions/SprinkleProp_p"
7446
+ },
7447
+ pb: {
7448
+ $ref: "#/definitions/SprinkleProp_pb"
7449
+ },
7450
+ pl: {
7451
+ $ref: "#/definitions/SprinkleProp_pl"
7452
+ },
7453
+ placeItems: {
7454
+ $ref: "#/definitions/SprinkleProp_placeItems"
7455
+ },
7456
+ pointerEvents: {
7457
+ $ref: "#/definitions/SprinkleProp_pointerEvents"
7458
+ },
7459
+ pr: {
7460
+ $ref: "#/definitions/SprinkleProp_pr"
7461
+ },
7462
+ pt: {
7463
+ $ref: "#/definitions/SprinkleProp_pt"
7464
+ },
7465
+ px: {
7466
+ $ref: "#/definitions/SprinkleProp_px"
7467
+ },
7468
+ py: {
7469
+ $ref: "#/definitions/SprinkleProp_py"
7470
+ },
7471
+ required: {
7472
+ anyOf: [
7473
+ {
7474
+ type: "boolean"
7475
+ },
7476
+ {
7477
+ $ref: "#/definitions/ProteusValue"
7478
+ }
7479
+ ],
7480
+ description: "Whether selecting this input is required."
7481
+ },
7482
+ rounded: {
7483
+ $ref: "#/definitions/SprinkleProp_rounded"
7484
+ },
7485
+ shadow: {
7486
+ $ref: "#/definitions/SprinkleProp_shadow"
7487
+ },
7488
+ textAlign: {
7489
+ $ref: "#/definitions/SprinkleProp_textAlign"
7490
+ },
7491
+ textTransform: {
7492
+ $ref: "#/definitions/SprinkleProp_textTransform"
7493
+ },
7494
+ transition: {
7495
+ $ref: "#/definitions/SprinkleProp_transition"
7496
+ },
7497
+ w: {
7498
+ $ref: "#/definitions/SprinkleProp_w"
7499
+ },
7500
+ whiteSpace: {
7501
+ $ref: "#/definitions/SprinkleProp_whiteSpace"
7502
+ },
7503
+ z: {
7504
+ $ref: "#/definitions/SprinkleProp_z"
7505
+ }
7506
+ },
7507
+ required: [
7508
+ "$type"
7509
+ ],
7510
+ type: "object"
7511
+ },
7077
7512
  ProteusText: {
7078
7513
  examples: [
7079
7514
  {
@@ -1,6 +1,6 @@
1
- import { getProteusValue } from './getProteusValue.js';
2
- import { useProteusDocumentContext } from './ProteusDocumentContext.js';
3
- import { useProteusDocumentPathContext } from './ProteusDocumentPathContext.js';
1
+ import { getProteusValue } from '../proteus-document/getProteusValue.js';
2
+ import { useProteusDocumentContext } from '../proteus-document/ProteusDocumentContext.js';
3
+ import { useProteusDocumentPathContext } from '../proteus-document/ProteusDocumentPathContext.js';
4
4
 
5
5
  function useProteusValue(element) {
6
6
  const { data } = useProteusDocumentContext(
package/dist/index.d.ts CHANGED
@@ -168,10 +168,6 @@ type ProteusValueProps = {
168
168
  */
169
169
  path: string;
170
170
  };
171
- declare function ProteusValue(props: ProteusValueProps): any;
172
- declare namespace ProteusValue {
173
- var displayName: string;
174
- }
175
171
 
176
172
  type ProteusDocumentShellProps = Pick<ComponentPropsWithoutRef<typeof Disclosure>, "defaultOpen" | "onOpenChange" | "open"> & {
177
173
  /**
@@ -214,7 +210,8 @@ type ProteusDocument$2 = {
214
210
  blocking?: boolean;
215
211
  body: ReactNode;
216
212
  subtitle?: ReactNode;
217
- title: ReactNode;
213
+ title?: ReactNode;
214
+ titleIcon?: string;
218
215
  };
219
216
  declare function ProteusDocumentShell({ collapsible: collapsibleProp, data, defaultOpen, element, onDataChange, onMessage, onOpenChange, onToolCall, open: openProp, readOnly, strict, }: ProteusDocumentShellProps): react_jsx_runtime.JSX.Element;
220
217
  declare namespace ProteusDocumentShell {
@@ -226,6 +223,9 @@ type ProteusEventHandler = {
226
223
  url: (ProteusValueProps & {
227
224
  $type: "Value";
228
225
  }) | string;
226
+ } | {
227
+ action: "message-from";
228
+ path: string;
229
229
  } | {
230
230
  message: string;
231
231
  } | {
@@ -272,7 +272,8 @@ type ProteusDocument = {
272
272
  blocking?: boolean;
273
273
  body: unknown;
274
274
  subtitle?: unknown;
275
- title: unknown;
275
+ title?: unknown;
276
+ titleIcon?: string;
276
277
  };
277
278
  declare function ProteusDocumentRenderer({ element: elementProp, strict, ...props }: ProteusDocumentRendererProps): react_jsx_runtime.JSX.Element | null;
278
279
  declare namespace ProteusDocumentRenderer {
@@ -289,5 +290,7 @@ declare namespace ProteusTextarea {
289
290
  var displayName: string;
290
291
  }
291
292
 
292
- export { ProteusAction, ProteusCancelAction, ProteusChart, ProteusDataTable, ProteusDocumentRenderer, ProteusDocumentShell, ProteusImage, ProteusInput, ProteusMap, ProteusSelect, ProteusShow, ProteusTextarea, ProteusValue, safeParseDocument };
293
+ declare function useProteusValue(element: ProteusValueProps): any;
294
+
295
+ export { ProteusAction, ProteusCancelAction, ProteusChart, ProteusDataTable, ProteusDocumentRenderer, ProteusDocumentShell, ProteusImage, ProteusInput, ProteusMap, ProteusSelect, ProteusShow, ProteusTextarea, safeParseDocument, useProteusValue };
293
296
  export type { ProteusDocumentRendererProps, ProteusDocumentShellProps };