@agentage/components 0.0.0-stage → 0.21.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 +207 -2
- package/dist/components/accordion.context.d.ts +17 -0
- package/dist/components/accordion.context.d.ts.map +1 -0
- package/dist/components/accordion.context.js +14 -0
- package/dist/components/accordion.d.ts +27 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +90 -0
- package/dist/components/accordion.trigger.d.ts +11 -0
- package/dist/components/accordion.trigger.d.ts.map +1 -0
- package/dist/components/accordion.trigger.js +57 -0
- package/dist/components/action-bar.d.ts +29 -0
- package/dist/components/action-bar.d.ts.map +1 -0
- package/dist/components/action-bar.js +119 -0
- package/dist/components/action-bar.parts.d.ts +23 -0
- package/dist/components/action-bar.parts.d.ts.map +1 -0
- package/dist/components/action-bar.parts.js +117 -0
- package/dist/components/alert.d.ts +17 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +73 -0
- package/dist/components/avatar.d.ts +22 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +82 -0
- package/dist/components/badge.d.ts +20 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +32 -0
- package/dist/components/breadcrumb.d.ts +12 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +70 -0
- package/dist/components/button.d.ts +17 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -0
- package/dist/components/button.variants.d.ts +5 -0
- package/dist/components/button.variants.d.ts.map +1 -0
- package/dist/components/button.variants.js +26 -0
- package/dist/components/card-base.d.ts +10 -0
- package/dist/components/card-base.d.ts.map +1 -0
- package/dist/components/card-base.js +10 -0
- package/dist/components/card-state.d.ts +45 -0
- package/dist/components/card-state.d.ts.map +1 -0
- package/dist/components/card-state.js +137 -0
- package/dist/components/card.d.ts +25 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +62 -0
- package/dist/components/card.parts.d.ts +9 -0
- package/dist/components/card.parts.d.ts.map +1 -0
- package/dist/components/card.parts.js +37 -0
- package/dist/components/check-list.d.ts +30 -0
- package/dist/components/check-list.d.ts.map +1 -0
- package/dist/components/check-list.js +88 -0
- package/dist/components/check-list.parts.d.ts +17 -0
- package/dist/components/check-list.parts.d.ts.map +1 -0
- package/dist/components/check-list.parts.js +40 -0
- package/dist/components/checkbox.d.ts +24 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +103 -0
- package/dist/components/chip.d.ts +17 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +93 -0
- package/dist/components/code-block.d.ts +15 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +87 -0
- package/dist/components/collapsible.d.ts +27 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +81 -0
- package/dist/components/command.context.d.ts +16 -0
- package/dist/components/command.context.d.ts.map +1 -0
- package/dist/components/command.context.js +13 -0
- package/dist/components/command.d.ts +19 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +125 -0
- package/dist/components/command.parts.d.ts +18 -0
- package/dist/components/command.parts.d.ts.map +1 -0
- package/dist/components/command.parts.js +77 -0
- package/dist/components/command.variants.d.ts +6 -0
- package/dist/components/command.variants.d.ts.map +1 -0
- package/dist/components/command.variants.js +23 -0
- package/dist/components/content-block.d.ts +24 -0
- package/dist/components/content-block.d.ts.map +1 -0
- package/dist/components/content-block.diff.d.ts +26 -0
- package/dist/components/content-block.diff.d.ts.map +1 -0
- package/dist/components/content-block.diff.js +110 -0
- package/dist/components/content-block.js +61 -0
- package/dist/components/content-block.parts.d.ts +12 -0
- package/dist/components/content-block.parts.d.ts.map +1 -0
- package/dist/components/content-block.parts.js +52 -0
- package/dist/components/content-blocks.d.ts +61 -0
- package/dist/components/content-blocks.d.ts.map +1 -0
- package/dist/components/content-blocks.js +99 -0
- package/dist/components/content-blocks.meta.d.ts +21 -0
- package/dist/components/content-blocks.meta.d.ts.map +1 -0
- package/dist/components/content-blocks.meta.js +56 -0
- package/dist/components/control.variants.d.ts +10 -0
- package/dist/components/control.variants.d.ts.map +1 -0
- package/dist/components/control.variants.js +25 -0
- package/dist/components/copy-button.d.ts +15 -0
- package/dist/components/copy-button.d.ts.map +1 -0
- package/dist/components/copy-button.js +96 -0
- package/dist/components/count.d.ts +5 -0
- package/dist/components/count.d.ts.map +1 -0
- package/dist/components/count.js +12 -0
- package/dist/components/data-table.body.d.ts +36 -0
- package/dist/components/data-table.body.d.ts.map +1 -0
- package/dist/components/data-table.body.js +112 -0
- package/dist/components/data-table.d.ts +14 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.group-head.d.ts +17 -0
- package/dist/components/data-table.group-head.d.ts.map +1 -0
- package/dist/components/data-table.group-head.js +40 -0
- package/dist/components/data-table.group.d.ts +27 -0
- package/dist/components/data-table.group.d.ts.map +1 -0
- package/dist/components/data-table.group.js +32 -0
- package/dist/components/data-table.js +115 -0
- package/dist/components/data-table.menu.d.ts +12 -0
- package/dist/components/data-table.menu.d.ts.map +1 -0
- package/dist/components/data-table.menu.js +39 -0
- package/dist/components/data-table.parts.d.ts +28 -0
- package/dist/components/data-table.parts.d.ts.map +1 -0
- package/dist/components/data-table.parts.js +54 -0
- package/dist/components/data-table.selection.d.ts +27 -0
- package/dist/components/data-table.selection.d.ts.map +1 -0
- package/dist/components/data-table.selection.js +42 -0
- package/dist/components/data-table.state.d.ts +8 -0
- package/dist/components/data-table.state.d.ts.map +1 -0
- package/dist/components/data-table.state.js +11 -0
- package/dist/components/data-table.types.d.ts +71 -0
- package/dist/components/data-table.types.d.ts.map +1 -0
- package/dist/components/data-table.types.js +0 -0
- package/dist/components/data-table.variants.d.ts +22 -0
- package/dist/components/data-table.variants.d.ts.map +1 -0
- package/dist/components/data-table.variants.js +91 -0
- package/dist/components/data-tree.d.ts +20 -0
- package/dist/components/data-tree.d.ts.map +1 -0
- package/dist/components/data-tree.js +75 -0
- package/dist/components/data-tree.model.d.ts +35 -0
- package/dist/components/data-tree.model.d.ts.map +1 -0
- package/dist/components/data-tree.model.js +70 -0
- package/dist/components/data-tree.row.d.ts +23 -0
- package/dist/components/data-tree.row.d.ts.map +1 -0
- package/dist/components/data-tree.row.js +109 -0
- package/dist/components/data-view.board-card.d.ts +18 -0
- package/dist/components/data-view.board-card.d.ts.map +1 -0
- package/dist/components/data-view.board-card.js +74 -0
- package/dist/components/data-view.board-head.d.ts +14 -0
- package/dist/components/data-view.board-head.d.ts.map +1 -0
- package/dist/components/data-view.board-head.js +61 -0
- package/dist/components/data-view.board.d.ts +31 -0
- package/dist/components/data-view.board.d.ts.map +1 -0
- package/dist/components/data-view.board.js +120 -0
- package/dist/components/data-view.config.d.ts +70 -0
- package/dist/components/data-view.config.d.ts.map +1 -0
- package/dist/components/data-view.config.js +68 -0
- package/dist/components/data-view.d.ts +10 -0
- package/dist/components/data-view.d.ts.map +1 -0
- package/dist/components/data-view.hooks.d.ts +23 -0
- package/dist/components/data-view.hooks.d.ts.map +1 -0
- package/dist/components/data-view.hooks.js +104 -0
- package/dist/components/data-view.js +117 -0
- package/dist/components/data-view.parts.d.ts +22 -0
- package/dist/components/data-view.parts.d.ts.map +1 -0
- package/dist/components/data-view.parts.js +29 -0
- package/dist/components/data-view.toolbar.d.ts +34 -0
- package/dist/components/data-view.toolbar.d.ts.map +1 -0
- package/dist/components/data-view.toolbar.js +134 -0
- package/dist/components/data-view.types.d.ts +53 -0
- package/dist/components/data-view.types.d.ts.map +1 -0
- package/dist/components/data-view.types.js +0 -0
- package/dist/components/date-picker.d.ts +27 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker.js +123 -0
- package/dist/components/date-picker.range.d.ts +18 -0
- package/dist/components/date-picker.range.d.ts.map +1 -0
- package/dist/components/date-picker.range.js +97 -0
- package/dist/components/date-picker.range.parts.d.ts +12 -0
- package/dist/components/date-picker.range.parts.d.ts.map +1 -0
- package/dist/components/date-picker.range.parts.js +80 -0
- package/dist/components/description-list.d.ts +33 -0
- package/dist/components/description-list.d.ts.map +1 -0
- package/dist/components/description-list.js +75 -0
- package/dist/components/description-list.property.d.ts +25 -0
- package/dist/components/description-list.property.d.ts.map +1 -0
- package/dist/components/description-list.property.js +36 -0
- package/dist/components/description-list.variants.d.ts +8 -0
- package/dist/components/description-list.variants.d.ts.map +1 -0
- package/dist/components/description-list.variants.js +74 -0
- package/dist/components/dialog-shell.d.ts +36 -0
- package/dist/components/dialog-shell.d.ts.map +1 -0
- package/dist/components/dialog-shell.js +69 -0
- package/dist/components/dialog.confirm.d.ts +8 -0
- package/dist/components/dialog.confirm.d.ts.map +1 -0
- package/dist/components/dialog.confirm.js +91 -0
- package/dist/components/dialog.d.ts +27 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +53 -0
- package/dist/components/dialog.phrase.d.ts +9 -0
- package/dist/components/dialog.phrase.d.ts.map +1 -0
- package/dist/components/dialog.phrase.js +43 -0
- package/dist/components/dirty-bar.d.ts +30 -0
- package/dist/components/dirty-bar.d.ts.map +1 -0
- package/dist/components/dirty-bar.js +109 -0
- package/dist/components/disclosure.d.ts +24 -0
- package/dist/components/disclosure.d.ts.map +1 -0
- package/dist/components/disclosure.js +34 -0
- package/dist/components/dropdown-menu.d.ts +16 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.items.d.ts +15 -0
- package/dist/components/dropdown-menu.items.d.ts.map +1 -0
- package/dist/components/dropdown-menu.items.js +25 -0
- package/dist/components/dropdown-menu.js +80 -0
- package/dist/components/dropdown-menu.variants.d.ts +2 -0
- package/dist/components/dropdown-menu.variants.d.ts.map +1 -0
- package/dist/components/dropdown-menu.variants.js +1 -0
- package/dist/components/empty-state.d.ts +11 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +33 -0
- package/dist/components/entity-card.d.ts +34 -0
- package/dist/components/entity-card.d.ts.map +1 -0
- package/dist/components/entity-card.js +87 -0
- package/dist/components/entity-list.d.ts +30 -0
- package/dist/components/entity-list.d.ts.map +1 -0
- package/dist/components/entity-list.items.d.ts +20 -0
- package/dist/components/entity-list.items.d.ts.map +1 -0
- package/dist/components/entity-list.items.js +59 -0
- package/dist/components/entity-list.js +61 -0
- package/dist/components/entity-list.parts.d.ts +35 -0
- package/dist/components/entity-list.parts.d.ts.map +1 -0
- package/dist/components/entity-list.parts.js +86 -0
- package/dist/components/entity-list.row.d.ts +14 -0
- package/dist/components/entity-list.row.d.ts.map +1 -0
- package/dist/components/entity-list.row.js +58 -0
- package/dist/components/form-field.d.ts +13 -0
- package/dist/components/form-field.d.ts.map +1 -0
- package/dist/components/form-field.js +65 -0
- package/dist/components/form-field.live.d.ts +6 -0
- package/dist/components/form-field.live.d.ts.map +1 -0
- package/dist/components/form-field.live.js +19 -0
- package/dist/components/group-header.d.ts +23 -0
- package/dist/components/group-header.d.ts.map +1 -0
- package/dist/components/group-header.js +81 -0
- package/dist/components/highlight.d.ts +4 -0
- package/dist/components/highlight.d.ts.map +1 -0
- package/dist/components/highlight.js +14 -0
- package/dist/components/icon-button.d.ts +15 -0
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +25 -0
- package/dist/components/index.d.ts +155 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +95 -0
- package/dist/components/inline-edit.d.ts +24 -0
- package/dist/components/inline-edit.d.ts.map +1 -0
- package/dist/components/inline-edit.js +68 -0
- package/dist/components/input.d.ts +35 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +101 -0
- package/dist/components/kbd.d.ts +5 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +12 -0
- package/dist/components/label.d.ts +5 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +16 -0
- package/dist/components/list-toolbar.d.ts +37 -0
- package/dist/components/list-toolbar.d.ts.map +1 -0
- package/dist/components/list-toolbar.filter.d.ts +13 -0
- package/dist/components/list-toolbar.filter.d.ts.map +1 -0
- package/dist/components/list-toolbar.filter.js +65 -0
- package/dist/components/list-toolbar.fit.d.ts +24 -0
- package/dist/components/list-toolbar.fit.d.ts.map +1 -0
- package/dist/components/list-toolbar.fit.js +69 -0
- package/dist/components/list-toolbar.icons.d.ts +10 -0
- package/dist/components/list-toolbar.icons.d.ts.map +1 -0
- package/dist/components/list-toolbar.icons.js +21 -0
- package/dist/components/list-toolbar.js +68 -0
- package/dist/components/list-toolbar.menus.d.ts +26 -0
- package/dist/components/list-toolbar.menus.d.ts.map +1 -0
- package/dist/components/list-toolbar.menus.js +98 -0
- package/dist/components/list-toolbar.parts.d.ts +25 -0
- package/dist/components/list-toolbar.parts.d.ts.map +1 -0
- package/dist/components/list-toolbar.parts.js +72 -0
- package/dist/components/list-toolbar.search.d.ts +8 -0
- package/dist/components/list-toolbar.search.d.ts.map +1 -0
- package/dist/components/list-toolbar.search.js +54 -0
- package/dist/components/list-toolbar.variants.d.ts +11 -0
- package/dist/components/list-toolbar.variants.d.ts.map +1 -0
- package/dist/components/list-toolbar.variants.js +9 -0
- package/dist/components/log-view.d.ts +25 -0
- package/dist/components/log-view.d.ts.map +1 -0
- package/dist/components/log-view.hooks.d.ts +40 -0
- package/dist/components/log-view.hooks.d.ts.map +1 -0
- package/dist/components/log-view.hooks.js +87 -0
- package/dist/components/log-view.js +110 -0
- package/dist/components/log-view.model.d.ts +35 -0
- package/dist/components/log-view.model.d.ts.map +1 -0
- package/dist/components/log-view.model.js +56 -0
- package/dist/components/log-view.row.d.ts +31 -0
- package/dist/components/log-view.row.d.ts.map +1 -0
- package/dist/components/log-view.row.js +127 -0
- package/dist/components/menu.parts.d.ts +26 -0
- package/dist/components/menu.parts.d.ts.map +1 -0
- package/dist/components/menu.parts.js +59 -0
- package/dist/components/menu.selectable.d.ts +24 -0
- package/dist/components/menu.selectable.d.ts.map +1 -0
- package/dist/components/menu.selectable.js +66 -0
- package/dist/components/menu.variants.d.ts +9 -0
- package/dist/components/menu.variants.d.ts.map +1 -0
- package/dist/components/menu.variants.js +16 -0
- package/dist/components/nav-tree.d.ts +22 -0
- package/dist/components/nav-tree.d.ts.map +1 -0
- package/dist/components/nav-tree.js +95 -0
- package/dist/components/nav-tree.variants.d.ts +13 -0
- package/dist/components/nav-tree.variants.d.ts.map +1 -0
- package/dist/components/nav-tree.variants.js +9 -0
- package/dist/components/page-header.d.ts +34 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/page-header.js +115 -0
- package/dist/components/pagination.d.ts +13 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +114 -0
- package/dist/components/popover.d.ts +18 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +64 -0
- package/dist/components/priority-glyph.d.ts +11 -0
- package/dist/components/priority-glyph.d.ts.map +1 -0
- package/dist/components/priority-glyph.js +75 -0
- package/dist/components/progress.d.ts +30 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +87 -0
- package/dist/components/progress.meter.d.ts +36 -0
- package/dist/components/progress.meter.d.ts.map +1 -0
- package/dist/components/progress.meter.js +64 -0
- package/dist/components/progress.segments.d.ts +28 -0
- package/dist/components/progress.segments.d.ts.map +1 -0
- package/dist/components/progress.segments.js +59 -0
- package/dist/components/property-date.d.ts +11 -0
- package/dist/components/property-date.d.ts.map +1 -0
- package/dist/components/property-date.format.d.ts +3 -0
- package/dist/components/property-date.format.d.ts.map +1 -0
- package/dist/components/property-date.format.js +7 -0
- package/dist/components/property-date.js +142 -0
- package/dist/components/property-select.d.ts +28 -0
- package/dist/components/property-select.d.ts.map +1 -0
- package/dist/components/property-select.js +68 -0
- package/dist/components/prose.d.ts +6 -0
- package/dist/components/prose.d.ts.map +1 -0
- package/dist/components/prose.js +13 -0
- package/dist/components/radio-group.d.ts +23 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +116 -0
- package/dist/components/relative-time.d.ts +12 -0
- package/dist/components/relative-time.d.ts.map +1 -0
- package/dist/components/relative-time.js +30 -0
- package/dist/components/resizable-split-prepaint.d.ts +12 -0
- package/dist/components/resizable-split-prepaint.d.ts.map +1 -0
- package/dist/components/resizable-split-prepaint.js +5 -0
- package/dist/components/resizable-split.context.d.ts +11 -0
- package/dist/components/resizable-split.context.d.ts.map +1 -0
- package/dist/components/resizable-split.context.js +9 -0
- package/dist/components/resizable-split.d.ts +30 -0
- package/dist/components/resizable-split.d.ts.map +1 -0
- package/dist/components/resizable-split.js +85 -0
- package/dist/components/resizable.d.ts +21 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +90 -0
- package/dist/components/resizable.model.d.ts +18 -0
- package/dist/components/resizable.model.d.ts.map +1 -0
- package/dist/components/resizable.model.js +11 -0
- package/dist/components/resizable.parts.d.ts +20 -0
- package/dist/components/resizable.parts.d.ts.map +1 -0
- package/dist/components/resizable.parts.js +36 -0
- package/dist/components/resizable.variants.d.ts +16 -0
- package/dist/components/resizable.variants.d.ts.map +1 -0
- package/dist/components/resizable.variants.js +41 -0
- package/dist/components/row.variants.d.ts +10 -0
- package/dist/components/row.variants.d.ts.map +1 -0
- package/dist/components/row.variants.js +36 -0
- package/dist/components/secret-input.d.ts +20 -0
- package/dist/components/secret-input.d.ts.map +1 -0
- package/dist/components/secret-input.js +94 -0
- package/dist/components/section-index.d.ts +23 -0
- package/dist/components/section-index.d.ts.map +1 -0
- package/dist/components/section-index.js +51 -0
- package/dist/components/section.d.ts +19 -0
- package/dist/components/section.d.ts.map +1 -0
- package/dist/components/section.js +42 -0
- package/dist/components/select.d.ts +28 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +120 -0
- package/dist/components/select.keys.d.ts +6 -0
- package/dist/components/select.keys.d.ts.map +1 -0
- package/dist/components/select.keys.js +20 -0
- package/dist/components/select.list.d.ts +26 -0
- package/dist/components/select.list.d.ts.map +1 -0
- package/dist/components/select.list.js +50 -0
- package/dist/components/select.parts.d.ts +53 -0
- package/dist/components/select.parts.d.ts.map +1 -0
- package/dist/components/select.parts.js +95 -0
- package/dist/components/select.variants.d.ts +13 -0
- package/dist/components/select.variants.d.ts.map +1 -0
- package/dist/components/select.variants.js +54 -0
- package/dist/components/sheet.d.ts +27 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.docked.d.ts +8 -0
- package/dist/components/sheet.docked.d.ts.map +1 -0
- package/dist/components/sheet.docked.js +106 -0
- package/dist/components/sheet.js +61 -0
- package/dist/components/sheet.narrow.d.ts +3 -0
- package/dist/components/sheet.narrow.d.ts.map +1 -0
- package/dist/components/sheet.narrow.js +9 -0
- package/dist/components/sidebar.d.ts +14 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +48 -0
- package/dist/components/skeleton.d.ts +10 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +21 -0
- package/dist/components/sparkline.d.ts +26 -0
- package/dist/components/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline.js +83 -0
- package/dist/components/spinner.d.ts +10 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +38 -0
- package/dist/components/stat-card.d.ts +9 -0
- package/dist/components/stat-card.d.ts.map +1 -0
- package/dist/components/stat-card.header.d.ts +19 -0
- package/dist/components/stat-card.header.d.ts.map +1 -0
- package/dist/components/stat-card.header.js +43 -0
- package/dist/components/stat-card.js +84 -0
- package/dist/components/stat-card.parts.d.ts +10 -0
- package/dist/components/stat-card.parts.d.ts.map +1 -0
- package/dist/components/stat-card.parts.js +35 -0
- package/dist/components/stat-card.state.d.ts +9 -0
- package/dist/components/stat-card.state.d.ts.map +1 -0
- package/dist/components/stat-card.state.js +51 -0
- package/dist/components/stat-card.types.d.ts +28 -0
- package/dist/components/stat-card.types.d.ts.map +1 -0
- package/dist/components/stat-card.types.js +0 -0
- package/dist/components/status-bar.d.ts +32 -0
- package/dist/components/status-bar.d.ts.map +1 -0
- package/dist/components/status-bar.js +114 -0
- package/dist/components/status-bar.variants.d.ts +12 -0
- package/dist/components/status-bar.variants.d.ts.map +1 -0
- package/dist/components/status-bar.variants.js +63 -0
- package/dist/components/status-glyph.d.ts +15 -0
- package/dist/components/status-glyph.d.ts.map +1 -0
- package/dist/components/status-glyph.js +118 -0
- package/dist/components/status-glyph.status.d.ts +11 -0
- package/dist/components/status-glyph.status.d.ts.map +1 -0
- package/dist/components/status-glyph.status.js +33 -0
- package/dist/components/step-list.d.ts +28 -0
- package/dist/components/step-list.d.ts.map +1 -0
- package/dist/components/step-list.js +70 -0
- package/dist/components/step-list.parts.d.ts +34 -0
- package/dist/components/step-list.parts.d.ts.map +1 -0
- package/dist/components/step-list.parts.js +74 -0
- package/dist/components/switch.d.ts +22 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +93 -0
- package/dist/components/table.d.ts +19 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +73 -0
- package/dist/components/tabs.context.d.ts +19 -0
- package/dist/components/tabs.context.d.ts.map +1 -0
- package/dist/components/tabs.context.js +15 -0
- package/dist/components/tabs.d.ts +23 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +61 -0
- package/dist/components/tabs.trigger.d.ts +12 -0
- package/dist/components/tabs.trigger.d.ts.map +1 -0
- package/dist/components/tabs.trigger.js +69 -0
- package/dist/components/tabs.variants.d.ts +10 -0
- package/dist/components/tabs.variants.d.ts.map +1 -0
- package/dist/components/tabs.variants.js +33 -0
- package/dist/components/toast.d.ts +21 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/toast.js +125 -0
- package/dist/components/toggle-group.d.ts +36 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +68 -0
- package/dist/components/toggle-group.variants.d.ts +13 -0
- package/dist/components/toggle-group.variants.d.ts.map +1 -0
- package/dist/components/toggle-group.variants.js +71 -0
- package/dist/components/tooltip.d.ts +10 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +49 -0
- package/dist/components/tree-select.d.ts +26 -0
- package/dist/components/tree-select.d.ts.map +1 -0
- package/dist/components/tree-select.js +102 -0
- package/dist/components/tree-select.model.d.ts +30 -0
- package/dist/components/tree-select.model.d.ts.map +1 -0
- package/dist/components/tree-select.model.js +33 -0
- package/dist/components/tree-select.rows.d.ts +18 -0
- package/dist/components/tree-select.rows.d.ts.map +1 -0
- package/dist/components/tree-select.rows.js +39 -0
- package/dist/components/truncate.d.ts +9 -0
- package/dist/components/truncate.d.ts.map +1 -0
- package/dist/components/truncate.js +31 -0
- package/dist/components/use-split-state.d.ts +17 -0
- package/dist/components/use-split-state.d.ts.map +1 -0
- package/dist/components/use-split-state.js +51 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/lib/aria.d.ts +4 -0
- package/dist/lib/aria.d.ts.map +1 -0
- package/dist/lib/aria.js +4 -0
- package/dist/lib/copy-text.d.ts +3 -0
- package/dist/lib/copy-text.d.ts.map +1 -0
- package/dist/lib/copy-text.js +20 -0
- package/dist/lib/cron.d.ts +13 -0
- package/dist/lib/cron.d.ts.map +1 -0
- package/dist/lib/cron.js +131 -0
- package/dist/lib/cron.next.d.ts +9 -0
- package/dist/lib/cron.next.d.ts.map +1 -0
- package/dist/lib/cron.next.js +49 -0
- package/dist/lib/cron.text.d.ts +3 -0
- package/dist/lib/cron.text.d.ts.map +1 -0
- package/dist/lib/cron.text.js +61 -0
- package/dist/lib/drag-reorder.d.ts +33 -0
- package/dist/lib/drag-reorder.d.ts.map +1 -0
- package/dist/lib/drag-reorder.js +61 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/list-controls-storage.d.ts +7 -0
- package/dist/lib/list-controls-storage.d.ts.map +1 -0
- package/dist/lib/list-controls-storage.js +25 -0
- package/dist/lib/list-controls.d.ts +49 -0
- package/dist/lib/list-controls.d.ts.map +1 -0
- package/dist/lib/list-controls.js +44 -0
- package/dist/lib/list-navigation.d.ts +3 -0
- package/dist/lib/list-navigation.d.ts.map +1 -0
- package/dist/lib/list-navigation.js +7 -0
- package/dist/lib/overlay-layer.d.ts +32 -0
- package/dist/lib/overlay-layer.d.ts.map +1 -0
- package/dist/lib/overlay-layer.js +37 -0
- package/dist/lib/panel-sizes.d.ts +18 -0
- package/dist/lib/panel-sizes.d.ts.map +1 -0
- package/dist/lib/panel-sizes.js +25 -0
- package/dist/lib/relative-range.d.ts +23 -0
- package/dist/lib/relative-range.d.ts.map +1 -0
- package/dist/lib/relative-range.js +130 -0
- package/dist/lib/relative-time-format.d.ts +6 -0
- package/dist/lib/relative-time-format.d.ts.map +1 -0
- package/dist/lib/relative-time-format.js +21 -0
- package/dist/lib/split-px.d.ts +23 -0
- package/dist/lib/split-px.d.ts.map +1 -0
- package/dist/lib/split-px.js +30 -0
- package/dist/lib/table-sort.d.ts +11 -0
- package/dist/lib/table-sort.d.ts.map +1 -0
- package/dist/lib/table-sort.js +17 -0
- package/dist/lib/usage-level.d.ts +13 -0
- package/dist/lib/usage-level.d.ts.map +1 -0
- package/dist/lib/usage-level.js +12 -0
- package/dist/lib/use-anchor-position.d.ts +22 -0
- package/dist/lib/use-anchor-position.d.ts.map +1 -0
- package/dist/lib/use-anchor-position.js +41 -0
- package/dist/lib/use-announce.d.ts +6 -0
- package/dist/lib/use-announce.d.ts.map +1 -0
- package/dist/lib/use-announce.js +20 -0
- package/dist/lib/use-cell-stack.d.ts +8 -0
- package/dist/lib/use-cell-stack.d.ts.map +1 -0
- package/dist/lib/use-cell-stack.js +23 -0
- package/dist/lib/use-controlled.d.ts +8 -0
- package/dist/lib/use-controlled.d.ts.map +1 -0
- package/dist/lib/use-controlled.js +22 -0
- package/dist/lib/use-drag-reorder.d.ts +28 -0
- package/dist/lib/use-drag-reorder.d.ts.map +1 -0
- package/dist/lib/use-drag-reorder.js +100 -0
- package/dist/lib/use-flip.d.ts +8 -0
- package/dist/lib/use-flip.d.ts.map +1 -0
- package/dist/lib/use-flip.js +28 -0
- package/dist/lib/use-focus-origin.d.ts +9 -0
- package/dist/lib/use-focus-origin.d.ts.map +1 -0
- package/dist/lib/use-focus-origin.js +15 -0
- package/dist/lib/use-focus-restore.d.ts +7 -0
- package/dist/lib/use-focus-restore.d.ts.map +1 -0
- package/dist/lib/use-focus-restore.js +15 -0
- package/dist/lib/use-focus-trap.d.ts +5 -0
- package/dist/lib/use-focus-trap.d.ts.map +1 -0
- package/dist/lib/use-focus-trap.js +32 -0
- package/dist/lib/use-keep-focus.d.ts +4 -0
- package/dist/lib/use-keep-focus.d.ts.map +1 -0
- package/dist/lib/use-keep-focus.js +20 -0
- package/dist/lib/use-list-controls.d.ts +28 -0
- package/dist/lib/use-list-controls.d.ts.map +1 -0
- package/dist/lib/use-list-controls.js +72 -0
- package/dist/lib/use-mounted.d.ts +3 -0
- package/dist/lib/use-mounted.d.ts.map +1 -0
- package/dist/lib/use-mounted.js +8 -0
- package/dist/lib/use-persisted-state.d.ts +21 -0
- package/dist/lib/use-persisted-state.d.ts.map +1 -0
- package/dist/lib/use-persisted-state.js +52 -0
- package/dist/lib/use-roving-focus.d.ts +14 -0
- package/dist/lib/use-roving-focus.d.ts.map +1 -0
- package/dist/lib/use-roving-focus.js +36 -0
- package/dist/lib/use-scroll-lock.d.ts +6 -0
- package/dist/lib/use-scroll-lock.d.ts.map +1 -0
- package/dist/lib/use-scroll-lock.js +23 -0
- package/dist/lib/use-scroll-spy.d.ts +12 -0
- package/dist/lib/use-scroll-spy.d.ts.map +1 -0
- package/dist/lib/use-scroll-spy.js +34 -0
- package/dist/lib/utils.d.ts +12 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/package.json +457 -4
- package/src/styles/base.css +98 -0
- package/src/styles/primitives.css +143 -0
- package/src/styles/theme.css +10 -0
- package/src/styles/tokens.css +344 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Chip as t } from "./chip.js";
|
|
4
|
+
import { ListToolbarIcons as n } from "./list-toolbar.icons.js";
|
|
5
|
+
import { activeFilterChipVariants as r, activeFiltersVariants as i } from "./list-toolbar.variants.js";
|
|
6
|
+
import { ToggleGroup as a } from "./toggle-group.js";
|
|
7
|
+
import * as o from "react";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
// src/components/list-toolbar.parts.tsx
|
|
10
|
+
var l = (e, t) => {
|
|
11
|
+
o.useLayoutEffect(() => {
|
|
12
|
+
let t = e.current;
|
|
13
|
+
if (!t) return;
|
|
14
|
+
let n = () => {
|
|
15
|
+
t.dataset.overflow = String(t.scrollWidth > t.clientWidth + 1);
|
|
16
|
+
};
|
|
17
|
+
if (n(), typeof ResizeObserver > "u") return;
|
|
18
|
+
let r = new ResizeObserver(n);
|
|
19
|
+
return r.observe(t), () => r.disconnect();
|
|
20
|
+
}, [e, t]);
|
|
21
|
+
}, u = o.forwardRef(({ groups: n, value: a, onRemove: u, className: d, ...f }, p) => {
|
|
22
|
+
let m = o.useRef(null);
|
|
23
|
+
o.useImperativeHandle(p, () => m.current);
|
|
24
|
+
let h = n.flatMap((e) => e.options.filter((t) => a[e.id]?.includes(t.value)).map((t) => ({
|
|
25
|
+
group: e,
|
|
26
|
+
option: t
|
|
27
|
+
})));
|
|
28
|
+
return l(m, h.length), /* @__PURE__ */ s("div", {
|
|
29
|
+
ref: m,
|
|
30
|
+
className: e(i(), d),
|
|
31
|
+
"data-slot": "active-filters",
|
|
32
|
+
"data-fit-hide": "search",
|
|
33
|
+
...f,
|
|
34
|
+
children: h.map(({ group: e, option: n }) => /* @__PURE__ */ c(t, {
|
|
35
|
+
size: "sm",
|
|
36
|
+
className: r(),
|
|
37
|
+
onRemove: () => u(e.id, n.value),
|
|
38
|
+
removeLabel: `Remove filter ${e.label}: ${n.label}`,
|
|
39
|
+
children: [
|
|
40
|
+
e.label,
|
|
41
|
+
": ",
|
|
42
|
+
n.label
|
|
43
|
+
]
|
|
44
|
+
}, `${e.id}:${n.value}`))
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
u.displayName = "ActiveFilters";
|
|
48
|
+
var d = {
|
|
49
|
+
...n,
|
|
50
|
+
table: n.list
|
|
51
|
+
}, f = [{
|
|
52
|
+
value: "list",
|
|
53
|
+
label: "List view"
|
|
54
|
+
}, {
|
|
55
|
+
value: "cards",
|
|
56
|
+
label: "Cards view"
|
|
57
|
+
}], p = o.forwardRef(({ value: t, onValueChange: n, options: r = f, "aria-label": i = "View", className: o }, c) => /* @__PURE__ */ s(a, {
|
|
58
|
+
ref: c,
|
|
59
|
+
variant: "segmented",
|
|
60
|
+
value: t,
|
|
61
|
+
onValueChange: n,
|
|
62
|
+
"aria-label": i,
|
|
63
|
+
className: e("flex-none", o),
|
|
64
|
+
"data-slot": "view-switch",
|
|
65
|
+
options: r.map((e) => ({
|
|
66
|
+
...e,
|
|
67
|
+
icon: e.icon ?? d[e.value],
|
|
68
|
+
iconOnly: !0
|
|
69
|
+
}))
|
|
70
|
+
}));
|
|
71
|
+
p.displayName = "ViewSwitch";
|
|
72
|
+
export { u as ActiveFilters, p as ViewSwitch };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ToolbarSearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
|
|
3
|
+
value: string;
|
|
4
|
+
onValueChange: (value: string) => void;
|
|
5
|
+
}
|
|
6
|
+
/** Filter by name. Escape clears a non-empty query; in a narrow toolbar it folds to a button. */
|
|
7
|
+
export declare const ToolbarSearch: React.ForwardRefExoticComponent<ToolbarSearchProps & React.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
//# sourceMappingURL=list-toolbar.search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-toolbar.search.d.ts","sourceRoot":"","sources":["../../src/components/list-toolbar.search.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAC9C,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,OAAO,GAAG,UAAU,CACrB;IACC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC;AAUD,iGAAiG;AACjG,eAAO,MAAM,aAAa,6FA6EzB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { ToolbarFitContext as t } from "./list-toolbar.fit.js";
|
|
4
|
+
import { ListToolbarIcons as n } from "./list-toolbar.icons.js";
|
|
5
|
+
import { toolbarIconButtonVariants as r, toolbarSearchVariants as i } from "./list-toolbar.variants.js";
|
|
6
|
+
import * as a from "react";
|
|
7
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
// src/components/list-toolbar.search.tsx
|
|
9
|
+
var l = [
|
|
10
|
+
"group-data-[fit-search]/list-toolbar:absolute group-data-[fit-search]/list-toolbar:inset-0",
|
|
11
|
+
"group-data-[fit-search]/list-toolbar:z-10 group-data-[fit-search]/list-toolbar:flex",
|
|
12
|
+
"group-data-[fit-search]/list-toolbar:items-center group-data-[fit-search]/list-toolbar:px-4",
|
|
13
|
+
"group-data-[fit-search]/list-toolbar:bg-background"
|
|
14
|
+
], u = a.forwardRef(({ value: u, onValueChange: d, className: f, onKeyDown: p, onBlur: m, placeholder: h = "Search", ...g }, _) => {
|
|
15
|
+
let v = a.useContext(t), [y, b] = a.useState(!1), x = a.useRef(null), S = a.useRef(null), C = a.useRef(!1);
|
|
16
|
+
a.useImperativeHandle(_, () => x.current), a.useLayoutEffect(() => {
|
|
17
|
+
y ? x.current?.focus() : C.current && S.current?.focus(), C.current = !1;
|
|
18
|
+
}, [y]);
|
|
19
|
+
let w = g["aria-label"] ?? h, T = /* @__PURE__ */ s("input", {
|
|
20
|
+
ref: x,
|
|
21
|
+
type: "search",
|
|
22
|
+
autoComplete: "off",
|
|
23
|
+
"aria-label": w,
|
|
24
|
+
placeholder: h,
|
|
25
|
+
value: u,
|
|
26
|
+
onChange: (e) => d(e.target.value),
|
|
27
|
+
onKeyDown: (e) => {
|
|
28
|
+
p?.(e), e.key === "Escape" && (u || y) && (e.stopPropagation(), u ? d("") : (C.current = !0, b(!1)));
|
|
29
|
+
},
|
|
30
|
+
onBlur: (e) => {
|
|
31
|
+
m?.(e), b(!1);
|
|
32
|
+
},
|
|
33
|
+
className: e(i(), v && "group-data-[fit-search]/list-toolbar:max-w-none", f),
|
|
34
|
+
"data-slot": "toolbar-search",
|
|
35
|
+
...g
|
|
36
|
+
});
|
|
37
|
+
return v ? /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("button", {
|
|
38
|
+
ref: S,
|
|
39
|
+
type: "button",
|
|
40
|
+
"aria-label": u ? `${w}: ${u}` : w,
|
|
41
|
+
title: u ? `${w}: ${u}` : w,
|
|
42
|
+
"aria-expanded": y,
|
|
43
|
+
onClick: () => b(!0),
|
|
44
|
+
className: e(r(), "hidden flex-none group-data-[fit-search]/list-toolbar:inline-flex", u && "bg-accent text-foreground"),
|
|
45
|
+
"data-fit-show": "search",
|
|
46
|
+
"data-slot": "toolbar-search-toggle",
|
|
47
|
+
children: n.search
|
|
48
|
+
}), /* @__PURE__ */ s("span", {
|
|
49
|
+
className: e("contents", y ? l : "group-data-[fit-search]/list-toolbar:hidden"),
|
|
50
|
+
children: T
|
|
51
|
+
})] }) : T;
|
|
52
|
+
});
|
|
53
|
+
u.displayName = "ToolbarSearch";
|
|
54
|
+
export { u as ToolbarSearch };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** One 45 px row that never wraps: the search shrinks, the chips scroll, then fit steps apply. */
|
|
2
|
+
export declare const listToolbarVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
3
|
+
export declare const toolbarSearchVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
4
|
+
/** 28 px bordered text button, for example Filter. */
|
|
5
|
+
export declare const toolbarButtonVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
6
|
+
/** 28 px square icon button, for example Display options. */
|
|
7
|
+
export declare const toolbarIconButtonVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
8
|
+
/** Chips row: scrolls without a scrollbar, fades its right edge while it overflows; folds with the search (the Filter badge keeps the count). */
|
|
9
|
+
export declare const activeFiltersVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
10
|
+
export declare const activeFilterChipVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
11
|
+
//# sourceMappingURL=list-toolbar.variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-toolbar.variants.d.ts","sourceRoot":"","sources":["../../src/components/list-toolbar.variants.ts"],"names":[],"mappings":"AAIA,kGAAkG;AAClG,eAAO,MAAM,mBAAmB,oFAE/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,oFAIhC,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,oFAGhC,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,yBAAyB,oFAGpC,CAAC;AAEH,iJAAiJ;AACjJ,eAAO,MAAM,qBAAqB,oFAGhC,CAAC;AAEH,eAAO,MAAM,wBAAwB,oFAEpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { controlVariants as e, fieldVariants as t } from "./control.variants.js";
|
|
2
|
+
import { cva as n } from "class-variance-authority";
|
|
3
|
+
// src/components/list-toolbar.variants.ts
|
|
4
|
+
var r = n("group/list-toolbar relative flex h-[45px] min-w-0 flex-none flex-nowrap items-center gap-2 border-b border-border px-4 py-2"), i = n([
|
|
5
|
+
t(),
|
|
6
|
+
"h-7 w-auto min-w-[72px] max-w-[340px] flex-[1_1_160px] bg-card text-foreground",
|
|
7
|
+
"[&::-webkit-search-cancel-button]:hidden"
|
|
8
|
+
]), a = n([e(), "border border-border font-medium text-foreground transition-colors duration-fast hover:bg-accent aria-expanded:bg-accent focus-ring"]), o = n([e(), "w-7 px-0 text-muted-foreground transition-colors duration-fast hover:bg-accent hover:text-foreground aria-expanded:bg-accent aria-expanded:text-foreground focus-ring"]), s = n(["flex min-w-0 flex-[0_1_auto] flex-nowrap items-center gap-1.5 overflow-x-auto py-1 empty:hidden group-data-[fit-search]/list-toolbar:hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", "data-[overflow=true]:pr-6 data-[overflow=true]:[mask-image:linear-gradient(90deg,black_calc(100%-28px),transparent)]"]), c = n("flex-none border-muted-foreground text-foreground hover:border-primary");
|
|
9
|
+
export { c as activeFilterChipVariants, s as activeFiltersVariants, r as listToolbarVariants, a as toolbarButtonVariants, o as toolbarIconButtonVariants, i as toolbarSearchVariants };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LogLine } from './log-view.model.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type { LogLevel, LogLine } from './log-view.model.js';
|
|
4
|
+
export interface LogViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onScroll'> {
|
|
5
|
+
/** Oldest first. Keep ids stable so lines update in place; a capped buffer is fine. */
|
|
6
|
+
lines: LogLine[];
|
|
7
|
+
/** Levels to show; all by default. */
|
|
8
|
+
filter?: string[];
|
|
9
|
+
/** Marks this text in every line. */
|
|
10
|
+
highlight?: string;
|
|
11
|
+
/** Long lines wrap instead of cutting. Turns windowing off, so keep wrapped logs to a few thousand lines. */
|
|
12
|
+
wrap?: boolean;
|
|
13
|
+
showTime?: 'absolute' | 'relative' | false;
|
|
14
|
+
/** Live tail: stays at the bottom while lines arrive. Pair with `onFollowChange`. */
|
|
15
|
+
follow?: boolean;
|
|
16
|
+
onFollowChange?: (follow: boolean) => void;
|
|
17
|
+
/** Called when a line is picked by click or Enter. */
|
|
18
|
+
onLineOpen?: (line: LogLine) => void;
|
|
19
|
+
/** Lines with `fields` open a DataTree below them. Default true. */
|
|
20
|
+
expandable?: boolean;
|
|
21
|
+
'aria-label'?: string;
|
|
22
|
+
}
|
|
23
|
+
/** A windowed, keyboard-driven log with levels, live tail and expandable structured lines. */
|
|
24
|
+
export declare const LogView: React.ForwardRefExoticComponent<LogViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
//# sourceMappingURL=log-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-view.d.ts","sourceRoot":"","sources":["../../src/components/log-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAKL,KAAK,OAAO,EACb,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC1F,uFAAuF;IACvF,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6GAA6G;IAC7G,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;IAC3C,qFAAqF;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sDAAsD;IACtD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,8FAA8F;AAC9F,eAAO,MAAM,OAAO,qFAgJlB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { LogLine } from './log-view.model.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface FollowOptions {
|
|
4
|
+
follow?: boolean;
|
|
5
|
+
onFollowChange?: (follow: boolean) => void;
|
|
6
|
+
/** Every line, before the filter: the new count survives a filter change and a capped buffer. */
|
|
7
|
+
lines: LogLine[];
|
|
8
|
+
passes: (line: LogLine) => boolean;
|
|
9
|
+
shown: LogLine[];
|
|
10
|
+
offsets: number[];
|
|
11
|
+
/** Keeps the top line in place while paused; off in wrap mode, where offsets are guesses. */
|
|
12
|
+
anchor: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Live tail: follows the bottom, pauses on scroll up and counts lines after the last one seen. */
|
|
15
|
+
export declare const useFollow: (o: FollowOptions) => {
|
|
16
|
+
scroller: React.RefObject<HTMLDivElement | null>;
|
|
17
|
+
following: boolean;
|
|
18
|
+
newCount: number;
|
|
19
|
+
scrollTop: number;
|
|
20
|
+
onScroll: () => void;
|
|
21
|
+
jumpToEnd: () => void;
|
|
22
|
+
reveal: (y: number, h: number) => void;
|
|
23
|
+
};
|
|
24
|
+
/** Ids of the open lines, with a setter that keeps the same set when nothing changes. */
|
|
25
|
+
export declare const useOpenSet: () => readonly [Set<string>, (id: string, want: boolean) => void];
|
|
26
|
+
/** Client height of the scroller, kept current with a ResizeObserver. */
|
|
27
|
+
export declare const useViewHeight: (scroller: React.RefObject<HTMLDivElement | null>, fallback: number) => number;
|
|
28
|
+
export interface LogKeysOptions {
|
|
29
|
+
shown: LogLine[];
|
|
30
|
+
activeIndex: number;
|
|
31
|
+
isOpen: (line: LogLine) => boolean;
|
|
32
|
+
canOpen: (line: LogLine) => boolean;
|
|
33
|
+
setOpen: (id: string, open: boolean) => void;
|
|
34
|
+
pick: (line: LogLine) => void;
|
|
35
|
+
move: (index: number) => void;
|
|
36
|
+
jumpToEnd: () => void;
|
|
37
|
+
}
|
|
38
|
+
/** Grid keys: Up, Down, Home, End move; Enter picks; Right and Left open and close; Ctrl+C copies. */
|
|
39
|
+
export declare const useLogKeys: (o: LogKeysOptions) => (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
40
|
+
//# sourceMappingURL=log-view.hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-view.hooks.d.ts","sourceRoot":"","sources":["../../src/components/log-view.hooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAA6C,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3F,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,iGAAiG;IACjG,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACnC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6FAA6F;IAC7F,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,mGAAmG;AACnG,eAAO,MAAM,SAAS,GAAI,GAAG,aAAa;;;;;oBAwCnB,IAAI;qBAYH,IAAI;gBAOP,MAAM,KAAK,MAAM,KAAG,IAAI;CAQ5C,CAAC;AAEF,yFAAyF;AACzF,eAAO,MAAM,UAAU,oCAEkB,MAAM,QAAQ,OAAO,KAAG,IAAI,CAUpE,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,aAAa,GACxB,UAAU,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAChD,UAAU,MAAM,KACf,MAUF,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9B,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,sGAAsG;AACtG,eAAO,MAAM,UAAU,GAAI,GAAG,cAAc,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,SAyBvF,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { copyText as e } from "../lib/copy-text.js";
|
|
3
|
+
import { useControlled as t } from "../lib/use-controlled.js";
|
|
4
|
+
import { isCopyKey as n } from "./data-tree.row.js";
|
|
5
|
+
import { countAfter as r, indexAt as i, isAtBottom as a, lineText as o } from "./log-view.model.js";
|
|
6
|
+
import * as s from "react";
|
|
7
|
+
// src/components/log-view.hooks.ts
|
|
8
|
+
var c = (e) => {
|
|
9
|
+
let [n, o] = t(e.follow, !1, e.onFollowChange), { lines: c, passes: l, shown: u, offsets: d } = e, f = c.length > 0 ? c[c.length - 1].id : null, [p, m] = s.useState(f), [h, g] = s.useState(n);
|
|
10
|
+
h !== n && (g(n), n || m(f));
|
|
11
|
+
let _ = s.useRef(null), v = s.useRef(0), y = s.useRef(null), [b, x] = s.useState(0), S = `${u[u.length - 1]?.id ?? ""}:${String(d[u.length])}`;
|
|
12
|
+
return s.useLayoutEffect(() => {
|
|
13
|
+
let e = _.current;
|
|
14
|
+
n && e && (e.scrollTop = e.scrollHeight, v.current = e.scrollTop);
|
|
15
|
+
}, [n, S]), s.useLayoutEffect(() => {
|
|
16
|
+
let t = _.current, r = y.current;
|
|
17
|
+
if (y.current = null, !t || n || !e.anchor) return;
|
|
18
|
+
let a = r ? u.findIndex((e) => e.id === r.id) : -1;
|
|
19
|
+
r && a >= 0 && d[a] !== r.y && (t.scrollTop += d[a] - r.y);
|
|
20
|
+
let o = i(d, t.scrollTop);
|
|
21
|
+
u[o] && (y.current = {
|
|
22
|
+
id: u[o].id,
|
|
23
|
+
y: d[o]
|
|
24
|
+
});
|
|
25
|
+
}), {
|
|
26
|
+
scroller: _,
|
|
27
|
+
following: n,
|
|
28
|
+
newCount: s.useMemo(() => n ? 0 : r(c, p, l), [
|
|
29
|
+
n,
|
|
30
|
+
c,
|
|
31
|
+
p,
|
|
32
|
+
l
|
|
33
|
+
]),
|
|
34
|
+
scrollTop: b,
|
|
35
|
+
onScroll: () => {
|
|
36
|
+
let e = _.current;
|
|
37
|
+
if (!e) return;
|
|
38
|
+
let t = e.scrollTop, r = a(t, e.clientHeight, e.scrollHeight);
|
|
39
|
+
n && !r && t < v.current - 1 ? o(!1) : !n && r && t > v.current && o(!0), v.current = t, x(t);
|
|
40
|
+
},
|
|
41
|
+
jumpToEnd: () => {
|
|
42
|
+
let e = _.current;
|
|
43
|
+
e && (e.scrollTop = e.scrollHeight), o(!0);
|
|
44
|
+
},
|
|
45
|
+
reveal: (e, t) => {
|
|
46
|
+
let n = _.current;
|
|
47
|
+
n && (e < n.scrollTop ? n.scrollTop = e : e + t > n.scrollTop + n.clientHeight && (n.scrollTop = e + t - n.clientHeight));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}, l = () => {
|
|
51
|
+
let [e, t] = s.useState(() => /* @__PURE__ */ new Set());
|
|
52
|
+
return [e, s.useCallback((e, n) => {
|
|
53
|
+
t((t) => {
|
|
54
|
+
if (t.has(e) === n) return t;
|
|
55
|
+
let r = new Set(t);
|
|
56
|
+
return n ? r.add(e) : r.delete(e), r;
|
|
57
|
+
});
|
|
58
|
+
}, [])];
|
|
59
|
+
}, u = (e, t) => {
|
|
60
|
+
let [n, r] = s.useState(t);
|
|
61
|
+
return s.useLayoutEffect(() => {
|
|
62
|
+
let t = e.current;
|
|
63
|
+
if (!t || typeof ResizeObserver > "u") return;
|
|
64
|
+
let n = new ResizeObserver(() => t.clientHeight && r(t.clientHeight));
|
|
65
|
+
return n.observe(t), () => n.disconnect();
|
|
66
|
+
}, [e]), n;
|
|
67
|
+
}, d = (t) => (r) => {
|
|
68
|
+
if (r.target !== r.currentTarget) return;
|
|
69
|
+
let { shown: i, activeIndex: a, move: s } = t, c = i[a];
|
|
70
|
+
if (c && n(r)) {
|
|
71
|
+
e(o(c));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
let l = c !== void 0 && t.canOpen(c), u = {
|
|
75
|
+
ArrowDown: () => s(a + 1),
|
|
76
|
+
ArrowUp: () => s(a < 0 ? i.length - 1 : a - 1),
|
|
77
|
+
Home: () => s(0),
|
|
78
|
+
End: () => {
|
|
79
|
+
s(i.length - 1), t.jumpToEnd();
|
|
80
|
+
},
|
|
81
|
+
Enter: c && (() => t.pick(c)),
|
|
82
|
+
ArrowRight: l && !t.isOpen(c) ? () => t.setOpen(c.id, !0) : void 0,
|
|
83
|
+
ArrowLeft: l && t.isOpen(c) ? () => t.setOpen(c.id, !1) : void 0
|
|
84
|
+
}[r.key];
|
|
85
|
+
u && (r.preventDefault(), u());
|
|
86
|
+
};
|
|
87
|
+
export { c as useFollow, d as useLogKeys, l as useOpenSet, u as useViewHeight };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { useFollow as n, useLogKeys as r, useOpenSet as i, useViewHeight as a } from "./log-view.hooks.js";
|
|
5
|
+
import { LOG_LEVELS as o, offsetsOf as s, windowOf as c } from "./log-view.model.js";
|
|
6
|
+
import { LogRow as l } from "./log-view.row.js";
|
|
7
|
+
import * as u from "react";
|
|
8
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
// src/components/log-view.tsx
|
|
10
|
+
var p = 160, m = 24, h = u.forwardRef((h, g) => {
|
|
11
|
+
let { lines: _, filter: v, highlight: y, wrap: b = !1, showTime: x = "absolute", follow: S, onFollowChange: C, onLineOpen: w, expandable: T = !0, className: E, "aria-label": D = "Log", ...O } = h, k = u.useId(), A = u.useCallback((e) => !v || v.includes(e.level ?? "info"), [v]), j = u.useMemo(() => v ? _.filter(A) : _, [
|
|
12
|
+
_,
|
|
13
|
+
v,
|
|
14
|
+
A
|
|
15
|
+
]), M = u.useMemo(() => j.some((e) => e.source), [j]), [N, P] = i(), [F, I] = u.useState({}), [L, R] = u.useState(null), z = (e) => T && e.fields !== void 0, B = (e) => N.has(e.id) && z(e), V = j.map((e) => B(e) ? F[e.id] ?? p : 0), H = s(j.length, m, V), U = n({
|
|
16
|
+
follow: S,
|
|
17
|
+
onFollowChange: C,
|
|
18
|
+
lines: _,
|
|
19
|
+
passes: A,
|
|
20
|
+
shown: j,
|
|
21
|
+
offsets: H,
|
|
22
|
+
anchor: !b
|
|
23
|
+
}), { scroller: W } = U, G = a(W, 480), [K, q] = b ? [0, j.length] : c(H, U.scrollTop, G), J = L === null ? -1 : j.findIndex((e) => e.id === L), Y = (e) => `${k}-${e.id}`, X = Array.from({ length: q - K }, (e, t) => K + t);
|
|
24
|
+
J >= 0 && J < K && X.unshift(J), J >= q && X.push(J);
|
|
25
|
+
let Z = (e) => {
|
|
26
|
+
R(e.id), z(e) && P(e.id, !N.has(e.id)), w?.(e);
|
|
27
|
+
}, Q = u.useRef({
|
|
28
|
+
pick: Z,
|
|
29
|
+
shown: j
|
|
30
|
+
});
|
|
31
|
+
u.useLayoutEffect(() => {
|
|
32
|
+
Q.current = {
|
|
33
|
+
pick: Z,
|
|
34
|
+
shown: j
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
let $ = u.useCallback((e) => {
|
|
38
|
+
let t = Q.current.shown.find((t) => t.id === e);
|
|
39
|
+
t && Q.current.pick(t), W.current?.focus({ preventScroll: !0 });
|
|
40
|
+
}, [W]), ee = u.useCallback((e, t) => I((n) => n[e] === t ? n : {
|
|
41
|
+
...n,
|
|
42
|
+
[e]: t
|
|
43
|
+
}), []), te = r({
|
|
44
|
+
shown: j,
|
|
45
|
+
activeIndex: J,
|
|
46
|
+
isOpen: B,
|
|
47
|
+
canOpen: z,
|
|
48
|
+
setOpen: P,
|
|
49
|
+
pick: Z,
|
|
50
|
+
move: (e) => {
|
|
51
|
+
let t = Math.max(0, Math.min(j.length - 1, e));
|
|
52
|
+
j[t] && (R(j[t].id), b || U.reveal(H[t], m));
|
|
53
|
+
},
|
|
54
|
+
jumpToEnd: U.jumpToEnd
|
|
55
|
+
});
|
|
56
|
+
return /* @__PURE__ */ f("div", {
|
|
57
|
+
ref: g,
|
|
58
|
+
className: e("relative flex h-80 min-h-0 flex-col", E),
|
|
59
|
+
"data-slot": "log-view",
|
|
60
|
+
...O,
|
|
61
|
+
children: [/* @__PURE__ */ d("div", {
|
|
62
|
+
ref: W,
|
|
63
|
+
role: "grid",
|
|
64
|
+
"aria-label": D,
|
|
65
|
+
"aria-rowcount": j.length,
|
|
66
|
+
"aria-activedescendant": J >= 0 ? Y(j[J]) : void 0,
|
|
67
|
+
tabIndex: 0,
|
|
68
|
+
onScroll: U.onScroll,
|
|
69
|
+
onKeyDown: te,
|
|
70
|
+
className: "min-h-0 flex-1 overflow-auto overscroll-contain focus-ring",
|
|
71
|
+
"data-slot": "log-view-scroller",
|
|
72
|
+
"data-following": U.following || void 0,
|
|
73
|
+
children: /* @__PURE__ */ d("div", {
|
|
74
|
+
className: "relative",
|
|
75
|
+
style: b ? void 0 : { height: H[j.length] },
|
|
76
|
+
children: X.map((e) => {
|
|
77
|
+
let t = j[e];
|
|
78
|
+
return /* @__PURE__ */ d(l, {
|
|
79
|
+
id: Y(t),
|
|
80
|
+
line: t,
|
|
81
|
+
index: e,
|
|
82
|
+
style: o[t.level ?? "info"] ?? o.info,
|
|
83
|
+
top: b ? void 0 : H[e],
|
|
84
|
+
height: m,
|
|
85
|
+
wrap: b,
|
|
86
|
+
showTime: x,
|
|
87
|
+
showSource: M,
|
|
88
|
+
highlight: y,
|
|
89
|
+
active: t.id === L,
|
|
90
|
+
expanded: z(t) ? B(t) : void 0,
|
|
91
|
+
onPick: $,
|
|
92
|
+
onHeight: ee
|
|
93
|
+
}, t.id);
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
}), U.newCount > 0 && /* @__PURE__ */ f(t, {
|
|
97
|
+
size: "sm",
|
|
98
|
+
onClick: U.jumpToEnd,
|
|
99
|
+
className: "absolute bottom-2 left-1/2 -translate-x-1/2",
|
|
100
|
+
"data-slot": "log-view-jump",
|
|
101
|
+
children: [
|
|
102
|
+
U.newCount,
|
|
103
|
+
" new ",
|
|
104
|
+
U.newCount === 1 ? "line" : "lines"
|
|
105
|
+
]
|
|
106
|
+
})]
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
h.displayName = "LogView";
|
|
110
|
+
export { h as LogView };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StatusGlyphShape } from './status-glyph.js';
|
|
2
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
3
|
+
export interface LogLine {
|
|
4
|
+
/** Stable key: a line keeps its node while new lines arrive. */
|
|
5
|
+
id: string;
|
|
6
|
+
time?: Date | number | string;
|
|
7
|
+
level?: LogLevel | (string & {});
|
|
8
|
+
message: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
/** Structured detail, shown as a DataTree when the line expands. */
|
|
11
|
+
fields?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export type LogTone = 'muted' | 'default' | 'info' | 'success' | 'warning' | 'destructive';
|
|
14
|
+
export interface LogLevelStyle {
|
|
15
|
+
tone: LogTone;
|
|
16
|
+
/** Glyph in the level column, so a level never relies on colour alone. */
|
|
17
|
+
shape: StatusGlyphShape;
|
|
18
|
+
label?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const LOG_LEVELS: Record<LogLevel, LogLevelStyle>;
|
|
21
|
+
/** Level of a plain text line: FAIL or ERROR, WARN, an indented line is quiet. */
|
|
22
|
+
export declare const levelOfText: (text: string) => LogLevel;
|
|
23
|
+
/** A plain string becomes a line keyed by its index. */
|
|
24
|
+
export declare const toLogLine: (line: string | LogLine, index: number) => LogLine;
|
|
25
|
+
export declare const lineText: (line: LogLine) => string;
|
|
26
|
+
/** Top offset of each line plus the total height at the end; extra holds open detail heights. */
|
|
27
|
+
export declare const offsetsOf: (count: number, rowHeight: number, extra: number[]) => number[];
|
|
28
|
+
/** Index of the line at `y`, by binary search over the offsets. */
|
|
29
|
+
export declare const indexAt: (offsets: number[], y: number) => number;
|
|
30
|
+
/** The window of lines to render for a scroll position, with `overscan` lines either side. */
|
|
31
|
+
export declare const windowOf: (offsets: number[], scrollTop: number, height: number, overscan?: number) => [number, number];
|
|
32
|
+
export declare const isAtBottom: (scrollTop: number, clientHeight: number, scrollHeight: number, slack?: number) => boolean;
|
|
33
|
+
/** Lines after the one with id `seen` that pass; all passing lines when it is gone. */
|
|
34
|
+
export declare const countAfter: (lines: LogLine[], seen: string | null, passes: (line: LogLine) => boolean) => number;
|
|
35
|
+
//# sourceMappingURL=log-view.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-view.model.d.ts","sourceRoot":"","sources":["../../src/components/log-view.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,OAAO;IACtB,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAE3F,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,0EAA0E;IAC1E,KAAK,EAAE,gBAAgB,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,CAKtD,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,QAI1C,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,GAAG,OAAO,EAAE,OAAO,MAAM,KAAG,OACgC,CAAC;AASnG,eAAO,MAAM,QAAQ,GAAI,MAAM,OAAO,KAAG,MAQ3B,CAAC;AAEf,iGAAiG;AACjG,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,WAAW,MAAM,EAAE,OAAO,MAAM,EAAE,KAAG,MAAM,EAKnF,CAAC;AAEF,mEAAmE;AACnE,eAAO,MAAM,OAAO,GAAI,SAAS,MAAM,EAAE,EAAE,GAAG,MAAM,KAAG,MAStD,CAAC;AAEF,8FAA8F;AAC9F,eAAO,MAAM,QAAQ,GACnB,SAAS,MAAM,EAAE,EACjB,WAAW,MAAM,EACjB,QAAQ,MAAM,EACd,iBAAY,KACX,CAAC,MAAM,EAAE,MAAM,CAMjB,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,cAAc,MAAM,EACpB,cAAS,KACR,OAA2D,CAAC;AAE/D,uFAAuF;AACvF,eAAO,MAAM,UAAU,GACrB,OAAO,OAAO,EAAE,EAChB,MAAM,MAAM,GAAG,IAAI,EACnB,QAAQ,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,KACjC,MAIF,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// src/components/log-view.model.ts
|
|
2
|
+
var e = {
|
|
3
|
+
debug: {
|
|
4
|
+
tone: "muted",
|
|
5
|
+
shape: "dashed",
|
|
6
|
+
label: "Debug"
|
|
7
|
+
},
|
|
8
|
+
info: {
|
|
9
|
+
tone: "default",
|
|
10
|
+
shape: "dot",
|
|
11
|
+
label: "Info"
|
|
12
|
+
},
|
|
13
|
+
warn: {
|
|
14
|
+
tone: "warning",
|
|
15
|
+
shape: "alert",
|
|
16
|
+
label: "Warning"
|
|
17
|
+
},
|
|
18
|
+
error: {
|
|
19
|
+
tone: "destructive",
|
|
20
|
+
shape: "cross",
|
|
21
|
+
label: "Error"
|
|
22
|
+
}
|
|
23
|
+
}, t = (e) => /^(FAIL|ERROR|ERR!)/i.test(e) ? "error" : /^WARN/i.test(e) ? "warn" : /^\s/.test(e) ? "debug" : "info", n = (e, n) => typeof e == "string" ? {
|
|
24
|
+
id: String(n),
|
|
25
|
+
message: e,
|
|
26
|
+
level: t(e)
|
|
27
|
+
} : e, r = (e) => {
|
|
28
|
+
if (e === void 0) return "";
|
|
29
|
+
let t = new Date(e);
|
|
30
|
+
return Number.isNaN(t.getTime()) ? String(e) : t.toISOString();
|
|
31
|
+
}, i = (e) => [
|
|
32
|
+
r(e.time),
|
|
33
|
+
e.level?.toUpperCase() ?? "",
|
|
34
|
+
e.source ? `[${e.source}]` : "",
|
|
35
|
+
e.message
|
|
36
|
+
].filter(Boolean).join(" "), a = (e, t, n) => {
|
|
37
|
+
let r = Array(e + 1);
|
|
38
|
+
r[0] = 0;
|
|
39
|
+
for (let i = 0; i < e; i++) r[i + 1] = r[i] + t + (n[i] ?? 0);
|
|
40
|
+
return r;
|
|
41
|
+
}, o = (e, t) => {
|
|
42
|
+
let n = 0, r = e.length - 2;
|
|
43
|
+
for (; n < r;) {
|
|
44
|
+
let i = n + r + 1 >> 1;
|
|
45
|
+
e[i] <= t ? n = i : r = i - 1;
|
|
46
|
+
}
|
|
47
|
+
return Math.max(0, n);
|
|
48
|
+
}, s = (e, t, n, r = 8) => {
|
|
49
|
+
let i = e.length - 1;
|
|
50
|
+
return i <= 0 ? [0, 0] : [Math.max(0, o(e, t) - r), Math.min(i, o(e, t + n) + 1 + r)];
|
|
51
|
+
}, c = (e, t, n, r = 4) => n - e - t <= r, l = (e, t, n) => {
|
|
52
|
+
let r = 0;
|
|
53
|
+
for (let i = e.length - 1; i >= 0 && e[i].id !== t; i--) n(e[i]) && r++;
|
|
54
|
+
return r;
|
|
55
|
+
};
|
|
56
|
+
export { e as LOG_LEVELS, l as countAfter, o as indexAt, c as isAtBottom, t as levelOfText, i as lineText, a as offsetsOf, n as toLogLine, s as windowOf };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LogLevelStyle, LogLine } from './log-view.model.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface LogRowProps {
|
|
4
|
+
id: string;
|
|
5
|
+
line: LogLine;
|
|
6
|
+
index: number;
|
|
7
|
+
style: LogLevelStyle;
|
|
8
|
+
top?: number;
|
|
9
|
+
height: number;
|
|
10
|
+
wrap: boolean;
|
|
11
|
+
showTime: 'absolute' | 'relative' | false;
|
|
12
|
+
showSource: boolean;
|
|
13
|
+
highlight?: string;
|
|
14
|
+
active: boolean;
|
|
15
|
+
/** Undefined for a line without fields; true shows the detail inside the row. */
|
|
16
|
+
expanded?: boolean;
|
|
17
|
+
onPick: (id: string) => void;
|
|
18
|
+
onHeight: (id: string, height: number) => void;
|
|
19
|
+
}
|
|
20
|
+
/** One mono log line: level glyph, time, source, text and a copy button; open, its fields below. */
|
|
21
|
+
export declare const LogRow: React.MemoExoticComponent<({ id, line, index, style, top, height, wrap, showTime, showSource, ...p }: LogRowProps) => React.JSX.Element>;
|
|
22
|
+
export interface LogDetailProps {
|
|
23
|
+
id: string;
|
|
24
|
+
fields: unknown;
|
|
25
|
+
index: number;
|
|
26
|
+
cols: number;
|
|
27
|
+
onHeight: (id: string, height: number) => void;
|
|
28
|
+
}
|
|
29
|
+
/** The open detail of a line: its fields as a DataTree; reports every height change for windowing. */
|
|
30
|
+
export declare const LogDetail: ({ id, fields, index, cols, onHeight }: LogDetailProps) => React.JSX.Element;
|
|
31
|
+
//# sourceMappingURL=log-view.row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-view.row.d.ts","sourceRoot":"","sources":["../../src/components/log-view.row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,OAAO,EAAgB,MAAM,kBAAkB,CAAC;AAsB5F,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,UAAU,GAAG,UAAU,GAAG,KAAK,CAAC;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAQD,oGAAoG;AACpG,eAAO,MAAM,MAAM,wGAC2D,WAAW,uBAkFxF,CAAC;AAGF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,sGAAsG;AACtG,eAAO,MAAM,SAAS,GAAI,uCAAuC,cAAc,sBA+B9E,CAAC"}
|