@gjermundgaraba-designs/pixel-paper 0.26.0 → 0.27.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/DESIGN.md +28 -3
- package/dist/src/adapters/diagram.d.ts +38 -0
- package/dist/src/adapters/diagram.d.ts.map +1 -0
- package/dist/src/adapters/diagram.js +206 -0
- package/dist/src/adapters/mermaid.d.ts +2 -20
- package/dist/src/adapters/mermaid.d.ts.map +1 -1
- package/dist/src/adapters/mermaid.js +9 -229
- package/dist/src/announcer/announcer.d.ts +0 -4
- package/dist/src/announcer/announcer.d.ts.map +1 -1
- package/dist/src/announcer/announcer.js +19 -18
- package/dist/src/attributes/attributes.d.ts.map +1 -1
- package/dist/src/{audioFrame/audioFrame.d.ts → audio-frame/audio-frame.d.ts} +1 -1
- package/dist/src/audio-frame/audio-frame.d.ts.map +1 -0
- package/dist/src/{audioFrame/audioFrame.js → audio-frame/audio-frame.js} +1 -1
- package/dist/src/audio-frame/index.d.ts +3 -0
- package/dist/src/audio-frame/index.d.ts.map +1 -0
- package/dist/src/audio-frame/index.js +1 -0
- package/dist/src/banner/banner.d.ts.map +1 -1
- package/dist/src/banner/index.d.ts.map +1 -1
- package/dist/src/{barChart/barChart.d.ts → bar-chart/bar-chart.d.ts} +2 -2
- package/dist/src/bar-chart/bar-chart.d.ts.map +1 -0
- package/dist/src/{barChart/barChart.js → bar-chart/bar-chart.js} +40 -35
- package/dist/src/bar-chart/index.d.ts +3 -0
- package/dist/src/bar-chart/index.d.ts.map +1 -0
- package/dist/src/bar-chart/index.js +1 -0
- package/dist/src/bench/bench.d.ts.map +1 -1
- package/dist/src/bench/index.d.ts.map +1 -1
- package/dist/src/board/board.d.ts +45 -46
- package/dist/src/board/board.d.ts.map +1 -1
- package/dist/src/board/board.js +76 -102
- package/dist/src/board/index.d.ts +1 -1
- package/dist/src/board/index.d.ts.map +1 -1
- package/dist/src/button/button.d.ts +1 -2
- package/dist/src/button/button.d.ts.map +1 -1
- package/dist/src/button/button.js +7 -5
- package/dist/src/button/index.d.ts +1 -1
- package/dist/src/button/index.d.ts.map +1 -1
- package/dist/src/card/card.d.ts.map +1 -1
- package/dist/src/card/card.js +4 -2
- package/dist/src/card/index.d.ts.map +1 -1
- package/dist/src/{chartTable/chartTable.d.ts → chart-table/chart-table.d.ts} +4 -14
- package/dist/src/chart-table/chart-table.d.ts.map +1 -0
- package/dist/src/{chartTable/chartTable.js → chart-table/chart-table.js} +9 -16
- package/dist/src/chip/chip.d.ts.map +1 -1
- package/dist/src/chip/chip.js +4 -2
- package/dist/src/chip/index.d.ts.map +1 -1
- package/dist/src/choice/choice.d.ts.map +1 -1
- package/dist/src/choice/choice.js +3 -1
- package/dist/src/choice/index.d.ts.map +1 -1
- package/dist/src/choices/choices.d.ts.map +1 -1
- package/dist/src/choices/index.d.ts.map +1 -1
- package/dist/src/{codeEditor/codeEditor.d.ts → code-editor/code-editor.d.ts} +1 -1
- package/dist/src/code-editor/code-editor.d.ts.map +1 -0
- package/dist/src/{codeEditor/codeEditor.js → code-editor/code-editor.js} +2 -2
- package/dist/src/code-editor/index.d.ts +3 -0
- package/dist/src/code-editor/index.d.ts.map +1 -0
- package/dist/src/code-editor/index.js +1 -0
- package/dist/src/{codeSurface/codeSurface.d.ts → code-surface/code-surface.d.ts} +1 -1
- package/dist/src/code-surface/code-surface.d.ts.map +1 -0
- package/dist/src/{codeSurface/codeSurface.js → code-surface/code-surface.js} +6 -1
- package/dist/src/code-surface/index.d.ts +3 -0
- package/dist/src/code-surface/index.d.ts.map +1 -0
- package/dist/src/code-surface/index.js +1 -0
- package/dist/src/{commandPalette/commandPalette.d.ts → command-palette/command-palette.d.ts} +85 -77
- package/dist/src/command-palette/command-palette.d.ts.map +1 -0
- package/dist/src/command-palette/command-palette.js +625 -0
- package/dist/src/{commandPalette → command-palette}/index.d.ts +2 -2
- package/dist/src/command-palette/index.d.ts.map +1 -0
- package/dist/src/{commandPalette → command-palette}/index.js +1 -1
- package/dist/src/{commandPalette → command-palette}/keys.d.ts +0 -21
- package/dist/src/command-palette/keys.d.ts.map +1 -0
- package/dist/src/command-palette/keys.js +85 -0
- package/dist/src/{commandPalette → command-palette}/match.d.ts +5 -11
- package/dist/src/command-palette/match.d.ts.map +1 -0
- package/dist/src/{commandPalette → command-palette}/match.js +20 -24
- package/dist/src/{commandPalette → command-palette}/message.d.ts +37 -26
- package/dist/src/command-palette/message.d.ts.map +1 -0
- package/dist/src/{commandPalette → command-palette}/message.js +8 -20
- package/dist/src/{confirmDialog/confirmDialog.d.ts → confirm-dialog/confirm-dialog.d.ts} +1 -1
- package/dist/src/confirm-dialog/confirm-dialog.d.ts.map +1 -0
- package/dist/src/{confirmDialog/confirmDialog.js → confirm-dialog/confirm-dialog.js} +18 -23
- package/dist/src/confirm-dialog/index.d.ts +3 -0
- package/dist/src/confirm-dialog/index.d.ts.map +1 -0
- package/dist/src/{confirmDialog → confirm-dialog}/index.js +1 -1
- package/dist/src/{contextMenu/contextMenu.d.ts → context-menu/context-menu.d.ts} +18 -21
- package/dist/src/context-menu/context-menu.d.ts.map +1 -0
- package/dist/src/{contextMenu/contextMenu.js → context-menu/context-menu.js} +45 -57
- package/dist/src/{contextMenu → context-menu}/index.d.ts +2 -2
- package/dist/src/context-menu/index.d.ts.map +1 -0
- package/dist/src/{contextMenu → context-menu}/index.js +1 -1
- package/dist/src/{copyButton/copyButton.d.ts → copy-button/copy-button.d.ts} +5 -7
- package/dist/src/copy-button/copy-button.d.ts.map +1 -0
- package/dist/src/{copyButton/copyButton.js → copy-button/copy-button.js} +18 -27
- package/dist/src/copy-button/index.d.ts +3 -0
- package/dist/src/copy-button/index.d.ts.map +1 -0
- package/dist/src/copy-button/index.js +1 -0
- package/dist/src/crumbs/crumbs.d.ts +1 -1
- package/dist/src/crumbs/crumbs.d.ts.map +1 -1
- package/dist/src/crumbs/index.d.ts.map +1 -1
- package/dist/src/deck/deck.d.ts.map +1 -1
- package/dist/src/deck/index.d.ts.map +1 -1
- package/dist/src/dialog/dialog.d.ts +6 -14
- package/dist/src/dialog/dialog.d.ts.map +1 -1
- package/dist/src/dialog/dialog.js +29 -36
- package/dist/src/dialog/fold.d.ts +3 -3
- package/dist/src/dialog/fold.d.ts.map +1 -1
- package/dist/src/dialog/fold.js +5 -4
- package/dist/src/dialog/index.d.ts +1 -1
- package/dist/src/dialog/index.d.ts.map +1 -1
- package/dist/src/disclosure/disclosure.d.ts.map +1 -1
- package/dist/src/disclosure/disclosure.js +3 -1
- package/dist/src/disclosure/index.d.ts.map +1 -1
- package/dist/src/dom/html-element.d.ts +3 -0
- package/dist/src/dom/html-element.d.ts.map +1 -0
- package/dist/src/dom/html-element.js +6 -0
- package/dist/src/drag/drag.d.ts +0 -34
- package/dist/src/drag/drag.d.ts.map +1 -1
- package/dist/src/drag/drag.js +27 -73
- package/dist/src/{dropZone/dropZone.d.ts → drop-zone/drop-zone.d.ts} +3 -3
- package/dist/src/drop-zone/drop-zone.d.ts.map +1 -0
- package/dist/src/{dropZone/dropZone.js → drop-zone/drop-zone.js} +13 -19
- package/dist/src/drop-zone/index.d.ts +3 -0
- package/dist/src/drop-zone/index.d.ts.map +1 -0
- package/dist/src/drop-zone/index.js +1 -0
- package/dist/src/{editableTitle/editableTitle.d.ts → editable-title/editable-title.d.ts} +14 -12
- package/dist/src/editable-title/editable-title.d.ts.map +1 -0
- package/dist/src/{editableTitle/editableTitle.js → editable-title/editable-title.js} +33 -39
- package/dist/src/editable-title/index.d.ts +4 -0
- package/dist/src/editable-title/index.d.ts.map +1 -0
- package/dist/src/{editableTitle → editable-title}/index.js +1 -1
- package/dist/src/{emptyState/emptyState.d.ts → empty-state/empty-state.d.ts} +1 -1
- package/dist/src/empty-state/empty-state.d.ts.map +1 -0
- package/dist/src/{emptyState/emptyState.js → empty-state/empty-state.js} +5 -2
- package/dist/src/empty-state/index.d.ts +3 -0
- package/dist/src/empty-state/index.d.ts.map +1 -0
- package/dist/src/empty-state/index.js +1 -0
- package/dist/src/{errorSummary/errorSummary.d.ts → error-summary/error-summary.d.ts} +2 -2
- package/dist/src/error-summary/error-summary.d.ts.map +1 -0
- package/dist/src/{errorSummary/errorSummary.js → error-summary/error-summary.js} +7 -5
- package/dist/src/error-summary/index.d.ts +3 -0
- package/dist/src/error-summary/index.d.ts.map +1 -0
- package/dist/src/error-summary/index.js +1 -0
- package/dist/src/field/field.d.ts +2 -7
- package/dist/src/field/field.d.ts.map +1 -1
- package/dist/src/field/field.js +12 -13
- package/dist/src/field/index.d.ts.map +1 -1
- package/dist/src/{fieldGrid/fieldGrid.d.ts → field-grid/field-grid.d.ts} +1 -1
- package/dist/src/field-grid/field-grid.d.ts.map +1 -0
- package/dist/src/{fieldGrid/fieldGrid.js → field-grid/field-grid.js} +1 -1
- package/dist/src/field-grid/index.d.ts +3 -0
- package/dist/src/field-grid/index.d.ts.map +1 -0
- package/dist/src/field-grid/index.js +1 -0
- package/dist/src/fields/fields.d.ts.map +1 -1
- package/dist/src/fields/fields.js +4 -1
- package/dist/src/fields/index.d.ts.map +1 -1
- package/dist/src/fieldset/fieldset.d.ts.map +1 -1
- package/dist/src/fieldset/index.d.ts.map +1 -1
- package/dist/src/{fileTree/fileTree.d.ts → file-tree/file-tree.d.ts} +5 -5
- package/dist/src/file-tree/file-tree.d.ts.map +1 -0
- package/dist/src/file-tree/file-tree.js +242 -0
- package/dist/src/file-tree/index.d.ts +3 -0
- package/dist/src/file-tree/index.d.ts.map +1 -0
- package/dist/src/{fileTree → file-tree}/index.js +1 -1
- package/dist/src/{filterChip/filterChip.d.ts → filter-chip/filter-chip.d.ts} +1 -1
- package/dist/src/filter-chip/filter-chip.d.ts.map +1 -0
- package/dist/src/{filterChip/filterChip.js → filter-chip/filter-chip.js} +11 -7
- package/dist/src/filter-chip/index.d.ts +3 -0
- package/dist/src/filter-chip/index.d.ts.map +1 -0
- package/dist/src/filter-chip/index.js +1 -0
- package/dist/src/{filterStrip/filterStrip.d.ts → filter-strip/filter-strip.d.ts} +1 -1
- package/dist/src/filter-strip/filter-strip.d.ts.map +1 -0
- package/dist/src/{filterStrip/filterStrip.js → filter-strip/filter-strip.js} +1 -1
- package/dist/src/filter-strip/index.d.ts +3 -0
- package/dist/src/filter-strip/index.d.ts.map +1 -0
- package/dist/src/filter-strip/index.js +1 -0
- package/dist/src/{flashWord/flashWord.d.ts → flash-word/flash-word.d.ts} +2 -2
- package/dist/src/flash-word/flash-word.d.ts.map +1 -0
- package/dist/src/{flashWord/flashWord.js → flash-word/flash-word.js} +2 -3
- package/dist/src/flash-word/index.d.ts +3 -0
- package/dist/src/flash-word/index.d.ts.map +1 -0
- package/dist/src/flash-word/index.js +1 -0
- package/dist/src/focus/focus.d.ts.map +1 -1
- package/dist/src/focus/focus.js +0 -2
- package/dist/src/format/format.d.ts +0 -7
- package/dist/src/format/format.d.ts.map +1 -1
- package/dist/src/format/format.js +7 -16
- package/dist/src/format/index.d.ts.map +1 -1
- package/dist/src/glyph/glyph.d.ts +1 -2
- package/dist/src/glyph/glyph.d.ts.map +1 -1
- package/dist/src/glyph/glyph.js +0 -2
- package/dist/src/glyph/glyphs.d.ts +19 -4
- package/dist/src/glyph/glyphs.d.ts.map +1 -1
- package/dist/src/glyph/glyphs.js +2577 -2594
- package/dist/src/glyph/index.d.ts.map +1 -1
- package/dist/src/group/group.d.ts.map +1 -1
- package/dist/src/group/index.d.ts.map +1 -1
- package/dist/src/history/history.d.ts +1 -1
- package/dist/src/history/history.d.ts.map +1 -1
- package/dist/src/history/history.js +6 -3
- package/dist/src/history/index.d.ts.map +1 -1
- package/dist/src/{iconButton/iconButton.d.ts → icon-button/icon-button.d.ts} +1 -1
- package/dist/src/icon-button/icon-button.d.ts.map +1 -0
- package/dist/src/{iconButton/iconButton.js → icon-button/icon-button.js} +6 -4
- package/dist/src/icon-button/index.d.ts +3 -0
- package/dist/src/icon-button/index.d.ts.map +1 -0
- package/dist/src/icon-button/index.js +1 -0
- package/dist/src/identity/identity.d.ts.map +1 -1
- package/dist/src/identity/index.d.ts.map +1 -1
- package/dist/src/{imageFrame/imageFrame.d.ts → image-frame/image-frame.d.ts} +1 -1
- package/dist/src/image-frame/image-frame.d.ts.map +1 -0
- package/dist/src/{imageFrame/imageFrame.js → image-frame/image-frame.js} +19 -12
- package/dist/src/image-frame/index.d.ts +3 -0
- package/dist/src/image-frame/index.d.ts.map +1 -0
- package/dist/src/image-frame/index.js +1 -0
- package/dist/src/index.d.ts +41 -41
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +41 -41
- package/dist/src/inline-input/index.d.ts +3 -0
- package/dist/src/inline-input/index.d.ts.map +1 -0
- package/dist/src/{inlineInput → inline-input}/index.js +1 -1
- package/dist/src/{inlineInput/inlineInput.d.ts → inline-input/inline-input.d.ts} +8 -12
- package/dist/src/inline-input/inline-input.d.ts.map +1 -0
- package/dist/src/{inlineInput/inlineInput.js → inline-input/inline-input.js} +60 -75
- package/dist/src/key-help/index.d.ts +3 -0
- package/dist/src/key-help/index.d.ts.map +1 -0
- package/dist/src/{keyHelp → key-help}/index.js +1 -1
- package/dist/src/{keyHelp/keyHelp.d.ts → key-help/key-help.d.ts} +7 -7
- package/dist/src/key-help/key-help.d.ts.map +1 -0
- package/dist/src/{keyHelp/keyHelp.js → key-help/key-help.js} +48 -47
- package/dist/src/key-hint/index.d.ts +4 -0
- package/dist/src/key-hint/index.d.ts.map +1 -0
- package/dist/src/key-hint/index.js +2 -0
- package/dist/src/{keyHint/keyHint.d.ts → key-hint/key-hint.d.ts} +2 -2
- package/dist/src/key-hint/key-hint.d.ts.map +1 -0
- package/dist/src/{keyHint/keyHint.js → key-hint/key-hint.js} +2 -2
- package/dist/src/{keyHint/keyLabel.d.ts → key-hint/key-label.d.ts} +2 -3
- package/dist/src/key-hint/key-label.d.ts.map +1 -0
- package/dist/src/{keyHint/keyLabel.js → key-hint/key-label.js} +29 -24
- package/dist/src/keymap/index.d.ts.map +1 -1
- package/dist/src/keymap/keymap.d.ts +2 -2
- package/dist/src/keymap/keymap.d.ts.map +1 -1
- package/dist/src/keymap/keymap.js +3 -1
- package/dist/src/keys/keys.d.ts +0 -2
- package/dist/src/keys/keys.d.ts.map +1 -1
- package/dist/src/keys/keys.js +0 -2
- package/dist/src/line-chart/index.d.ts +3 -0
- package/dist/src/line-chart/index.d.ts.map +1 -0
- package/dist/src/line-chart/index.js +1 -0
- package/dist/src/{lineChart/lineChart.d.ts → line-chart/line-chart.d.ts} +2 -2
- package/dist/src/line-chart/line-chart.d.ts.map +1 -0
- package/dist/src/{lineChart/lineChart.js → line-chart/line-chart.js} +52 -44
- package/dist/src/line-diff/diff.d.ts +29 -0
- package/dist/src/line-diff/diff.d.ts.map +1 -0
- package/dist/src/line-diff/diff.js +85 -0
- package/dist/src/line-diff/index.d.ts +5 -0
- package/dist/src/line-diff/index.d.ts.map +1 -0
- package/dist/src/line-diff/index.js +2 -0
- package/dist/src/{lineDiff/lineDiff.d.ts → line-diff/line-diff.d.ts} +1 -1
- package/dist/src/line-diff/line-diff.d.ts.map +1 -0
- package/dist/src/{lineDiff/lineDiff.js → line-diff/line-diff.js} +26 -19
- package/dist/src/{lineDiff → line-diff}/patch.d.ts +5 -9
- package/dist/src/line-diff/patch.d.ts.map +1 -0
- package/dist/src/{lineDiff → line-diff}/patch.js +54 -62
- package/dist/src/link-button/index.d.ts +3 -0
- package/dist/src/link-button/index.d.ts.map +1 -0
- package/dist/src/link-button/index.js +1 -0
- package/dist/src/{linkButton/linkButton.d.ts → link-button/link-button.d.ts} +2 -2
- package/dist/src/link-button/link-button.d.ts.map +1 -0
- package/dist/src/{linkButton/linkButton.js → link-button/link-button.js} +1 -1
- package/dist/src/link-state/index.d.ts +3 -0
- package/dist/src/link-state/index.d.ts.map +1 -0
- package/dist/src/link-state/index.js +1 -0
- package/dist/src/{linkState/linkState.d.ts → link-state/link-state.d.ts} +1 -1
- package/dist/src/link-state/link-state.d.ts.map +1 -0
- package/dist/src/link-state/link-state.js +24 -0
- package/dist/src/live-region/index.d.ts +3 -0
- package/dist/src/live-region/index.d.ts.map +1 -0
- package/dist/src/live-region/index.js +1 -0
- package/dist/src/{liveRegion/liveRegion.d.ts → live-region/live-region.d.ts} +6 -3
- package/dist/src/live-region/live-region.d.ts.map +1 -0
- package/dist/src/{liveRegion/liveRegion.js → live-region/live-region.js} +7 -5
- package/dist/src/loading/index.d.ts.map +1 -1
- package/dist/src/loading/loading.d.ts.map +1 -1
- package/dist/src/loading/loading.js +5 -1
- package/dist/src/mark/index.d.ts.map +1 -1
- package/dist/src/mark/mark.d.ts +0 -4
- package/dist/src/mark/mark.d.ts.map +1 -1
- package/dist/src/mark/mark.js +6 -3
- package/dist/src/media/index.d.ts.map +1 -1
- package/dist/src/media/media.d.ts +17 -42
- package/dist/src/media/media.d.ts.map +1 -1
- package/dist/src/media/media.js +106 -104
- package/dist/src/menu/index.d.ts.map +1 -1
- package/dist/src/menu/item.d.ts +8 -8
- package/dist/src/menu/item.d.ts.map +1 -1
- package/dist/src/menu/menu.d.ts +2 -5
- package/dist/src/menu/menu.d.ts.map +1 -1
- package/dist/src/menu/menu.js +19 -30
- package/dist/src/menu/slip.d.ts +4 -18
- package/dist/src/menu/slip.d.ts.map +1 -1
- package/dist/src/menu/slip.js +36 -36
- package/dist/src/meter/index.d.ts.map +1 -1
- package/dist/src/meter/meter.d.ts +1 -1
- package/dist/src/meter/meter.d.ts.map +1 -1
- package/dist/src/meter/meter.js +12 -15
- package/dist/src/monogram/index.d.ts.map +1 -1
- package/dist/src/monogram/monogram.d.ts.map +1 -1
- package/dist/src/monogram/monogram.js +9 -8
- package/dist/src/nav-strip/index.d.ts +3 -0
- package/dist/src/nav-strip/index.d.ts.map +1 -0
- package/dist/src/nav-strip/index.js +1 -0
- package/dist/src/{navStrip/navStrip.d.ts → nav-strip/nav-strip.d.ts} +3 -6
- package/dist/src/nav-strip/nav-strip.d.ts.map +1 -0
- package/dist/src/nav-strip/nav-strip.js +25 -0
- package/dist/src/notice/index.d.ts.map +1 -1
- package/dist/src/notice/notice.d.ts +0 -4
- package/dist/src/notice/notice.d.ts.map +1 -1
- package/dist/src/notice/notice.js +1 -4
- package/dist/src/outcome/index.d.ts.map +1 -1
- package/dist/src/outcome/outcome.d.ts.map +1 -1
- package/dist/src/outcome/outcome.js +1 -1
- package/dist/src/page-head/index.d.ts +3 -0
- package/dist/src/page-head/index.d.ts.map +1 -0
- package/dist/src/page-head/index.js +1 -0
- package/dist/src/{pageHead/pageHead.d.ts → page-head/page-head.d.ts} +1 -1
- package/dist/src/page-head/page-head.d.ts.map +1 -0
- package/dist/src/{pageHead/pageHead.js → page-head/page-head.js} +1 -1
- package/dist/src/panel/index.d.ts.map +1 -1
- package/dist/src/panel/panel.d.ts +0 -1
- package/dist/src/panel/panel.d.ts.map +1 -1
- package/dist/src/panel/panel.js +0 -1
- package/dist/src/password-field/index.d.ts +3 -0
- package/dist/src/password-field/index.d.ts.map +1 -0
- package/dist/src/password-field/index.js +1 -0
- package/dist/src/{passwordField/passwordField.d.ts → password-field/password-field.d.ts} +1 -1
- package/dist/src/password-field/password-field.d.ts.map +1 -0
- package/dist/src/{passwordField/passwordField.js → password-field/password-field.js} +4 -5
- package/dist/src/places/index.d.ts.map +1 -1
- package/dist/src/places/places.d.ts +3 -4
- package/dist/src/places/places.d.ts.map +1 -1
- package/dist/src/places/places.js +8 -2
- package/dist/src/props-list/index.d.ts +3 -0
- package/dist/src/props-list/index.d.ts.map +1 -0
- package/dist/src/props-list/index.js +1 -0
- package/dist/src/{propsList/propsList.d.ts → props-list/props-list.d.ts} +2 -2
- package/dist/src/props-list/props-list.d.ts.map +1 -0
- package/dist/src/{propsList/propsList.js → props-list/props-list.js} +2 -2
- package/dist/src/prose/index.d.ts.map +1 -1
- package/dist/src/prose/prose.d.ts.map +1 -1
- package/dist/src/query-chip/index.d.ts +3 -0
- package/dist/src/query-chip/index.d.ts.map +1 -0
- package/dist/src/query-chip/index.js +1 -0
- package/dist/src/{queryChip/queryChip.d.ts → query-chip/query-chip.d.ts} +1 -1
- package/dist/src/query-chip/query-chip.d.ts.map +1 -0
- package/dist/src/{queryChip/queryChip.js → query-chip/query-chip.js} +7 -4
- package/dist/src/{radioChoices → radio-choices}/index.d.ts +2 -2
- package/dist/src/radio-choices/index.d.ts.map +1 -0
- package/dist/src/{radioChoices → radio-choices}/index.js +1 -1
- package/dist/src/{radioChoices/radioChoices.d.ts → radio-choices/radio-choices.d.ts} +3 -3
- package/dist/src/radio-choices/radio-choices.d.ts.map +1 -0
- package/dist/src/{radioChoices/radioChoices.js → radio-choices/radio-choices.js} +25 -24
- package/dist/src/rail/index.d.ts.map +1 -1
- package/dist/src/rail/rail.d.ts +16 -32
- package/dist/src/rail/rail.d.ts.map +1 -1
- package/dist/src/rail/rail.js +97 -65
- package/dist/src/reel/index.d.ts +1 -1
- package/dist/src/reel/index.d.ts.map +1 -1
- package/dist/src/reel/layout.d.ts +12 -54
- package/dist/src/reel/layout.d.ts.map +1 -1
- package/dist/src/reel/layout.js +120 -145
- package/dist/src/reel/reel.d.ts +35 -34
- package/dist/src/reel/reel.d.ts.map +1 -1
- package/dist/src/reel/reel.js +253 -233
- package/dist/src/remote/index.d.ts.map +1 -1
- package/dist/src/remote/remote.d.ts +2 -2
- package/dist/src/remote/remote.d.ts.map +1 -1
- package/dist/src/remote/remote.js +6 -2
- package/dist/src/rows/index.d.ts.map +1 -1
- package/dist/src/rows/rows.d.ts +2 -2
- package/dist/src/rows/rows.d.ts.map +1 -1
- package/dist/src/rows/rows.js +16 -7
- package/dist/src/scheme/index.d.ts +1 -1
- package/dist/src/scheme/index.d.ts.map +1 -1
- package/dist/src/scheme/index.js +1 -1
- package/dist/src/scheme/{schemeSwitch.d.ts → scheme-switch.d.ts} +2 -2
- package/dist/src/scheme/scheme-switch.d.ts.map +1 -0
- package/dist/src/scheme/{schemeSwitch.js → scheme-switch.js} +33 -38
- package/dist/src/scheme/scheme.d.ts +0 -2
- package/dist/src/scheme/scheme.d.ts.map +1 -1
- package/dist/src/scheme/scheme.js +0 -2
- package/dist/src/secret/index.d.ts.map +1 -1
- package/dist/src/secret/secret.d.ts.map +1 -1
- package/dist/src/segmented/index.d.ts.map +1 -1
- package/dist/src/segmented/segmented.d.ts.map +1 -1
- package/dist/src/segmented/segmented.js +14 -3
- package/dist/src/select-all/index.d.ts +3 -0
- package/dist/src/select-all/index.d.ts.map +1 -0
- package/dist/src/select-all/index.js +1 -0
- package/dist/src/{selectAll/selectAll.d.ts → select-all/select-all.d.ts} +1 -1
- package/dist/src/select-all/select-all.d.ts.map +1 -0
- package/dist/src/{selectAll/selectAll.js → select-all/select-all.js} +2 -2
- package/dist/src/select-field/index.d.ts +3 -0
- package/dist/src/select-field/index.d.ts.map +1 -0
- package/dist/src/select-field/index.js +1 -0
- package/dist/src/{selectField/selectField.d.ts → select-field/select-field.d.ts} +2 -2
- package/dist/src/select-field/select-field.d.ts.map +1 -0
- package/dist/src/{selectField/selectField.js → select-field/select-field.js} +10 -7
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +4 -1
- package/dist/src/skip-link/index.d.ts +2 -0
- package/dist/src/skip-link/index.d.ts.map +1 -0
- package/dist/src/skip-link/index.js +1 -0
- package/dist/src/{skipLink/skipLink.d.ts → skip-link/skip-link.d.ts} +1 -3
- package/dist/src/skip-link/skip-link.d.ts.map +1 -0
- package/dist/src/{skipLink/skipLink.js → skip-link/skip-link.js} +7 -11
- package/dist/src/slot/slot.d.ts +1 -4
- package/dist/src/slot/slot.d.ts.map +1 -1
- package/dist/src/slot/slot.js +3 -3
- package/dist/src/sortable/index.d.ts.map +1 -1
- package/dist/src/sortable/sortable.d.ts +44 -44
- package/dist/src/sortable/sortable.d.ts.map +1 -1
- package/dist/src/sortable/sortable.js +60 -93
- package/dist/src/stack/index.d.ts.map +1 -1
- package/dist/src/stack/stack.d.ts.map +1 -1
- package/dist/src/stack/stack.js +0 -2
- package/dist/src/stage/index.d.ts.map +1 -1
- package/dist/src/stage/stage.d.ts +1 -1
- package/dist/src/stage/stage.d.ts.map +1 -1
- package/dist/src/stage/stage.js +4 -1
- package/dist/src/stat/index.d.ts.map +1 -1
- package/dist/src/stat/stat.d.ts +1 -1
- package/dist/src/stat/stat.d.ts.map +1 -1
- package/dist/src/stat/stat.js +17 -8
- package/dist/src/status-bar/index.d.ts +4 -0
- package/dist/src/status-bar/index.d.ts.map +1 -0
- package/dist/src/status-bar/index.js +2 -0
- package/dist/src/{statusBar/statusBar.d.ts → status-bar/status-bar.d.ts} +4 -4
- package/dist/src/status-bar/status-bar.d.ts.map +1 -0
- package/dist/src/{statusBar/statusBar.js → status-bar/status-bar.js} +5 -6
- package/dist/src/subscription/{prefixKeys.d.ts → prefix-keys.d.ts} +1 -2
- package/dist/src/subscription/prefix-keys.d.ts.map +1 -0
- package/dist/src/subscription/{prefixKeys.js → prefix-keys.js} +2 -5
- package/dist/src/table/index.d.ts.map +1 -1
- package/dist/src/table/table.d.ts +1 -1
- package/dist/src/table/table.d.ts.map +1 -1
- package/dist/src/table/table.js +19 -7
- package/dist/src/tabs/index.d.ts.map +1 -1
- package/dist/src/tabs/tabs.d.ts +4 -4
- package/dist/src/tabs/tabs.d.ts.map +1 -1
- package/dist/src/tabs/tabs.js +1 -6
- package/dist/src/tag/index.d.ts.map +1 -1
- package/dist/src/tag/tag.d.ts.map +1 -1
- package/dist/src/tag/tag.js +4 -1
- package/dist/src/text-button/index.d.ts +3 -0
- package/dist/src/text-button/index.d.ts.map +1 -0
- package/dist/src/text-button/index.js +1 -0
- package/dist/src/{textButton/textButton.d.ts → text-button/text-button.d.ts} +1 -1
- package/dist/src/text-button/text-button.d.ts.map +1 -0
- package/dist/src/{textButton/textButton.js → text-button/text-button.js} +2 -2
- package/dist/src/textarea-field/index.d.ts +3 -0
- package/dist/src/textarea-field/index.d.ts.map +1 -0
- package/dist/src/textarea-field/index.js +1 -0
- package/dist/src/{textareaField/textareaField.d.ts → textarea-field/textarea-field.d.ts} +1 -1
- package/dist/src/textarea-field/textarea-field.d.ts.map +1 -0
- package/dist/src/{textareaField/textareaField.js → textarea-field/textarea-field.js} +2 -2
- package/dist/src/time/index.d.ts.map +1 -1
- package/dist/src/time/time.d.ts.map +1 -1
- package/dist/src/time/time.js +16 -9
- package/dist/src/tips/index.d.ts.map +1 -1
- package/dist/src/tips/tips.d.ts +7 -18
- package/dist/src/tips/tips.d.ts.map +1 -1
- package/dist/src/tips/tips.js +67 -65
- package/dist/src/toast/index.d.ts.map +1 -1
- package/dist/src/toast/stack.d.ts +1 -8
- package/dist/src/toast/stack.d.ts.map +1 -1
- package/dist/src/toast/stack.js +5 -18
- package/dist/src/toast/toast.d.ts +3 -5
- package/dist/src/toast/toast.d.ts.map +1 -1
- package/dist/src/toast/toast.js +42 -39
- package/dist/src/toc/index.d.ts.map +1 -1
- package/dist/src/toc/toc.d.ts +3 -3
- package/dist/src/toc/toc.d.ts.map +1 -1
- package/dist/src/toc/toc.js +10 -7
- package/dist/src/toolbar/index.d.ts.map +1 -1
- package/dist/src/toolbar/toolbar.d.ts +1 -1
- package/dist/src/toolbar/toolbar.d.ts.map +1 -1
- package/dist/src/toolbar/toolbar.js +27 -24
- package/dist/src/{topBar/barHeight.d.ts → top-bar/bar-height.d.ts} +1 -2
- package/dist/src/top-bar/bar-height.d.ts.map +1 -0
- package/dist/src/{topBar/barHeight.js → top-bar/bar-height.js} +20 -13
- package/dist/src/top-bar/index.d.ts +4 -0
- package/dist/src/top-bar/index.d.ts.map +1 -0
- package/dist/src/top-bar/index.js +2 -0
- package/dist/src/{topBar/topBar.d.ts → top-bar/top-bar.d.ts} +3 -3
- package/dist/src/top-bar/top-bar.d.ts.map +1 -0
- package/dist/src/{topBar/topBar.js → top-bar/top-bar.js} +2 -2
- package/dist/src/video-frame/index.d.ts +3 -0
- package/dist/src/video-frame/index.d.ts.map +1 -0
- package/dist/src/video-frame/index.js +1 -0
- package/dist/src/{videoFrame/videoFrame.d.ts → video-frame/video-frame.d.ts} +1 -1
- package/dist/src/video-frame/video-frame.d.ts.map +1 -0
- package/dist/src/{videoFrame/videoFrame.js → video-frame/video-frame.js} +11 -7
- package/dist/src/wall/index.d.ts.map +1 -1
- package/dist/src/wall/wall.d.ts.map +1 -1
- package/dist/src/window/index.d.ts.map +1 -1
- package/dist/src/window/window.d.ts +2 -2
- package/dist/src/window/window.d.ts.map +1 -1
- package/dist/src/window/window.js +4 -2
- package/dist/src/wordmark/index.d.ts.map +1 -1
- package/dist/src/wordmark/wordmark.d.ts.map +1 -1
- package/dist/src/wrap/index.d.ts.map +1 -1
- package/dist/src/wrap/wrap.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/adapters/diagram.ts +278 -0
- package/src/adapters/mermaid.ts +13 -273
- package/src/announcer/announcer.ts +54 -35
- package/src/attributes/attributes.ts +3 -1
- package/src/{audioFrame/audioFrame.ts → audio-frame/audio-frame.ts} +4 -6
- package/src/audio-frame/index.ts +3 -0
- package/src/banner/banner.ts +5 -4
- package/src/banner/index.ts +1 -0
- package/src/{barChart/barChart.ts → bar-chart/bar-chart.ts} +81 -43
- package/src/bar-chart/index.ts +3 -0
- package/src/bench/bench.ts +5 -4
- package/src/bench/index.ts +1 -0
- package/src/board/board.ts +338 -243
- package/src/board/index.ts +8 -1
- package/src/button/button.ts +24 -16
- package/src/button/index.ts +8 -1
- package/src/card/card.ts +23 -21
- package/src/card/index.ts +1 -0
- package/src/chart-table/chart-table.ts +87 -0
- package/src/chip/chip.ts +13 -9
- package/src/chip/index.ts +1 -0
- package/src/choice/choice.ts +13 -7
- package/src/choice/index.ts +1 -0
- package/src/choices/choices.ts +4 -3
- package/src/choices/index.ts +1 -0
- package/src/{codeEditor/codeEditor.ts → code-editor/code-editor.ts} +5 -4
- package/src/code-editor/index.ts +3 -0
- package/src/{codeSurface/codeSurface.ts → code-surface/code-surface.ts} +11 -5
- package/src/code-surface/index.ts +3 -0
- package/src/{commandPalette/commandPalette.ts → command-palette/command-palette.ts} +470 -295
- package/src/{commandPalette → command-palette}/index.ts +12 -2
- package/src/{commandPalette → command-palette}/keys.ts +44 -43
- package/src/{commandPalette → command-palette}/match.ts +42 -30
- package/src/{commandPalette → command-palette}/message.ts +13 -20
- package/src/{confirmDialog/confirmDialog.ts → confirm-dialog/confirm-dialog.ts} +51 -46
- package/src/{confirmDialog → confirm-dialog}/index.ts +3 -2
- package/src/{contextMenu/contextMenu.ts → context-menu/context-menu.ts} +71 -70
- package/src/{contextMenu → context-menu}/index.ts +4 -2
- package/src/{copyButton/copyButton.ts → copy-button/copy-button.ts} +51 -54
- package/src/{copyButton → copy-button}/index.ts +3 -2
- package/src/crumbs/crumbs.ts +7 -6
- package/src/crumbs/index.ts +1 -0
- package/src/deck/deck.ts +4 -3
- package/src/deck/index.ts +1 -0
- package/src/dialog/dialog.ts +135 -113
- package/src/dialog/fold.ts +44 -25
- package/src/dialog/index.ts +9 -1
- package/src/disclosure/disclosure.ts +14 -8
- package/src/disclosure/index.ts +1 -0
- package/src/dom/html-element.ts +10 -0
- package/src/drag/drag.ts +102 -119
- package/src/{dropZone/dropZone.ts → drop-zone/drop-zone.ts} +43 -43
- package/src/drop-zone/index.ts +11 -0
- package/src/{editableTitle/editableTitle.ts → editable-title/editable-title.ts} +29 -32
- package/src/{editableTitle → editable-title}/index.ts +4 -2
- package/src/{emptyState/emptyState.ts → empty-state/empty-state.ts} +9 -5
- package/src/empty-state/index.ts +3 -0
- package/src/{errorSummary/errorSummary.ts → error-summary/error-summary.ts} +16 -7
- package/src/error-summary/index.ts +3 -0
- package/src/field/field.ts +38 -28
- package/src/field/index.ts +1 -0
- package/src/{fieldGrid/fieldGrid.ts → field-grid/field-grid.ts} +4 -3
- package/src/field-grid/index.ts +3 -0
- package/src/fields/fields.ts +9 -5
- package/src/fields/index.ts +1 -0
- package/src/fieldset/fieldset.ts +6 -5
- package/src/fieldset/index.ts +1 -0
- package/src/{fileTree/fileTree.ts → file-tree/file-tree.ts} +241 -166
- package/src/file-tree/index.ts +12 -0
- package/src/{filterChip/filterChip.ts → filter-chip/filter-chip.ts} +32 -13
- package/src/filter-chip/index.ts +3 -0
- package/src/{filterStrip/filterStrip.ts → filter-strip/filter-strip.ts} +4 -3
- package/src/filter-strip/index.ts +3 -0
- package/src/{flashWord/flashWord.ts → flash-word/flash-word.ts} +9 -7
- package/src/flash-word/index.ts +3 -0
- package/src/focus/focus.ts +5 -5
- package/src/format/format.ts +37 -31
- package/src/format/index.ts +1 -0
- package/src/glyph/glyph.ts +7 -6
- package/src/glyph/glyphs.ts +2601 -2611
- package/src/glyph/index.ts +3 -0
- package/src/group/group.ts +4 -3
- package/src/group/index.ts +1 -0
- package/src/history/history.ts +18 -10
- package/src/history/index.ts +1 -0
- package/src/{iconButton/iconButton.ts → icon-button/icon-button.ts} +13 -7
- package/src/icon-button/index.ts +3 -0
- package/src/identity/identity.ts +7 -6
- package/src/identity/index.ts +1 -0
- package/src/{imageFrame/imageFrame.ts → image-frame/image-frame.ts} +43 -25
- package/src/image-frame/index.ts +3 -0
- package/src/index.ts +139 -41
- package/src/{inlineInput → inline-input}/index.ts +3 -2
- package/src/{inlineInput/inlineInput.ts → inline-input/inline-input.ts} +97 -88
- package/src/{keyHelp → key-help}/index.ts +3 -2
- package/src/{keyHelp/keyHelp.ts → key-help/key-help.ts} +74 -62
- package/src/key-hint/index.ts +5 -0
- package/src/{keyHint/keyHint.ts → key-hint/key-hint.ts} +10 -5
- package/src/{keyHint/keyLabel.ts → key-hint/key-label.ts} +43 -22
- package/src/keymap/index.ts +1 -0
- package/src/keymap/keymap.ts +23 -9
- package/src/keys/keys.ts +0 -2
- package/src/line-chart/index.ts +3 -0
- package/src/{lineChart/lineChart.ts → line-chart/line-chart.ts} +71 -49
- package/src/line-diff/diff.ts +196 -0
- package/src/line-diff/index.ts +7 -0
- package/src/{lineDiff/lineDiff.ts → line-diff/line-diff.ts} +45 -23
- package/src/{lineDiff → line-diff}/patch.ts +104 -76
- package/src/link-button/index.ts +3 -0
- package/src/{linkButton/linkButton.ts → link-button/link-button.ts} +7 -5
- package/src/link-state/index.ts +3 -0
- package/src/{linkState/linkState.ts → link-state/link-state.ts} +20 -9
- package/src/live-region/index.ts +3 -0
- package/src/{liveRegion/liveRegion.ts → live-region/live-region.ts} +15 -11
- package/src/loading/index.ts +1 -0
- package/src/loading/loading.ts +10 -5
- package/src/mark/index.ts +1 -0
- package/src/mark/mark.ts +17 -15
- package/src/media/index.ts +1 -0
- package/src/media/media.ts +255 -157
- package/src/menu/index.ts +4 -0
- package/src/menu/item.ts +10 -11
- package/src/menu/menu.ts +110 -97
- package/src/menu/slip.ts +129 -92
- package/src/meter/index.ts +1 -0
- package/src/meter/meter.ts +52 -33
- package/src/monogram/index.ts +1 -0
- package/src/monogram/monogram.ts +27 -19
- package/src/nav-strip/index.ts +3 -0
- package/src/{navStrip/navStrip.ts → nav-strip/nav-strip.ts} +21 -13
- package/src/notice/index.ts +1 -0
- package/src/notice/notice.ts +24 -16
- package/src/outcome/index.ts +1 -0
- package/src/outcome/outcome.ts +14 -6
- package/src/page-head/index.ts +3 -0
- package/src/{pageHead/pageHead.ts → page-head/page-head.ts} +6 -5
- package/src/panel/index.ts +1 -0
- package/src/panel/panel.ts +6 -6
- package/src/password-field/index.ts +3 -0
- package/src/{passwordField/passwordField.ts → password-field/password-field.ts} +13 -13
- package/src/pixel-paper.css +26 -508
- package/src/places/index.ts +1 -0
- package/src/places/places.ts +22 -11
- package/src/props-list/index.ts +3 -0
- package/src/{propsList/propsList.ts → props-list/props-list.ts} +6 -6
- package/src/prose/index.ts +1 -0
- package/src/prose/prose.ts +4 -4
- package/src/query-chip/index.ts +3 -0
- package/src/{queryChip/queryChip.ts → query-chip/query-chip.ts} +18 -7
- package/src/{radioChoices → radio-choices}/index.ts +3 -2
- package/src/{radioChoices/radioChoices.ts → radio-choices/radio-choices.ts} +79 -65
- package/src/rail/index.ts +1 -0
- package/src/rail/rail.ts +291 -225
- package/src/reel/index.ts +8 -1
- package/src/reel/layout.ts +393 -238
- package/src/reel/reel.ts +750 -452
- package/src/remote/index.ts +1 -0
- package/src/remote/remote.ts +18 -11
- package/src/rows/index.ts +1 -0
- package/src/rows/rows.ts +83 -47
- package/src/scheme/index.ts +3 -1
- package/src/scheme/{schemeSwitch.ts → scheme-switch.ts} +24 -35
- package/src/scheme/scheme.ts +4 -4
- package/src/secret/index.ts +1 -0
- package/src/secret/secret.ts +5 -4
- package/src/segmented/index.ts +1 -0
- package/src/segmented/segmented.ts +22 -10
- package/src/select-all/index.ts +3 -0
- package/src/{selectAll/selectAll.ts → select-all/select-all.ts} +9 -8
- package/src/{selectField → select-field}/index.ts +3 -2
- package/src/{selectField/selectField.ts → select-field/select-field.ts} +25 -11
- package/src/sheet/index.ts +1 -0
- package/src/sheet/sheet.ts +9 -5
- package/src/skip-link/index.ts +1 -0
- package/src/{skipLink/skipLink.ts → skip-link/skip-link.ts} +9 -15
- package/src/slot/slot.ts +5 -6
- package/src/sortable/index.ts +1 -0
- package/src/sortable/sortable.ts +287 -206
- package/src/stack/index.ts +1 -0
- package/src/stack/stack.ts +6 -7
- package/src/stage/index.ts +1 -0
- package/src/stage/stage.ts +12 -8
- package/src/stat/index.ts +1 -0
- package/src/stat/stat.ts +39 -20
- package/src/status-bar/index.ts +5 -0
- package/src/{statusBar/statusBar.ts → status-bar/status-bar.ts} +18 -11
- package/src/subscription/{prefixKeys.ts → prefix-keys.ts} +5 -6
- package/src/table/index.ts +1 -0
- package/src/table/table.ts +49 -24
- package/src/tabs/index.ts +1 -0
- package/src/tabs/tabs.ts +58 -60
- package/src/tag/index.ts +1 -0
- package/src/tag/tag.ts +14 -7
- package/src/text-button/index.ts +3 -0
- package/src/{textButton/textButton.ts → text-button/text-button.ts} +7 -5
- package/src/textarea-field/index.ts +3 -0
- package/src/{textareaField/textareaField.ts → textarea-field/textarea-field.ts} +15 -7
- package/src/time/index.ts +1 -0
- package/src/time/time.ts +58 -25
- package/src/tips/index.ts +1 -0
- package/src/tips/tips.ts +183 -127
- package/src/toast/index.ts +3 -0
- package/src/toast/stack.ts +22 -23
- package/src/toast/toast.ts +168 -100
- package/src/toc/index.ts +1 -0
- package/src/toc/toc.ts +42 -27
- package/src/tokens.css +7 -24
- package/src/toolbar/index.ts +1 -0
- package/src/toolbar/toolbar.ts +78 -40
- package/src/{topBar/barHeight.ts → top-bar/bar-height.ts} +26 -12
- package/src/top-bar/index.ts +5 -0
- package/src/{topBar/topBar.ts → top-bar/top-bar.ts} +13 -7
- package/src/video-frame/index.ts +3 -0
- package/src/{videoFrame/videoFrame.ts → video-frame/video-frame.ts} +31 -18
- package/src/wall/index.ts +1 -0
- package/src/wall/wall.ts +13 -10
- package/src/window/index.ts +1 -0
- package/src/window/window.ts +15 -9
- package/src/wordmark/index.ts +1 -0
- package/src/wordmark/wordmark.ts +4 -3
- package/src/wrap/index.ts +1 -0
- package/src/wrap/wrap.ts +4 -3
- package/dist/src/audioFrame/audioFrame.d.ts.map +0 -1
- package/dist/src/audioFrame/index.d.ts +0 -3
- package/dist/src/audioFrame/index.d.ts.map +0 -1
- package/dist/src/audioFrame/index.js +0 -1
- package/dist/src/barChart/barChart.d.ts.map +0 -1
- package/dist/src/barChart/index.d.ts +0 -3
- package/dist/src/barChart/index.d.ts.map +0 -1
- package/dist/src/barChart/index.js +0 -1
- package/dist/src/chartTable/chartTable.d.ts.map +0 -1
- package/dist/src/codeEditor/codeEditor.d.ts.map +0 -1
- package/dist/src/codeEditor/index.d.ts +0 -3
- package/dist/src/codeEditor/index.d.ts.map +0 -1
- package/dist/src/codeEditor/index.js +0 -1
- package/dist/src/codeSurface/codeSurface.d.ts.map +0 -1
- package/dist/src/codeSurface/index.d.ts +0 -3
- package/dist/src/codeSurface/index.d.ts.map +0 -1
- package/dist/src/codeSurface/index.js +0 -1
- package/dist/src/commandPalette/commandPalette.d.ts.map +0 -1
- package/dist/src/commandPalette/commandPalette.js +0 -611
- package/dist/src/commandPalette/index.d.ts.map +0 -1
- package/dist/src/commandPalette/keys.d.ts.map +0 -1
- package/dist/src/commandPalette/keys.js +0 -102
- package/dist/src/commandPalette/match.d.ts.map +0 -1
- package/dist/src/commandPalette/message.d.ts.map +0 -1
- package/dist/src/confirmDialog/confirmDialog.d.ts.map +0 -1
- package/dist/src/confirmDialog/index.d.ts +0 -3
- package/dist/src/confirmDialog/index.d.ts.map +0 -1
- package/dist/src/contextMenu/contextMenu.d.ts.map +0 -1
- package/dist/src/contextMenu/index.d.ts.map +0 -1
- package/dist/src/copyButton/copyButton.d.ts.map +0 -1
- package/dist/src/copyButton/index.d.ts +0 -3
- package/dist/src/copyButton/index.d.ts.map +0 -1
- package/dist/src/copyButton/index.js +0 -1
- package/dist/src/dropZone/dropZone.d.ts.map +0 -1
- package/dist/src/dropZone/index.d.ts +0 -3
- package/dist/src/dropZone/index.d.ts.map +0 -1
- package/dist/src/dropZone/index.js +0 -1
- package/dist/src/editableTitle/editableTitle.d.ts.map +0 -1
- package/dist/src/editableTitle/index.d.ts +0 -4
- package/dist/src/editableTitle/index.d.ts.map +0 -1
- package/dist/src/emptyState/emptyState.d.ts.map +0 -1
- package/dist/src/emptyState/index.d.ts +0 -3
- package/dist/src/emptyState/index.d.ts.map +0 -1
- package/dist/src/emptyState/index.js +0 -1
- package/dist/src/errorSummary/errorSummary.d.ts.map +0 -1
- package/dist/src/errorSummary/index.d.ts +0 -3
- package/dist/src/errorSummary/index.d.ts.map +0 -1
- package/dist/src/errorSummary/index.js +0 -1
- package/dist/src/fieldGrid/fieldGrid.d.ts.map +0 -1
- package/dist/src/fieldGrid/index.d.ts +0 -3
- package/dist/src/fieldGrid/index.d.ts.map +0 -1
- package/dist/src/fieldGrid/index.js +0 -1
- package/dist/src/fileTree/fileTree.d.ts.map +0 -1
- package/dist/src/fileTree/fileTree.js +0 -230
- package/dist/src/fileTree/index.d.ts +0 -3
- package/dist/src/fileTree/index.d.ts.map +0 -1
- package/dist/src/filterChip/filterChip.d.ts.map +0 -1
- package/dist/src/filterChip/index.d.ts +0 -3
- package/dist/src/filterChip/index.d.ts.map +0 -1
- package/dist/src/filterChip/index.js +0 -1
- package/dist/src/filterStrip/filterStrip.d.ts.map +0 -1
- package/dist/src/filterStrip/index.d.ts +0 -3
- package/dist/src/filterStrip/index.d.ts.map +0 -1
- package/dist/src/filterStrip/index.js +0 -1
- package/dist/src/flashWord/flashWord.d.ts.map +0 -1
- package/dist/src/flashWord/index.d.ts +0 -3
- package/dist/src/flashWord/index.d.ts.map +0 -1
- package/dist/src/flashWord/index.js +0 -1
- package/dist/src/iconButton/iconButton.d.ts.map +0 -1
- package/dist/src/iconButton/index.d.ts +0 -3
- package/dist/src/iconButton/index.d.ts.map +0 -1
- package/dist/src/iconButton/index.js +0 -1
- package/dist/src/imageFrame/imageFrame.d.ts.map +0 -1
- package/dist/src/imageFrame/index.d.ts +0 -3
- package/dist/src/imageFrame/index.d.ts.map +0 -1
- package/dist/src/imageFrame/index.js +0 -1
- package/dist/src/inlineInput/index.d.ts +0 -3
- package/dist/src/inlineInput/index.d.ts.map +0 -1
- package/dist/src/inlineInput/inlineInput.d.ts.map +0 -1
- package/dist/src/keyHelp/index.d.ts +0 -3
- package/dist/src/keyHelp/index.d.ts.map +0 -1
- package/dist/src/keyHelp/keyHelp.d.ts.map +0 -1
- package/dist/src/keyHint/index.d.ts +0 -4
- package/dist/src/keyHint/index.d.ts.map +0 -1
- package/dist/src/keyHint/index.js +0 -2
- package/dist/src/keyHint/keyHint.d.ts.map +0 -1
- package/dist/src/keyHint/keyLabel.d.ts.map +0 -1
- package/dist/src/lineChart/index.d.ts +0 -3
- package/dist/src/lineChart/index.d.ts.map +0 -1
- package/dist/src/lineChart/index.js +0 -1
- package/dist/src/lineChart/lineChart.d.ts.map +0 -1
- package/dist/src/lineDiff/diff.d.ts +0 -41
- package/dist/src/lineDiff/diff.d.ts.map +0 -1
- package/dist/src/lineDiff/diff.js +0 -92
- package/dist/src/lineDiff/index.d.ts +0 -5
- package/dist/src/lineDiff/index.d.ts.map +0 -1
- package/dist/src/lineDiff/index.js +0 -2
- package/dist/src/lineDiff/lineDiff.d.ts.map +0 -1
- package/dist/src/lineDiff/patch.d.ts.map +0 -1
- package/dist/src/linkButton/index.d.ts +0 -3
- package/dist/src/linkButton/index.d.ts.map +0 -1
- package/dist/src/linkButton/index.js +0 -1
- package/dist/src/linkButton/linkButton.d.ts.map +0 -1
- package/dist/src/linkState/index.d.ts +0 -3
- package/dist/src/linkState/index.d.ts.map +0 -1
- package/dist/src/linkState/index.js +0 -1
- package/dist/src/linkState/linkState.d.ts.map +0 -1
- package/dist/src/linkState/linkState.js +0 -14
- package/dist/src/liveRegion/index.d.ts +0 -3
- package/dist/src/liveRegion/index.d.ts.map +0 -1
- package/dist/src/liveRegion/index.js +0 -1
- package/dist/src/liveRegion/liveRegion.d.ts.map +0 -1
- package/dist/src/navStrip/index.d.ts +0 -3
- package/dist/src/navStrip/index.d.ts.map +0 -1
- package/dist/src/navStrip/index.js +0 -1
- package/dist/src/navStrip/navStrip.d.ts.map +0 -1
- package/dist/src/navStrip/navStrip.js +0 -27
- package/dist/src/pageHead/index.d.ts +0 -3
- package/dist/src/pageHead/index.d.ts.map +0 -1
- package/dist/src/pageHead/index.js +0 -1
- package/dist/src/pageHead/pageHead.d.ts.map +0 -1
- package/dist/src/passwordField/index.d.ts +0 -3
- package/dist/src/passwordField/index.d.ts.map +0 -1
- package/dist/src/passwordField/index.js +0 -1
- package/dist/src/passwordField/passwordField.d.ts.map +0 -1
- package/dist/src/propsList/index.d.ts +0 -3
- package/dist/src/propsList/index.d.ts.map +0 -1
- package/dist/src/propsList/index.js +0 -1
- package/dist/src/propsList/propsList.d.ts.map +0 -1
- package/dist/src/queryChip/index.d.ts +0 -3
- package/dist/src/queryChip/index.d.ts.map +0 -1
- package/dist/src/queryChip/index.js +0 -1
- package/dist/src/queryChip/queryChip.d.ts.map +0 -1
- package/dist/src/radioChoices/index.d.ts.map +0 -1
- package/dist/src/radioChoices/radioChoices.d.ts.map +0 -1
- package/dist/src/scheme/schemeSwitch.d.ts.map +0 -1
- package/dist/src/selectAll/index.d.ts +0 -3
- package/dist/src/selectAll/index.d.ts.map +0 -1
- package/dist/src/selectAll/index.js +0 -1
- package/dist/src/selectAll/selectAll.d.ts.map +0 -1
- package/dist/src/selectField/index.d.ts +0 -3
- package/dist/src/selectField/index.d.ts.map +0 -1
- package/dist/src/selectField/index.js +0 -1
- package/dist/src/selectField/selectField.d.ts.map +0 -1
- package/dist/src/skipLink/index.d.ts +0 -2
- package/dist/src/skipLink/index.d.ts.map +0 -1
- package/dist/src/skipLink/index.js +0 -1
- package/dist/src/skipLink/skipLink.d.ts.map +0 -1
- package/dist/src/statusBar/index.d.ts +0 -4
- package/dist/src/statusBar/index.d.ts.map +0 -1
- package/dist/src/statusBar/index.js +0 -2
- package/dist/src/statusBar/statusBar.d.ts.map +0 -1
- package/dist/src/subscription/prefixKeys.d.ts.map +0 -1
- package/dist/src/textButton/index.d.ts +0 -3
- package/dist/src/textButton/index.d.ts.map +0 -1
- package/dist/src/textButton/index.js +0 -1
- package/dist/src/textButton/textButton.d.ts.map +0 -1
- package/dist/src/textareaField/index.d.ts +0 -3
- package/dist/src/textareaField/index.d.ts.map +0 -1
- package/dist/src/textareaField/index.js +0 -1
- package/dist/src/textareaField/textareaField.d.ts.map +0 -1
- package/dist/src/topBar/barHeight.d.ts.map +0 -1
- package/dist/src/topBar/index.d.ts +0 -4
- package/dist/src/topBar/index.d.ts.map +0 -1
- package/dist/src/topBar/index.js +0 -2
- package/dist/src/topBar/topBar.d.ts.map +0 -1
- package/dist/src/videoFrame/index.d.ts +0 -3
- package/dist/src/videoFrame/index.d.ts.map +0 -1
- package/dist/src/videoFrame/index.js +0 -1
- package/dist/src/videoFrame/videoFrame.d.ts.map +0 -1
- package/src/audioFrame/index.ts +0 -2
- package/src/barChart/index.ts +0 -2
- package/src/chartTable/chartTable.ts +0 -88
- package/src/codeEditor/index.ts +0 -2
- package/src/codeSurface/index.ts +0 -2
- package/src/dropZone/index.ts +0 -2
- package/src/emptyState/index.ts +0 -2
- package/src/errorSummary/index.ts +0 -2
- package/src/fieldGrid/index.ts +0 -2
- package/src/fileTree/index.ts +0 -2
- package/src/filterChip/index.ts +0 -2
- package/src/filterStrip/index.ts +0 -2
- package/src/flashWord/index.ts +0 -2
- package/src/iconButton/index.ts +0 -2
- package/src/imageFrame/index.ts +0 -2
- package/src/keyHint/index.ts +0 -3
- package/src/lineChart/index.ts +0 -2
- package/src/lineDiff/diff.ts +0 -182
- package/src/lineDiff/index.ts +0 -4
- package/src/linkButton/index.ts +0 -2
- package/src/linkState/index.ts +0 -2
- package/src/liveRegion/index.ts +0 -2
- package/src/navStrip/index.ts +0 -2
- package/src/pageHead/index.ts +0 -2
- package/src/passwordField/index.ts +0 -2
- package/src/propsList/index.ts +0 -2
- package/src/queryChip/index.ts +0 -2
- package/src/selectAll/index.ts +0 -2
- package/src/skipLink/index.ts +0 -1
- package/src/statusBar/index.ts +0 -3
- package/src/textButton/index.ts +0 -2
- package/src/textareaField/index.ts +0 -2
- package/src/topBar/index.ts +0 -3
- package/src/videoFrame/index.ts +0 -2
package/dist/src/reel/layout.js
CHANGED
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
|
|
2
|
-
|
|
3
|
-
// holds and applies, where a held pane may land, and how places are said.
|
|
4
|
-
import { Array, Equal, Match, Number, Option, Predicate, Record, Schema, pipe } from "effect";
|
|
2
|
+
import { Array, Equal, Match, Number, Option, Predicate, Record, Schema, pipe, } from "effect";
|
|
5
3
|
import { defineMessageUnion } from "foldkit/message";
|
|
6
4
|
import { defineTaggedUnion } from "foldkit/schema";
|
|
7
5
|
import { LOCALE } from "../locale/locale.js";
|
|
8
|
-
// LAYOUT SCHEMAS
|
|
9
6
|
/** Schema for one pane as the reel knows it: its id, unique in the reel and the application's
|
|
10
7
|
* to keep, its name in words (its grip, its splitter and what screen readers hear), and its
|
|
11
8
|
* share of its column's height, a weight against its neighbours'. */
|
|
12
9
|
export const Pane = Schema.Struct({
|
|
13
10
|
id: Schema.String,
|
|
14
11
|
label: Schema.String,
|
|
15
|
-
weight: Schema.
|
|
12
|
+
weight: Schema.Finite,
|
|
16
13
|
});
|
|
17
|
-
/** Schema for one column: its id, unique among the reel's columns and the application's to
|
|
18
|
-
* keep, its width, a fraction of the reel's visible width (1 fills it), and its panes, top
|
|
19
|
-
* to bottom. A column `apply` makes for a pane pulled out takes the pane's id (`notes`, or
|
|
20
|
-
* `notes/2` where a column has it), so pane and column ids share one namespace. */
|
|
21
14
|
export const Column = Schema.Struct({
|
|
22
15
|
id: Schema.String,
|
|
23
|
-
width: Schema.
|
|
16
|
+
width: Schema.Finite,
|
|
24
17
|
panes: Schema.NonEmptyArray(Pane),
|
|
25
18
|
});
|
|
26
19
|
/** Schema for a reel's layout: its columns, left to right. The application's to keep. */
|
|
27
20
|
export const Layout = Schema.Array(Column);
|
|
28
|
-
/** What a move is said of: a pane, or a column (a key moves one), by its id. */
|
|
29
21
|
export const Subject = defineTaggedUnion({
|
|
30
22
|
Pane: { paneId: Schema.String },
|
|
31
23
|
Column: { columnId: Schema.String },
|
|
32
24
|
});
|
|
33
|
-
/** Where a held pane would land: into a column, at a place among its other panes, or in the
|
|
34
|
-
* gap before a column (none: after the last), as a column of its own. */
|
|
35
25
|
export const Target = defineTaggedUnion({
|
|
36
|
-
Into: { columnId: Schema.String, index: Schema.
|
|
26
|
+
Into: { columnId: Schema.String, index: Schema.Finite },
|
|
37
27
|
Gap: { maybeBeforeColumnId: Schema.Option(Schema.String) },
|
|
38
28
|
});
|
|
39
|
-
// REQUEST
|
|
40
29
|
/** Union of what a reel asks the application to do to its layout, which the application
|
|
41
30
|
* applies (`apply` does it) or not, by id, so a request still means what it meant after the
|
|
42
31
|
* layout changed under it. `MovedPane`: a pane into a column, at `toIndex` among that
|
|
@@ -44,32 +33,45 @@ export const Target = defineTaggedUnion({
|
|
|
44
33
|
* (none: after the last). `MovedColumn`: a column to before another (none: last).
|
|
45
34
|
* `ResizedColumn`: a column's width. `ResizedPanes`: a column's panes' weights, by pane id. */
|
|
46
35
|
export const OutMessage = defineMessageUnion({
|
|
47
|
-
MovedPane: {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
MovedPane: {
|
|
37
|
+
paneId: Schema.String,
|
|
38
|
+
toColumnId: Schema.String,
|
|
39
|
+
toIndex: Schema.Finite,
|
|
40
|
+
},
|
|
41
|
+
PulledOutPane: {
|
|
42
|
+
paneId: Schema.String,
|
|
43
|
+
maybeBeforeColumnId: Schema.Option(Schema.String),
|
|
44
|
+
},
|
|
45
|
+
MovedColumn: {
|
|
46
|
+
columnId: Schema.String,
|
|
47
|
+
maybeBeforeColumnId: Schema.Option(Schema.String),
|
|
48
|
+
},
|
|
49
|
+
ResizedColumn: { columnId: Schema.String, width: Schema.Finite },
|
|
51
50
|
ResizedPanes: {
|
|
52
51
|
columnId: Schema.String,
|
|
53
|
-
weights: Schema.Record(Schema.String, Schema.
|
|
52
|
+
weights: Schema.Record(Schema.String, Schema.Finite),
|
|
54
53
|
},
|
|
55
54
|
});
|
|
56
|
-
/** A splitter: the one after a column, which sizes its width, or the one below a pane, which
|
|
57
|
-
* shares the height between it and the pane under it. */
|
|
58
55
|
export const Splitter = defineTaggedUnion({
|
|
59
56
|
Width: { columnId: Schema.String },
|
|
60
57
|
Split: { abovePaneId: Schema.String },
|
|
61
58
|
});
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
export const Resize = Schema.Union([
|
|
60
|
+
OutMessage.ResizedColumn,
|
|
61
|
+
OutMessage.ResizedPanes,
|
|
62
|
+
]);
|
|
64
63
|
const placesOf = (layout) => __foldkitBrandViewResult((Array.flatMap(layout, (column, columnIndex) => __foldkitBrandViewResult((Array.map(column.panes, (pane, row) => (__foldkitBrandViewResult(({ column, columnIndex, row, pane }), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~2")))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#placesOf");
|
|
65
64
|
export const placeOf = (layout, paneId) => __foldkitBrandViewResult((Array.findFirst(placesOf(layout), (place) => __foldkitBrandViewResult((place.pane.id === paneId), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~3"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#placeOf");
|
|
66
|
-
export const placeAt = (layout, columnIndex, row) => __foldkitBrandViewResult((Option.flatMap(Array.get(layout, columnIndex), (column) => __foldkitBrandViewResult((Option.map(Array.get(column.panes, row), (pane) => (__foldkitBrandViewResult(({
|
|
65
|
+
export const placeAt = (layout, columnIndex, row) => __foldkitBrandViewResult((Option.flatMap(Array.get(layout, columnIndex), (column) => __foldkitBrandViewResult((Option.map(Array.get(column.panes, row), (pane) => (__foldkitBrandViewResult(({
|
|
66
|
+
column,
|
|
67
|
+
columnIndex,
|
|
68
|
+
row,
|
|
69
|
+
pane,
|
|
70
|
+
}), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~5")))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~4"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#placeAt");
|
|
67
71
|
export const firstPlace = (layout) => __foldkitBrandViewResult((placeAt(layout, 0, 0)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#firstPlace");
|
|
68
72
|
const columnIndexOf = (layout, columnId) => __foldkitBrandViewResult((Array.findFirstIndex(layout, (column) => __foldkitBrandViewResult((column.id === columnId), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~6"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#columnIndexOf");
|
|
69
73
|
const columnOf = (layout, columnId) => __foldkitBrandViewResult((Array.findFirst(layout, (column) => __foldkitBrandViewResult((column.id === columnId), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~7"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#columnOf");
|
|
70
|
-
/** The id of the column after the one at `columnIndex`: none after the last. */
|
|
71
74
|
const nextColumnId = (layout, columnIndex) => __foldkitBrandViewResult((Option.map(Array.get(layout, columnIndex + 1), (column) => __foldkitBrandViewResult((column.id), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~8"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#nextColumnId");
|
|
72
|
-
// a running mean, which never passes the largest weight, where the weights' sum may overflow
|
|
73
75
|
const meanWeight = (panes) => __foldkitBrandViewResult((Array.match(panes, {
|
|
74
76
|
onEmpty: () => __foldkitBrandViewResult((1), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onEmpty"),
|
|
75
77
|
onNonEmpty: (some) => __foldkitBrandViewResult((Array.reduce(some, 0, (mean, pane, index) => __foldkitBrandViewResult((mean + (pane.weight - mean) / (index + 1)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~9"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNonEmpty"),
|
|
@@ -79,33 +81,34 @@ const insertAt = (items, index, item) => {
|
|
|
79
81
|
const [before, after] = Array.splitAt(items, Number.clamp(index, { minimum: 0, maximum: items.length }));
|
|
80
82
|
return __foldkitBrandViewResult((Array.appendAll(Array.append(before, item), after)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#insertAt");
|
|
81
83
|
};
|
|
82
|
-
/** `layout` with the pane `paneId` taken out, and any column it leaves empty gone. */
|
|
83
84
|
const without = (layout, paneId) => __foldkitBrandViewResult((Array.flatMap(layout, (column) => {
|
|
84
85
|
const others = othersIn(column, paneId);
|
|
85
|
-
return __foldkitBrandViewResult((Array.isReadonlyArrayNonEmpty(others)
|
|
86
|
+
return __foldkitBrandViewResult((Array.isReadonlyArrayNonEmpty(others)
|
|
87
|
+
? [{ ...column, panes: others }]
|
|
88
|
+
: []), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~11");
|
|
86
89
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#without");
|
|
87
|
-
/** Where a column goes when it is put before `maybeBeforeColumnId`: none when that column is
|
|
88
|
-
* not in `layout`. */
|
|
89
90
|
const gapIndex = (layout, maybeBeforeColumnId) => __foldkitBrandViewResult((Option.match(maybeBeforeColumnId, {
|
|
90
91
|
onNone: () => __foldkitBrandViewResult((Option.some(layout.length)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone"),
|
|
91
92
|
onSome: (columnId) => __foldkitBrandViewResult((columnIndexOf(layout, columnId)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome"),
|
|
92
93
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#gapIndex");
|
|
93
|
-
/** A column id for a column made for `paneId`: the pane's own id, or the first `id/2`,
|
|
94
|
-
* `id/3`… no column in `layout` has. */
|
|
95
94
|
const freshColumnId = (layout, paneId, suffix = 1) => {
|
|
96
95
|
const candidate = suffix === 1 ? paneId : `${paneId}/${suffix}`;
|
|
97
96
|
return __foldkitBrandViewResult((Array.some(layout, (column) => __foldkitBrandViewResult((column.id === candidate), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~12"))
|
|
98
97
|
? freshColumnId(layout, paneId, suffix + 1)
|
|
99
98
|
: candidate), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#freshColumnId");
|
|
100
99
|
};
|
|
101
|
-
const movePane = (layout, paneId, toColumnId, toIndex) => __foldkitBrandViewResult((Option.match(Option.all({
|
|
100
|
+
const movePane = (layout, paneId, toColumnId, toIndex) => __foldkitBrandViewResult((Option.match(Option.all({
|
|
101
|
+
from: placeOf(layout, paneId),
|
|
102
|
+
to: columnOf(layout, toColumnId),
|
|
103
|
+
}), {
|
|
102
104
|
onNone: () => __foldkitBrandViewResult((layout), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone~2"),
|
|
103
105
|
onSome: ({ from, to }) => {
|
|
104
106
|
const others = othersIn(to, paneId);
|
|
105
107
|
const weight = to.id === from.column.id ? from.pane.weight : meanWeight(others);
|
|
106
108
|
const panes = insertAt(others, toIndex, { ...from.pane, weight });
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
return __foldkitBrandViewResult((Array.flatMap(layout, (column) => __foldkitBrandViewResult((column.id === toColumnId
|
|
110
|
+
? [{ ...column, panes }]
|
|
111
|
+
: without([column], paneId)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~13"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~2");
|
|
109
112
|
},
|
|
110
113
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#movePane");
|
|
111
114
|
const pullOutPane = (layout, paneId, maybeBeforeColumnId) => __foldkitBrandViewResult((Option.match(placeOf(layout, paneId), {
|
|
@@ -158,15 +161,8 @@ export const apply = (layout, request) => __foldkitBrandViewResult((OutMessage.m
|
|
|
158
161
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~18"))),
|
|
159
162
|
}), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~17")))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#ResizedPanes"),
|
|
160
163
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#apply");
|
|
161
|
-
/** Whether `request` changes `layout`: a move, a drop or a stop that would leave it as it is
|
|
162
|
-
* is passed over. */
|
|
163
164
|
export const isChange = (layout, request) => __foldkitBrandViewResult((!Equal.equals(apply(layout, request), layout)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#isChange");
|
|
164
|
-
// WIDTHS
|
|
165
|
-
/** How close a width is to a preset to count as it. */
|
|
166
165
|
const PRESET_TOLERANCE = 0.01;
|
|
167
|
-
/** The widths a column cycles through, as fractions of the reel's visible width, with the
|
|
168
|
-
* words they are said in. They live here, not in the tokens, because they are words as much
|
|
169
|
-
* as sizes. */
|
|
170
166
|
const PRESETS = [
|
|
171
167
|
{ width: 1 / 3, words: "a third of the width" },
|
|
172
168
|
{ width: 1 / 2, words: "half the width" },
|
|
@@ -179,22 +175,19 @@ export const widthWords = (width) => __foldkitBrandViewResult((Option.match(pres
|
|
|
179
175
|
onNone: () => __foldkitBrandViewResult((`${percent(width)}% of the width`), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone~6"),
|
|
180
176
|
onSome: ({ words }) => __foldkitBrandViewResult((words), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~6"),
|
|
181
177
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#widthWords");
|
|
182
|
-
/** The next preset wider than `width`, or the narrowest past the widest. */
|
|
183
178
|
export const nextPreset = (width) => __foldkitBrandViewResult((Option.getOrElse(Array.findFirst(PRESETS, (preset) => __foldkitBrandViewResult((preset.width > width + PRESET_TOLERANCE), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~21")), () => __foldkitBrandViewResult((Array.headNonEmpty(PRESETS)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~22")).width), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#nextPreset");
|
|
184
|
-
// WORDS
|
|
185
|
-
/** The words a place is said in. `{pane}` is a pane's label and `{column}` a column's
|
|
186
|
-
* number, counted from one. */
|
|
187
179
|
const WORDS = {
|
|
188
180
|
columnSubject: "column with {pane}",
|
|
189
181
|
place: "column {column} of {columns}",
|
|
190
182
|
stackedPlace: "{row} of {rows} in column {column} of {columns}",
|
|
191
183
|
};
|
|
192
|
-
/** What a place is called when a drop or a move would leave the pane or column where it is. */
|
|
193
184
|
export const WHERE_IT_WAS = "where it was";
|
|
194
185
|
export const fill = (template, fields) => __foldkitBrandViewResult((Array.reduce(Object.entries(fields), template, (text, [key, value]) => __foldkitBrandViewResult((text.replaceAll(`{${key}}`, Predicate.isNumber(value) ? value.toLocaleString(LOCALE) : value)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~23"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#fill");
|
|
195
186
|
export const subjectWords = (layout, subject) => __foldkitBrandViewResult((Subject.match(subject, {
|
|
196
187
|
Pane: ({ paneId }) => __foldkitBrandViewResult((Option.map(placeOf(layout, paneId), ({ pane }) => __foldkitBrandViewResult((pane.label), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~24"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Pane"),
|
|
197
|
-
Column: ({ columnId }) => __foldkitBrandViewResult((Option.map(columnOf(layout, columnId), (column) => __foldkitBrandViewResult((fill(WORDS.columnSubject, {
|
|
188
|
+
Column: ({ columnId }) => __foldkitBrandViewResult((Option.map(columnOf(layout, columnId), (column) => __foldkitBrandViewResult((fill(WORDS.columnSubject, {
|
|
189
|
+
pane: Array.headNonEmpty(column.panes).label,
|
|
190
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~25"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Column"),
|
|
198
191
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#subjectWords");
|
|
199
192
|
export const placeWords = (layout, place) => {
|
|
200
193
|
const rows = place.column.panes.length;
|
|
@@ -204,54 +197,50 @@ export const placeWords = (layout, place) => {
|
|
|
204
197
|
row: place.row + 1,
|
|
205
198
|
rows,
|
|
206
199
|
};
|
|
207
|
-
return __foldkitBrandViewResult((rows > 1
|
|
200
|
+
return __foldkitBrandViewResult((rows > 1
|
|
201
|
+
? fill(WORDS.stackedPlace, fields)
|
|
202
|
+
: fill(WORDS.place, fields)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#placeWords");
|
|
208
203
|
};
|
|
209
|
-
/** Where `subject` sits in `layout`, in words. */
|
|
210
204
|
export const whereWords = (layout, subject) => __foldkitBrandViewResult((Subject.match(subject, {
|
|
211
205
|
Pane: ({ paneId }) => __foldkitBrandViewResult((Option.map(placeOf(layout, paneId), (place) => __foldkitBrandViewResult((placeWords(layout, place)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~26"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Pane~2"),
|
|
212
206
|
Column: ({ columnId }) => __foldkitBrandViewResult((Option.map(columnIndexOf(layout, columnId), (column) => __foldkitBrandViewResult((fill(WORDS.place, { column: column + 1, columns: layout.length })), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~27"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Column~2"),
|
|
213
207
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#whereWords");
|
|
214
|
-
// TARGETS
|
|
215
|
-
/** Where the pane `paneId` is now, as a target. */
|
|
216
208
|
export const originOf = (layout, paneId) => __foldkitBrandViewResult((Option.map(placeOf(layout, paneId), ({ column, row }) => __foldkitBrandViewResult((Target.Into({ columnId: column.id, index: row })), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~28"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#originOf");
|
|
217
|
-
/** What dropping the pane `paneId` at `target` asks of the layout: none where it would
|
|
218
|
-
* change nothing (where it is, or a target whose column is gone). */
|
|
219
209
|
export const requestOf = (layout, paneId, target) => __foldkitBrandViewResult((Option.liftPredicate(Target.match(target, {
|
|
220
210
|
Into: ({ columnId, index }) => __foldkitBrandViewResult((OutMessage.MovedPane({ paneId, toColumnId: columnId, toIndex: index })), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Into"),
|
|
221
211
|
Gap: ({ maybeBeforeColumnId }) => __foldkitBrandViewResult((OutMessage.PulledOutPane({ paneId, maybeBeforeColumnId })), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Gap"),
|
|
222
212
|
}), (request) => __foldkitBrandViewResult((isChange(layout, request)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~29"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#requestOf");
|
|
223
|
-
/** Where the pane `paneId` would be once dropped at `target`, in words. */
|
|
224
213
|
export const landingWords = (layout, paneId, target) => __foldkitBrandViewResult((Option.match(requestOf(layout, paneId, target), {
|
|
225
214
|
onNone: () => __foldkitBrandViewResult((WHERE_IT_WAS), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone~7"),
|
|
226
215
|
onSome: (request) => __foldkitBrandViewResult((Option.getOrElse(whereWords(apply(layout, request), Subject.Pane({ paneId })), () => __foldkitBrandViewResult((WHERE_IT_WAS), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~30"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~7"),
|
|
227
216
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#landingWords");
|
|
228
|
-
/** The column a target sits in or before (the last, for the gap after it), which a keyboard
|
|
229
|
-
* step scrolls to. */
|
|
230
217
|
export const columnOfTarget = (layout, target) => __foldkitBrandViewResult((Target.match(target, {
|
|
231
218
|
Into: ({ columnId }) => __foldkitBrandViewResult((Option.some(columnId)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Into~2"),
|
|
232
219
|
Gap: ({ maybeBeforeColumnId }) => __foldkitBrandViewResult((Option.orElse(maybeBeforeColumnId, () => __foldkitBrandViewResult((Option.map(Array.last(layout), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~32"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~31"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Gap~2"),
|
|
233
220
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#columnOfTarget");
|
|
234
221
|
export const Step = Schema.Literals(["Up", "Down", "Left", "Right"]);
|
|
235
|
-
// A keyboard step reads the layout as a row of stops: the gap before each column (even), then
|
|
236
|
-
// the column itself (odd), and the gap after the last.
|
|
237
222
|
const stopOf = (layout, target) => __foldkitBrandViewResult((Target.match(target, {
|
|
238
223
|
Into: ({ columnId }) => __foldkitBrandViewResult((Option.map(columnIndexOf(layout, columnId), (column) => __foldkitBrandViewResult((column * 2 + 1), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~33"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Into~3"),
|
|
239
224
|
Gap: ({ maybeBeforeColumnId }) => __foldkitBrandViewResult((Option.map(gapIndex(layout, maybeBeforeColumnId), (gap) => __foldkitBrandViewResult((gap * 2), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~34"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Gap~3"),
|
|
240
225
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#stopOf");
|
|
241
|
-
/** Whether the column `target` names (into it, or the gap before it) is still in `layout`. */
|
|
242
226
|
export const isTargetPresent = (layout, target) => __foldkitBrandViewResult((Option.isSome(stopOf(layout, target))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#isTargetPresent");
|
|
227
|
+
const roomIn = (column, paneId) => __foldkitBrandViewResult((othersIn(column, paneId).length), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#roomIn");
|
|
243
228
|
const targetAtStop = (layout, paneId, stop, row) => __foldkitBrandViewResult((stop % 2 === 0
|
|
244
229
|
? Target.Gap({
|
|
245
230
|
maybeBeforeColumnId: Option.map(Array.get(layout, stop / 2), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~35")),
|
|
246
231
|
})
|
|
247
232
|
: Option.match(Array.get(layout, (stop - 1) / 2), {
|
|
248
233
|
onNone: () => __foldkitBrandViewResult((Target.Gap({ maybeBeforeColumnId: Option.none() })), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone~8"),
|
|
249
|
-
onSome: (column) => __foldkitBrandViewResult((Target.Into({
|
|
234
|
+
onSome: (column) => __foldkitBrandViewResult((Target.Into({
|
|
235
|
+
columnId: column.id,
|
|
236
|
+
index: Math.min(row, roomIn(column, paneId)),
|
|
237
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~8"),
|
|
250
238
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#targetAtStop");
|
|
251
|
-
/** The last index the pane `paneId` may take among a column's panes. */
|
|
252
|
-
const roomIn = (column, paneId) => __foldkitBrandViewResult((othersIn(column, paneId).length), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#roomIn");
|
|
253
239
|
const stepOnce = (layout, paneId, target, step) => {
|
|
254
|
-
const row = Target.match(target, {
|
|
240
|
+
const row = Target.match(target, {
|
|
241
|
+
Into: ({ index }) => __foldkitBrandViewResult((index), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Into~4"),
|
|
242
|
+
Gap: () => __foldkitBrandViewResult((0), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Gap~4"),
|
|
243
|
+
});
|
|
255
244
|
return __foldkitBrandViewResult((Option.match(stopOf(layout, target), {
|
|
256
245
|
onNone: () => __foldkitBrandViewResult((target), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone~9"),
|
|
257
246
|
onSome: (stop) => __foldkitBrandViewResult((Match.value(step).pipe(Match.withReturnType(), Match.when("Left", () => __foldkitBrandViewResult((targetAtStop(layout, paneId, Math.max(stop - 1, 0), row)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~36")), Match.when("Right", () => __foldkitBrandViewResult((targetAtStop(layout, paneId, Math.min(stop + 1, layout.length * 2), row)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~37")), Match.whenOr("Up", "Down", () => __foldkitBrandViewResult((Target.match(target, {
|
|
@@ -269,104 +258,90 @@ const stepOnce = (layout, paneId, target, step) => {
|
|
|
269
258
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~38")), Match.exhaustive)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~9"),
|
|
270
259
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#stepOnce");
|
|
271
260
|
};
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
261
|
+
const presentOrOrigin = (layout, target, origin) => __foldkitBrandViewResult((isTargetPresent(layout, target)
|
|
262
|
+
? target
|
|
263
|
+
: Option.getOrElse(origin, () => __foldkitBrandViewResult((target), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~39"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#presentOrOrigin");
|
|
264
|
+
const isChangingDropOrOrigin = (layout, paneId, origin, candidate) => __foldkitBrandViewResult((Option.isSome(requestOf(layout, paneId, candidate)) ||
|
|
265
|
+
Option.exists(origin, (place) => __foldkitBrandViewResult((Equal.equals(place, candidate)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~40"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#isChangingDropOrOrigin");
|
|
266
|
+
const stopAndRowCount = (layout) => __foldkitBrandViewResult((layout.length * 2 + Array.length(placesOf(layout))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#stopAndRowCount");
|
|
277
267
|
export const steppedTarget = (layout, paneId, target, step) => {
|
|
278
268
|
const origin = originOf(layout, paneId);
|
|
279
|
-
|
|
280
|
-
const
|
|
281
|
-
const isStop = (candidate) => __foldkitBrandViewResult((Option.isSome(requestOf(layout, paneId, candidate)) ||
|
|
282
|
-
Option.exists(origin, (place) => __foldkitBrandViewResult((Equal.equals(place, candidate)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~40"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#isStop");
|
|
283
|
-
const walk = (from, left) => {
|
|
269
|
+
const start = presentOrOrigin(layout, target, origin);
|
|
270
|
+
const walkPastUnchangingStops = (from, left) => {
|
|
284
271
|
const next = stepOnce(layout, paneId, from, step);
|
|
285
272
|
if (Equal.equals(next, from) || left === 0) {
|
|
286
|
-
return __foldkitBrandViewResult((start), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#
|
|
273
|
+
return __foldkitBrandViewResult((start), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#walkPastUnchangingStops");
|
|
287
274
|
}
|
|
288
|
-
return __foldkitBrandViewResult((
|
|
275
|
+
return __foldkitBrandViewResult((isChangingDropOrOrigin(layout, paneId, origin, next)
|
|
276
|
+
? next
|
|
277
|
+
: walkPastUnchangingStops(next, left - 1)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#walkPastUnchangingStops");
|
|
289
278
|
};
|
|
290
|
-
return __foldkitBrandViewResult((
|
|
279
|
+
return __foldkitBrandViewResult((walkPastUnchangingStops(start, stopAndRowCount(layout))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#steppedTarget");
|
|
291
280
|
};
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
* among that column's other panes, after each whose middle is above the pointer.
|
|
302
|
-
* `slotMiddlesOf` gives the vertical middles of a column's slots, by its index, the held
|
|
303
|
-
* pane's left out: it is asked for the column the pointer is over alone, and only when the
|
|
304
|
-
* pointer is among its panes. */
|
|
305
|
-
export const targetAtPoint = (columns, clientX, clientY, slotMiddlesOf) => __foldkitBrandViewResult((pipe(Array.findFirstIndex(columns, ({ right }) => __foldkitBrandViewResult((clientX <= right), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~42")), Option.flatMap((index) => __foldkitBrandViewResult((Option.map(Array.get(columns, index), (box) => (__foldkitBrandViewResult(({ index, box }), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~44")))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~43")), Option.match({
|
|
281
|
+
const GAP_BAND_SHARE = 0.2;
|
|
282
|
+
const GAP_BAND_MAX = 48;
|
|
283
|
+
const gapBefore = (columns, gap) => __foldkitBrandViewResult((Target.Gap({
|
|
284
|
+
maybeBeforeColumnId: Option.map(Array.get(columns, gap), ({ id }) => __foldkitBrandViewResult((id), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~41")),
|
|
285
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#gapBefore");
|
|
286
|
+
const gapBandOf = ({ left, right }) => __foldkitBrandViewResult((Math.min((right - left) * GAP_BAND_SHARE, GAP_BAND_MAX)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#gapBandOf");
|
|
287
|
+
const columnUnderOrRightOf = (columns, clientX) => __foldkitBrandViewResult((pipe(Array.findFirstIndex(columns, ({ right }) => __foldkitBrandViewResult((clientX <= right), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~42")), Option.flatMap((index) => __foldkitBrandViewResult((Option.map(Array.get(columns, index), (box) => (__foldkitBrandViewResult(({ index, box }), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~44")))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~43")))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#columnUnderOrRightOf");
|
|
288
|
+
const slotsAbove = (slotMiddles, clientY) => __foldkitBrandViewResult((Array.filter(slotMiddles, (middle) => __foldkitBrandViewResult((middle < clientY), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~45")).length), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#slotsAbove");
|
|
289
|
+
export const targetAtPoint = (columns, clientX, clientY, slotMiddlesOf) => __foldkitBrandViewResult((Option.match(columnUnderOrRightOf(columns, clientX), {
|
|
306
290
|
onNone: () => __foldkitBrandViewResult((gapBefore(columns, columns.length)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onNone~11"),
|
|
307
|
-
onSome: ({ index, box
|
|
308
|
-
const band =
|
|
309
|
-
if (clientX < left + band) {
|
|
291
|
+
onSome: ({ index, box }) => {
|
|
292
|
+
const band = gapBandOf(box);
|
|
293
|
+
if (clientX < box.left + band) {
|
|
310
294
|
return __foldkitBrandViewResult((gapBefore(columns, index)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~11");
|
|
311
295
|
}
|
|
312
|
-
else if (clientX > right - band) {
|
|
296
|
+
else if (clientX > box.right - band) {
|
|
313
297
|
return __foldkitBrandViewResult((gapBefore(columns, index + 1)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~11");
|
|
314
298
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~11");
|
|
320
|
-
}
|
|
299
|
+
return __foldkitBrandViewResult((Target.Into({
|
|
300
|
+
columnId: box.id,
|
|
301
|
+
index: slotsAbove(slotMiddlesOf(index), clientY),
|
|
302
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#onSome~11");
|
|
321
303
|
},
|
|
322
|
-
}))
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
* keeps: the stylesheet keeps both on screen at their minimums, so these only keep a stored
|
|
326
|
-
* size from reaching nothing. */
|
|
327
|
-
const WIDTH_FLOOR = 0.1;
|
|
328
|
-
const SHARE_FLOOR = 0.05;
|
|
304
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#targetAtPoint");
|
|
305
|
+
const COLUMN_WIDTH_FLOOR = 0.1;
|
|
306
|
+
const PANE_SHARE_FLOOR = 0.05;
|
|
329
307
|
const PRECISION = 10_000;
|
|
330
308
|
const rounded = (value) => __foldkitBrandViewResult((Math.round(value * PRECISION) / PRECISION), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#rounded");
|
|
331
|
-
|
|
332
|
-
* `floor` (a column whose weights total under a five-hundredth, or two panes that small), to
|
|
333
|
-
* the first power of ten no more than it, so that it never rounds to nothing. A weight too
|
|
334
|
-
* large or a floor too small to scale by that power is left as it is. */
|
|
309
|
+
const precisionFinerThan = (floor) => __foldkitBrandViewResult((Math.max(PRECISION, 10 ** Math.ceil(-Math.log10(floor)))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#precisionFinerThan");
|
|
335
310
|
const roundedOver = (weight, floor) => {
|
|
336
|
-
const precision =
|
|
311
|
+
const precision = precisionFinerThan(floor);
|
|
337
312
|
const scaled = weight * precision;
|
|
338
|
-
|
|
313
|
+
const isScalable = globalThis.Number.isFinite(scaled);
|
|
314
|
+
return __foldkitBrandViewResult((isScalable ? Math.round(scaled) / precision : weight), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#roundedOver");
|
|
315
|
+
};
|
|
316
|
+
const resizedColumn = (layout, columnId, share) => __foldkitBrandViewResult((Option.map(columnOf(layout, columnId), (column) => __foldkitBrandViewResult((OutMessage.ResizedColumn({
|
|
317
|
+
columnId,
|
|
318
|
+
width: rounded(Number.clamp(column.width + share, {
|
|
319
|
+
minimum: COLUMN_WIDTH_FLOOR,
|
|
320
|
+
maximum: 1,
|
|
321
|
+
})),
|
|
322
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~46"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#resizedColumn");
|
|
323
|
+
const paneWeightFloor = (total, pair) => __foldkitBrandViewResult((Math.max(Math.min(total * PANE_SHARE_FLOOR, pair / 2), globalThis.Number.MIN_VALUE)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#paneWeightFloor");
|
|
324
|
+
const sharedPair = (column, above, below, share) => {
|
|
325
|
+
const total = Number.sumAll(Array.map(column.panes, ({ weight }) => __foldkitBrandViewResult((weight), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~47")));
|
|
326
|
+
const pair = above.weight + below.weight;
|
|
327
|
+
const floor = paneWeightFloor(total, pair);
|
|
328
|
+
const nextAbove = Number.clamp(above.weight + share * total, {
|
|
329
|
+
minimum: floor,
|
|
330
|
+
maximum: pair - floor,
|
|
331
|
+
});
|
|
332
|
+
const isShareMovable = globalThis.Number.isFinite(total);
|
|
333
|
+
return __foldkitBrandViewResult((OutMessage.ResizedPanes({
|
|
334
|
+
columnId: column.id,
|
|
335
|
+
weights: isShareMovable
|
|
336
|
+
? {
|
|
337
|
+
[above.id]: roundedOver(nextAbove, floor),
|
|
338
|
+
[below.id]: roundedOver(pair - nextAbove, floor),
|
|
339
|
+
}
|
|
340
|
+
: { [above.id]: above.weight, [below.id]: below.weight },
|
|
341
|
+
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#sharedPair");
|
|
339
342
|
};
|
|
340
|
-
/** What moving `splitter` by `share` asks of the layout, from the sizes the layout holds (not
|
|
341
|
-
* the sizes printed, which the stylesheet may hold at a minimum): a width splitter adds
|
|
342
|
-
* `share` to its column's width; a pane splitter moves `share` of its column's height from
|
|
343
|
-
* the pane below it to the pane above, leaving each a weight above nothing however small the
|
|
344
|
-
* column. None when what it sizes is gone. */
|
|
345
343
|
export const resizeOf = (layout, splitter, share) => __foldkitBrandViewResult((Splitter.match(splitter, {
|
|
346
|
-
Width: ({ columnId }) => __foldkitBrandViewResult((
|
|
347
|
-
|
|
348
|
-
width: rounded(Number.clamp(column.width + share, { minimum: WIDTH_FLOOR, maximum: 1 })),
|
|
349
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~46"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Width"),
|
|
350
|
-
Split: ({ abovePaneId }) => __foldkitBrandViewResult((Option.flatMap(placeOf(layout, abovePaneId), ({ column, row, pane: above }) => __foldkitBrandViewResult((Option.map(Array.get(column.panes, row + 1), (below) => {
|
|
351
|
-
const total = Number.sumAll(Array.map(column.panes, ({ weight }) => __foldkitBrandViewResult((weight), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~49")));
|
|
352
|
-
const pair = above.weight + below.weight;
|
|
353
|
-
// a column so small that a twentieth of it is no number keeps the least there is
|
|
354
|
-
const floor = Math.max(Math.min(total * SHARE_FLOOR, pair / 2), globalThis.Number.MIN_VALUE);
|
|
355
|
-
const nextAbove = Number.clamp(above.weight + share * total, {
|
|
356
|
-
minimum: floor,
|
|
357
|
-
maximum: pair - floor,
|
|
358
|
-
});
|
|
359
|
-
return __foldkitBrandViewResult((OutMessage.ResizedPanes({
|
|
360
|
-
columnId: column.id,
|
|
361
|
-
weights: globalThis.Number.isFinite(total)
|
|
362
|
-
? {
|
|
363
|
-
[above.id]: roundedOver(nextAbove, floor),
|
|
364
|
-
[below.id]: roundedOver(pair - nextAbove, floor),
|
|
365
|
-
}
|
|
366
|
-
: // weights that total past the largest number have no share to move: they stay
|
|
367
|
-
{ [above.id]: above.weight, [below.id]: below.weight },
|
|
368
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~48");
|
|
369
|
-
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~47"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Split"),
|
|
344
|
+
Width: ({ columnId }) => __foldkitBrandViewResult((resizedColumn(layout, columnId, share)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Width"),
|
|
345
|
+
Split: ({ abovePaneId }) => __foldkitBrandViewResult((Option.flatMap(placeOf(layout, abovePaneId), ({ column, row, pane: above }) => __foldkitBrandViewResult((Option.map(Array.get(column.panes, row + 1), (below) => __foldkitBrandViewResult((sharedPair(column, above, below, share)), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~49"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#anonymous~48"))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#Split"),
|
|
370
346
|
})), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#resizeOf");
|
|
371
|
-
/** Whether what `splitter` sizes is still in `layout`. */
|
|
372
347
|
export const isSplitterPresent = (layout, splitter) => __foldkitBrandViewResult((Option.isSome(resizeOf(layout, splitter, 0))), "@gjermundgaraba-designs/pixel-paper/src/reel/layout.js#isSplitterPresent");
|
package/dist/src/reel/reel.d.ts
CHANGED
|
@@ -4,25 +4,26 @@ import type { Html } from "foldkit/html";
|
|
|
4
4
|
import * as Mount from "foldkit/mount";
|
|
5
5
|
import * as Subscription from "foldkit/subscription";
|
|
6
6
|
import type * as Update from "foldkit/update";
|
|
7
|
-
import {
|
|
7
|
+
import { OutMessage } from "./layout.ts";
|
|
8
|
+
import type { Layout, Pane } from "./layout.ts";
|
|
8
9
|
/** Schema for a reel: its id, the focused pane, what is held and a splitter being dragged. All
|
|
9
10
|
* of it is this client's; the layout is the application's. */
|
|
10
11
|
export declare const Model: Schema.Struct<{
|
|
11
12
|
readonly id: Schema.String;
|
|
12
13
|
readonly maybeFocus: Schema.Option<Schema.Struct<{
|
|
13
14
|
readonly paneId: Schema.String;
|
|
14
|
-
readonly column: Schema.
|
|
15
|
-
readonly row: Schema.
|
|
15
|
+
readonly column: Schema.Finite;
|
|
16
|
+
readonly row: Schema.Finite;
|
|
16
17
|
}>>;
|
|
17
18
|
readonly maybeHeld: Schema.Option<Schema.Struct<{
|
|
18
19
|
readonly paneId: Schema.String;
|
|
19
20
|
readonly by: import("foldkit/schema").TaggedUnion<{
|
|
20
21
|
readonly Pointer: {
|
|
21
|
-
pointerId: Schema.
|
|
22
|
-
pressX: Schema.
|
|
23
|
-
pressY: Schema.
|
|
24
|
-
x: Schema.
|
|
25
|
-
y: Schema.
|
|
22
|
+
pointerId: Schema.Finite;
|
|
23
|
+
pressX: Schema.Finite;
|
|
24
|
+
pressY: Schema.Finite;
|
|
25
|
+
x: Schema.Finite;
|
|
26
|
+
y: Schema.Finite;
|
|
26
27
|
isCarrying: Schema.Boolean;
|
|
27
28
|
};
|
|
28
29
|
readonly Keyboard: {};
|
|
@@ -30,7 +31,7 @@ export declare const Model: Schema.Struct<{
|
|
|
30
31
|
readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
|
|
31
32
|
readonly Into: {
|
|
32
33
|
columnId: Schema.String;
|
|
33
|
-
index: Schema.
|
|
34
|
+
index: Schema.Finite;
|
|
34
35
|
};
|
|
35
36
|
readonly Gap: {
|
|
36
37
|
maybeBeforeColumnId: Schema.Option<Schema.String>;
|
|
@@ -46,15 +47,15 @@ export declare const Model: Schema.Struct<{
|
|
|
46
47
|
abovePaneId: Schema.String;
|
|
47
48
|
};
|
|
48
49
|
}>;
|
|
49
|
-
readonly pointerId: Schema.
|
|
50
|
-
readonly pressX: Schema.
|
|
51
|
-
readonly pressY: Schema.
|
|
50
|
+
readonly pointerId: Schema.Finite;
|
|
51
|
+
readonly pressX: Schema.Finite;
|
|
52
|
+
readonly pressY: Schema.Finite;
|
|
52
53
|
readonly maybeResize: Schema.Option<Schema.Union<readonly [import("foldkit/schema").CallableTaggedStruct<"ResizedColumn", {
|
|
53
54
|
readonly columnId: Schema.String;
|
|
54
|
-
readonly width: Schema.
|
|
55
|
+
readonly width: Schema.Finite;
|
|
55
56
|
}>, import("foldkit/schema").CallableTaggedStruct<"ResizedPanes", {
|
|
56
57
|
readonly columnId: Schema.String;
|
|
57
|
-
readonly weights: Schema.$Record<Schema.String, Schema.
|
|
58
|
+
readonly weights: Schema.$Record<Schema.String, Schema.Finite>;
|
|
58
59
|
}>]>>;
|
|
59
60
|
}>>;
|
|
60
61
|
}>;
|
|
@@ -68,20 +69,20 @@ export type Arrangement = typeof Arrangement.Type;
|
|
|
68
69
|
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
69
70
|
readonly PressedGrip: {
|
|
70
71
|
paneId: Schema.String;
|
|
71
|
-
pointerId: Schema.
|
|
72
|
-
clientX: Schema.
|
|
73
|
-
clientY: Schema.
|
|
72
|
+
pointerId: Schema.Finite;
|
|
73
|
+
clientX: Schema.Finite;
|
|
74
|
+
clientY: Schema.Finite;
|
|
74
75
|
};
|
|
75
76
|
readonly PressedGripKey: {
|
|
76
77
|
paneId: Schema.String;
|
|
77
78
|
};
|
|
78
79
|
readonly MovedPointer: {
|
|
79
|
-
readonly clientX: Schema.
|
|
80
|
-
readonly clientY: Schema.
|
|
80
|
+
readonly clientX: Schema.Finite;
|
|
81
|
+
readonly clientY: Schema.Finite;
|
|
81
82
|
readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
|
|
82
83
|
readonly Into: {
|
|
83
84
|
columnId: Schema.String;
|
|
84
|
-
index: Schema.
|
|
85
|
+
index: Schema.Finite;
|
|
85
86
|
};
|
|
86
87
|
readonly Gap: {
|
|
87
88
|
maybeBeforeColumnId: Schema.Option<Schema.String>;
|
|
@@ -89,12 +90,12 @@ export declare const Message: import("foldkit/message").MessageUnion<{
|
|
|
89
90
|
}>>;
|
|
90
91
|
};
|
|
91
92
|
readonly ReleasedPointer: {
|
|
92
|
-
readonly clientX: Schema.
|
|
93
|
-
readonly clientY: Schema.
|
|
93
|
+
readonly clientX: Schema.Finite;
|
|
94
|
+
readonly clientY: Schema.Finite;
|
|
94
95
|
readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
|
|
95
96
|
readonly Into: {
|
|
96
97
|
columnId: Schema.String;
|
|
97
|
-
index: Schema.
|
|
98
|
+
index: Schema.Finite;
|
|
98
99
|
};
|
|
99
100
|
readonly Gap: {
|
|
100
101
|
maybeBeforeColumnId: Schema.Option<Schema.String>;
|
|
@@ -126,15 +127,15 @@ export declare const Message: import("foldkit/message").MessageUnion<{
|
|
|
126
127
|
abovePaneId: Schema.String;
|
|
127
128
|
};
|
|
128
129
|
}>;
|
|
129
|
-
pointerId: Schema.
|
|
130
|
-
clientX: Schema.
|
|
131
|
-
clientY: Schema.
|
|
130
|
+
pointerId: Schema.Finite;
|
|
131
|
+
clientX: Schema.Finite;
|
|
132
|
+
clientY: Schema.Finite;
|
|
132
133
|
};
|
|
133
134
|
readonly MovedSplitter: {
|
|
134
|
-
share: Schema.
|
|
135
|
+
share: Schema.Finite;
|
|
135
136
|
};
|
|
136
137
|
readonly ReleasedSplitter: {
|
|
137
|
-
share: Schema.
|
|
138
|
+
share: Schema.Finite;
|
|
138
139
|
};
|
|
139
140
|
readonly CancelledSplitter: {};
|
|
140
141
|
readonly PressedSplitterKey: {
|
|
@@ -146,7 +147,7 @@ export declare const Message: import("foldkit/message").MessageUnion<{
|
|
|
146
147
|
abovePaneId: Schema.String;
|
|
147
148
|
};
|
|
148
149
|
}>;
|
|
149
|
-
share: Schema.
|
|
150
|
+
share: Schema.Finite;
|
|
150
151
|
};
|
|
151
152
|
readonly CompletedAnnounceReel: {};
|
|
152
153
|
readonly CompletedFocusPane: {};
|
|
@@ -878,8 +879,8 @@ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) =
|
|
|
878
879
|
* pressed. Measures the source once, when the copy appears. */
|
|
879
880
|
export declare const SizeLiftedPane: Mount.MountDefinitionWithArgs<"SizeLiftedPane", {
|
|
880
881
|
sourceSelector: Schema.String;
|
|
881
|
-
pressX: Schema.
|
|
882
|
-
pressY: Schema.
|
|
882
|
+
pressX: Schema.Finite;
|
|
883
|
+
pressY: Schema.Finite;
|
|
883
884
|
}, {
|
|
884
885
|
readonly _tag: "CompletedSizeLiftedPane";
|
|
885
886
|
}>;
|
|
@@ -888,7 +889,7 @@ export declare const SizeLiftedPane: Mount.MountDefinitionWithArgs<"SizeLiftedPa
|
|
|
888
889
|
export type PaneRender = Readonly<{
|
|
889
890
|
/** The title bar's `lead`: the pane's grip, a quiet glyph button named "Move <label>", or
|
|
890
891
|
* nothing under tabs, where a pane does not move. */
|
|
891
|
-
lead:
|
|
892
|
+
lead: readonly Html[];
|
|
892
893
|
/** The window's id, unique in the document. */
|
|
893
894
|
id: string;
|
|
894
895
|
}>;
|
|
@@ -907,7 +908,7 @@ export type ViewInputs = Readonly<{
|
|
|
907
908
|
* their tabs (`Tabs`). Pass the same to `perform`. */
|
|
908
909
|
arrangement?: Arrangement;
|
|
909
910
|
/** What a pane's tab prints before its label: a kind glyph. Nothing when not given. */
|
|
910
|
-
toTabLeadView?: (pane: Pane) =>
|
|
911
|
+
toTabLeadView?: (pane: Pane) => readonly Html[];
|
|
911
912
|
}>;
|
|
912
913
|
/**
|
|
913
914
|
* A row of columns wider than the view when it must be, each a stack of panes, scrolled
|
|
@@ -1088,7 +1089,7 @@ export declare const view: import("foldkit/submodel").View<{
|
|
|
1088
1089
|
* their tabs (`Tabs`). Pass the same to `perform`. */
|
|
1089
1090
|
arrangement?: Arrangement;
|
|
1090
1091
|
/** What a pane's tab prints before its label: a kind glyph. Nothing when not given. */
|
|
1091
|
-
toTabLeadView?: (pane: Pane) =>
|
|
1092
|
+
toTabLeadView?: (pane: Pane) => readonly Html[];
|
|
1092
1093
|
}>>;
|
|
1093
1094
|
export {};
|
|
1094
1095
|
//# sourceMappingURL=reel.d.ts.map
|