@sakaniui/react 0.8.12 → 0.9.0
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/AGENTS.md +9 -3
- package/CHANGELOG.md +37 -0
- package/README.md +22 -1
- package/bin/sakaniui-mcp.mjs +65 -10
- package/dist/components/Sonner/Sonner.d.ts +30 -0
- package/dist/components/Sonner/index.d.ts +4 -0
- package/dist/components/Sonner/state.d.ts +106 -0
- package/dist/icon-index.json +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1493 -1101
- package/dist/manifest.json +142 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 6,
|
|
3
3
|
"name": "@sakaniui/react",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
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",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@sakaniui/react/icons": "Tabler icons: IconName and IconNameFilled, one module each (5184 outline, 1054 filled)."
|
|
24
24
|
},
|
|
25
25
|
"conventions": {
|
|
26
|
-
"version": "This manifest describes @sakaniui/react@0.
|
|
26
|
+
"version": "This manifest describes @sakaniui/react@0.9.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
27
|
"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.",
|
|
28
28
|
"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.",
|
|
29
29
|
"tokens": "Use only the token names listed under `tokens`. Colour tokens follow the theme (the `.dark` class flips them); do not hard-code colours.",
|
|
@@ -458,9 +458,9 @@
|
|
|
458
458
|
}
|
|
459
459
|
},
|
|
460
460
|
"counts": {
|
|
461
|
-
"components":
|
|
461
|
+
"components": 127,
|
|
462
462
|
"blocks": 42,
|
|
463
|
-
"utilities":
|
|
463
|
+
"utilities": 7
|
|
464
464
|
},
|
|
465
465
|
"components": [
|
|
466
466
|
{
|
|
@@ -7613,12 +7613,143 @@
|
|
|
7613
7613
|
"example": "import { Toast } from '@sakaniui/react';\n\n<Toast />",
|
|
7614
7614
|
"aliases": [
|
|
7615
7615
|
"snackbar",
|
|
7616
|
-
"toaster",
|
|
7617
7616
|
"toast notification",
|
|
7618
7617
|
"flash message",
|
|
7619
7618
|
"transient notification"
|
|
7620
7619
|
]
|
|
7621
7620
|
},
|
|
7621
|
+
{
|
|
7622
|
+
"name": "Toaster",
|
|
7623
|
+
"kind": "component",
|
|
7624
|
+
"category": "Composite",
|
|
7625
|
+
"import": "@sakaniui/react",
|
|
7626
|
+
"summary": "Renders the toasts that toast() creates, as a stack on one edge of the screen. Mount one near the root of the app, then call toast() from any handler or module.",
|
|
7627
|
+
"props": [
|
|
7628
|
+
{
|
|
7629
|
+
"name": "position",
|
|
7630
|
+
"type": "\"top-left\" | \"top-center\" | \"top-right\" | \"bottom-left\" | \"bottom-center\" | \"bottom-right\"",
|
|
7631
|
+
"required": false,
|
|
7632
|
+
"values": [
|
|
7633
|
+
"top-left",
|
|
7634
|
+
"top-center",
|
|
7635
|
+
"top-right",
|
|
7636
|
+
"bottom-left",
|
|
7637
|
+
"bottom-center",
|
|
7638
|
+
"bottom-right"
|
|
7639
|
+
],
|
|
7640
|
+
"default": "bottom-right",
|
|
7641
|
+
"description": "Corner or edge the stack sits on. Defaults to \"bottom-right\"."
|
|
7642
|
+
},
|
|
7643
|
+
{
|
|
7644
|
+
"name": "richColors",
|
|
7645
|
+
"type": "boolean",
|
|
7646
|
+
"required": false,
|
|
7647
|
+
"default": false,
|
|
7648
|
+
"description": "Tints success, info, warning and error toasts by type."
|
|
7649
|
+
},
|
|
7650
|
+
{
|
|
7651
|
+
"name": "closeButton",
|
|
7652
|
+
"type": "boolean",
|
|
7653
|
+
"required": false,
|
|
7654
|
+
"default": false,
|
|
7655
|
+
"description": "Shows the round close button on every toast."
|
|
7656
|
+
},
|
|
7657
|
+
{
|
|
7658
|
+
"name": "expand",
|
|
7659
|
+
"type": "boolean",
|
|
7660
|
+
"required": false,
|
|
7661
|
+
"default": false,
|
|
7662
|
+
"description": "Keeps the stack spread out instead of piled up."
|
|
7663
|
+
},
|
|
7664
|
+
{
|
|
7665
|
+
"name": "visibleToasts",
|
|
7666
|
+
"type": "number",
|
|
7667
|
+
"required": false,
|
|
7668
|
+
"default": 3,
|
|
7669
|
+
"description": "How many toasts show at once; older ones fade out. Defaults to 3."
|
|
7670
|
+
},
|
|
7671
|
+
{
|
|
7672
|
+
"name": "duration",
|
|
7673
|
+
"type": "number",
|
|
7674
|
+
"required": false,
|
|
7675
|
+
"default": 4000,
|
|
7676
|
+
"description": "Milliseconds before a toast closes itself. Defaults to 4000."
|
|
7677
|
+
},
|
|
7678
|
+
{
|
|
7679
|
+
"name": "gap",
|
|
7680
|
+
"type": "number",
|
|
7681
|
+
"required": false,
|
|
7682
|
+
"default": 14,
|
|
7683
|
+
"description": "Space between toasts when spread out, in px. Defaults to 14."
|
|
7684
|
+
},
|
|
7685
|
+
{
|
|
7686
|
+
"name": "offset",
|
|
7687
|
+
"type": "string | number",
|
|
7688
|
+
"required": false,
|
|
7689
|
+
"default": 24,
|
|
7690
|
+
"description": "Distance from the viewport edge, in px or any CSS length. Defaults to 24."
|
|
7691
|
+
},
|
|
7692
|
+
{
|
|
7693
|
+
"name": "mobileOffset",
|
|
7694
|
+
"type": "string | number",
|
|
7695
|
+
"required": false,
|
|
7696
|
+
"default": 16,
|
|
7697
|
+
"description": "Distance from the viewport edge on screens 600px wide or less. Defaults to 16."
|
|
7698
|
+
},
|
|
7699
|
+
{
|
|
7700
|
+
"name": "hotkey",
|
|
7701
|
+
"type": "string[]",
|
|
7702
|
+
"required": false,
|
|
7703
|
+
"default": "['altKey', 'KeyT']",
|
|
7704
|
+
"description": "Keys that focus the stack. Defaults to alt+T (`['altKey', 'KeyT']`)."
|
|
7705
|
+
},
|
|
7706
|
+
{
|
|
7707
|
+
"name": "containerAriaLabel",
|
|
7708
|
+
"type": "string",
|
|
7709
|
+
"required": false,
|
|
7710
|
+
"default": "Notifications",
|
|
7711
|
+
"description": "Accessible name of the notifications region. The hotkey is appended. Defaults to \"Notifications\"."
|
|
7712
|
+
},
|
|
7713
|
+
{
|
|
7714
|
+
"name": "className",
|
|
7715
|
+
"type": "string",
|
|
7716
|
+
"required": false
|
|
7717
|
+
},
|
|
7718
|
+
{
|
|
7719
|
+
"name": "style",
|
|
7720
|
+
"type": "CSSProperties",
|
|
7721
|
+
"required": false
|
|
7722
|
+
}
|
|
7723
|
+
],
|
|
7724
|
+
"contract": {
|
|
7725
|
+
"requiredProps": [],
|
|
7726
|
+
"requiresAccessibleName": false
|
|
7727
|
+
},
|
|
7728
|
+
"since": "0.9.0",
|
|
7729
|
+
"example": "import { Toaster } from '@sakaniui/react';\n\n<Toaster />",
|
|
7730
|
+
"recipes": [
|
|
7731
|
+
{
|
|
7732
|
+
"title": "Show a toast from anywhere",
|
|
7733
|
+
"description": "Mount one `<Toaster />` near the root of the app, then call `toast()` (or `toast.success`, `.info`, `.warning`, `.error`, `.loading`) from any handler or module. Do not render `<Toast>` yourself for this: `Toast` is the static, presentational card.",
|
|
7734
|
+
"code": "import { Button, Toaster, toast } from '@sakaniui/react';\n\nexport const App = () => (\n <>\n <Button\n onClick={() =>\n toast.success('Event has been created', {\n description: 'Monday, January 3rd at 6:00pm',\n action: { label: 'Undo', onClick: () => toast('Undone') },\n })\n }\n >\n Create event\n </Button>\n <Toaster position=\"bottom-right\" richColors />\n </>\n);"
|
|
7735
|
+
},
|
|
7736
|
+
{
|
|
7737
|
+
"title": "One toast for an async task",
|
|
7738
|
+
"description": "`toast.promise` shows a loading toast and turns the same toast into success or error when the promise settles. To update any toast by hand, pass the id that `toast()` returned as `id`.",
|
|
7739
|
+
"code": "import { toast } from '@sakaniui/react';\n\ndeclare function saveInvoice(): Promise<{ number: string }>;\n\nexport function onSave() {\n toast.promise(saveInvoice(), {\n loading: 'Saving invoice…',\n success: (invoice) => `Invoice ${invoice.number} saved`,\n error: 'Could not save the invoice',\n });\n\n const id = toast.loading('Uploading…');\n setTimeout(() => toast.success('Uploaded', { id }), 1000);\n}"
|
|
7740
|
+
}
|
|
7741
|
+
],
|
|
7742
|
+
"aliases": [
|
|
7743
|
+
"sonner",
|
|
7744
|
+
"toast stack",
|
|
7745
|
+
"toast provider",
|
|
7746
|
+
"toast container",
|
|
7747
|
+
"toast queue",
|
|
7748
|
+
"notification stack",
|
|
7749
|
+
"stacked toasts",
|
|
7750
|
+
"toast manager"
|
|
7751
|
+
]
|
|
7752
|
+
},
|
|
7622
7753
|
{
|
|
7623
7754
|
"name": "Tooltip",
|
|
7624
7755
|
"kind": "component",
|
|
@@ -11080,6 +11211,12 @@
|
|
|
11080
11211
|
"import": "@sakaniui/react",
|
|
11081
11212
|
"since": "0.4.3"
|
|
11082
11213
|
},
|
|
11214
|
+
{
|
|
11215
|
+
"name": "toast",
|
|
11216
|
+
"kind": "helper",
|
|
11217
|
+
"import": "@sakaniui/react",
|
|
11218
|
+
"since": "0.9.0"
|
|
11219
|
+
},
|
|
11083
11220
|
{
|
|
11084
11221
|
"name": "useHoverHighlight",
|
|
11085
11222
|
"kind": "hook",
|