@next-buildr/editor 0.0.0-stage → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/app/builder-editor.d.ts +8 -0
- package/dist/app/builder-editor.d.ts.map +1 -0
- package/dist/app/builder-editor.js +14 -0
- package/dist/app/builder-editor.test.d.ts +2 -0
- package/dist/app/builder-editor.test.d.ts.map +1 -0
- package/dist/app/builder-editor.test.js +199 -0
- package/dist/app/config.d.ts +59 -0
- package/dist/app/config.d.ts.map +1 -0
- package/dist/app/config.js +18 -0
- package/dist/app/content-language.test.d.ts +2 -0
- package/dist/app/content-language.test.d.ts.map +1 -0
- package/dist/app/content-language.test.js +157 -0
- package/dist/app/editor-app.d.ts +17 -0
- package/dist/app/editor-app.d.ts.map +1 -0
- package/dist/app/editor-app.js +206 -0
- package/dist/app/editor-app.test.d.ts +2 -0
- package/dist/app/editor-app.test.d.ts.map +1 -0
- package/dist/app/editor-app.test.js +135 -0
- package/dist/app/layout.d.ts +32 -0
- package/dist/app/layout.d.ts.map +1 -0
- package/dist/app/layout.js +82 -0
- package/dist/app/manifest.d.ts +12 -0
- package/dist/app/manifest.d.ts.map +1 -0
- package/dist/app/manifest.js +17 -0
- package/dist/app/shell-panels.d.ts +15 -0
- package/dist/app/shell-panels.d.ts.map +1 -0
- package/dist/app/shell-panels.js +5 -0
- package/dist/app/small-screen.d.ts +12 -0
- package/dist/app/small-screen.d.ts.map +1 -0
- package/dist/app/small-screen.js +33 -0
- package/dist/app/small-screen.test.d.ts +2 -0
- package/dist/app/small-screen.test.d.ts.map +1 -0
- package/dist/app/small-screen.test.js +108 -0
- package/dist/app/status-info.d.ts +14 -0
- package/dist/app/status-info.d.ts.map +1 -0
- package/dist/app/status-info.js +34 -0
- package/dist/app/use-resizable.d.ts +34 -0
- package/dist/app/use-resizable.d.ts.map +1 -0
- package/dist/app/use-resizable.js +84 -0
- package/dist/canvas-host/canvas-frame.d.ts +53 -0
- package/dist/canvas-host/canvas-frame.d.ts.map +1 -0
- package/dist/canvas-host/canvas-frame.js +146 -0
- package/dist/canvas-host/canvas-frame.test.d.ts +2 -0
- package/dist/canvas-host/canvas-frame.test.d.ts.map +1 -0
- package/dist/canvas-host/canvas-frame.test.js +91 -0
- package/dist/canvas-host/host.d.ts +109 -0
- package/dist/canvas-host/host.d.ts.map +1 -0
- package/dist/canvas-host/host.js +293 -0
- package/dist/canvas-host/host.test.d.ts +2 -0
- package/dist/canvas-host/host.test.d.ts.map +1 -0
- package/dist/canvas-host/host.test.js +398 -0
- package/dist/canvas-host/index.d.ts +5 -0
- package/dist/canvas-host/index.d.ts.map +1 -0
- package/dist/canvas-host/index.js +2 -0
- package/dist/clipboard/clipboard.d.ts +38 -0
- package/dist/clipboard/clipboard.d.ts.map +1 -0
- package/dist/clipboard/clipboard.js +160 -0
- package/dist/clipboard/clipboard.test.d.ts +2 -0
- package/dist/clipboard/clipboard.test.d.ts.map +1 -0
- package/dist/clipboard/clipboard.test.js +457 -0
- package/dist/clipboard/format.d.ts +27 -0
- package/dist/clipboard/format.d.ts.map +1 -0
- package/dist/clipboard/format.js +37 -0
- package/dist/clipboard/index.d.ts +6 -0
- package/dist/clipboard/index.d.ts.map +1 -0
- package/dist/clipboard/index.js +3 -0
- package/dist/clipboard/react.d.ts +20 -0
- package/dist/clipboard/react.d.ts.map +1 -0
- package/dist/clipboard/react.js +71 -0
- package/dist/dialogs/index.d.ts +2 -0
- package/dist/dialogs/index.d.ts.map +1 -0
- package/dist/dialogs/index.js +1 -0
- package/dist/dialogs/media-picker/index.d.ts +7 -0
- package/dist/dialogs/media-picker/index.d.ts.map +1 -0
- package/dist/dialogs/media-picker/index.js +3 -0
- package/dist/dialogs/media-picker/library.d.ts +17 -0
- package/dist/dialogs/media-picker/library.d.ts.map +1 -0
- package/dist/dialogs/media-picker/library.js +9 -0
- package/dist/dialogs/media-picker/media-picker.d.ts +18 -0
- package/dist/dialogs/media-picker/media-picker.d.ts.map +1 -0
- package/dist/dialogs/media-picker/media-picker.js +99 -0
- package/dist/dialogs/media-picker/media-picker.test.d.ts +2 -0
- package/dist/dialogs/media-picker/media-picker.test.d.ts.map +1 -0
- package/dist/dialogs/media-picker/media-picker.test.js +161 -0
- package/dist/dialogs/media-picker/media-ref.d.ts +28 -0
- package/dist/dialogs/media-picker/media-ref.d.ts.map +1 -0
- package/dist/dialogs/media-picker/media-ref.js +52 -0
- package/dist/dnd/check.d.ts +8 -0
- package/dist/dnd/check.d.ts.map +1 -0
- package/dist/dnd/check.js +12 -0
- package/dist/dnd/destinations.d.ts +15 -0
- package/dist/dnd/destinations.d.ts.map +1 -0
- package/dist/dnd/destinations.js +43 -0
- package/dist/dnd/dnd-react.test.d.ts +2 -0
- package/dist/dnd/dnd-react.test.d.ts.map +1 -0
- package/dist/dnd/dnd-react.test.js +93 -0
- package/dist/dnd/dnd.test.d.ts +2 -0
- package/dist/dnd/dnd.test.d.ts.map +1 -0
- package/dist/dnd/dnd.test.js +327 -0
- package/dist/dnd/engine.d.ts +85 -0
- package/dist/dnd/engine.d.ts.map +1 -0
- package/dist/dnd/engine.js +185 -0
- package/dist/dnd/fragment.d.ts +6 -0
- package/dist/dnd/fragment.d.ts.map +1 -0
- package/dist/dnd/fragment.js +18 -0
- package/dist/dnd/geometry.d.ts +30 -0
- package/dist/dnd/geometry.d.ts.map +1 -0
- package/dist/dnd/geometry.js +31 -0
- package/dist/dnd/index.d.ts +14 -0
- package/dist/dnd/index.d.ts.map +1 -0
- package/dist/dnd/index.js +7 -0
- package/dist/dnd/move-to-dialog.d.ts +13 -0
- package/dist/dnd/move-to-dialog.d.ts.map +1 -0
- package/dist/dnd/move-to-dialog.js +30 -0
- package/dist/dnd/react.d.ts +43 -0
- package/dist/dnd/react.d.ts.map +1 -0
- package/dist/dnd/react.js +185 -0
- package/dist/dnd/tree-target.d.ts +29 -0
- package/dist/dnd/tree-target.d.ts.map +1 -0
- package/dist/dnd/tree-target.js +97 -0
- package/dist/fonts/LICENSE-inter.txt +93 -0
- package/dist/fonts/inter-latin-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-600-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-500-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-600-normal.woff2 +0 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/messages/en.d.ts +335 -0
- package/dist/messages/en.d.ts.map +1 -0
- package/dist/messages/en.js +332 -0
- package/dist/messages/index.d.ts +16 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/messages/index.js +22 -0
- package/dist/messages/pl.d.ts +3 -0
- package/dist/messages/pl.d.ts.map +1 -0
- package/dist/messages/pl.js +327 -0
- package/dist/panels/breadcrumbs/breadcrumbs.d.ts +6 -0
- package/dist/panels/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/panels/breadcrumbs/breadcrumbs.js +24 -0
- package/dist/panels/breadcrumbs/breadcrumbs.test.d.ts +2 -0
- package/dist/panels/breadcrumbs/breadcrumbs.test.d.ts.map +1 -0
- package/dist/panels/breadcrumbs/breadcrumbs.test.js +56 -0
- package/dist/panels/index.d.ts +9 -0
- package/dist/panels/index.d.ts.map +1 -0
- package/dist/panels/index.js +6 -0
- package/dist/panels/insert/catalog.d.ts +30 -0
- package/dist/panels/insert/catalog.d.ts.map +1 -0
- package/dist/panels/insert/catalog.js +76 -0
- package/dist/panels/insert/catalog.order.test.d.ts +2 -0
- package/dist/panels/insert/catalog.order.test.d.ts.map +1 -0
- package/dist/panels/insert/catalog.order.test.js +17 -0
- package/dist/panels/insert/category-name.d.ts +4 -0
- package/dist/panels/insert/category-name.d.ts.map +1 -0
- package/dist/panels/insert/category-name.js +8 -0
- package/dist/panels/insert/index.d.ts +3 -0
- package/dist/panels/insert/index.d.ts.map +1 -0
- package/dist/panels/insert/index.js +2 -0
- package/dist/panels/insert/insert-panel.d.ts +7 -0
- package/dist/panels/insert/insert-panel.d.ts.map +1 -0
- package/dist/panels/insert/insert-panel.js +155 -0
- package/dist/panels/insert/insert-panel.test.d.ts +2 -0
- package/dist/panels/insert/insert-panel.test.d.ts.map +1 -0
- package/dist/panels/insert/insert-panel.test.js +323 -0
- package/dist/panels/insert/target.d.ts +17 -0
- package/dist/panels/insert/target.d.ts.map +1 -0
- package/dist/panels/insert/target.js +48 -0
- package/dist/panels/inspector/controls/boolean.d.ts +4 -0
- package/dist/panels/inspector/controls/boolean.d.ts.map +1 -0
- package/dist/panels/inspector/controls/boolean.js +4 -0
- package/dist/panels/inspector/controls/compound.d.ts +15 -0
- package/dist/panels/inspector/controls/compound.d.ts.map +1 -0
- package/dist/panels/inspector/controls/compound.js +99 -0
- package/dist/panels/inspector/controls/compound.test.d.ts +2 -0
- package/dist/panels/inspector/controls/compound.test.d.ts.map +1 -0
- package/dist/panels/inspector/controls/compound.test.js +195 -0
- package/dist/panels/inspector/controls/icon.d.ts +5 -0
- package/dist/panels/inspector/controls/icon.d.ts.map +1 -0
- package/dist/panels/inspector/controls/icon.js +6 -0
- package/dist/panels/inspector/controls/index.d.ts +13 -0
- package/dist/panels/inspector/controls/index.d.ts.map +1 -0
- package/dist/panels/inspector/controls/index.js +11 -0
- package/dist/panels/inspector/controls/label.d.ts +4 -0
- package/dist/panels/inspector/controls/label.d.ts.map +1 -0
- package/dist/panels/inspector/controls/label.js +8 -0
- package/dist/panels/inspector/controls/link.d.ts +5 -0
- package/dist/panels/inspector/controls/link.d.ts.map +1 -0
- package/dist/panels/inspector/controls/link.js +6 -0
- package/dist/panels/inspector/controls/media.d.ts +9 -0
- package/dist/panels/inspector/controls/media.d.ts.map +1 -0
- package/dist/panels/inspector/controls/media.js +21 -0
- package/dist/panels/inspector/controls/number.d.ts +10 -0
- package/dist/panels/inspector/controls/number.d.ts.map +1 -0
- package/dist/panels/inspector/controls/number.js +33 -0
- package/dist/panels/inspector/controls/rich-text-model.d.ts +20 -0
- package/dist/panels/inspector/controls/rich-text-model.d.ts.map +1 -0
- package/dist/panels/inspector/controls/rich-text-model.js +91 -0
- package/dist/panels/inspector/controls/rich-text.d.ts +10 -0
- package/dist/panels/inspector/controls/rich-text.d.ts.map +1 -0
- package/dist/panels/inspector/controls/rich-text.js +159 -0
- package/dist/panels/inspector/controls/select.d.ts +5 -0
- package/dist/panels/inspector/controls/select.d.ts.map +1 -0
- package/dist/panels/inspector/controls/select.js +16 -0
- package/dist/panels/inspector/controls/select.test.d.ts +2 -0
- package/dist/panels/inspector/controls/select.test.d.ts.map +1 -0
- package/dist/panels/inspector/controls/select.test.js +43 -0
- package/dist/panels/inspector/controls/text.d.ts +4 -0
- package/dist/panels/inspector/controls/text.d.ts.map +1 -0
- package/dist/panels/inspector/controls/text.js +5 -0
- package/dist/panels/inspector/controls/textarea.d.ts +4 -0
- package/dist/panels/inspector/controls/textarea.d.ts.map +1 -0
- package/dist/panels/inspector/controls/textarea.js +4 -0
- package/dist/panels/inspector/controls/types.d.ts +16 -0
- package/dist/panels/inspector/controls/types.d.ts.map +1 -0
- package/dist/panels/inspector/controls/types.js +1 -0
- package/dist/panels/inspector/index.d.ts +17 -0
- package/dist/panels/inspector/index.d.ts.map +1 -0
- package/dist/panels/inspector/index.js +9 -0
- package/dist/panels/inspector/inspector.d.ts +16 -0
- package/dist/panels/inspector/inspector.d.ts.map +1 -0
- package/dist/panels/inspector/inspector.js +116 -0
- package/dist/panels/inspector/inspector.test.d.ts +2 -0
- package/dist/panels/inspector/inspector.test.d.ts.map +1 -0
- package/dist/panels/inspector/inspector.test.js +328 -0
- package/dist/panels/inspector/props-panel.d.ts +26 -0
- package/dist/panels/inspector/props-panel.d.ts.map +1 -0
- package/dist/panels/inspector/props-panel.js +117 -0
- package/dist/panels/inspector/styles/box-model.d.ts +20 -0
- package/dist/panels/inspector/styles/box-model.d.ts.map +1 -0
- package/dist/panels/inspector/styles/box-model.js +31 -0
- package/dist/panels/inspector/styles/index.d.ts +5 -0
- package/dist/panels/inspector/styles/index.d.ts.map +1 -0
- package/dist/panels/inspector/styles/index.js +2 -0
- package/dist/panels/inspector/styles/model.d.ts +55 -0
- package/dist/panels/inspector/styles/model.d.ts.map +1 -0
- package/dist/panels/inspector/styles/model.js +111 -0
- package/dist/panels/inspector/styles/segments.d.ts +18 -0
- package/dist/panels/inspector/styles/segments.d.ts.map +1 -0
- package/dist/panels/inspector/styles/segments.js +75 -0
- package/dist/panels/inspector/styles/sides-editor.d.ts +34 -0
- package/dist/panels/inspector/styles/sides-editor.d.ts.map +1 -0
- package/dist/panels/inspector/styles/sides-editor.js +86 -0
- package/dist/panels/inspector/styles/style-inspector.d.ts +15 -0
- package/dist/panels/inspector/styles/style-inspector.d.ts.map +1 -0
- package/dist/panels/inspector/styles/style-inspector.js +219 -0
- package/dist/panels/inspector/styles/style-inspector.test.d.ts +2 -0
- package/dist/panels/inspector/styles/style-inspector.test.d.ts.map +1 -0
- package/dist/panels/inspector/styles/style-inspector.test.js +265 -0
- package/dist/panels/inspector/styles/token-picker.d.ts +15 -0
- package/dist/panels/inspector/styles/token-picker.d.ts.map +1 -0
- package/dist/panels/inspector/styles/token-picker.js +23 -0
- package/dist/panels/inspector/styles/use-style-value.d.ts +28 -0
- package/dist/panels/inspector/styles/use-style-value.d.ts.map +1 -0
- package/dist/panels/inspector/styles/use-style-value.js +51 -0
- package/dist/panels/inspector/value.d.ts +20 -0
- package/dist/panels/inspector/value.d.ts.map +1 -0
- package/dist/panels/inspector/value.js +32 -0
- package/dist/panels/inspector/values/analyze.d.ts +49 -0
- package/dist/panels/inspector/values/analyze.d.ts.map +1 -0
- package/dist/panels/inspector/values/analyze.js +115 -0
- package/dist/panels/inspector/values/data.d.ts +18 -0
- package/dist/panels/inspector/values/data.d.ts.map +1 -0
- package/dist/panels/inspector/values/data.js +10 -0
- package/dist/panels/inspector/values/translation.d.ts +20 -0
- package/dist/panels/inspector/values/translation.d.ts.map +1 -0
- package/dist/panels/inspector/values/translation.js +25 -0
- package/dist/panels/inspector/values/value-editor.d.ts +30 -0
- package/dist/panels/inspector/values/value-editor.d.ts.map +1 -0
- package/dist/panels/inspector/values/value-editor.js +191 -0
- package/dist/panels/inspector/values/values.test.d.ts +2 -0
- package/dist/panels/inspector/values/values.test.d.ts.map +1 -0
- package/dist/panels/inspector/values/values.test.js +173 -0
- package/dist/panels/issues/collect.d.ts +70 -0
- package/dist/panels/issues/collect.d.ts.map +1 -0
- package/dist/panels/issues/collect.js +96 -0
- package/dist/panels/issues/index.d.ts +5 -0
- package/dist/panels/issues/index.d.ts.map +1 -0
- package/dist/panels/issues/index.js +2 -0
- package/dist/panels/issues/issues-panel.d.ts +17 -0
- package/dist/panels/issues/issues-panel.d.ts.map +1 -0
- package/dist/panels/issues/issues-panel.js +77 -0
- package/dist/panels/layers/flatten.d.ts +28 -0
- package/dist/panels/layers/flatten.d.ts.map +1 -0
- package/dist/panels/layers/flatten.js +61 -0
- package/dist/panels/layers/layers-panel.d.ts +14 -0
- package/dist/panels/layers/layers-panel.d.ts.map +1 -0
- package/dist/panels/layers/layers-panel.js +428 -0
- package/dist/panels/layers/layers-panel.test.d.ts +2 -0
- package/dist/panels/layers/layers-panel.test.d.ts.map +1 -0
- package/dist/panels/layers/layers-panel.test.js +315 -0
- package/dist/persistence/controller.d.ts +55 -0
- package/dist/persistence/controller.d.ts.map +1 -0
- package/dist/persistence/controller.js +341 -0
- package/dist/persistence/index.d.ts +6 -0
- package/dist/persistence/index.d.ts.map +1 -0
- package/dist/persistence/index.js +3 -0
- package/dist/persistence/load.d.ts +35 -0
- package/dist/persistence/load.d.ts.map +1 -0
- package/dist/persistence/load.js +67 -0
- package/dist/persistence/persistence.test.d.ts +2 -0
- package/dist/persistence/persistence.test.d.ts.map +1 -0
- package/dist/persistence/persistence.test.js +483 -0
- package/dist/persistence/react.d.ts +18 -0
- package/dist/persistence/react.d.ts.map +1 -0
- package/dist/persistence/react.js +105 -0
- package/dist/persistence/types.d.ts +182 -0
- package/dist/persistence/types.d.ts.map +1 -0
- package/dist/persistence/types.js +1 -0
- package/dist/preview/index.d.ts +3 -0
- package/dist/preview/index.d.ts.map +1 -0
- package/dist/preview/index.js +2 -0
- package/dist/preview/prepare.d.ts +16 -0
- package/dist/preview/prepare.d.ts.map +1 -0
- package/dist/preview/prepare.js +21 -0
- package/dist/preview/preview.d.ts +27 -0
- package/dist/preview/preview.d.ts.map +1 -0
- package/dist/preview/preview.js +51 -0
- package/dist/preview/preview.test.d.ts +2 -0
- package/dist/preview/preview.test.d.ts.map +1 -0
- package/dist/preview/preview.test.js +129 -0
- package/dist/shortcuts/actions.d.ts +17 -0
- package/dist/shortcuts/actions.d.ts.map +1 -0
- package/dist/shortcuts/actions.js +85 -0
- package/dist/shortcuts/index.d.ts +11 -0
- package/dist/shortcuts/index.d.ts.map +1 -0
- package/dist/shortcuts/index.js +5 -0
- package/dist/shortcuts/keys.d.ts +29 -0
- package/dist/shortcuts/keys.d.ts.map +1 -0
- package/dist/shortcuts/keys.js +100 -0
- package/dist/shortcuts/map.d.ts +17 -0
- package/dist/shortcuts/map.d.ts.map +1 -0
- package/dist/shortcuts/map.js +31 -0
- package/dist/shortcuts/registry.d.ts +32 -0
- package/dist/shortcuts/registry.d.ts.map +1 -0
- package/dist/shortcuts/registry.js +53 -0
- package/dist/shortcuts/shortcuts.d.ts +32 -0
- package/dist/shortcuts/shortcuts.d.ts.map +1 -0
- package/dist/shortcuts/shortcuts.js +95 -0
- package/dist/shortcuts/shortcuts.test.d.ts +2 -0
- package/dist/shortcuts/shortcuts.test.d.ts.map +1 -0
- package/dist/shortcuts/shortcuts.test.js +263 -0
- package/dist/store/create-store.d.ts +13 -0
- package/dist/store/create-store.d.ts.map +1 -0
- package/dist/store/create-store.js +248 -0
- package/dist/store/index.d.ts +9 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +5 -0
- package/dist/store/locale.d.ts +23 -0
- package/dist/store/locale.d.ts.map +1 -0
- package/dist/store/locale.js +31 -0
- package/dist/store/react.d.ts +17 -0
- package/dist/store/react.d.ts.map +1 -0
- package/dist/store/react.js +32 -0
- package/dist/store/selection.d.ts +32 -0
- package/dist/store/selection.d.ts.map +1 -0
- package/dist/store/selection.js +84 -0
- package/dist/store/selection.test.d.ts +2 -0
- package/dist/store/selection.test.d.ts.map +1 -0
- package/dist/store/selection.test.js +95 -0
- package/dist/store/selectors.d.ts +18 -0
- package/dist/store/selectors.d.ts.map +1 -0
- package/dist/store/selectors.js +39 -0
- package/dist/store/store.test.d.ts +2 -0
- package/dist/store/store.test.d.ts.map +1 -0
- package/dist/store/store.test.js +331 -0
- package/dist/store/types.d.ts +114 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js +1 -0
- package/dist/styles/tokens.test.d.ts +2 -0
- package/dist/styles/tokens.test.d.ts.map +1 -0
- package/dist/styles/tokens.test.js +199 -0
- package/dist/styles.css +2885 -0
- package/dist/toolbar/brand.d.ts +7 -0
- package/dist/toolbar/brand.d.ts.map +1 -0
- package/dist/toolbar/brand.js +11 -0
- package/dist/toolbar/breakpoint-control.d.ts +9 -0
- package/dist/toolbar/breakpoint-control.d.ts.map +1 -0
- package/dist/toolbar/breakpoint-control.js +23 -0
- package/dist/toolbar/editable-title.d.ts +14 -0
- package/dist/toolbar/editable-title.d.ts.map +1 -0
- package/dist/toolbar/editable-title.js +46 -0
- package/dist/toolbar/editable-title.test.d.ts +2 -0
- package/dist/toolbar/editable-title.test.d.ts.map +1 -0
- package/dist/toolbar/editable-title.test.js +53 -0
- package/dist/toolbar/index.d.ts +12 -0
- package/dist/toolbar/index.d.ts.map +1 -0
- package/dist/toolbar/index.js +5 -0
- package/dist/toolbar/locale-switcher.d.ts +10 -0
- package/dist/toolbar/locale-switcher.d.ts.map +1 -0
- package/dist/toolbar/locale-switcher.js +20 -0
- package/dist/toolbar/more-menu.d.ts +12 -0
- package/dist/toolbar/more-menu.d.ts.map +1 -0
- package/dist/toolbar/more-menu.js +47 -0
- package/dist/toolbar/panel-toggles.d.ts +9 -0
- package/dist/toolbar/panel-toggles.d.ts.map +1 -0
- package/dist/toolbar/panel-toggles.js +19 -0
- package/dist/toolbar/publish-dialog.d.ts +18 -0
- package/dist/toolbar/publish-dialog.d.ts.map +1 -0
- package/dist/toolbar/publish-dialog.js +49 -0
- package/dist/toolbar/publish.test.d.ts +2 -0
- package/dist/toolbar/publish.test.d.ts.map +1 -0
- package/dist/toolbar/publish.test.js +258 -0
- package/dist/toolbar/sample-picker.d.ts +18 -0
- package/dist/toolbar/sample-picker.d.ts.map +1 -0
- package/dist/toolbar/sample-picker.js +72 -0
- package/dist/toolbar/sample-picker.test.d.ts +2 -0
- package/dist/toolbar/sample-picker.test.d.ts.map +1 -0
- package/dist/toolbar/sample-picker.test.js +78 -0
- package/dist/toolbar/save-indicator.d.ts +8 -0
- package/dist/toolbar/save-indicator.d.ts.map +1 -0
- package/dist/toolbar/save-indicator.js +30 -0
- package/dist/toolbar/theme.d.ts +22 -0
- package/dist/toolbar/theme.d.ts.map +1 -0
- package/dist/toolbar/theme.js +46 -0
- package/dist/toolbar/theme.test.d.ts +2 -0
- package/dist/toolbar/theme.test.d.ts.map +1 -0
- package/dist/toolbar/theme.test.js +49 -0
- package/dist/toolbar/toolbar-centre.d.ts +13 -0
- package/dist/toolbar/toolbar-centre.d.ts.map +1 -0
- package/dist/toolbar/toolbar-centre.js +7 -0
- package/dist/toolbar/toolbar-left.d.ts +12 -0
- package/dist/toolbar/toolbar-left.d.ts.map +1 -0
- package/dist/toolbar/toolbar-left.js +16 -0
- package/dist/toolbar/toolbar-right.d.ts +19 -0
- package/dist/toolbar/toolbar-right.d.ts.map +1 -0
- package/dist/toolbar/toolbar-right.js +21 -0
- package/dist/toolbar/toolbar.d.ts +38 -0
- package/dist/toolbar/toolbar.d.ts.map +1 -0
- package/dist/toolbar/toolbar.js +27 -0
- package/dist/toolbar/toolbar.test.d.ts +2 -0
- package/dist/toolbar/toolbar.test.d.ts.map +1 -0
- package/dist/toolbar/toolbar.test.js +289 -0
- package/dist/toolbar/use-overflow-level.d.ts +9 -0
- package/dist/toolbar/use-overflow-level.d.ts.map +1 -0
- package/dist/toolbar/use-overflow-level.js +40 -0
- package/dist/toolbar/zoom-menu.d.ts +10 -0
- package/dist/toolbar/zoom-menu.d.ts.map +1 -0
- package/dist/toolbar/zoom-menu.js +17 -0
- package/dist/ui/icon.d.ts +102 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +182 -0
- package/dist/ui/icon.test.d.ts +2 -0
- package/dist/ui/icon.test.d.ts.map +1 -0
- package/dist/ui/icon.test.js +115 -0
- package/dist/ui/index.d.ts +11 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +5 -0
- package/dist/ui/panel.d.ts +18 -0
- package/dist/ui/panel.d.ts.map +1 -0
- package/dist/ui/panel.js +21 -0
- package/dist/ui/portal.d.ts +14 -0
- package/dist/ui/portal.d.ts.map +1 -0
- package/dist/ui/portal.js +14 -0
- package/dist/ui/primitives.d.ts +190 -0
- package/dist/ui/primitives.d.ts.map +1 -0
- package/dist/ui/primitives.js +164 -0
- package/dist/ui/primitives.test.d.ts +2 -0
- package/dist/ui/primitives.test.d.ts.map +1 -0
- package/dist/ui/primitives.test.js +215 -0
- package/dist/ui/toast.d.ts +39 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.js +76 -0
- package/dist/ui/toast.test.d.ts +2 -0
- package/dist/ui/toast.test.d.ts.map +1 -0
- package/dist/ui/toast.test.js +95 -0
- package/package.json +66 -3
- package/README.md +0 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const rectContains = (rect, point) => point.x >= rect.left &&
|
|
2
|
+
point.x < rect.left + rect.width &&
|
|
3
|
+
point.y >= rect.top &&
|
|
4
|
+
point.y < rect.top + rect.height;
|
|
5
|
+
/**
|
|
6
|
+
* A pointer position in the window (`clientX/Y`) as the canvas sees it: relative to the frame's
|
|
7
|
+
* top-left corner and divided by the zoom the frame is shown at (`scale` 0.5 means the page is drawn
|
|
8
|
+
* at half size). A frame that is not laid out (zero scale) gives `undefined` rather than infinity.
|
|
9
|
+
*/
|
|
10
|
+
export function toCanvasPoint(client, frame, scale = 1) {
|
|
11
|
+
if (!(scale > 0) || !Number.isFinite(scale))
|
|
12
|
+
return undefined;
|
|
13
|
+
return { x: (client.x - frame.left) / scale, y: (client.y - frame.top) / scale };
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* How far to scroll a region this frame while a drag is near its top or bottom edge: 0 in the
|
|
17
|
+
* middle, growing linearly to `maxSpeed` at the edge (and past it, so a pointer that left the
|
|
18
|
+
* region keeps scrolling), negative upwards.
|
|
19
|
+
*/
|
|
20
|
+
export function autoscrollDelta(region, pointerY, { edge = 48, maxSpeed = 24 } = {}) {
|
|
21
|
+
const fromTop = pointerY - region.top;
|
|
22
|
+
const fromBottom = region.top + region.height - pointerY;
|
|
23
|
+
const zone = Math.min(edge, region.height / 2);
|
|
24
|
+
if (zone <= 0)
|
|
25
|
+
return 0;
|
|
26
|
+
if (fromTop < zone)
|
|
27
|
+
return -maxSpeed * Math.min(1, (zone - fromTop) / zone);
|
|
28
|
+
if (fromBottom < zone)
|
|
29
|
+
return maxSpeed * Math.min(1, (zone - fromBottom) / zone);
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type { Destination } from './destinations.ts';
|
|
2
|
+
export { moveDestinations } from './destinations.ts';
|
|
3
|
+
export type { CanvasSurface, DragEngine, DragEngineOptions, DragHost, DragOver, DragPhase, DragState, DragSurfaces, TreeSurface, } from './engine.ts';
|
|
4
|
+
export { createDragEngine, DRAG_THRESHOLD } from './engine.ts';
|
|
5
|
+
export { fragmentFor } from './fragment.ts';
|
|
6
|
+
export type { AutoscrollOptions, Point, Rect } from './geometry.ts';
|
|
7
|
+
export { autoscrollDelta, rectContains, toCanvasPoint } from './geometry.ts';
|
|
8
|
+
export type { MoveToDialogProps } from './move-to-dialog.tsx';
|
|
9
|
+
export { MoveToDialog } from './move-to-dialog.tsx';
|
|
10
|
+
export type { DragProviderProps } from './react.tsx';
|
|
11
|
+
export { DragProvider, useDragAutoscroll, useDragAvailable, useDragEngine, useDragPress, useDragSource, useDragState, useRegisterCanvas, useRegisterDragHost, useRegisterTree, } from './react.tsx';
|
|
12
|
+
export type { TreeDropInput, TreeDropResult, TreePosition } from './tree-target.ts';
|
|
13
|
+
export { treeDropTarget } from './tree-target.ts';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dnd/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EACV,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7E,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { moveDestinations } from './destinations.js';
|
|
2
|
+
export { createDragEngine, DRAG_THRESHOLD } from './engine.js';
|
|
3
|
+
export { fragmentFor } from './fragment.js';
|
|
4
|
+
export { autoscrollDelta, rectContains, toCanvasPoint } from './geometry.js';
|
|
5
|
+
export { MoveToDialog } from './move-to-dialog.js';
|
|
6
|
+
export { DragProvider, useDragAutoscroll, useDragAvailable, useDragEngine, useDragPress, useDragSource, useDragState, useRegisterCanvas, useRegisterDragHost, useRegisterTree, } from './react.js';
|
|
7
|
+
export { treeDropTarget } from './tree-target.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NodeId } from '@next-buildr/core';
|
|
2
|
+
export interface MoveToDialogProps {
|
|
3
|
+
readonly open: boolean;
|
|
4
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
5
|
+
/** The nodes to move. */
|
|
6
|
+
readonly ids: readonly NodeId[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* "Move to": the keyboard way to do what dragging does. It lists the places the rules allow (the
|
|
10
|
+
* end of a slot of any node) and moves the nodes there with the same drop the pointer uses.
|
|
11
|
+
*/
|
|
12
|
+
export declare function MoveToDialog({ open, onOpenChange, ids }: MoveToDialogProps): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=move-to-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"move-to-dialog.d.ts","sourceRoot":"","sources":["../../src/dnd/move-to-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAQhD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,yBAAyB;IACzB,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,iBAAiB,+BA2C1E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useT } from '../messages/index.js';
|
|
4
|
+
import { useEditor } from '../store/index.js';
|
|
5
|
+
import { Button, Dialog } from '../ui/index.js';
|
|
6
|
+
import { moveDestinations } from './destinations.js';
|
|
7
|
+
import { useDragEngine } from './react.js';
|
|
8
|
+
/**
|
|
9
|
+
* "Move to": the keyboard way to do what dragging does. It lists the places the rules allow (the
|
|
10
|
+
* end of a slot of any node) and moves the nodes there with the same drop the pointer uses.
|
|
11
|
+
*/
|
|
12
|
+
export function MoveToDialog({ open, onOpenChange, ids }) {
|
|
13
|
+
const t = useT();
|
|
14
|
+
const store = useEditor();
|
|
15
|
+
const engine = useDragEngine();
|
|
16
|
+
const destinations = useMemo(() => {
|
|
17
|
+
if (!open)
|
|
18
|
+
return [];
|
|
19
|
+
return moveDestinations(store.getState().doc, store.registry, ids);
|
|
20
|
+
}, [open, store, ids]);
|
|
21
|
+
const label = (id) => {
|
|
22
|
+
const node = store.getState().doc.nodes[id];
|
|
23
|
+
return node?.name ?? store.registry.get(node?.type ?? '')?.label ?? node?.type ?? id;
|
|
24
|
+
};
|
|
25
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, title: t('dnd.moveTo.title'), description: t('dnd.moveTo.description'), children: destinations.length === 0 ? (_jsx("p", { className: "bd-dnd-empty", children: t('dnd.moveTo.none') })) : (_jsx("ul", { className: "bd-dnd-destinations", children: destinations.map((destination) => (_jsx("li", { children: _jsxs(Button, { variant: "ghost", onClick: () => {
|
|
26
|
+
const result = engine.drop({ kind: 'nodes', ids }, destination.target);
|
|
27
|
+
if (result.ok)
|
|
28
|
+
onOpenChange(false);
|
|
29
|
+
}, children: [t('dnd.moveTo.into'), " ", label(destination.parentId), destination.slot === 'default' ? '' : ` › ${destination.slot}`] }) }, `${destination.parentId}/${destination.slot}`))) })) }));
|
|
30
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { DragItem } from '@next-buildr/core';
|
|
2
|
+
import { type ReactNode, type PointerEvent as ReactPointerEvent, type RefObject } from 'react';
|
|
3
|
+
import { type CanvasSurface, type DragEngine, type DragHost, type DragState, type TreeSurface } from './engine.ts';
|
|
4
|
+
/** The engine, for what wires it (`receiveTarget` from the canvas' `dnd:target`, "Move to…"). */
|
|
5
|
+
export declare function useDragEngine(): DragEngine;
|
|
6
|
+
/** The drag as it stands, for indicators; only what `select` returns causes a render. */
|
|
7
|
+
export declare function useDragState<T>(select: (state: DragState) => T): T;
|
|
8
|
+
/** The canvas hands over where its frame is (window coordinates) and how far it is zoomed. */
|
|
9
|
+
export declare function useRegisterCanvas(surface: () => CanvasSurface | undefined): void;
|
|
10
|
+
/** The layers tree hands over its viewport, scroll position and rows. */
|
|
11
|
+
export declare function useRegisterTree(surface: () => TreeSurface | undefined): void;
|
|
12
|
+
/** The canvas host the drag forwards to; `null` while there is none. */
|
|
13
|
+
export declare function useRegisterDragHost(host: DragHost | null): void;
|
|
14
|
+
export interface DragProviderProps {
|
|
15
|
+
readonly children: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Owns the engine of an editor, listens to the pointer and Escape while something is dragged, puts
|
|
19
|
+
* a shield over the page (the canvas iframe would otherwise swallow the pointer events), and draws
|
|
20
|
+
* the ghost that follows the pointer. What it says for the screen reader is a live region.
|
|
21
|
+
*/
|
|
22
|
+
export declare function DragProvider({ children }: DragProviderProps): import("react").JSX.Element;
|
|
23
|
+
export interface DragSourceProps {
|
|
24
|
+
readonly onPointerDown: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Props that make an element start a drag on primary-button press. `item` may be a function, so a
|
|
28
|
+
* tree row can decide at press time (the whole selection or just this row).
|
|
29
|
+
*/
|
|
30
|
+
export declare function useDragSource(item: DragItem | (() => DragItem), label: string | (() => string)): (event: ReactPointerEvent<HTMLElement>) => void;
|
|
31
|
+
/** Whether a `DragProvider` is above: panels offer dragging and "Move to" only then. */
|
|
32
|
+
export declare function useDragAvailable(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Starts a drag from a pointer event of something that decides at press time what is dragged (a row
|
|
35
|
+
* of the layers tree); `undefined` without a provider.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useDragPress(): ((item: DragItem, label: string, event: ReactPointerEvent<HTMLElement>) => void) | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* While something is dragged over `element`, scrolls it when the pointer is near its top or bottom
|
|
40
|
+
* edge, once per animation frame, and re-hovers so the target follows what scrolled under the pointer.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useDragAutoscroll(element: RefObject<HTMLElement | null>): void;
|
|
43
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/dnd/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,YAAY,IAAI,iBAAiB,EACtC,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAIf,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,SAAS,EAEd,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AA6BrB,iGAAiG;AACjG,wBAAgB,aAAa,IAAI,UAAU,CAE1C;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,GAAG,CAAC,CAOlE;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,aAAa,GAAG,SAAS,GAAG,IAAI,CAUhF;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,WAAW,GAAG,SAAS,GAAG,IAAI,CAW5E;AAED,wEAAwE;AACxE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,IAAI,CAQ/D;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAiD3D;AA8BD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACzE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,CAAC,MAAM,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,WAKnF,iBAAiB,CAAC,WAAW,CAAC,UASzC;AAED,wFAAwF;AACxF,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,IACxB,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC,GAChF,SAAS,CAYZ;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CA0B9E"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useSyncExternalStore, } from 'react';
|
|
3
|
+
import { useStore } from 'zustand';
|
|
4
|
+
import { useT } from '../messages/index.js';
|
|
5
|
+
import { useEditor } from '../store/index.js';
|
|
6
|
+
import { createDragEngine, IDLE_STATE, } from './engine.js';
|
|
7
|
+
import { autoscrollDelta } from './geometry.js';
|
|
8
|
+
const IDLE_STORE = { getState: () => IDLE_STATE };
|
|
9
|
+
const DragContext = createContext(null);
|
|
10
|
+
function useDragContext() {
|
|
11
|
+
const value = useContext(DragContext);
|
|
12
|
+
if (value === null)
|
|
13
|
+
throw new Error('DragProvider is missing');
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
/** Panels work without a provider (no dragging, no indicators): tests and embeds that do not need it. */
|
|
17
|
+
const useOptionalDrag = () => useContext(DragContext);
|
|
18
|
+
const noSubscription = () => () => undefined;
|
|
19
|
+
/** The engine, for what wires it (`receiveTarget` from the canvas' `dnd:target`, "Move to…"). */
|
|
20
|
+
export function useDragEngine() {
|
|
21
|
+
return useDragContext().engine;
|
|
22
|
+
}
|
|
23
|
+
/** The drag as it stands, for indicators; only what `select` returns causes a render. */
|
|
24
|
+
export function useDragState(select) {
|
|
25
|
+
const drag = useOptionalDrag();
|
|
26
|
+
return useSyncExternalStore(drag === null ? noSubscription : drag.engine.state.subscribe, () => select((drag?.engine.state ?? IDLE_STORE).getState()), () => select(IDLE_STATE));
|
|
27
|
+
}
|
|
28
|
+
/** The canvas hands over where its frame is (window coordinates) and how far it is zoomed. */
|
|
29
|
+
export function useRegisterCanvas(surface) {
|
|
30
|
+
const { registry } = useDragContext();
|
|
31
|
+
const ref = useRef(surface);
|
|
32
|
+
ref.current = surface;
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
registry.canvas = () => ref.current();
|
|
35
|
+
return () => {
|
|
36
|
+
registry.canvas = null;
|
|
37
|
+
};
|
|
38
|
+
}, [registry]);
|
|
39
|
+
}
|
|
40
|
+
/** The layers tree hands over its viewport, scroll position and rows. */
|
|
41
|
+
export function useRegisterTree(surface) {
|
|
42
|
+
const registry = useOptionalDrag()?.registry;
|
|
43
|
+
const ref = useRef(surface);
|
|
44
|
+
ref.current = surface;
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (registry === undefined)
|
|
47
|
+
return;
|
|
48
|
+
registry.tree = () => ref.current();
|
|
49
|
+
return () => {
|
|
50
|
+
registry.tree = null;
|
|
51
|
+
};
|
|
52
|
+
}, [registry]);
|
|
53
|
+
}
|
|
54
|
+
/** The canvas host the drag forwards to; `null` while there is none. */
|
|
55
|
+
export function useRegisterDragHost(host) {
|
|
56
|
+
const { registry } = useDragContext();
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
registry.host = host;
|
|
59
|
+
return () => {
|
|
60
|
+
registry.host = null;
|
|
61
|
+
};
|
|
62
|
+
}, [registry, host]);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Owns the engine of an editor, listens to the pointer and Escape while something is dragged, puts
|
|
66
|
+
* a shield over the page (the canvas iframe would otherwise swallow the pointer events), and draws
|
|
67
|
+
* the ghost that follows the pointer. What it says for the screen reader is a live region.
|
|
68
|
+
*/
|
|
69
|
+
export function DragProvider({ children }) {
|
|
70
|
+
const store = useEditor();
|
|
71
|
+
const value = useMemo(() => {
|
|
72
|
+
const registry = { canvas: null, tree: null, host: null };
|
|
73
|
+
const engine = createDragEngine({
|
|
74
|
+
store,
|
|
75
|
+
host: () => registry.host ?? undefined,
|
|
76
|
+
surfaces: { canvas: () => registry.canvas?.(), tree: () => registry.tree?.() },
|
|
77
|
+
});
|
|
78
|
+
return { engine, registry };
|
|
79
|
+
}, [store]);
|
|
80
|
+
const { engine } = value;
|
|
81
|
+
const phase = useStore(engine.state, (s) => s.phase);
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (phase === 'idle')
|
|
84
|
+
return;
|
|
85
|
+
const move = (event) => engine.move({ x: event.clientX, y: event.clientY });
|
|
86
|
+
const up = () => {
|
|
87
|
+
engine.release();
|
|
88
|
+
};
|
|
89
|
+
const cancel = () => engine.cancel();
|
|
90
|
+
const key = (event) => {
|
|
91
|
+
if (event.key !== 'Escape')
|
|
92
|
+
return;
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
event.stopPropagation();
|
|
95
|
+
engine.cancel();
|
|
96
|
+
};
|
|
97
|
+
window.addEventListener('pointermove', move);
|
|
98
|
+
window.addEventListener('pointerup', up);
|
|
99
|
+
window.addEventListener('pointercancel', cancel);
|
|
100
|
+
window.addEventListener('blur', cancel);
|
|
101
|
+
window.addEventListener('keydown', key, true);
|
|
102
|
+
return () => {
|
|
103
|
+
window.removeEventListener('pointermove', move);
|
|
104
|
+
window.removeEventListener('pointerup', up);
|
|
105
|
+
window.removeEventListener('pointercancel', cancel);
|
|
106
|
+
window.removeEventListener('blur', cancel);
|
|
107
|
+
window.removeEventListener('keydown', key, true);
|
|
108
|
+
};
|
|
109
|
+
}, [engine, phase]);
|
|
110
|
+
useEffect(() => () => engine.dispose(), [engine]);
|
|
111
|
+
return (_jsxs(DragContext.Provider, { value: value, children: [children, _jsx(DragOverlay, { engine: engine })] }));
|
|
112
|
+
}
|
|
113
|
+
function DragOverlay({ engine }) {
|
|
114
|
+
const t = useT();
|
|
115
|
+
const state = useStore(engine.state);
|
|
116
|
+
const dragging = state.phase === 'dragging';
|
|
117
|
+
return (_jsxs(_Fragment, { children: [dragging ? (_jsx("div", { className: "bd-drag-shield", "data-over": state.over ?? 'none', "aria-hidden": "true" })) : null, dragging && state.pointer !== null ? (_jsx("div", { className: "bd-drag-ghost", "aria-hidden": "true", "data-allowed": state.target !== null, style: { transform: `translate(${state.pointer.x + 12}px, ${state.pointer.y + 12}px)` }, children: state.label })) : null, _jsx("div", { className: "bd-drag-live", role: "status", "aria-live": "polite", children: dragging && state.over !== null && state.target === null
|
|
118
|
+
? `${t('dnd.notAllowed')} ${state.reason?.message ?? ''}`.trim()
|
|
119
|
+
: '' })] }));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Props that make an element start a drag on primary-button press. `item` may be a function, so a
|
|
123
|
+
* tree row can decide at press time (the whole selection or just this row).
|
|
124
|
+
*/
|
|
125
|
+
export function useDragSource(item, label) {
|
|
126
|
+
const engine = useOptionalDrag()?.engine;
|
|
127
|
+
const latest = useRef({ item, label });
|
|
128
|
+
latest.current = { item, label };
|
|
129
|
+
return useCallback((event) => {
|
|
130
|
+
if (engine === undefined || event.button !== 0 || !event.isPrimary)
|
|
131
|
+
return;
|
|
132
|
+
const current = latest.current;
|
|
133
|
+
const resolved = typeof current.item === 'function' ? current.item() : current.item;
|
|
134
|
+
const text = typeof current.label === 'function' ? current.label() : current.label;
|
|
135
|
+
engine.press(resolved, text, { x: event.clientX, y: event.clientY });
|
|
136
|
+
}, [engine]);
|
|
137
|
+
}
|
|
138
|
+
/** Whether a `DragProvider` is above: panels offer dragging and "Move to" only then. */
|
|
139
|
+
export function useDragAvailable() {
|
|
140
|
+
return useOptionalDrag() !== null;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Starts a drag from a pointer event of something that decides at press time what is dragged (a row
|
|
144
|
+
* of the layers tree); `undefined` without a provider.
|
|
145
|
+
*/
|
|
146
|
+
export function useDragPress() {
|
|
147
|
+
const engine = useOptionalDrag()?.engine;
|
|
148
|
+
return useMemo(() => engine === undefined
|
|
149
|
+
? undefined
|
|
150
|
+
: (item, label, event) => {
|
|
151
|
+
if (event.button !== 0 || !event.isPrimary)
|
|
152
|
+
return;
|
|
153
|
+
engine.press(item, label, { x: event.clientX, y: event.clientY });
|
|
154
|
+
}, [engine]);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* While something is dragged over `element`, scrolls it when the pointer is near its top or bottom
|
|
158
|
+
* edge, once per animation frame, and re-hovers so the target follows what scrolled under the pointer.
|
|
159
|
+
*/
|
|
160
|
+
export function useDragAutoscroll(element) {
|
|
161
|
+
const engine = useOptionalDrag()?.engine;
|
|
162
|
+
const active = useDragState((state) => state.phase === 'dragging' && state.over === 'tree');
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
if (engine === undefined || !active)
|
|
165
|
+
return;
|
|
166
|
+
let handle = 0;
|
|
167
|
+
const tick = () => {
|
|
168
|
+
const target = element.current;
|
|
169
|
+
const pointer = engine.state.getState().pointer;
|
|
170
|
+
if (target !== null && pointer !== null) {
|
|
171
|
+
const box = target.getBoundingClientRect();
|
|
172
|
+
const delta = autoscrollDelta({ left: box.left, top: box.top, width: box.width, height: box.height }, pointer.y);
|
|
173
|
+
if (delta !== 0) {
|
|
174
|
+
const before = target.scrollTop;
|
|
175
|
+
target.scrollTop = before + delta;
|
|
176
|
+
if (target.scrollTop !== before)
|
|
177
|
+
engine.move(pointer);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
handle = requestAnimationFrame(tick);
|
|
181
|
+
};
|
|
182
|
+
handle = requestAnimationFrame(tick);
|
|
183
|
+
return () => cancelAnimationFrame(handle);
|
|
184
|
+
}, [engine, active, element]);
|
|
185
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type BuilderDocument, type DragItem, type DropTarget, type Reason, type RegistryMeta } from '@next-buildr/core';
|
|
2
|
+
import type { LayerRow } from '../panels/layers/flatten.ts';
|
|
3
|
+
export type TreePosition = 'before' | 'inside' | 'after';
|
|
4
|
+
export interface TreeDropResult {
|
|
5
|
+
readonly target: DropTarget | null;
|
|
6
|
+
/** The row the indicator is drawn at and on which side of it (or over it, for "inside"). */
|
|
7
|
+
readonly rowIndex: number;
|
|
8
|
+
readonly position: TreePosition;
|
|
9
|
+
/** Why nothing accepts the drop, from the rule that refused the spot nearest the pointer. */
|
|
10
|
+
readonly reason?: Reason | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface TreeDropInput {
|
|
13
|
+
readonly doc: BuilderDocument;
|
|
14
|
+
readonly registry: RegistryMeta;
|
|
15
|
+
readonly rows: readonly LayerRow[];
|
|
16
|
+
readonly item: DragItem;
|
|
17
|
+
/** The pointer's distance from the top of the list's content (scroll included). */
|
|
18
|
+
readonly y: number;
|
|
19
|
+
readonly rowHeight: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Where a drop over the layers tree would land: the row under the pointer picks the spot (its top
|
|
23
|
+
* quarter is before it, its bottom quarter after it, the middle inside it) and the rules
|
|
24
|
+
* (`canInsert`/`canMove`) accept or refuse it. When they refuse, the nearest legal alternatives are
|
|
25
|
+
* tried — inside the row's parent, then after each ancestor — so a drop on a leaf's edge that the
|
|
26
|
+
* leaf's own slot does not allow still finds a home. Pure: nothing is dispatched.
|
|
27
|
+
*/
|
|
28
|
+
export declare function treeDropTarget(input: TreeDropInput): TreeDropResult | undefined;
|
|
29
|
+
//# sourceMappingURL=tree-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-target.d.ts","sourceRoot":"","sources":["../../src/dnd/tree-target.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EAGpB,KAAK,QAAQ,EACb,KAAK,UAAU,EAEf,KAAK,MAAM,EACX,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAI5D,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IACnC,4FAA4F;IAC5F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,6FAA6F;IAC7F,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,QAAQ,EAAE,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAKD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,CA4E/E"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { canInsert, createIndex, } from '@next-buildr/core';
|
|
2
|
+
import { moveVerdict } from './check.js';
|
|
3
|
+
import { fragmentFor } from './fragment.js';
|
|
4
|
+
/** The share of a row that counts as its edge; the middle is "inside". */
|
|
5
|
+
const EDGE = 0.25;
|
|
6
|
+
/**
|
|
7
|
+
* Where a drop over the layers tree would land: the row under the pointer picks the spot (its top
|
|
8
|
+
* quarter is before it, its bottom quarter after it, the middle inside it) and the rules
|
|
9
|
+
* (`canInsert`/`canMove`) accept or refuse it. When they refuse, the nearest legal alternatives are
|
|
10
|
+
* tried — inside the row's parent, then after each ancestor — so a drop on a leaf's edge that the
|
|
11
|
+
* leaf's own slot does not allow still finds a home. Pure: nothing is dispatched.
|
|
12
|
+
*/
|
|
13
|
+
export function treeDropTarget(input) {
|
|
14
|
+
const { doc, registry, rows, item, y, rowHeight } = input;
|
|
15
|
+
if (rows.length === 0 || !(rowHeight > 0))
|
|
16
|
+
return undefined;
|
|
17
|
+
const rowIndex = Math.min(rows.length - 1, Math.max(0, Math.floor(y / rowHeight)));
|
|
18
|
+
const row = rows[rowIndex];
|
|
19
|
+
if (row === undefined)
|
|
20
|
+
return undefined;
|
|
21
|
+
const within = y / rowHeight - rowIndex;
|
|
22
|
+
const isRoot = row.parentId === null;
|
|
23
|
+
const position = isRoot
|
|
24
|
+
? 'inside'
|
|
25
|
+
: within < EDGE
|
|
26
|
+
? 'before'
|
|
27
|
+
: within > 1 - EDGE
|
|
28
|
+
? 'after'
|
|
29
|
+
: 'inside';
|
|
30
|
+
const index = createIndex(doc);
|
|
31
|
+
const fragment = item.kind === 'nodes' ? undefined : fragmentFor(registry, item);
|
|
32
|
+
if (item.kind !== 'nodes' && fragment === undefined) {
|
|
33
|
+
return { target: null, rowIndex, position };
|
|
34
|
+
}
|
|
35
|
+
const ids = item.kind === 'nodes' ? item.ids : [];
|
|
36
|
+
const endOf = (parentId, slot) => {
|
|
37
|
+
const children = doc.nodes[parentId]?.slots?.[slot] ?? [];
|
|
38
|
+
// Moving out of the same slot leaves one gap less than the count.
|
|
39
|
+
return children.length;
|
|
40
|
+
};
|
|
41
|
+
const beside = (id, offset) => {
|
|
42
|
+
const parentId = index.parentOf[id];
|
|
43
|
+
const slot = index.slotOf[id];
|
|
44
|
+
const at = index.indexOf[id];
|
|
45
|
+
return parentId === undefined || slot === undefined || at === undefined
|
|
46
|
+
? undefined
|
|
47
|
+
: { parentId, slot, index: at + offset };
|
|
48
|
+
};
|
|
49
|
+
const candidates = [];
|
|
50
|
+
const push = (target) => {
|
|
51
|
+
if (target !== undefined)
|
|
52
|
+
candidates.push(target);
|
|
53
|
+
};
|
|
54
|
+
const inside = () => {
|
|
55
|
+
const slots = new Set(['default', ...Object.keys(doc.nodes[row.id]?.slots ?? {})]);
|
|
56
|
+
for (const slot of slots)
|
|
57
|
+
push({ parentId: row.id, slot, index: endOf(row.id, slot) });
|
|
58
|
+
};
|
|
59
|
+
if (position === 'inside')
|
|
60
|
+
inside();
|
|
61
|
+
else
|
|
62
|
+
push(beside(row.id, position === 'before' ? 0 : 1));
|
|
63
|
+
if (position !== 'inside')
|
|
64
|
+
inside();
|
|
65
|
+
else if (!isRoot)
|
|
66
|
+
push(beside(row.id, 1));
|
|
67
|
+
for (let up = index.parentOf[row.id]; up !== undefined; up = index.parentOf[up]) {
|
|
68
|
+
if (up === doc.root)
|
|
69
|
+
break;
|
|
70
|
+
// Right after a node that is itself being moved is where it already is.
|
|
71
|
+
if (!ids.includes(up))
|
|
72
|
+
push(beside(up, 1));
|
|
73
|
+
}
|
|
74
|
+
let firstRefusal;
|
|
75
|
+
for (const target of candidates) {
|
|
76
|
+
const place = { parentId: target.parentId, slot: target.slot, at: target.index };
|
|
77
|
+
let verdict;
|
|
78
|
+
if (fragment !== undefined) {
|
|
79
|
+
verdict = canInsert(doc, index, registry, place, fragment);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// Every dragged node must be allowed there; the first that is not gives the reason.
|
|
83
|
+
verdict = { ok: true, value: true };
|
|
84
|
+
for (const id of ids) {
|
|
85
|
+
const one = moveVerdict(doc, index, registry, id, target);
|
|
86
|
+
if (!one.ok) {
|
|
87
|
+
verdict = one;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (verdict.ok)
|
|
93
|
+
return { target, rowIndex, position };
|
|
94
|
+
firstRefusal ??= verdict.error;
|
|
95
|
+
}
|
|
96
|
+
return { target: null, rowIndex, position, reason: firstRefusal };
|
|
97
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { BuilderEditor } from './app/builder-editor.tsx';
|
|
2
|
+
export type { BreakpointConfig, BuilderEditorProps, DocumentRef, EditorConfig, ResolvedEditorConfig, } from './app/config.ts';
|
|
3
|
+
export { DEFAULT_BREAKPOINTS, resolveConfig } from './app/config.ts';
|
|
4
|
+
export type { EditorAppProps } from './app/editor-app.tsx';
|
|
5
|
+
export { EditorApp } from './app/editor-app.tsx';
|
|
6
|
+
export type { EditorLayoutProps } from './app/layout.tsx';
|
|
7
|
+
export { EditorLayout } from './app/layout.tsx';
|
|
8
|
+
export { ManifestProvider, useManifest } from './app/manifest.tsx';
|
|
9
|
+
export * from './canvas-host/index.ts';
|
|
10
|
+
export * from './clipboard/index.ts';
|
|
11
|
+
export * from './dialogs/index.ts';
|
|
12
|
+
export * from './dnd/index.ts';
|
|
13
|
+
export type { MessageKey, Messages, Translate, UiLocale } from './messages/index.tsx';
|
|
14
|
+
export { createTranslator, MessagesProvider, UI_LOCALES, useT } from './messages/index.tsx';
|
|
15
|
+
export * from './panels/index.ts';
|
|
16
|
+
export * from './persistence/index.ts';
|
|
17
|
+
export * from './preview/index.ts';
|
|
18
|
+
export * from './shortcuts/index.ts';
|
|
19
|
+
export * from './store/index.ts';
|
|
20
|
+
export * from './toolbar/index.ts';
|
|
21
|
+
export * from './ui/index.ts';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnE,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5F,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Public entry point of @next-buildr/editor: the standalone visual editor application.
|
|
2
|
+
// Depends only on @next-buildr/core - it drives a canvas (a real Next.js route running the
|
|
3
|
+
// real renderer) through the postMessage protocol; it never renders the document itself.
|
|
4
|
+
// Import '@next-buildr/editor/styles.css' once in the host.
|
|
5
|
+
export { BuilderEditor } from './app/builder-editor.js';
|
|
6
|
+
export { DEFAULT_BREAKPOINTS, resolveConfig } from './app/config.js';
|
|
7
|
+
export { EditorApp } from './app/editor-app.js';
|
|
8
|
+
export { EditorLayout } from './app/layout.js';
|
|
9
|
+
export { ManifestProvider, useManifest } from './app/manifest.js';
|
|
10
|
+
export * from './canvas-host/index.js';
|
|
11
|
+
export * from './clipboard/index.js';
|
|
12
|
+
export * from './dialogs/index.js';
|
|
13
|
+
export * from './dnd/index.js';
|
|
14
|
+
export { createTranslator, MessagesProvider, UI_LOCALES, useT } from './messages/index.js';
|
|
15
|
+
export * from './panels/index.js';
|
|
16
|
+
export * from './persistence/index.js';
|
|
17
|
+
export * from './preview/index.js';
|
|
18
|
+
export * from './shortcuts/index.js';
|
|
19
|
+
export * from './store/index.js';
|
|
20
|
+
export * from './toolbar/index.js';
|
|
21
|
+
export * from './ui/index.js';
|