@sakaniui/react 0.13.0 → 0.14.1

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.
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ /** `pulse` sweeps every 2.5s while idle, and once each time the field takes focus; `focus` sweeps only on focus; `off` draws nothing. */
3
+ export type AiGlowMode = 'pulse' | 'focus' | 'off';
4
+ export declare const AiGlow: React.FC<{
5
+ mode: AiGlowMode;
6
+ }>;
7
+ /** The Textarea's focus border: a static 1.5px ember gradient, left to right, that replaces the plain strong border while the box has focus. */
8
+ export declare const AiFocusRing: React.FC;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 6,
3
3
  "name": "@sakaniui/react",
4
- "version": "0.13.0",
4
+ "version": "0.14.1",
5
5
  "description": "Machine-readable contract of the SakaniUI React library, generated from its TypeScript source.",
6
6
  "docs": "https://www.sakaniui.com",
7
7
  "guide": "https://www.sakaniui.com/llms-full.txt",
@@ -24,7 +24,7 @@
24
24
  "@sakaniui/react/emoji": "Fluent Emoji (full colour): EmojiName, one module each (1594 emoji, 311 with skin tones)."
25
25
  },
26
26
  "conventions": {
27
- "version": "This manifest describes @sakaniui/react@0.13.0. Each component has `since`, the first release that contained it; a prop added later has its own `since`, and a value added later is listed in the prop's `valuesSince`. If the project has an older version installed, anything newer than that does not exist there.",
27
+ "version": "This manifest describes @sakaniui/react@0.14.1. Each component has `since`, the first release that contained it; a prop added later has its own `since`, and a value added later is listed in the prop's `valuesSince`. If the project has an older version installed, anything newer than that does not exist there.",
28
28
  "acceptsNativeProps": "Components forward native HTML attributes (className, style, aria-*, event handlers) to their root element unless a prop says otherwise; only the props that are specific to SakaniUI are listed here.",
29
29
  "accessibleName": "When `contract.requiresAccessibleName` is true, a required prop (aria-label, aria-labelledby or an alt text) is the only thing that names the control or image. Do not omit it.",
30
30
  "tokens": "Use only the token names listed under `tokens`. Colour tokens follow the theme (the `.dark` class flips them); do not hard-code colours.",
@@ -195,7 +195,7 @@
195
195
  "wrap"
196
196
  ],
197
197
  "tokens": {
198
- "count": 233,
198
+ "count": 235,
199
199
  "groups": {
200
200
  "bp": {
201
201
  "--bp-sm": "640px",
@@ -281,6 +281,8 @@
281
281
  "--color-chart-purple": "#9179D6",
282
282
  "--color-chart-gold": "#DCA84F",
283
283
  "--color-chart-green": "#12B76A",
284
+ "--color-blue-700": "#33619F",
285
+ "--color-violet-500": "#9179D6",
284
286
  "--color-code-keyword": "#7B4BD9",
285
287
  "--color-code-string": "#16A34A",
286
288
  "--color-bg-canvas": "var(--color-neutral-50)",
@@ -3002,14 +3004,16 @@
3002
3004
  "name": "previewActions",
3003
3005
  "type": "ReactNode | ((item: CommandMenuItem) => ReactNode)",
3004
3006
  "required": false,
3005
- "description": "Buttons or links pinned to the bottom of the detail pane. They stay put while the content above changes from row to row (only `renderPreview`'s content cross-fades); pass a function to read the previewed row. Hidden when a row has no preview."
3007
+ "description": "Buttons or links pinned to the bottom of the detail pane. They stay put while the content above changes from row to row (only `renderPreview`'s content cross-fades); pass a function to read the previewed row. Hidden when a row has no preview.",
3008
+ "since": "0.14.0"
3006
3009
  },
3007
3010
  {
3008
3011
  "name": "previewEmpty",
3009
3012
  "type": "ReactNode",
3010
3013
  "required": false,
3011
3014
  "default": "Nothing to preview for this result",
3012
- "description": "Shown in the detail pane when the active row has nothing to preview (`renderPreview` returned nothing)."
3015
+ "description": "Shown in the detail pane when the active row has nothing to preview (`renderPreview` returned nothing).",
3016
+ "since": "0.14.0"
3013
3017
  },
3014
3018
  {
3015
3019
  "name": "emptyTitle",
@@ -3115,19 +3119,22 @@
3115
3119
  "name": "onReport",
3116
3120
  "type": "(() => void)",
3117
3121
  "required": false,
3118
- "description": "A second, quieter action beside \"Try again\" in the error state (\"Report\")."
3122
+ "description": "A second, quieter action beside \"Try again\" in the error state (\"Report\").",
3123
+ "since": "0.14.0"
3119
3124
  },
3120
3125
  {
3121
3126
  "name": "retryLabel",
3122
3127
  "type": "ReactNode",
3123
3128
  "required": false,
3124
- "default": "Try again"
3129
+ "default": "Try again",
3130
+ "since": "0.14.0"
3125
3131
  },
3126
3132
  {
3127
3133
  "name": "reportLabel",
3128
3134
  "type": "ReactNode",
3129
3135
  "required": false,
3130
- "default": "Report"
3136
+ "default": "Report",
3137
+ "since": "0.14.0"
3131
3138
  },
3132
3139
  {
3133
3140
  "name": "workspace",
@@ -3215,13 +3222,15 @@
3215
3222
  "name": "stream",
3216
3223
  "type": "boolean",
3217
3224
  "required": false,
3218
- "description": "Writes the answer in word by word, the way a chat reply arrives, and brings in the sources and the follow-up once it is written. Needs `children` to be a plain string; reduced motion shows it at once."
3225
+ "description": "Writes the answer in word by word, the way a chat reply arrives, and brings in the sources and the follow-up once it is written. Needs `children` to be a plain string; reduced motion shows it at once.",
3226
+ "since": "0.14.0"
3219
3227
  },
3220
3228
  {
3221
3229
  "name": "onStreamEnd",
3222
3230
  "type": "(() => void)",
3223
3231
  "required": false,
3224
- "description": "Called once when the text has been written (or at once when it is not streamed)."
3232
+ "description": "Called once when the text has been written (or at once when it is not streamed).",
3233
+ "since": "0.14.0"
3225
3234
  },
3226
3235
  {
3227
3236
  "name": "sources",
@@ -4219,6 +4228,45 @@
4219
4228
  "name": "trailingIcon",
4220
4229
  "type": "ReactNode",
4221
4230
  "required": false
4231
+ },
4232
+ {
4233
+ "name": "variant",
4234
+ "type": "\"default\" | \"ai\"",
4235
+ "required": false,
4236
+ "values": [
4237
+ "default",
4238
+ "ai"
4239
+ ],
4240
+ "default": "default",
4241
+ "description": "\"ai\" is the prompt box of an AI product: a pill with a 16px field, action slots and a light around the border. Defaults to \"default\".",
4242
+ "since": "0.14.0"
4243
+ },
4244
+ {
4245
+ "name": "glow",
4246
+ "type": "\"off\" | \"pulse\" | \"focus\"",
4247
+ "required": false,
4248
+ "values": [
4249
+ "off",
4250
+ "pulse",
4251
+ "focus"
4252
+ ],
4253
+ "default": "pulse",
4254
+ "description": "variant=\"ai\": the light that sweeps clockwise around the border. \"pulse\" (default) sweeps every 2.5s while idle and once each time the field takes focus; \"focus\" sweeps only on focus; \"off\" draws none. Reduced motion draws none.",
4255
+ "since": "0.14.0"
4256
+ },
4257
+ {
4258
+ "name": "leading",
4259
+ "type": "ReactNode",
4260
+ "required": false,
4261
+ "description": "variant=\"ai\": actions before the field, such as an attach button. Interactive content is fine here (unlike `leadingIcon`).",
4262
+ "since": "0.14.0"
4263
+ },
4264
+ {
4265
+ "name": "trailing",
4266
+ "type": "ReactNode",
4267
+ "required": false,
4268
+ "description": "variant=\"ai\": actions after the field, such as a mic and a send button.",
4269
+ "since": "0.14.0"
4222
4270
  }
4223
4271
  ],
4224
4272
  "contract": {
@@ -5002,13 +5050,13 @@
5002
5050
  "description": "Returns the item located at the specified index."
5003
5051
  },
5004
5052
  {
5005
- "name": "__@iterator@15607",
5053
+ "name": "__@iterator@15637",
5006
5054
  "type": "() => ArrayIterator<number>",
5007
5055
  "required": true,
5008
5056
  "description": "Iterator"
5009
5057
  },
5010
5058
  {
5011
- "name": "__@unscopables@15637",
5059
+ "name": "__@unscopables@15667",
5012
5060
  "type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
5013
5061
  "required": true,
5014
5062
  "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
@@ -5584,13 +5632,13 @@
5584
5632
  "description": "Returns the item located at the specified index."
5585
5633
  },
5586
5634
  {
5587
- "name": "__@iterator@15607",
5635
+ "name": "__@iterator@15637",
5588
5636
  "type": "() => ArrayIterator<number>",
5589
5637
  "required": true,
5590
5638
  "description": "Iterator"
5591
5639
  },
5592
5640
  {
5593
- "name": "__@unscopables@15637",
5641
+ "name": "__@unscopables@15667",
5594
5642
  "type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
5595
5643
  "required": true,
5596
5644
  "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
@@ -5974,13 +6022,13 @@
5974
6022
  "description": "Returns the item located at the specified index."
5975
6023
  },
5976
6024
  {
5977
- "name": "__@iterator@15607",
6025
+ "name": "__@iterator@15637",
5978
6026
  "type": "() => ArrayIterator<number>",
5979
6027
  "required": true,
5980
6028
  "description": "Iterator"
5981
6029
  },
5982
6030
  {
5983
- "name": "__@unscopables@15637",
6031
+ "name": "__@unscopables@15667",
5984
6032
  "type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
5985
6033
  "required": true,
5986
6034
  "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
@@ -6281,13 +6329,13 @@
6281
6329
  "description": "Returns the item located at the specified index."
6282
6330
  },
6283
6331
  {
6284
- "name": "__@iterator@15607",
6332
+ "name": "__@iterator@15637",
6285
6333
  "type": "() => ArrayIterator<number>",
6286
6334
  "required": true,
6287
6335
  "description": "Iterator"
6288
6336
  },
6289
6337
  {
6290
- "name": "__@unscopables@15637",
6338
+ "name": "__@unscopables@15667",
6291
6339
  "type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
6292
6340
  "required": true,
6293
6341
  "description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
@@ -9955,6 +10003,53 @@
9955
10003
  "name": "error",
9956
10004
  "type": "string",
9957
10005
  "required": false
10006
+ },
10007
+ {
10008
+ "name": "variant",
10009
+ "type": "\"default\" | \"ai\"",
10010
+ "required": false,
10011
+ "values": [
10012
+ "default",
10013
+ "ai"
10014
+ ],
10015
+ "default": "default",
10016
+ "description": "\"ai\" is the prompt box of an AI product: a 16px-radius box, a 16px field that grows with the text, an actions row and a light around the border. Defaults to \"default\".",
10017
+ "since": "0.14.0"
10018
+ },
10019
+ {
10020
+ "name": "glow",
10021
+ "type": "\"off\" | \"pulse\" | \"focus\"",
10022
+ "required": false,
10023
+ "values": [
10024
+ "off",
10025
+ "pulse",
10026
+ "focus"
10027
+ ],
10028
+ "default": "pulse",
10029
+ "description": "variant=\"ai\": the light that sweeps clockwise around the border. \"pulse\" (default) sweeps every 2.5s while idle and once each time the field takes focus; \"focus\" sweeps only on focus; \"off\" draws none. Reduced motion draws none.",
10030
+ "since": "0.14.0"
10031
+ },
10032
+ {
10033
+ "name": "leading",
10034
+ "type": "ReactNode",
10035
+ "required": false,
10036
+ "description": "variant=\"ai\": actions on the left of the row under the field, such as an attach button.",
10037
+ "since": "0.14.0"
10038
+ },
10039
+ {
10040
+ "name": "trailing",
10041
+ "type": "ReactNode",
10042
+ "required": false,
10043
+ "description": "variant=\"ai\": actions on the right of that row, such as a mic and a send button.",
10044
+ "since": "0.14.0"
10045
+ },
10046
+ {
10047
+ "name": "maxRows",
10048
+ "type": "number",
10049
+ "required": false,
10050
+ "default": 8,
10051
+ "description": "variant=\"ai\": the most lines the field grows to before it scrolls. Defaults to 8.",
10052
+ "since": "0.14.0"
9958
10053
  }
9959
10054
  ],
9960
10055
  "contract": {