@panphora/bevel 0.1.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/LICENSE +16 -0
- package/README.md +226 -0
- package/bevel-fonts.css +16 -0
- package/bevel.css +3075 -0
- package/bevel.js +2126 -0
- package/dist/react/components/activity-feed.d.ts +89 -0
- package/dist/react/components/activity-feed.js +54 -0
- package/dist/react/components/alert-dialog.d.ts +14 -0
- package/dist/react/components/alert-dialog.js +19 -0
- package/dist/react/components/app-shell.d.ts +98 -0
- package/dist/react/components/app-shell.js +86 -0
- package/dist/react/components/app-toolbar.d.ts +19 -0
- package/dist/react/components/app-toolbar.js +22 -0
- package/dist/react/components/avatar-group.d.ts +67 -0
- package/dist/react/components/avatar-group.js +49 -0
- package/dist/react/components/badge-and-pill.d.ts +34 -0
- package/dist/react/components/badge-and-pill.js +12 -0
- package/dist/react/components/breadcrumbs.d.ts +56 -0
- package/dist/react/components/breadcrumbs.js +44 -0
- package/dist/react/components/bulk-bar.d.ts +22 -0
- package/dist/react/components/bulk-bar.js +59 -0
- package/dist/react/components/button.d.ts +15 -0
- package/dist/react/components/button.js +20 -0
- package/dist/react/components/callout-and-hint.d.ts +17 -0
- package/dist/react/components/callout-and-hint.js +8 -0
- package/dist/react/components/checkbox.d.ts +5 -0
- package/dist/react/components/checkbox.js +13 -0
- package/dist/react/components/chip.d.ts +149 -0
- package/dist/react/components/chip.js +29 -0
- package/dist/react/components/code-block.d.ts +50 -0
- package/dist/react/components/code-block.js +77 -0
- package/dist/react/components/code-editor.d.ts +122 -0
- package/dist/react/components/code-editor.js +695 -0
- package/dist/react/components/column-manager.d.ts +28 -0
- package/dist/react/components/column-manager.js +85 -0
- package/dist/react/components/combobox.d.ts +32 -0
- package/dist/react/components/combobox.js +37 -0
- package/dist/react/components/data-grid.d.ts +108 -0
- package/dist/react/components/data-grid.js +159 -0
- package/dist/react/components/data-table.d.ts +2 -0
- package/dist/react/components/data-table.js +6 -0
- package/dist/react/components/date.d.ts +23 -0
- package/dist/react/components/date.js +11 -0
- package/dist/react/components/details.d.ts +13 -0
- package/dist/react/components/details.js +20 -0
- package/dist/react/components/dialog.d.ts +74 -0
- package/dist/react/components/dialog.js +31 -0
- package/dist/react/components/diff-view.d.ts +73 -0
- package/dist/react/components/diff-view.js +68 -0
- package/dist/react/components/documents.d.ts +70 -0
- package/dist/react/components/documents.js +10 -0
- package/dist/react/components/drawer.d.ts +45 -0
- package/dist/react/components/drawer.js +35 -0
- package/dist/react/components/editable-grid-cells.d.ts +32 -0
- package/dist/react/components/editable-grid-cells.js +116 -0
- package/dist/react/components/eyebrow-kicker-lede-pull-quote.d.ts +39 -0
- package/dist/react/components/eyebrow-kicker-lede-pull-quote.js +12 -0
- package/dist/react/components/field.d.ts +32 -0
- package/dist/react/components/field.js +27 -0
- package/dist/react/components/file-tree.d.ts +75 -0
- package/dist/react/components/file-tree.js +247 -0
- package/dist/react/components/file.d.ts +43 -0
- package/dist/react/components/file.js +73 -0
- package/dist/react/components/files-table.d.ts +174 -0
- package/dist/react/components/files-table.js +237 -0
- package/dist/react/components/filter-builder.d.ts +37 -0
- package/dist/react/components/filter-builder.js +109 -0
- package/dist/react/components/form-error-summary.d.ts +16 -0
- package/dist/react/components/form-error-summary.js +49 -0
- package/dist/react/components/icon-button.d.ts +8 -0
- package/dist/react/components/icon-button.js +14 -0
- package/dist/react/components/icon.d.ts +7 -0
- package/dist/react/components/icon.js +15 -0
- package/dist/react/components/image.d.ts +72 -0
- package/dist/react/components/image.js +24 -0
- package/dist/react/components/inline-edit.d.ts +70 -0
- package/dist/react/components/inline-edit.js +149 -0
- package/dist/react/components/input.d.ts +29 -0
- package/dist/react/components/input.js +20 -0
- package/dist/react/components/kanban-board.d.ts +140 -0
- package/dist/react/components/kanban-board.js +374 -0
- package/dist/react/components/layout.d.ts +51 -0
- package/dist/react/components/layout.js +28 -0
- package/dist/react/components/list.d.ts +28 -0
- package/dist/react/components/list.js +6 -0
- package/dist/react/components/masthead-and-verdict.d.ts +60 -0
- package/dist/react/components/masthead-and-verdict.js +8 -0
- package/dist/react/components/menu.d.ts +26 -0
- package/dist/react/components/menu.js +31 -0
- package/dist/react/components/multi-select-picker.d.ts +49 -0
- package/dist/react/components/multi-select-picker.js +20 -0
- package/dist/react/components/note.d.ts +33 -0
- package/dist/react/components/note.js +8 -0
- package/dist/react/components/number-field.d.ts +16 -0
- package/dist/react/components/number-field.js +17 -0
- package/dist/react/components/pagination.d.ts +45 -0
- package/dist/react/components/pagination.js +87 -0
- package/dist/react/components/persistent-action-banner.d.ts +71 -0
- package/dist/react/components/persistent-action-banner.js +39 -0
- package/dist/react/components/popconfirm.d.ts +42 -0
- package/dist/react/components/popconfirm.js +59 -0
- package/dist/react/components/popover.d.ts +16 -0
- package/dist/react/components/popover.js +21 -0
- package/dist/react/components/progress-and-gauge.d.ts +44 -0
- package/dist/react/components/progress-and-gauge.js +19 -0
- package/dist/react/components/radio.d.ts +7 -0
- package/dist/react/components/radio.js +13 -0
- package/dist/react/components/rich-text-toolbar.d.ts +26 -0
- package/dist/react/components/rich-text-toolbar.js +64 -0
- package/dist/react/components/rows-and-card.d.ts +88 -0
- package/dist/react/components/rows-and-card.js +10 -0
- package/dist/react/components/save-status-indicator.d.ts +11 -0
- package/dist/react/components/save-status-indicator.js +33 -0
- package/dist/react/components/segmented-control.d.ts +21 -0
- package/dist/react/components/segmented-control.js +15 -0
- package/dist/react/components/select.d.ts +29 -0
- package/dist/react/components/select.js +29 -0
- package/dist/react/components/selectable-cards.d.ts +30 -0
- package/dist/react/components/selectable-cards.js +29 -0
- package/dist/react/components/settings-rows.d.ts +51 -0
- package/dist/react/components/settings-rows.js +8 -0
- package/dist/react/components/sidebar-nav.d.ts +77 -0
- package/dist/react/components/sidebar-nav.js +41 -0
- package/dist/react/components/skeleton-and-empty.d.ts +51 -0
- package/dist/react/components/skeleton-and-empty.js +14 -0
- package/dist/react/components/slider.d.ts +19 -0
- package/dist/react/components/slider.js +17 -0
- package/dist/react/components/small-charts.d.ts +60 -0
- package/dist/react/components/small-charts.js +76 -0
- package/dist/react/components/sortable.d.ts +30 -0
- package/dist/react/components/sortable.js +85 -0
- package/dist/react/components/split-button.d.ts +38 -0
- package/dist/react/components/split-button.js +43 -0
- package/dist/react/components/split-panes.d.ts +35 -0
- package/dist/react/components/split-panes.js +102 -0
- package/dist/react/components/stat-tiles.d.ts +54 -0
- package/dist/react/components/stat-tiles.js +8 -0
- package/dist/react/components/steps.d.ts +11 -0
- package/dist/react/components/steps.js +13 -0
- package/dist/react/components/switch.d.ts +6 -0
- package/dist/react/components/switch.js +13 -0
- package/dist/react/components/table.d.ts +61 -0
- package/dist/react/components/table.js +6 -0
- package/dist/react/components/tabs.d.ts +7 -0
- package/dist/react/components/tabs.js +13 -0
- package/dist/react/components/tags.d.ts +33 -0
- package/dist/react/components/tags.js +83 -0
- package/dist/react/components/textarea.d.ts +10 -0
- package/dist/react/components/textarea.js +6 -0
- package/dist/react/components/toast.d.ts +35 -0
- package/dist/react/components/toast.js +90 -0
- package/dist/react/components/tooltip-and-key.d.ts +20 -0
- package/dist/react/components/tooltip-and-key.js +20 -0
- package/dist/react/components/tree-view.d.ts +34 -0
- package/dist/react/components/tree-view.js +118 -0
- package/dist/react/components/upload-dropzone.d.ts +92 -0
- package/dist/react/components/upload-dropzone.js +116 -0
- package/dist/react/components/wizard-shell.d.ts +78 -0
- package/dist/react/components/wizard-shell.js +176 -0
- package/dist/react/fonts.css.d.ts +1 -0
- package/dist/react/index.d.ts +76 -0
- package/dist/react/index.js +77 -0
- package/dist/react/integrations/quickcrop.d.ts +58 -0
- package/dist/react/integrations/quickcrop.js +137 -0
- package/dist/react/integrations/richclay.d.ts +43 -0
- package/dist/react/integrations/richclay.js +129 -0
- package/dist/react/internal/classes.d.ts +3 -0
- package/dist/react/internal/classes.js +10 -0
- package/dist/react/internal/close-mark.d.ts +1 -0
- package/dist/react/internal/close-mark.js +10 -0
- package/dist/react/internal/controllable-state.d.ts +9 -0
- package/dist/react/internal/controllable-state.js +22 -0
- package/dist/react/internal/drop-effect.d.ts +28 -0
- package/dist/react/internal/drop-effect.js +8 -0
- package/dist/react/internal/form-reset.d.ts +2 -0
- package/dist/react/internal/form-reset.js +22 -0
- package/dist/react/internal/format.d.ts +1 -0
- package/dist/react/internal/format.js +14 -0
- package/dist/react/internal/link.d.ts +2 -0
- package/dist/react/internal/link.js +8 -0
- package/dist/react/internal/part.d.ts +20 -0
- package/dist/react/internal/part.js +47 -0
- package/dist/react/internal/pointer-session.d.ts +8 -0
- package/dist/react/internal/pointer-session.js +60 -0
- package/dist/react/internal/refs.d.ts +2 -0
- package/dist/react/internal/refs.js +22 -0
- package/dist/react/internal/rich-text.d.ts +28 -0
- package/dist/react/internal/rich-text.js +4 -0
- package/dist/react/internal/table-context.d.ts +39 -0
- package/dist/react/internal/table-context.js +12 -0
- package/dist/react/internal/use-object-url.d.ts +1 -0
- package/dist/react/internal/use-object-url.js +15 -0
- package/dist/react/layout.css +274 -0
- package/dist/react/layout.css.d.ts +1 -0
- package/dist/react/models/filter.d.ts +31 -0
- package/dist/react/models/filter.js +79 -0
- package/dist/react/models/kanban.d.ts +51 -0
- package/dist/react/models/kanban.js +35 -0
- package/dist/react/models/reorder.d.ts +9 -0
- package/dist/react/models/reorder.js +23 -0
- package/dist/react/models/table.d.ts +85 -0
- package/dist/react/models/table.js +144 -0
- package/dist/react/models/tree.d.ts +16 -0
- package/dist/react/models/tree.js +26 -0
- package/dist/react/provider.d.ts +18 -0
- package/dist/react/provider.js +31 -0
- package/dist/react/recipes/context-hypercms.d.ts +17 -0
- package/dist/react/recipes/context-hypercms.js +71 -0
- package/dist/react/recipes/context-quickcrop.d.ts +8 -0
- package/dist/react/recipes/context-quickcrop.js +49 -0
- package/dist/react/theme.css +8004 -0
- package/dist/react/theme.css.d.ts +1 -0
- package/examples/README.md +34 -0
- package/examples/components/activity-feed.html +28 -0
- package/examples/components/app-shell.html +12 -0
- package/examples/components/app-toolbar.html +38 -0
- package/examples/components/avatar-group.html +27 -0
- package/examples/components/breadcrumbs.html +26 -0
- package/examples/components/bulk-bar.html +22 -0
- package/examples/components/code-block.html +12 -0
- package/examples/components/code-editor.html +25 -0
- package/examples/components/column-manager.html +9 -0
- package/examples/components/combobox.html +13 -0
- package/examples/components/context-hypercms.css +41 -0
- package/examples/components/context-hypercms.html +40 -0
- package/examples/components/context-hypercms.js +62 -0
- package/examples/components/context-quickcrop.html +137 -0
- package/examples/components/diff-view.html +9 -0
- package/examples/components/drawer.html +11 -0
- package/examples/components/editable-grid-cells.html +9 -0
- package/examples/components/file-browser.html +53 -0
- package/examples/components/file-tree.html +34 -0
- package/examples/components/files-table.html +80 -0
- package/examples/components/filter-builder.html +11 -0
- package/examples/components/form-error-summary.html +11 -0
- package/examples/components/index.html +51 -0
- package/examples/components/inline-edit.html +42 -0
- package/examples/components/kanban-board.html +42 -0
- package/examples/components/manifest.json +3279 -0
- package/examples/components/modal.html +11 -0
- package/examples/components/multi-select-picker.html +13 -0
- package/examples/components/pagination.html +32 -0
- package/examples/components/persistent-action-banner.html +23 -0
- package/examples/components/popconfirm.html +13 -0
- package/examples/components/popover-menu.html +13 -0
- package/examples/components/reference/baseline/DECISIONS.md +85 -0
- package/examples/components/reference/baseline/README.md +58 -0
- package/examples/components/reference/baseline/bevel-fonts.css +16 -0
- package/examples/components/reference/baseline/bevel.css +1339 -0
- package/examples/components/reference/baseline/bevel.js +496 -0
- package/examples/components/reference/baseline/fonts/LICENSE-ibm-plex-mono.txt +93 -0
- package/examples/components/reference/baseline/fonts/LICENSE-ibm-plex-sans.txt +93 -0
- package/examples/components/reference/baseline/fonts/LICENSE-newsreader.txt +93 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-sans-latin-400-italic.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/newsreader-latin-opsz-italic.woff2 +0 -0
- package/examples/components/reference/baseline/fonts/newsreader-latin-opsz-normal.woff2 +0 -0
- package/examples/components/reference/fable/IMPROVEMENTS.md +106 -0
- package/examples/components/reference/fable/PARENT-REPAIRS.md +17 -0
- package/examples/components/reference/fable/__pycache__/build_repairs.cpython-311.pyc +0 -0
- package/examples/components/reference/fable/__pycache__/kanban.cpython-311.pyc +0 -0
- package/examples/components/reference/fable/as-authored/IMPROVEMENTS-completed.md +106 -0
- package/examples/components/reference/fable/as-authored/base-astra.css +17 -0
- package/examples/components/reference/fable/as-authored/base-parent.css +416 -0
- package/examples/components/reference/fable/as-authored/build.py +858 -0
- package/examples/components/reference/fable/as-authored/fable.css +823 -0
- package/examples/components/reference/fable/as-authored/kanban-completed.css +235 -0
- package/examples/components/reference/fable/as-authored/kanban-completed.html +53 -0
- package/examples/components/reference/fable/as-authored/kanban-completed.py +212 -0
- package/examples/components/reference/fable/as-authored/kanban.py +207 -0
- package/examples/components/reference/fable/base-astra.css +17 -0
- package/examples/components/reference/fable/base-parent.css +416 -0
- package/examples/components/reference/fable/build.py +858 -0
- package/examples/components/reference/fable/build_repairs.py +25 -0
- package/examples/components/reference/fable/components/activity-feed.html +3 -0
- package/examples/components/reference/fable/components/app-toolbar.html +3 -0
- package/examples/components/reference/fable/components/avatar-group.html +4 -0
- package/examples/components/reference/fable/components/breadcrumbs.html +3 -0
- package/examples/components/reference/fable/components/code-block.html +9 -0
- package/examples/components/reference/fable/components/column-manager.html +3 -0
- package/examples/components/reference/fable/components/combobox.html +6 -0
- package/examples/components/reference/fable/components/context-hypercms.html +3 -0
- package/examples/components/reference/fable/components/context-quickcrop.html +4 -0
- package/examples/components/reference/fable/components/diff-view.html +13 -0
- package/examples/components/reference/fable/components/drawer.html +3 -0
- package/examples/components/reference/fable/components/editable-grid-cells.html +3 -0
- package/examples/components/reference/fable/components/filter-builder.html +3 -0
- package/examples/components/reference/fable/components/form-error-summary.html +4 -0
- package/examples/components/reference/fable/components/inline-edit.html +3 -0
- package/examples/components/reference/fable/components/kanban-board.html +53 -0
- package/examples/components/reference/fable/components/modal.html +3 -0
- package/examples/components/reference/fable/components/multi-select-picker.html +5 -0
- package/examples/components/reference/fable/components/pagination.html +3 -0
- package/examples/components/reference/fable/components/persistent-action-banner.html +4 -0
- package/examples/components/reference/fable/components/popconfirm.html +5 -0
- package/examples/components/reference/fable/components/popover-menu.html +3 -0
- package/examples/components/reference/fable/components/rich-text-toolbar.html +3 -0
- package/examples/components/reference/fable/components/save-status-indicator.html +2 -0
- package/examples/components/reference/fable/components/selectable-cards.html +3 -0
- package/examples/components/reference/fable/components/settings-rows.html +3 -0
- package/examples/components/reference/fable/components/sidebar-nav.html +4 -0
- package/examples/components/reference/fable/components/small-charts.html +5 -0
- package/examples/components/reference/fable/components/split-button.html +4 -0
- package/examples/components/reference/fable/components/split-panes.html +8 -0
- package/examples/components/reference/fable/components/stat-tiles.html +3 -0
- package/examples/components/reference/fable/components/toast-stack.html +5 -0
- package/examples/components/reference/fable/components/tree-view.html +4 -0
- package/examples/components/reference/fable/components/upload-dropzone.html +6 -0
- package/examples/components/reference/fable/components/wizard-shell.html +3 -0
- package/examples/components/reference/fable/coverage.json +414 -0
- package/examples/components/reference/fable/fable.css +823 -0
- package/examples/components/reference/fable/index.html +5 -0
- package/examples/components/reference/fable/kanban.css +237 -0
- package/examples/components/reference/fable/kanban.py +212 -0
- package/examples/components/reference/fable/parent-repairs.css +9 -0
- package/examples/components/reference/fixtures/data.json +102 -0
- package/examples/components/reference/fixtures/host.js +47 -0
- package/examples/components/reference/fixtures/static-host.js +39 -0
- package/examples/components/reference/fixtures/workspace.jpg +0 -0
- package/examples/components/reference/parent/CHANGES.md +179 -0
- package/examples/components/reference/parent/__pycache__/kanban.cpython-311.pyc +0 -0
- package/examples/components/reference/parent/base-astra.css +17 -0
- package/examples/components/reference/parent/base-parent.css +416 -0
- package/examples/components/reference/parent/build.py +148 -0
- package/examples/components/reference/parent/components/activity-feed.html +2 -0
- package/examples/components/reference/parent/components/app-toolbar.html +2 -0
- package/examples/components/reference/parent/components/avatar-group.html +4 -0
- package/examples/components/reference/parent/components/breadcrumbs.html +2 -0
- package/examples/components/reference/parent/components/code-block.html +8 -0
- package/examples/components/reference/parent/components/column-manager.html +2 -0
- package/examples/components/reference/parent/components/combobox.html +6 -0
- package/examples/components/reference/parent/components/context-hypercms.html +2 -0
- package/examples/components/reference/parent/components/context-quickcrop.html +4 -0
- package/examples/components/reference/parent/components/diff-view.html +4 -0
- package/examples/components/reference/parent/components/drawer.html +2 -0
- package/examples/components/reference/parent/components/editable-grid-cells.html +2 -0
- package/examples/components/reference/parent/components/filter-builder.html +2 -0
- package/examples/components/reference/parent/components/form-error-summary.html +2 -0
- package/examples/components/reference/parent/components/inline-edit.html +2 -0
- package/examples/components/reference/parent/components/kanban-board.html +84 -0
- package/examples/components/reference/parent/components/modal.html +2 -0
- package/examples/components/reference/parent/components/multi-select-picker.html +5 -0
- package/examples/components/reference/parent/components/pagination.html +2 -0
- package/examples/components/reference/parent/components/persistent-action-banner.html +4 -0
- package/examples/components/reference/parent/components/popconfirm.html +5 -0
- package/examples/components/reference/parent/components/popover-menu.html +2 -0
- package/examples/components/reference/parent/components/rich-text-toolbar.html +2 -0
- package/examples/components/reference/parent/components/save-status-indicator.html +2 -0
- package/examples/components/reference/parent/components/selectable-cards.html +2 -0
- package/examples/components/reference/parent/components/settings-rows.html +2 -0
- package/examples/components/reference/parent/components/sidebar-nav.html +4 -0
- package/examples/components/reference/parent/components/small-charts.html +2 -0
- package/examples/components/reference/parent/components/split-button.html +5 -0
- package/examples/components/reference/parent/components/split-panes.html +8 -0
- package/examples/components/reference/parent/components/stat-tiles.html +2 -0
- package/examples/components/reference/parent/components/toast-stack.html +5 -0
- package/examples/components/reference/parent/components/tree-view.html +4 -0
- package/examples/components/reference/parent/components/upload-dropzone.html +6 -0
- package/examples/components/reference/parent/components/wizard-shell.html +2 -0
- package/examples/components/reference/parent/coverage.json +414 -0
- package/examples/components/reference/parent/index.html +1 -0
- package/examples/components/reference/parent/kanban.css +114 -0
- package/examples/components/reference/parent/kanban.py +55 -0
- package/examples/components/reference/parent/refinement.css +53 -0
- package/examples/components/reference/selected/build.py +70 -0
- package/examples/components/reference/selected/components/activity-feed.html +3 -0
- package/examples/components/reference/selected/components/app-toolbar.html +3 -0
- package/examples/components/reference/selected/components/avatar-group.html +4 -0
- package/examples/components/reference/selected/components/breadcrumbs.html +3 -0
- package/examples/components/reference/selected/components/code-block.html +9 -0
- package/examples/components/reference/selected/components/column-manager.html +3 -0
- package/examples/components/reference/selected/components/combobox.html +6 -0
- package/examples/components/reference/selected/components/context-hypercms.html +3 -0
- package/examples/components/reference/selected/components/context-quickcrop.html +4 -0
- package/examples/components/reference/selected/components/diff-view.html +13 -0
- package/examples/components/reference/selected/components/drawer.html +3 -0
- package/examples/components/reference/selected/components/editable-grid-cells.html +3 -0
- package/examples/components/reference/selected/components/filter-builder.html +3 -0
- package/examples/components/reference/selected/components/form-error-summary.html +4 -0
- package/examples/components/reference/selected/components/inline-edit.html +3 -0
- package/examples/components/reference/selected/components/kanban-board.html +53 -0
- package/examples/components/reference/selected/components/modal.html +2 -0
- package/examples/components/reference/selected/components/multi-select-picker.html +5 -0
- package/examples/components/reference/selected/components/pagination.html +3 -0
- package/examples/components/reference/selected/components/persistent-action-banner.html +4 -0
- package/examples/components/reference/selected/components/popconfirm.html +5 -0
- package/examples/components/reference/selected/components/popover-menu.html +3 -0
- package/examples/components/reference/selected/components/rich-text-toolbar.html +3 -0
- package/examples/components/reference/selected/components/save-status-indicator.html +2 -0
- package/examples/components/reference/selected/components/selectable-cards.html +3 -0
- package/examples/components/reference/selected/components/settings-rows.html +3 -0
- package/examples/components/reference/selected/components/sidebar-nav.html +4 -0
- package/examples/components/reference/selected/components/small-charts.html +5 -0
- package/examples/components/reference/selected/components/split-button.html +4 -0
- package/examples/components/reference/selected/components/split-panes.html +8 -0
- package/examples/components/reference/selected/components/stat-tiles.html +3 -0
- package/examples/components/reference/selected/components/toast-stack.html +5 -0
- package/examples/components/reference/selected/components/tree-view.html +4 -0
- package/examples/components/reference/selected/components/upload-dropzone.html +6 -0
- package/examples/components/reference/selected/components/wizard-shell.html +3 -0
- package/examples/components/reference/selected/corrections.css +11 -0
- package/examples/components/reference/selected/coverage.json +413 -0
- package/examples/components/reference/selected/gallery-build.mjs +49 -0
- package/examples/components/reference/selected/gallery-spec.json +12 -0
- package/examples/components/reference/selected/index.html +1 -0
- package/examples/components/reference/selected/kanban-comparison.json +6 -0
- package/examples/components/reference/selected/manifest.json +476 -0
- package/examples/components/reference/sha256.json +142 -0
- package/examples/components/reference/sources/diagonal-close.svg +1 -0
- package/examples/components/reference/sources/hyperclay/public-assets/css/hyperclay-app-source.css +614 -0
- package/examples/components/reference/sources/hyperclay/public-assets/js/app.js +94 -0
- package/examples/components/reference/sources/hyperclayjs/src/ui/theModal.js +897 -0
- package/examples/components/reference/sources/hypercms/scripts/build-theme.js +203 -0
- package/examples/components/reference/sources/hypercms/src/anchor.js +24 -0
- package/examples/components/reference/sources/hypercms/src/apply-loop.js +167 -0
- package/examples/components/reference/sources/hypercms/src/diagnostics.js +44 -0
- package/examples/components/reference/sources/hypercms/src/enhance.js +173 -0
- package/examples/components/reference/sources/hypercms/src/events.js +955 -0
- package/examples/components/reference/sources/hypercms/src/form-builder.js +518 -0
- package/examples/components/reference/sources/hypercms/src/form-rules.js +208 -0
- package/examples/components/reference/sources/hypercms/src/hooks.js +100 -0
- package/examples/components/reference/sources/hypercms/src/hypercms-bundle.js +10 -0
- package/examples/components/reference/sources/hypercms/src/hypercms.js +347 -0
- package/examples/components/reference/sources/hypercms/src/morph.js +10 -0
- package/examples/components/reference/sources/hypercms/src/path.js +61 -0
- package/examples/components/reference/sources/hypercms/src/place.js +131 -0
- package/examples/components/reference/sources/hypercms/src/platform.js +131 -0
- package/examples/components/reference/sources/hypercms/src/refresh.js +87 -0
- package/examples/components/reference/sources/hypercms/src/richclay-bridge.js +140 -0
- package/examples/components/reference/sources/hypercms/src/row-identity.js +111 -0
- package/examples/components/reference/sources/hypercms/src/scaffold.js +10 -0
- package/examples/components/reference/sources/hypercms/src/session.js +303 -0
- package/examples/components/reference/sources/hypercms/src/shell.js +248 -0
- package/examples/components/reference/sources/hypercms/src/styles.css +298 -0
- package/examples/components/reference/sources/hypercms/src/targets.js +144 -0
- package/examples/components/reference/sources/hypercms/src/templates.js +656 -0
- package/examples/components/reference/sources/hypercms/src/theme/pixel-quiet.overrides.css +761 -0
- package/examples/components/reference/sources/hypercms/src/theme.generated.css +1772 -0
- package/examples/components/reference/sources/hypercms/src/toggle.js +666 -0
- package/examples/components/reference/sources/hypercms/src/unresolved.js +211 -0
- package/examples/components/reference/sources/hypercms/src/vendor/mirk.vendor.js +212 -0
- package/examples/components/reference/sources/hypercms/src/views/inline-layer.js +421 -0
- package/examples/components/reference/sources/hypercms/src/views/inline.js +1072 -0
- package/examples/components/reference/sources/hypercms/src/views/sidebar.js +97 -0
- package/examples/components/reference/sources/modal-reference.html +301 -0
- package/examples/components/reference/sources/quickcrop/quickcrop.css +124 -0
- package/examples/components/reference/sources/quickcrop/quickcrop.js +400 -0
- package/examples/components/reference/sources/richclay/richclay.css +416 -0
- package/examples/components/reference/sources/richclay/richclay.js +2962 -0
- package/examples/components/reference/sources/richclay/src/a11y.js +67 -0
- package/examples/components/reference/sources/richclay/src/browser-global.js +7 -0
- package/examples/components/reference/sources/richclay/src/buttons.js +254 -0
- package/examples/components/reference/sources/richclay/src/hyperclay.js +470 -0
- package/examples/components/reference/sources/richclay/src/normalize.js +380 -0
- package/examples/components/reference/sources/richclay/src/richclay.js +1356 -0
- package/examples/components/reference/sources/richclay/src/sanitize.js +189 -0
- package/examples/components/reference/sources/richclay/src/styles.js +23 -0
- package/examples/components/reference/sources/richclay/src/toolbar-float.js +175 -0
- package/examples/components/reference/sources/richclay/src/toolbar.js +394 -0
- package/examples/components/reference/sources/richclay/src/vendor-bundle.js +15 -0
- package/examples/components/reference/sources/richclay/vendor/DOMPURIFY-LICENSE +202 -0
- package/examples/components/reference/sources/richclay/vendor/DOMPURIFY-LICENSE-MPL +373 -0
- package/examples/components/reference/sources/richclay/vendor/SQUIRE-LICENSE +21 -0
- package/examples/components/reference/sources/richclay/vendor/purify.es.mjs +2249 -0
- package/examples/components/reference/sources/richclay/vendor/purify.min.js +3 -0
- package/examples/components/reference/sources/richclay/vendor/squire.js +22 -0
- package/examples/components/reference/sources/richclay/vendor/squire.mjs +22 -0
- package/examples/components/reference/sources/richclay/vendor/squire.provenance.json +19 -0
- package/examples/components/rich-text-toolbar.html +43 -0
- package/examples/components/save-status-indicator.html +11 -0
- package/examples/components/selectable-cards.html +9 -0
- package/examples/components/settings-rows.html +10 -0
- package/examples/components/sidebar-nav.html +9 -0
- package/examples/components/small-charts.html +21 -0
- package/examples/components/split-button.html +13 -0
- package/examples/components/split-panes-editor.html +6 -0
- package/examples/components/split-panes.html +9 -0
- package/examples/components/stat-tiles.html +23 -0
- package/examples/components/toast-stack.html +21 -0
- package/examples/components/tree-view.html +9 -0
- package/examples/components/upload-dropzone.html +88 -0
- package/examples/components/wizard-shell.html +50 -0
- package/examples/datastar/index.html +38 -0
- package/examples/datastar/server.mjs +31 -0
- package/examples/fixtures/field-guide.pdf +14 -0
- package/examples/fixtures/workspace.jpg +0 -0
- package/examples/setup-peers.mjs +35 -0
- package/fonts/LICENSE-ibm-plex-mono.txt +93 -0
- package/fonts/LICENSE-ibm-plex-sans.txt +93 -0
- package/fonts/LICENSE-newsreader.txt +93 -0
- package/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/fonts/ibm-plex-mono-latin-600-normal.woff2 +0 -0
- package/fonts/ibm-plex-sans-latin-400-italic.woff2 +0 -0
- package/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- package/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- package/fonts/newsreader-latin-opsz-italic.woff2 +0 -0
- package/fonts/newsreader-latin-opsz-normal.woff2 +0 -0
- package/icons/LICENSE +21 -0
- package/icons/house.json +71 -0
- package/icons/icons.d.ts +17 -0
- package/icons/icons.js +648 -0
- package/icons/icons.svg +126 -0
- package/icons/marks/build-tray.source.mjs +45 -0
- package/icons/marks/hyperclay-local.svg +11 -0
- package/icons/phosphor.json +53 -0
- package/icons/round.json +8 -0
- package/integrations/datastar.js +202 -0
- package/integrations/quickcrop.css +26 -0
- package/integrations/quickcrop.js +56 -0
- package/integrations/richclay.css +100 -0
- package/integrations/richclay.js +131 -0
- package/package.json +630 -0
- package/react/README.md +244 -0
- package/src/README.md +83 -0
- package/vendor/datastar/datastar-1.0.3.js +10 -0
- package/vendor/datastar/provenance.json +6 -0
- package/vendor/floating-ui/LICENSE-core +20 -0
- package/vendor/floating-ui/LICENSE-dom +20 -0
- package/vendor/floating-ui/floating-ui.core.umd.min.js +1 -0
- package/vendor/floating-ui/floating-ui.dom.umd.min.js +1 -0
- package/vendor/floating-ui/provenance.json +17 -0
- package/vendor/richclay/LICENSE +16 -0
- package/vendor/richclay/THIRD-PARTY-NOTICES.md +45 -0
- package/vendor/richclay/provenance.json +17 -0
- package/vendor/richclay/richclay.css +404 -0
- package/vendor/richclay/richclay.js +2940 -0
- package/vendor/richclay/vendor/DOMPURIFY-LICENSE +202 -0
- package/vendor/richclay/vendor/DOMPURIFY-LICENSE-MPL +373 -0
- package/vendor/richclay/vendor/SQUIRE-LICENSE +21 -0
- package/vendor/richclay/vendor/purify.min.js +3 -0
- package/vendor/richclay/vendor/squire.js +22 -0
- package/vendor/richclay/vendor/squire.provenance.json +30 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
MIT No Attribution
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 David Miranda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
|
6
|
+
software and associated documentation files (the "Software"), to deal in the Software
|
|
7
|
+
without restriction, including without limitation the rights to use, copy, modify,
|
|
8
|
+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
+
permit persons to whom the Software is furnished to do so.
|
|
10
|
+
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
12
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
13
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
14
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
15
|
+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
|
|
16
|
+
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# bevel
|
|
2
|
+
|
|
3
|
+
Beveled controls in an editorial page. One stylesheet, one script, no build.
|
|
4
|
+
|
|
5
|
+
Buttons, switches, radios and steppers with a real machined edge (light top and left, dark right and bottom, mitred corners), set in a page that reads like a broadsheet: IBM Plex Sans body at 17px, Newsreader headings, IBM Plex Mono for every label and figure. Committed component state lives in the markup and survives `document.documentElement.outerHTML` serialization. Browser resources such as upload Files, editor selection and pointer sessions are temporary. Built for self-saving HTML (Hyperclay, htmlclay, clayjs) and fine anywhere else.
|
|
6
|
+
|
|
7
|
+
The docs page is the spec: [index.html](index.html) shows every component with its markup. [starter.html](starter.html) is a page to copy.
|
|
8
|
+
|
|
9
|
+
React applications can opt into [Bevel for React](react/README.md), with React 19 and Base UI 1.8 parts for all 70 catalog families. Import `@panphora/bevel/react/layout.css` for functional layout, then optionally `@panphora/bevel/react/theme.css` and `@panphora/bevel/react/fonts.css`. React owns component state; the classic script is not part of the React entry points.
|
|
10
|
+
|
|
11
|
+
The 36 functional examples live in `examples/components/`, and 33 of them preserve the selected reference sources under `examples/components/reference/`. They cover local interactions, keyboard behavior, durable DOM state and application event boundaries. The HyperCMS and Quickcrop contexts use their real supplied peers. Component, integration, installed-package and browser checks pass; the independent implementation review is resolved. See [the examples guide](examples/README.md) for local setup. The Datastar example in `examples/datastar/` uses the self-hosted 1.0.3 bundle and a local demonstration server.
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@panphora/bevel@0.1.0/bevel-fonts.css">
|
|
17
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@panphora/bevel@0.1.0/bevel.css">
|
|
18
|
+
<script src="https://cdn.jsdelivr.net/npm/@panphora/bevel@0.1.0/bevel.js" defer></script>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or `npm install @panphora/bevel` and import `@panphora/bevel/bevel.css`, `@panphora/bevel/bevel-fonts.css` and `@panphora/bevel/bevel.js`. The font files ship in the package with relative URLs, so a vendored copy works offline. To use Google Fonts instead, drop the fonts file and add:
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap">
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Put `bevel-page` on `body` for the column and the typographic defaults, then copy components from the docs page.
|
|
28
|
+
|
|
29
|
+
## Icons
|
|
30
|
+
|
|
31
|
+
Bevel ships one semantic icon library from `@panphora/bevel/icons`. It has 124 public names and four source kinds:
|
|
32
|
+
|
|
33
|
+
- 69 `house` icons use the 24 by 24 Bevel grid, a 1.6px stroke, square caps and miter joins.
|
|
34
|
+
- 3 `round` heading icons use the same grid with a 1.5px stroke, round caps and round joins.
|
|
35
|
+
- 51 `phosphor` icons use the Phosphor Regular drawings selected for their contexts.
|
|
36
|
+
- 1 `mark` is the filled Hyperclay Local menu bar mark.
|
|
37
|
+
|
|
38
|
+
The first three kinds are one outline library. There is no filled icon style. The Hyperclay Local mark is the sole filled exception. Every public name resolves to one drawing, so consumers choose a semantic name rather than a source or weight. See [the icon drawing guide](ICONS.md) and the recorded choices in [DECISIONS.md](DECISIONS.md).
|
|
39
|
+
|
|
40
|
+
Import `bevelIcon` when markup is the useful output:
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import { bevelIcon } from '@panphora/bevel/icons'
|
|
44
|
+
|
|
45
|
+
const decorative = bevelIcon('check')
|
|
46
|
+
const labelled = bevelIcon('warning', { size: 20, label: 'Warning' })
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`size` defaults to 16 and sets both dimensions. Without `label`, the result is hidden from assistive technology. With `label`, it has `role="img"` and the supplied `aria-label`. Every drawing inherits `currentColor`.
|
|
50
|
+
|
|
51
|
+
The `@panphora/bevel/icons.svg` export contains one symbol per name. Copy or serve it as an asset, then reference `#bevel-icon-<name>`:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<svg width="16" height="16" aria-hidden="true" focusable="false">
|
|
55
|
+
<use href="/assets/bevel-icons.svg#bevel-icon-check"></use>
|
|
56
|
+
</svg>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
React applications get the same names and accessibility behavior from the main React entry point:
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import { Icon } from '@panphora/bevel/react'
|
|
63
|
+
|
|
64
|
+
<Icon name="check" />
|
|
65
|
+
<Icon name="warning" size={20} label="Warning" />
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The icon guard scans Bevel source, React, integrations, the showcase and built examples. `npm run check:icons` reports inline drawings that do not match the library. `npm run check` runs the same guard in strict mode and fails when it finds one.
|
|
69
|
+
|
|
70
|
+
To add an icon:
|
|
71
|
+
|
|
72
|
+
1. Choose one semantic public name and the drawing that reads best in its real context. Add a house path to `icons/house.json`, a rounded path to `icons/round.json`, or a public name to Phosphor file mapping in `icons/phosphor.json`. Product marks live in `icons/marks/` and remain exceptional.
|
|
73
|
+
2. Follow [the icon drawing guide](ICONS.md). Render the icon at its real size beside related library icons, then inspect it at 48px.
|
|
74
|
+
3. Run `npm run build:icons`. This regenerates the ESM map and helper, declarations, sprite and React component.
|
|
75
|
+
4. If the namespace changed, update the total and kind counts in `tests/icons.mjs`. If component markup changed, run `npm run build` to refresh the generated showcase and examples.
|
|
76
|
+
5. Run `npm run test:icons`, `npm run test:icon-guard`, `npm run build:check` and `npm run check`.
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
1. Bevel means pressable. Buttons, boxes, rings, thumbs, nubs, steppers and chips get the edge. Nothing else does.
|
|
81
|
+
2. Fields are flat and recessed: a hairline box on the surface, a 2px brass focus ring.
|
|
82
|
+
3. Ink acts, brass works, ox warns, teal confirms. One primary button per view.
|
|
83
|
+
4. Anything with a digit is mono. Language is sans. Headlines are the serif.
|
|
84
|
+
5. Square corners, no gradients. The radio ring is the exception.
|
|
85
|
+
6. Twenty-seven colour tokens, cream by day and navy by night, every in-between state a `color-mix()`. Dark mode is `light-dark()` on the same names; `.light` and `.dark` force any subtree.
|
|
86
|
+
7. One shadow tier.
|
|
87
|
+
8. State lives in the markup. The script mirrors live values back into attributes.
|
|
88
|
+
|
|
89
|
+
## Architecture
|
|
90
|
+
|
|
91
|
+
- Components live in `@layer components`. Any utility or unlayered rule wins with no `!important`.
|
|
92
|
+
- BEM with a `bevel-` prefix: `bevel-button`, `bevel-button__label`, `bevel-button--primary`.
|
|
93
|
+
- `bevel.js` delegates interactions on `document` and initializes authored state on load. Call `Bevel.refresh(root)` after replacing markup and `Bevel.destroy(root)` before removing active components. Repeated script inclusion is guarded. Geometry tracking runs during active overlays and pointer sessions; optional integrations manage their own observers. Custom events: `bevel:tags`, `bevel:reorder`, `bevel:tab`, `bevel:seg`, `bevel:remove`, and on the data grid `bevel:sort`, `bevel:select`, `bevel:expand`, `bevel:page`, `bevel:search`.
|
|
94
|
+
- No consumer build. Component sources generate the classic script, stylesheet and showcase with a small Node build.
|
|
95
|
+
|
|
96
|
+
## Functional API
|
|
97
|
+
|
|
98
|
+
Load `vendor/floating-ui/floating-ui.core.umd.min.js` and `vendor/floating-ui/floating-ui.dom.umd.min.js` before `bevel.js` when a page uses anchored menus, pickers or confirmations. The core has no network dependency.
|
|
99
|
+
|
|
100
|
+
`Bevel.open(element, { trigger })` and `Bevel.close(element, { reason })` coordinate native dialog and manual popover state. `Bevel.refresh(root)` reconciles restored or replaced markup. Call `Bevel.destroy(root)` before removing an active subtree. `Bevel.prepareForSave(cloneRoot)` removes temporary UI from a save clone while retaining committed values. `Bevel.notify(options)` creates a local notification. Call `Bevel.saved()` only after an application save succeeds.
|
|
101
|
+
|
|
102
|
+
New mutating components emit cancelable `bevel:beforechange`, then `bevel:change` after a commit. Application operations emit `bevel:action`. Remote grids and boards emit `bevel:request`; the application applies authoritative content and calls `Bevel.remote.resolve()` to clear pending state.
|
|
103
|
+
|
|
104
|
+
Richclay, Quickcrop and Datastar remain optional. Load their adapters from `integrations/` after `bevel.js`. The Richclay adapter exposes `Bevel.richtext.mount()` and `unmount()`. The Quickcrop adapter exposes `Bevel.crop()`. The Datastar adapter exposes `Bevel.datastar.mount()`, `unmount()`, `control()` and `state()`.
|
|
105
|
+
|
|
106
|
+
Nested Datastar registrations retain their own sessions when an outer registration unmounts. The adapter passes the remaining roots through `Bevel.destroy(root, { preserve: roots })`; those subtrees and their owned rich editors are excluded from teardown. Ordinary `Bevel.destroy(root)` still releases the entire subtree.
|
|
107
|
+
|
|
108
|
+
For Richclay, load its Squire and DOMPurify scripts followed by its `richclay.js` global build before mounting. Bevel reuses externally mounted instances and never destroys them. It owns newly created instances even when the author supplied `contenteditable`. Repeated mounts reuse the instance; unmount releases its owned editor and theme tracking. A missing peer throws and emits `bevel:error`.
|
|
109
|
+
|
|
110
|
+
Use `{ inline: true, hyperclay: false }` for an explicitly managed floating editor. Inside a native modal, use `{ inline: false, hyperclay: false, toolbarContainer }`, with the toolbar container authored inside that modal beside the draft. Richclay keeps ownership of formatting, selection and link dialogs. Its body-level floating chrome receives scoped Bevel tokens without being relocated. For mounted editors, `Bevel.prepareForSave(clone)` invokes the actual peer's `RichClay.stripFromClone(clone)` cleanup through the adapter. A host managing Richclay without the Bevel adapter should call the peer cleanup directly. The live editor remains untouched.
|
|
111
|
+
|
|
112
|
+
Inline editing keeps the committed `.bevel-inline-edit__value` separate from its draft. Put a native input or textarea inside `template[data-bevel-edit-template]`, with the class `.bevel-inline-edit__input` and its required/min/max/pattern constraints. An authored `.bevel-inline-edit__editor` contains the Save/Cancel controls and an optional `[data-bevel-edit-slot]` where Bevel inserts the temporary draft. Existing authored inputs are also supported.
|
|
113
|
+
|
|
114
|
+
`Bevel.edit.start(root)`, `commit(root)` and `cancel(root)` return whether the operation succeeded. Save emits the cancelable edit transaction before changing canonical content. Escape cancels; Enter saves a single line, while textarea and multiline rich editing use Save or Ctrl/Cmd+Enter. A root with `aria-readonly="true"` or `data-bevel-readonly` refuses editing. `[data-bevel-edit-error]` displays validation messages; an optional child `[data-bevel-error-message]` preserves authored icons around the message.
|
|
115
|
+
|
|
116
|
+
Rich mode uses `data-bevel-edit-kind="rich"` and the optional Richclay integration. Add `data-bevel-single-line` for the chosen project-name editor, and `data-bevel-placeholder` on its draft element for an empty-state hint. The adapter owns the temporary peer instance and releases it on Save, Cancel or teardown. Multiline editors inside native modals keep their toolbar inside the modal. The [inline-edit example](examples/components/inline-edit.html) loads consumer-supplied peers prepared through the [example setup](examples/README.md). Run `npm run examples:peers` in the checkout, or use `node examples/setup-peers.mjs richclay /path/to/richclay` in an extracted package. A committed edit updates the local document and does not claim a remote save.
|
|
117
|
+
|
|
118
|
+
For Quickcrop, load `integrations/quickcrop.css` with the core stylesheet and `integrations/quickcrop.js` after the core script. Import the consumer-supplied peer as an ES module before calling it:
|
|
119
|
+
|
|
120
|
+
```html
|
|
121
|
+
<script type="module">
|
|
122
|
+
import quickcrop from './vendor/quickcrop/quickcrop.js'
|
|
123
|
+
|
|
124
|
+
export async function prepareImage(file, trigger) {
|
|
125
|
+
const result = await Bevel.crop(file, { quickcrop, aspect: 1, trigger })
|
|
126
|
+
if (!result) return null
|
|
127
|
+
const data = new FormData()
|
|
128
|
+
data.append('image', result.blob, 'cropped.png')
|
|
129
|
+
return data
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Call `prepareImage` with the original selected File or Blob and its trigger element. Cancellation returns `null`, so retain that original selection. Confirmation returns actual encoded dimensions and a Blob; it does not upload the image. The native crop modal honors Bevel close vetoes and returns focus to the trigger. An opening veto rejects the promise and releases the peer. Crop chrome is transient and removed from prepared snapshots. Quickcrop currently supports pointer geometry; centered presets can be confirmed by keyboard, but arbitrary keyboard rectangle movement is not available through its peer API.
|
|
135
|
+
|
|
136
|
+
For Clay or Hyperclay snapshot cleanup, load Bevel first, then register the clone transform. This handles an already loaded host, its readiness promise, or its ready event:
|
|
137
|
+
|
|
138
|
+
```html
|
|
139
|
+
<script>
|
|
140
|
+
(() => {
|
|
141
|
+
const registered = new WeakSet()
|
|
142
|
+
const attach = (host) => {
|
|
143
|
+
if (!host || registered.has(host)) return
|
|
144
|
+
const register = host.onSnapshot || host.addDocumentTransform || host.beforeSave
|
|
145
|
+
if (typeof register !== "function") return
|
|
146
|
+
register.call(host, (clone) => Bevel.prepareForSave(clone))
|
|
147
|
+
registered.add(host)
|
|
148
|
+
}
|
|
149
|
+
for (const name of ["clay", "hyperclay"]) {
|
|
150
|
+
window.addEventListener(`${name}:ready`, () => attach(window[name]), { capture: true })
|
|
151
|
+
attach(window[name])
|
|
152
|
+
window[name]?.ready?.then(() => attach(window[name]))
|
|
153
|
+
}
|
|
154
|
+
})()
|
|
155
|
+
</script>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Install this registration once per page. Capture listeners also receive nonbubbling ready events dispatched on `document`. For a host version without ready events or a readiness promise, run the registration after awaiting its module import. Snapshot hooks clean live sync frames. The fallback transform hooks clean saved documents only. Native Reset returns controls to their currently mirrored defaults, because committed changes update the default attributes.
|
|
159
|
+
|
|
160
|
+
The [Datastar example](examples/datastar/index.html) seeds its application signals from the restored query input and hidden customer key on every cold load. The control adapter mirrors later user and signal changes into their saved attributes. Its initializer therefore remains valid after saving newer values, without serializing Datastar's entire signal store. The example also loads Floating UI for its combobox and sends the current values to a local demonstration handler.
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
node examples/datastar/server.mjs
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The example opens at `http://127.0.0.1:7384/`. Its server acknowledges requests; persistence and business operations remain the application's responsibility.
|
|
167
|
+
|
|
168
|
+
## Code and diff examples
|
|
169
|
+
|
|
170
|
+
The [code block](examples/components/code-block.html) keeps its canonical source in one `<pre><code>` node. Optional line spans carry `data-line` for decorative numbers; those numbers are excluded from copied text and use an empty CSS text alternative. `data-bevel-code-wrap` toggles the durable `data-bevel-wrap` attribute. `data-bevel-copy` sends the exact code text to the Clipboard API. Rejection exposes a focused, selectable text field. Clipboard feedback is temporary and removed on reload, prepared snapshots and destroy.
|
|
171
|
+
|
|
172
|
+
The [diff view](examples/components/diff-view.html) takes authored records from `<template data-bevel-diff-records>`. Each record has a stable `data-bevel-key`, `data-bevel-kind="same|add|remove"`, its applicable `data-bevel-old` and `data-bevel-new` line numbers, and a `<code>` child. Supplied `<mark>` spans retain word emphasis. Update the template content and call `Bevel.refresh(root)` to render new records. `data-bevel-layout="unified|split"` selects the presentation. Both layouts derive from that one template; Bevel does not calculate a text diff. Generated views can be discarded on save and rebuilt from the records.
|
|
173
|
+
|
|
174
|
+
Datastar may patch `data-bevel-wrap` and `data-bevel-layout` directly when its adapter is mounted. The adapter refreshes their derived controls without emitting a user change. Change `data-bevel-revision` after editing inert template content, or call `Bevel.refresh(root)` explicitly.
|
|
175
|
+
|
|
176
|
+
## Develop
|
|
177
|
+
|
|
178
|
+
Author components in `src/components/<name>/`. Root `index.html`, `bevel.css`, `bevel.js` and the standalone component pages are generated. See [the source guide](src/README.md) for composition, shared helpers and ownership.
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
npm install
|
|
182
|
+
npm run fonts # vendor the woff2 files out of the Fontsource packages
|
|
183
|
+
npm run check # static rules: prefix, tokens only, square, coverage, ids
|
|
184
|
+
npm run contrast # WCAG pairs in both modes
|
|
185
|
+
npm run roundtrip # playwright: change every state on the docs page, save, reload, assert
|
|
186
|
+
npm run build # generate the bundles and showcase
|
|
187
|
+
npm run dev # build, watch and serve on :7383
|
|
188
|
+
npm run preview -- modal
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
`npm test` runs the original checks plus component, adapter, HTTP/SSE and snapshot regressions. The browser tests need `npx playwright install chromium` once. Run `node tests/clay-snapshot.mjs` for the documented registration against the pinned Clay snapshot fixture; full host boot and transport coverage remains separate.
|
|
192
|
+
|
|
193
|
+
## License
|
|
194
|
+
|
|
195
|
+
MIT-0. Fonts are OFL-1.1 (see `fonts/`). The icons in `icons/svg` are Phosphor regular, MIT (see `icons/LICENSE`); they are in the repo for copying inline and are not part of the npm package.
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### Feedback and split panes
|
|
199
|
+
|
|
200
|
+
`Bevel.notify({ key, title, message, tone, action, duration })` creates a transient toast in an authored `.bevel-toasts` host, or a fixed host when none exists. `tone` is `info`, `success` or `error`. Optional `action: { id, label, icon }` emits one `bevel:action` with the toast key before dismissing. The retry action mirrors its icon; `icon: "retry"` also applies that treatment to a custom action ID. Text is inserted as text, never HTML. An authored `<template data-bevel-toast-template>` can supply the documented toast anatomy.
|
|
201
|
+
|
|
202
|
+
Timed notices pause on hover, focus and document hiding. Action and error notices persist by default; `duration: 0` keeps any notice open. Dismissal restores focus when necessary. Toasts and their timers are temporary: destroy, raw reload and prepared snapshots remove them. `Bevel.saved({ duration })` shows the small Saved chip after your application reports success. Repeated saves restart its timer. A `.bevel-action-banner` instead represents an application condition; the application owns requests and resolution, while `data-bevel-banner-dismiss` records a vetoable durable dismissal.
|
|
203
|
+
|
|
204
|
+
The [split panes](examples/components/split-panes.html) and [source/preview example](examples/components/split-panes-editor.html) use two `.bevel-split__pane` children separated by `.bevel-split__divider`. Give the separator an accessible label. `data-bevel-split="32"` stores the first pane's percentage; existing `data-bevel-ratio` markup is also supported. `data-bevel-orientation="vertical"` stacks resizable panes vertically. Optional `data-bevel-min-first` and `data-bevel-min-second` set minimum pane extents in CSS pixels, each defaulting to 180.
|
|
205
|
+
|
|
206
|
+
Pointer resizing previews the track size and commits on release. Escape, pointer cancellation, lost capture and destruction discard the preview. An authoritative external ratio cancels an older draft. Arrow keys move two percentage points, Shift moves ten, and Home/End use the current bounds. The separator exposes its orientation and numeric ARIA values. Bounds normally span 25 to 75 percent and honor physical minima; an insufficient container uses a fixed proportional allocation with scrolling inside the panes. Below 641 viewport pixels, panes stack and the separator disappears while retaining the desktop ratio. Update canonical attributes and call `Bevel.refresh(root)` after external changes; the Datastar adapter observes those attributes automatically.
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
## Grid extensions
|
|
210
|
+
|
|
211
|
+
The [filter builder](examples/components/filter-builder.html), [column manager](examples/components/column-manager.html), and [editable cells](examples/components/editable-grid-cells.html) use stable field and row keys. `data-bevel-grid` on a filter or manager names its target grid. Existing search, view filters, sorting and pagination continue to operate on the same rows.
|
|
212
|
+
|
|
213
|
+
`Bevel.filter.read(root)` returns committed `{ match, rules }`. `Bevel.filter.matches(record, expression, fields)` evaluates those rules without a DOM. A field definition supplies `id`, `label`, `type` and optional enum `{ id, label }` options. Supported types are text, number, date and enum. Dates are valid ISO calendar dates; blank or invalid numbers are not coerced to zero. Empty rules match all records. Apply validates before replacing committed rules; Cancel and a cold reload discard drafts.
|
|
214
|
+
|
|
215
|
+
Column headers own `data-bevel-column`, DOM order, `hidden`, `data-bevel-pinned` and `data-bevel-width` in CSS pixels. The manager derives its controls from those headers. `Bevel.refresh(manager)` reconciles body/footer cells, the colgroup, sticky offsets and legacy field indexes. Optional `[data-bevel-column-pin]` buttons inside manager items toggle left pinning. Required identity columns remain visible and pinned. Reordering, visibility, pinning and resizing use cancelable transactions; pointer preview does not change committed order.
|
|
216
|
+
|
|
217
|
+
Editable cells declare `data-bevel-edit="text|number|enum"`, `data-bevel-column` and canonical `data-value`. Enum cells provide `data-bevel-options` containing `{ id, label }` options. Enter or F2 starts editing; Save or Enter commits, Cancel or Escape discards, and Tab or Shift+Tab commits then moves to another visible editable cell. Validation and veto keep the draft open. The cell’s committed value remains separate from its temporary editor during snapshot cleanup.
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## Kanban state
|
|
221
|
+
|
|
222
|
+
Cards in keyed column lists own task content and order. `data-bevel-assignee`, `data-bevel-priority`, `data-bevel-due` and child `data-bevel-label` elements hold committed fields. Keyed native checkboxes in `.bevel-kanban__checklist-data` own checklist values. The inspector renders `.bevel-kanban__check-item` controls from those checkboxes; generated inspector content is temporary.
|
|
223
|
+
|
|
224
|
+
Filter selects and date inputs use `data-bevel-kanban-filter` with `assignee`, `label`, `priority`, `due-from` or `due-to`. The matching `data-bevel-filter-*` attributes on the board are committed values. Date ranges include both endpoints. Filtered boards retain full card order and expose Move controls while pointer reorder is disabled.
|
|
225
|
+
|
|
226
|
+
The shipped example fixes its demonstration date with `data-bevel-today`. Omit that attribute to compare due dates with the current local date. WIP limits use `data-bevel-wip` on a column and remain advisory. Board counts exclude archived cards. The generated inspector is rebuilt from the selected key after raw or prepared reload; unfinished task and checklist forms are discarded.
|
package/bevel-fonts.css
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* bevel-fonts.css — the kit's three families, latin subset, self-hosted.
|
|
3
|
+
* IBM Plex Sans and IBM Plex Mono (IBM, OFL-1.1), Newsreader (Production Type,
|
|
4
|
+
* OFL-1.1), via Fontsource. Regenerate the files with `npm run fonts`.
|
|
5
|
+
* The URLs are relative to this file, so it works from npm, jsDelivr and a
|
|
6
|
+
* vendored copy alike. The alternative is one Google Fonts link (README).
|
|
7
|
+
*/
|
|
8
|
+
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
|
|
9
|
+
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-italic.woff2) format("woff2"); }
|
|
10
|
+
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
|
|
11
|
+
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
|
|
12
|
+
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
|
|
13
|
+
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
|
|
14
|
+
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }
|
|
15
|
+
@font-face { font-family: Newsreader; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2-variations"); }
|
|
16
|
+
@font-face { font-family: Newsreader; font-style: italic; font-weight: 200 800; font-display: swap; src: url(fonts/newsreader-latin-opsz-italic.woff2) format("woff2-variations"); }
|