@fungi.computer/caps 0.0.0-stage → 0.0.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.
- package/LICENSE +21 -0
- package/README.md +1125 -2
- package/dist/blocks/app-bar.d.ts +43 -0
- package/dist/blocks/app-bar.js +244 -0
- package/dist/blocks/app-status-bar.d.ts +93 -0
- package/dist/blocks/app-status-bar.js +42 -0
- package/dist/blocks/async-state.d.ts +21 -0
- package/dist/blocks/async-state.js +8 -0
- package/dist/blocks/card-grid.d.ts +11 -0
- package/dist/blocks/card-grid.js +21 -0
- package/dist/blocks/command-menu.d.ts +26 -0
- package/dist/blocks/command-menu.js +70 -0
- package/dist/blocks/composer.d.ts +23 -0
- package/dist/blocks/composer.js +13 -0
- package/dist/blocks/empty-state.d.ts +59 -0
- package/dist/blocks/empty-state.js +35 -0
- package/dist/blocks/faq-chat.d.ts +62 -0
- package/dist/blocks/faq-chat.js +77 -0
- package/dist/blocks/game-share-card.d.ts +17 -0
- package/dist/blocks/game-share-card.js +9 -0
- package/dist/blocks/launcher-grid.d.ts +50 -0
- package/dist/blocks/launcher-grid.js +11 -0
- package/dist/blocks/listing-detail.d.ts +23 -0
- package/dist/blocks/listing-detail.js +12 -0
- package/dist/blocks/loading-state.d.ts +5 -0
- package/dist/blocks/loading-state.js +8 -0
- package/dist/blocks/mosaic.d.ts +29 -0
- package/dist/blocks/mosaic.js +19 -0
- package/dist/blocks/permission-grid.d.ts +45 -0
- package/dist/blocks/permission-grid.js +14 -0
- package/dist/blocks/pricing-card.d.ts +53 -0
- package/dist/blocks/pricing-card.js +12 -0
- package/dist/blocks/release-tag.d.ts +20 -0
- package/dist/blocks/release-tag.js +10 -0
- package/dist/blocks/resource-select.d.ts +22 -0
- package/dist/blocks/resource-select.js +16 -0
- package/dist/blocks/result-state.d.ts +15 -0
- package/dist/blocks/result-state.js +8 -0
- package/dist/blocks/section-card.d.ts +31 -0
- package/dist/blocks/section-card.js +7 -0
- package/dist/blocks/section-heading.d.ts +13 -0
- package/dist/blocks/section-heading.js +11 -0
- package/dist/blocks/spec-sheet.d.ts +125 -0
- package/dist/blocks/spec-sheet.js +47 -0
- package/dist/blocks/status-tray.d.ts +83 -0
- package/dist/blocks/status-tray.js +79 -0
- package/dist/blocks/upload-queue.d.ts +48 -0
- package/dist/blocks/upload-queue.js +24 -0
- package/dist/components/action-row.d.ts +16 -0
- package/dist/components/action-row.js +11 -0
- package/dist/components/activity-line.d.ts +33 -0
- package/dist/components/activity-line.js +69 -0
- package/dist/components/alert.d.ts +17 -0
- package/dist/components/alert.js +17 -0
- package/dist/components/badge.d.ts +19 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/button.d.ts +55 -0
- package/dist/components/button.js +230 -0
- package/dist/components/card.d.ts +61 -0
- package/dist/components/card.js +48 -0
- package/dist/components/chat-bubble.d.ts +34 -0
- package/dist/components/chat-bubble.js +10 -0
- package/dist/components/checkbox-bead.d.ts +6 -0
- package/dist/components/checkbox-bead.js +67 -0
- package/dist/components/checkbox.d.ts +21 -0
- package/dist/components/checkbox.js +46 -0
- package/dist/components/code-input.d.ts +35 -0
- package/dist/components/code-input.js +126 -0
- package/dist/components/combobox.d.ts +86 -0
- package/dist/components/combobox.js +218 -0
- package/dist/components/confirm-action.d.ts +23 -0
- package/dist/components/confirm-action.js +64 -0
- package/dist/components/copy-field.d.ts +53 -0
- package/dist/components/copy-field.js +49 -0
- package/dist/components/count-badge.d.ts +15 -0
- package/dist/components/count-badge.js +9 -0
- package/dist/components/cover-pattern.d.ts +19 -0
- package/dist/components/cover-pattern.js +74 -0
- package/dist/components/data-list.d.ts +25 -0
- package/dist/components/data-list.js +16 -0
- package/dist/components/dialog.d.ts +39 -0
- package/dist/components/dialog.js +73 -0
- package/dist/components/diff-view.d.ts +14 -0
- package/dist/components/diff-view.js +13 -0
- package/dist/components/disclosure.d.ts +29 -0
- package/dist/components/disclosure.js +19 -0
- package/dist/components/dropdown-menu.d.ts +49 -0
- package/dist/components/dropdown-menu.js +98 -0
- package/dist/components/field-guide.d.ts +41 -0
- package/dist/components/field-guide.js +18 -0
- package/dist/components/field.d.ts +164 -0
- package/dist/components/field.js +228 -0
- package/dist/components/game-feedback.d.ts +84 -0
- package/dist/components/game-feedback.js +48 -0
- package/dist/components/game-hud.d.ts +126 -0
- package/dist/components/game-hud.js +136 -0
- package/dist/components/generation-frame.d.ts +36 -0
- package/dist/components/generation-frame.js +97 -0
- package/dist/components/gooey.d.ts +32 -0
- package/dist/components/gooey.js +25 -0
- package/dist/components/hold-button.d.ts +26 -0
- package/dist/components/hold-button.js +115 -0
- package/dist/components/icon-button.d.ts +24 -0
- package/dist/components/icon-button.js +18 -0
- package/dist/components/icon-checkbox.d.ts +20 -0
- package/dist/components/icon-checkbox.js +9 -0
- package/dist/components/icon-choice-mark.d.ts +6 -0
- package/dist/components/icon-choice-mark.js +5 -0
- package/dist/components/icon-lamp.d.ts +42 -0
- package/dist/components/icon-lamp.js +15 -0
- package/dist/components/icon-radio.d.ts +16 -0
- package/dist/components/icon-radio.js +9 -0
- package/dist/components/inline-code.d.ts +3 -0
- package/dist/components/inline-code.js +7 -0
- package/dist/components/input-group.d.ts +9 -0
- package/dist/components/input-group.js +15 -0
- package/dist/components/input.d.ts +15 -0
- package/dist/components/input.js +15 -0
- package/dist/components/item-grid.d.ts +110 -0
- package/dist/components/item-grid.js +136 -0
- package/dist/components/keycap.d.ts +80 -0
- package/dist/components/keycap.js +18 -0
- package/dist/components/label.d.ts +13 -0
- package/dist/components/label.js +7 -0
- package/dist/components/listbox.d.ts +50 -0
- package/dist/components/listbox.js +134 -0
- package/dist/components/loader-blobs.d.ts +5 -0
- package/dist/components/loader-blobs.js +128 -0
- package/dist/components/loader.d.ts +21 -0
- package/dist/components/loader.js +25 -0
- package/dist/components/markdown.d.ts +23 -0
- package/dist/components/markdown.js +70 -0
- package/dist/components/minimap-labels.d.ts +39 -0
- package/dist/components/minimap-labels.js +113 -0
- package/dist/components/monogram.d.ts +32 -0
- package/dist/components/monogram.js +24 -0
- package/dist/components/motion-visibility.d.ts +2 -0
- package/dist/components/motion-visibility.js +25 -0
- package/dist/components/navigation-rail.d.ts +11 -0
- package/dist/components/navigation-rail.js +55 -0
- package/dist/components/overlay-root.d.ts +16 -0
- package/dist/components/overlay-root.js +24 -0
- package/dist/components/pixel-number.d.ts +50 -0
- package/dist/components/pixel-number.js +113 -0
- package/dist/components/popover.d.ts +31 -0
- package/dist/components/popover.js +24 -0
- package/dist/components/presence.d.ts +59 -0
- package/dist/components/presence.js +232 -0
- package/dist/components/price-tag.d.ts +11 -0
- package/dist/components/price-tag.js +6 -0
- package/dist/components/progress.d.ts +25 -0
- package/dist/components/progress.js +24 -0
- package/dist/components/prose.d.ts +14 -0
- package/dist/components/prose.js +10 -0
- package/dist/components/quota-meter.d.ts +24 -0
- package/dist/components/quota-meter.js +11 -0
- package/dist/components/radio-bead.d.ts +4 -0
- package/dist/components/radio-bead.js +53 -0
- package/dist/components/radio-group.d.ts +54 -0
- package/dist/components/radio-group.js +64 -0
- package/dist/components/resize-handle.d.ts +23 -0
- package/dist/components/resize-handle.js +31 -0
- package/dist/components/rough-drawing.d.ts +42 -0
- package/dist/components/rough-drawing.js +231 -0
- package/dist/components/rough.d.ts +68 -0
- package/dist/components/rough.js +33 -0
- package/dist/components/scroll-area.d.ts +12 -0
- package/dist/components/scroll-area.js +96 -0
- package/dist/components/scroll-motion.d.ts +12 -0
- package/dist/components/scroll-motion.js +31 -0
- package/dist/components/scroll-to-bottom-blob-state.d.ts +40 -0
- package/dist/components/scroll-to-bottom-blob-state.js +109 -0
- package/dist/components/scroll-to-bottom-blob.d.ts +16 -0
- package/dist/components/scroll-to-bottom-blob.js +174 -0
- package/dist/components/select.d.ts +9 -0
- package/dist/components/select.js +12 -0
- package/dist/components/selectable.d.ts +13 -0
- package/dist/components/selectable.js +45 -0
- package/dist/components/send-action.d.ts +33 -0
- package/dist/components/send-action.js +96 -0
- package/dist/components/separator.d.ts +11 -0
- package/dist/components/separator.js +7 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +7 -0
- package/dist/components/slider.d.ts +18 -0
- package/dist/components/slider.js +31 -0
- package/dist/components/stat.d.ts +17 -0
- package/dist/components/stat.js +7 -0
- package/dist/components/status-bead.d.ts +9 -0
- package/dist/components/status-bead.js +107 -0
- package/dist/components/status-mark.d.ts +12 -0
- package/dist/components/status-mark.js +177 -0
- package/dist/components/status.d.ts +38 -0
- package/dist/components/status.js +28 -0
- package/dist/components/store-card.d.ts +21 -0
- package/dist/components/store-card.js +10 -0
- package/dist/components/surface.d.ts +89 -0
- package/dist/components/surface.js +31 -0
- package/dist/components/switch-bead.d.ts +4 -0
- package/dist/components/switch-bead.js +62 -0
- package/dist/components/switch.d.ts +11 -0
- package/dist/components/switch.js +36 -0
- package/dist/components/tabs.d.ts +55 -0
- package/dist/components/tabs.js +81 -0
- package/dist/components/technonomicon.d.ts +192 -0
- package/dist/components/technonomicon.js +121 -0
- package/dist/components/textarea.d.ts +9 -0
- package/dist/components/textarea.js +11 -0
- package/dist/components/toaster.d.ts +4 -0
- package/dist/components/toaster.js +13 -0
- package/dist/components/tool-call-chip.d.ts +22 -0
- package/dist/components/tool-call-chip.js +100 -0
- package/dist/components/tooltip.d.ts +41 -0
- package/dist/components/tooltip.js +169 -0
- package/dist/components/trading-card.d.ts +60 -0
- package/dist/components/trading-card.js +13 -0
- package/dist/components/undo-action.d.ts +52 -0
- package/dist/components/undo-action.js +100 -0
- package/dist/components/undo-toast.d.ts +21 -0
- package/dist/components/undo-toast.js +58 -0
- package/dist/components/visually-hidden.d.ts +9 -0
- package/dist/components/visually-hidden.js +11 -0
- package/dist/components/window.d.ts +65 -0
- package/dist/components/window.js +31 -0
- package/dist/components/wizard.d.ts +17 -0
- package/dist/components/wizard.js +19 -0
- package/dist/enhance/cigarette-card.d.ts +8 -0
- package/dist/enhance/cigarette-card.js +33 -0
- package/dist/enhance/sketch.d.ts +16 -0
- package/dist/enhance/sketch.js +130 -0
- package/dist/form-error.d.ts +7 -0
- package/dist/form-error.js +14 -0
- package/dist/form-fields.d.ts +15 -0
- package/dist/form-fields.js +250 -0
- package/dist/form-schema.d.ts +166 -0
- package/dist/form-schema.js +398 -0
- package/dist/form.d.ts +30 -0
- package/dist/form.js +20 -0
- package/dist/lib/cn.d.ts +8 -0
- package/dist/lib/cn.js +12 -0
- package/dist/lib/format-money.d.ts +2 -0
- package/dist/lib/format-money.js +22 -0
- package/dist/lib/glide.d.ts +12 -0
- package/dist/lib/glide.js +143 -0
- package/dist/lib/ime.d.ts +3 -0
- package/dist/lib/ime.js +8 -0
- package/dist/lib/motion-spring.d.ts +27 -0
- package/dist/lib/motion-spring.js +36 -0
- package/dist/lib/motion.d.ts +51 -0
- package/dist/lib/motion.js +161 -0
- package/dist/lib/reorder-motion.d.ts +13 -0
- package/dist/lib/reorder-motion.js +201 -0
- package/dist/lib/seed-hash.d.ts +6 -0
- package/dist/lib/seed-hash.js +13 -0
- package/dist/lib/tanstack-highlight.d.ts +4 -0
- package/dist/lib/tanstack-highlight.js +41 -0
- package/dist/schema-form.d.ts +120 -0
- package/dist/schema-form.js +129 -0
- package/dist/styles.css +18814 -0
- package/docs/api/README.md +134 -0
- package/docs/api/blocks/app-bar.md +227 -0
- package/docs/api/blocks/app-status-bar.md +257 -0
- package/docs/api/blocks/async-state.md +53 -0
- package/docs/api/blocks/card-grid.md +31 -0
- package/docs/api/blocks/command-menu.md +89 -0
- package/docs/api/blocks/composer.md +40 -0
- package/docs/api/blocks/empty-state.md +97 -0
- package/docs/api/blocks/faq-chat.md +147 -0
- package/docs/api/blocks/game-share-card.md +40 -0
- package/docs/api/blocks/launcher-grid.md +86 -0
- package/docs/api/blocks/listing-detail.md +51 -0
- package/docs/api/blocks/loading-state.md +21 -0
- package/docs/api/blocks/mosaic.md +94 -0
- package/docs/api/blocks/permission-grid.md +79 -0
- package/docs/api/blocks/pricing-card.md +90 -0
- package/docs/api/blocks/release-tag.md +62 -0
- package/docs/api/blocks/resource-select.md +126 -0
- package/docs/api/blocks/result-state.md +42 -0
- package/docs/api/blocks/section-card.md +42 -0
- package/docs/api/blocks/section-heading.md +61 -0
- package/docs/api/blocks/spec-sheet.md +400 -0
- package/docs/api/blocks/status-tray.md +141 -0
- package/docs/api/blocks/upload-queue.md +110 -0
- package/docs/api/components/action-row.md +51 -0
- package/docs/api/components/activity-line.md +103 -0
- package/docs/api/components/alert.md +60 -0
- package/docs/api/components/badge.md +77 -0
- package/docs/api/components/button.md +94 -0
- package/docs/api/components/card.md +165 -0
- package/docs/api/components/chat-bubble.md +66 -0
- package/docs/api/components/checkbox-bead.md +20 -0
- package/docs/api/components/checkbox.md +42 -0
- package/docs/api/components/code-input.md +61 -0
- package/docs/api/components/combobox.md +303 -0
- package/docs/api/components/confirm-action.md +58 -0
- package/docs/api/components/copy-field.md +106 -0
- package/docs/api/components/count-badge.md +39 -0
- package/docs/api/components/cover-pattern.md +43 -0
- package/docs/api/components/data-list.md +80 -0
- package/docs/api/components/dialog.md +235 -0
- package/docs/api/components/diff-view.md +59 -0
- package/docs/api/components/disclosure.md +71 -0
- package/docs/api/components/dropdown-menu.md +269 -0
- package/docs/api/components/field-guide.md +174 -0
- package/docs/api/components/field.md +252 -0
- package/docs/api/components/game-feedback.md +157 -0
- package/docs/api/components/game-hud.md +359 -0
- package/docs/api/components/generation-frame.md +59 -0
- package/docs/api/components/hold-button.md +44 -0
- package/docs/api/components/icon-button.md +56 -0
- package/docs/api/components/icon-checkbox.md +42 -0
- package/docs/api/components/icon-choice-mark.md +31 -0
- package/docs/api/components/icon-lamp.md +92 -0
- package/docs/api/components/icon-radio.md +42 -0
- package/docs/api/components/inline-code.md +21 -0
- package/docs/api/components/input-group.md +53 -0
- package/docs/api/components/input.md +54 -0
- package/docs/api/components/item-grid.md +262 -0
- package/docs/api/components/keycap.md +102 -0
- package/docs/api/components/label.md +40 -0
- package/docs/api/components/listbox.md +131 -0
- package/docs/api/components/loader-blobs.md +9 -0
- package/docs/api/components/loader.md +51 -0
- package/docs/api/components/markdown.md +91 -0
- package/docs/api/components/minimap-labels.md +84 -0
- package/docs/api/components/monogram.md +96 -0
- package/docs/api/components/motion-visibility.md +9 -0
- package/docs/api/components/navigation-rail.md +37 -0
- package/docs/api/components/overlay-root.md +92 -0
- package/docs/api/components/pixel-number.md +120 -0
- package/docs/api/components/popover.md +80 -0
- package/docs/api/components/presence.md +106 -0
- package/docs/api/components/price-tag.md +48 -0
- package/docs/api/components/progress.md +90 -0
- package/docs/api/components/prose.md +48 -0
- package/docs/api/components/quota-meter.md +47 -0
- package/docs/api/components/radio-bead.md +9 -0
- package/docs/api/components/radio-group.md +126 -0
- package/docs/api/components/resize-handle.md +46 -0
- package/docs/api/components/rough-drawing.md +122 -0
- package/docs/api/components/rough.md +66 -0
- package/docs/api/components/scroll-area.md +22 -0
- package/docs/api/components/scroll-motion.md +9 -0
- package/docs/api/components/scroll-to-bottom-blob-state.md +162 -0
- package/docs/api/components/scroll-to-bottom-blob.md +73 -0
- package/docs/api/components/select.md +39 -0
- package/docs/api/components/send-action.md +58 -0
- package/docs/api/components/separator.md +38 -0
- package/docs/api/components/skeleton.md +31 -0
- package/docs/api/components/slider.md +70 -0
- package/docs/api/components/stat.md +42 -0
- package/docs/api/components/status-bead.md +19 -0
- package/docs/api/components/status-mark.md +19 -0
- package/docs/api/components/status.md +105 -0
- package/docs/api/components/store-card.md +53 -0
- package/docs/api/components/surface.md +161 -0
- package/docs/api/components/switch-bead.md +9 -0
- package/docs/api/components/switch.md +40 -0
- package/docs/api/components/tabs.md +138 -0
- package/docs/api/components/technonomicon.md +773 -0
- package/docs/api/components/textarea.md +40 -0
- package/docs/api/components/toaster.md +29 -0
- package/docs/api/components/tool-call-chip.md +68 -0
- package/docs/api/components/tooltip.md +113 -0
- package/docs/api/components/trading-card.md +95 -0
- package/docs/api/components/undo-action.md +117 -0
- package/docs/api/components/undo-toast.md +49 -0
- package/docs/api/components/visually-hidden.md +37 -0
- package/docs/api/components/window.md +291 -0
- package/docs/api/components/wizard.md +65 -0
- package/docs/api/enhance/cigarette-card.md +52 -0
- package/docs/api/enhance/sketch.md +42 -0
- package/docs/api/form.md +1623 -0
- package/docs/api/lib/cn.md +46 -0
- package/docs/api/lib/format-money.md +30 -0
- package/docs/api/lib/glide.md +36 -0
- package/docs/api/lib/ime.md +29 -0
- package/docs/api/lib/motion-spring.md +91 -0
- package/docs/api/lib/motion.md +212 -0
- package/docs/api/lib/reorder-motion.md +46 -0
- package/docs/api/lib/seed-hash.md +31 -0
- package/docs/api/lib/tanstack-highlight.md +40 -0
- package/package.json +597 -3
- package/src/app-status-bar.css +158 -0
- package/src/fonts.css +1 -0
- package/src/status-tray.css +282 -0
- package/src/styles.css +10177 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/presence
|
|
8
|
+
|
|
9
|
+
# components/presence
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### PresenceProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type PresenceProps = object & HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Props accepted by Presence.
|
|
20
|
+
|
|
21
|
+
#### Type Declaration
|
|
22
|
+
|
|
23
|
+
| Name | Type | Description |
|
|
24
|
+
| ---------- | ----------- | -------------------------------------------------------------------------------- |
|
|
25
|
+
| `show` | `boolean` | Whether the content is present. Leaving content stays mounted until it has left. |
|
|
26
|
+
| `appear?` | `boolean` | Animate the first mount too (for content that arrives after the page). |
|
|
27
|
+
| `children` | `ReactNode` | - |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### CollapseProps
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
type CollapseProps = object & HTMLAttributes<HTMLDivElement>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Props accepted by Collapse.
|
|
38
|
+
|
|
39
|
+
#### Type Declaration
|
|
40
|
+
|
|
41
|
+
| Name | Type | Description |
|
|
42
|
+
| ---------- | ----------- | ---------------------------------------------------------------------------------------- |
|
|
43
|
+
| `open` | `boolean` | Open: the content takes its height. Closed: no space, and out of the accessibility tree. |
|
|
44
|
+
| `children` | `ReactNode` | - |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### SwapProps
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
type SwapProps = object & HTMLAttributes<HTMLDivElement>;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Props accepted by Swap.
|
|
55
|
+
|
|
56
|
+
#### Type Declaration
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description |
|
|
59
|
+
| ---------- | -------------------- | ------------------------------------------------------------------------------------------- |
|
|
60
|
+
| `swapKey` | `string` | Names the current content. A new key crossfades from the old content to the new. |
|
|
61
|
+
| `anchor?` | `"start"` \| `"end"` | Which edge leaving content holds to while the box resizes; `end` for right-aligned actions. |
|
|
62
|
+
| `children` | `ReactNode` | - |
|
|
63
|
+
|
|
64
|
+
## Variables
|
|
65
|
+
|
|
66
|
+
### Presence
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
const Presence: ForwardRefExoticComponent<
|
|
70
|
+
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
|
|
71
|
+
>;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Content that arrives and leaves instead of popping: it makes room, fades in
|
|
75
|
+
while travelling the theme's `--stipe-motion-distance`, and on leaving fades out
|
|
76
|
+
and gives its room back before it unmounts. Reduced motion keeps a short fade
|
|
77
|
+
only.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### Collapse
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
const Collapse: ForwardRefExoticComponent<
|
|
85
|
+
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
|
|
86
|
+
>;
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Content that opens and closes its own space: an inserted alert, a field error, a
|
|
90
|
+
disclosure body. Height and opacity follow the theme's tempo; under reduced
|
|
91
|
+
motion the space changes at once and only the fade remains.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### Swap
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
const Swap: ForwardRefExoticComponent<
|
|
99
|
+
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
|
|
100
|
+
>;
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
One piece of content replaced by another without a hard cut: loading to loaded,
|
|
104
|
+
"Saving…" to "Saved". The old content fades out (blurred by the theme's
|
|
105
|
+
`--stipe-motion-blur`) as the new one arrives, and the box eases to the new
|
|
106
|
+
size. Reduced motion keeps the crossfade and drops the travel.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/price-tag
|
|
8
|
+
|
|
9
|
+
# components/price-tag
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### PriceTagProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type PriceTagProps = Readonly<{
|
|
17
|
+
price:
|
|
18
|
+
| {
|
|
19
|
+
kind: "free";
|
|
20
|
+
}
|
|
21
|
+
| {
|
|
22
|
+
kind: "one-time";
|
|
23
|
+
label: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The caller-provided price shown on a store entry.
|
|
29
|
+
|
|
30
|
+
## Functions
|
|
31
|
+
|
|
32
|
+
### PriceTag()
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
function PriceTag(__namedParameters): Element;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
A compact, theme-backed price label for store entries.
|
|
39
|
+
|
|
40
|
+
#### Parameters
|
|
41
|
+
|
|
42
|
+
| Parameter | Type |
|
|
43
|
+
| ------------------- | --------------------------------- |
|
|
44
|
+
| `__namedParameters` | [`PriceTagProps`](#pricetagprops) |
|
|
45
|
+
|
|
46
|
+
#### Returns
|
|
47
|
+
|
|
48
|
+
`Element`
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/progress
|
|
8
|
+
|
|
9
|
+
# components/progress
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ProgressTone
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ProgressTone =
|
|
17
|
+
| "neutral"
|
|
18
|
+
| "primary"
|
|
19
|
+
| "secondary"
|
|
20
|
+
| "accent"
|
|
21
|
+
| "success"
|
|
22
|
+
| "info"
|
|
23
|
+
| "warning"
|
|
24
|
+
| "error";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Supported ProgressTone values.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### ProgressProps
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
type ProgressProps = object & ProgressHTMLAttributes<HTMLProgressElement>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Props accepted by Progress.
|
|
38
|
+
|
|
39
|
+
#### Type Declaration
|
|
40
|
+
|
|
41
|
+
| Name | Type |
|
|
42
|
+
| ------- | ------------------------------- |
|
|
43
|
+
| `tone?` | [`ProgressTone`](#progresstone) |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### GameMeterProps
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
type GameMeterProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & object;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
A compact labelled resource meter for game windows. Values come from the game.
|
|
54
|
+
|
|
55
|
+
#### Type Declaration
|
|
56
|
+
|
|
57
|
+
| Name | Type |
|
|
58
|
+
| ------- | ------------------------------- |
|
|
59
|
+
| `label` | `string` |
|
|
60
|
+
| `value` | `number` |
|
|
61
|
+
| `max` | `number` |
|
|
62
|
+
| `tone?` | [`ProgressTone`](#progresstone) |
|
|
63
|
+
|
|
64
|
+
## Variables
|
|
65
|
+
|
|
66
|
+
### Progress
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
const Progress: ForwardRefExoticComponent<
|
|
70
|
+
object &
|
|
71
|
+
ProgressHTMLAttributes<HTMLProgressElement> &
|
|
72
|
+
RefAttributes<HTMLProgressElement>
|
|
73
|
+
>;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
A progress indicator for caller-provided progress values.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### GameMeter
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
const GameMeter: ForwardRefExoticComponent<
|
|
84
|
+
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
|
|
85
|
+
object &
|
|
86
|
+
RefAttributes<HTMLDivElement>
|
|
87
|
+
>;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Pair a game's bounded resource value with its visible and accessible meter.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/prose
|
|
8
|
+
|
|
9
|
+
# components/prose
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ProseVariant
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ProseVariant = "default" | "dropcap";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Supported Prose treatments.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### ProseProps
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
type ProseProps = object & HTMLAttributes<HTMLElement>;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Props accepted by Prose.
|
|
30
|
+
|
|
31
|
+
#### Type Declaration
|
|
32
|
+
|
|
33
|
+
| Name | Type |
|
|
34
|
+
| ---------- | ------------------------------- |
|
|
35
|
+
| `variant?` | [`ProseVariant`](#prosevariant) |
|
|
36
|
+
|
|
37
|
+
## Variables
|
|
38
|
+
|
|
39
|
+
### Prose
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
const Prose: ForwardRefExoticComponent<
|
|
43
|
+
object & HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>
|
|
44
|
+
>;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Tailwind Typography's `prose` rhythm and measure in the active theme's colours
|
|
48
|
+
and faces; the caller supplies the document content.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/quota-meter
|
|
8
|
+
|
|
9
|
+
# components/quota-meter
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### QuotaMeterProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type QuotaMeterProps = object &
|
|
17
|
+
Omit<HTMLAttributes<HTMLDivElement>, "children">;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Props accepted by QuotaMeter.
|
|
21
|
+
|
|
22
|
+
#### Type Declaration
|
|
23
|
+
|
|
24
|
+
| Name | Type |
|
|
25
|
+
| -------------- | ------------------------------------------ |
|
|
26
|
+
| `label` | `ReactNode` |
|
|
27
|
+
| `value` | `number` |
|
|
28
|
+
| `max` | `number` |
|
|
29
|
+
| `valueLabel?` | `ReactNode` |
|
|
30
|
+
| `maxLabel?` | `ReactNode` |
|
|
31
|
+
| `description?` | `ReactNode` |
|
|
32
|
+
| `indicator?` | `ReactNode` |
|
|
33
|
+
| `tone?` | [`ProgressTone`](progress.md#progresstone) |
|
|
34
|
+
|
|
35
|
+
## Variables
|
|
36
|
+
|
|
37
|
+
### QuotaMeter
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
const QuotaMeter: ForwardRefExoticComponent<
|
|
41
|
+
object &
|
|
42
|
+
Omit<HTMLAttributes<HTMLDivElement>, "children"> &
|
|
43
|
+
RefAttributes<HTMLDivElement>
|
|
44
|
+
>;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A meter presentation for caller-provided quota values.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/radio-group
|
|
8
|
+
|
|
9
|
+
# components/radio-group
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### RadioGroupProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type RadioGroupProps = object &
|
|
17
|
+
Omit<
|
|
18
|
+
FieldsetHTMLAttributes<HTMLFieldSetElement>,
|
|
19
|
+
"defaultValue" | "onChange"
|
|
20
|
+
>;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Props accepted by RadioGroup.
|
|
24
|
+
|
|
25
|
+
#### Type Declaration
|
|
26
|
+
|
|
27
|
+
| Name | Type | Description |
|
|
28
|
+
| ------------------ | ------------------------------ | ---------------------------------------------- |
|
|
29
|
+
| `children` | `ReactNode` | - |
|
|
30
|
+
| `defaultValue?` | `string` | - |
|
|
31
|
+
| `name?` | `string` | - |
|
|
32
|
+
| `onValueChange()?` | (`value`) => `void` | Called after the selected radio value changes. |
|
|
33
|
+
| `orientation?` | `"horizontal"` \| `"vertical"` | - |
|
|
34
|
+
| `value?` | `string` | - |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### RadioGroupItemProps
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
type RadioGroupItemProps = object &
|
|
42
|
+
Omit<
|
|
43
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
44
|
+
"checked" | "defaultChecked" | "name" | "type" | "value"
|
|
45
|
+
>;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Props accepted by RadioGroupItem.
|
|
49
|
+
|
|
50
|
+
#### Type Declaration
|
|
51
|
+
|
|
52
|
+
| Name | Type | Description |
|
|
53
|
+
| ------------ | ----------- | -------------------------------------------------------------------- |
|
|
54
|
+
| `value` | `string` | - |
|
|
55
|
+
| `indicator?` | `ReactNode` | Replaces the bead while the native input continues to own selection. |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### RadioGroupCardProps
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
type RadioGroupCardProps = object & RadioGroupItemProps;
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Props accepted by RadioGroupCard.
|
|
66
|
+
|
|
67
|
+
#### Type Declaration
|
|
68
|
+
|
|
69
|
+
| Name | Type | Description |
|
|
70
|
+
| -------------- | ----------- | --------------------------------------------------------------------- |
|
|
71
|
+
| `title` | `ReactNode` | - |
|
|
72
|
+
| `description?` | `ReactNode` | - |
|
|
73
|
+
| `meta?` | `ReactNode` | A short readout on the card's trailing edge, such as a price or size. |
|
|
74
|
+
|
|
75
|
+
## Variables
|
|
76
|
+
|
|
77
|
+
### RadioGroup
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
const RadioGroup: ForwardRefExoticComponent<
|
|
81
|
+
object &
|
|
82
|
+
Omit<
|
|
83
|
+
FieldsetHTMLAttributes<HTMLFieldSetElement>,
|
|
84
|
+
"defaultValue" | "onChange"
|
|
85
|
+
> &
|
|
86
|
+
RefAttributes<HTMLFieldSetElement>
|
|
87
|
+
>;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
A radio-group primitive with caller-owned selection state.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### RadioGroupItem
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
const RadioGroupItem: ForwardRefExoticComponent<
|
|
98
|
+
object &
|
|
99
|
+
Omit<
|
|
100
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
101
|
+
"name" | "defaultChecked" | "type" | "value" | "checked"
|
|
102
|
+
> &
|
|
103
|
+
RefAttributes<HTMLInputElement>
|
|
104
|
+
>;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
A selectable item in a RadioGroup.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### RadioGroupCard
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
const RadioGroupCard: ForwardRefExoticComponent<
|
|
115
|
+
object &
|
|
116
|
+
object &
|
|
117
|
+
Omit<
|
|
118
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
119
|
+
"name" | "defaultChecked" | "type" | "value" | "checked"
|
|
120
|
+
> &
|
|
121
|
+
RefAttributes<HTMLInputElement>
|
|
122
|
+
>;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
A radio choice presented as a card: bead, title, optional description and a
|
|
126
|
+
trailing readout. The whole card is the hit area; the title names it.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/resize-handle
|
|
8
|
+
|
|
9
|
+
# components/resize-handle
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### ResizeHandleProps
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type ResizeHandleProps = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> &
|
|
17
|
+
object;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Accessible grip presentation with caller-owned resize state and pointer gesture.
|
|
21
|
+
|
|
22
|
+
#### Type Declaration
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description |
|
|
25
|
+
| ----------------- | ------------------------------ | --------------------------------------------------------- |
|
|
26
|
+
| `aria-label` | `string` | - |
|
|
27
|
+
| `orientation` | `"horizontal"` \| `"vertical"` | - |
|
|
28
|
+
| `variant?` | `"grip"` \| `"notch"` | - |
|
|
29
|
+
| `value` | `number` | - |
|
|
30
|
+
| `min` | `number` | - |
|
|
31
|
+
| `max` | `number` | - |
|
|
32
|
+
| `onValueChange()` | (`value`) => `void` | Receives a clamped pixel position from keyboard controls. |
|
|
33
|
+
|
|
34
|
+
## Variables
|
|
35
|
+
|
|
36
|
+
### ResizeHandle
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
const ResizeHandle: ForwardRefExoticComponent<
|
|
40
|
+
Omit<HTMLAttributes<HTMLDivElement>, "onChange"> &
|
|
41
|
+
object &
|
|
42
|
+
RefAttributes<HTMLDivElement>
|
|
43
|
+
>;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Visual and keyboard surface for a caller-owned resize gesture.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
[**@fungi.computer/caps**](../README.md)
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[@fungi.computer/caps](../README.md) / components/rough-drawing
|
|
8
|
+
|
|
9
|
+
# components/rough-drawing
|
|
10
|
+
|
|
11
|
+
## Type Aliases
|
|
12
|
+
|
|
13
|
+
### RoughMark
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
type RoughMark =
|
|
17
|
+
"box" | "underline" | "circle" | "highlight" | "bubble" | "line";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
A hand-drawn mark around, under or behind an element.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### RoughTone
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
type RoughTone = "ink" | "primary";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Theme ink (`currentColor` by default) or the theme's primary accent.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### RoughSpec
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
type RoughSpec = Readonly<{
|
|
38
|
+
mark: RoughMark;
|
|
39
|
+
seed: number;
|
|
40
|
+
weight: number;
|
|
41
|
+
roughness: number;
|
|
42
|
+
fill: "none" | "solid" | "hachure";
|
|
43
|
+
tail: "left" | "right" | "none";
|
|
44
|
+
points: readonly (readonly [number, number][]);
|
|
45
|
+
}>;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Parsed `data-rough-*` settings for one element.
|
|
49
|
+
|
|
50
|
+
## Functions
|
|
51
|
+
|
|
52
|
+
### parseRoughPoints()
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
function parseRoughPoints(value): readonly (readonly [number, number][]);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Read `0,100 40,20 100,0` as percent points, dropping malformed pairs.
|
|
59
|
+
|
|
60
|
+
#### Parameters
|
|
61
|
+
|
|
62
|
+
| Parameter | Type |
|
|
63
|
+
| --------- | ----------------------- |
|
|
64
|
+
| `value` | `string` \| `undefined` |
|
|
65
|
+
|
|
66
|
+
#### Returns
|
|
67
|
+
|
|
68
|
+
readonly readonly \[`number`, `number`\][]
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### readRoughSpec()
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
function readRoughSpec(element): Readonly<{
|
|
76
|
+
mark: RoughMark;
|
|
77
|
+
seed: number;
|
|
78
|
+
weight: number;
|
|
79
|
+
roughness: number;
|
|
80
|
+
fill: "none" | "solid" | "hachure";
|
|
81
|
+
tail: "none" | "left" | "right";
|
|
82
|
+
points: readonly (readonly [number, number][]);
|
|
83
|
+
}> | null;
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Parse an element's `data-caps-rough` and `data-rough-*` attributes.
|
|
87
|
+
|
|
88
|
+
#### Parameters
|
|
89
|
+
|
|
90
|
+
| Parameter | Type |
|
|
91
|
+
| --------- | ------------- |
|
|
92
|
+
| `element` | `HTMLElement` |
|
|
93
|
+
|
|
94
|
+
#### Returns
|
|
95
|
+
|
|
96
|
+
\| `Readonly`\<\{ `mark`: [`RoughMark`](#roughmark); `seed`: `number`; `weight`:
|
|
97
|
+
`number`; `roughness`: `number`; `fill`: `"none"` \| `"solid"` \| `"hachure"`;
|
|
98
|
+
`tail`: `"none"` \| `"left"` \| `"right"`; `points`: readonly readonly
|
|
99
|
+
\[`number`, `number`\][]; \}\> \| `null`
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### drawRough()
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
function drawRough(root?): () => void;
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Draw every `[data-caps-rough]` element inside `root` (and `root` itself),
|
|
110
|
+
loading Rough.js on first use, and redraw each one when its size changes.
|
|
111
|
+
Returns a function that stops watching sizes. If Rough.js cannot load, the CSS
|
|
112
|
+
fallback stays.
|
|
113
|
+
|
|
114
|
+
#### Parameters
|
|
115
|
+
|
|
116
|
+
| Parameter | Type | Default value |
|
|
117
|
+
| --------- | ------------ | ------------- |
|
|
118
|
+
| `root` | `ParentNode` | `document` |
|
|
119
|
+
|
|
120
|
+
#### Returns
|
|
121
|
+
|
|
122
|
+
() => `void`
|