@visuallyjs/browser-ui 1.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/css/visuallyjs-theme.css +148 -0
- package/css/visuallyjs.css +1879 -0
- package/js/visuallyjs.browser-ui.cjs.js +143 -0
- package/js/visuallyjs.browser-ui.esm.js +143 -0
- package/package.json +16 -0
- package/types/browser-ui/base-dom-ui-layout-adapter.d.ts +14 -0
- package/types/browser-ui/browser-ui.d.ts +95 -0
- package/types/browser-ui/browser-util.d.ts +233 -0
- package/types/browser-ui/browser-visuallyjs-instance.d.ts +881 -0
- package/types/browser-ui/canvas-layout-adapter.d.ts +15 -0
- package/types/browser-ui/collicat.d.ts +245 -0
- package/types/browser-ui/components/controls/controls-component.d.ts +137 -0
- package/types/browser-ui/components/controls/copy-paste-controls-component.d.ts +9 -0
- package/types/browser-ui/components/controls/css-classes.d.ts +79 -0
- package/types/browser-ui/components/controls/index.d.ts +4 -0
- package/types/browser-ui/components/controls/svg-export-component.d.ts +60 -0
- package/types/browser-ui/components/edge-type-picker/edge-type-picker.d.ts +37 -0
- package/types/browser-ui/components/edge-type-picker/index.d.ts +1 -0
- package/types/browser-ui/components/index.d.ts +4 -0
- package/types/browser-ui/components/inspector/color-picker-tag.d.ts +32 -0
- package/types/browser-ui/components/inspector/definitions.d.ts +114 -0
- package/types/browser-ui/components/inspector/edge-type-tag.d.ts +15 -0
- package/types/browser-ui/components/inspector/index.d.ts +6 -0
- package/types/browser-ui/components/inspector/inspector.d.ts +138 -0
- package/types/browser-ui/components/inspector/shape-type-inspector.d.ts +43 -0
- package/types/browser-ui/components/inspector/vanilla-inspector.d.ts +39 -0
- package/types/browser-ui/components/palette/index.d.ts +2 -0
- package/types/browser-ui/components/palette/palette-content-generator.d.ts +14 -0
- package/types/browser-ui/components/palette/palette-options.d.ts +159 -0
- package/types/browser-ui/components/palette/palette.d.ts +126 -0
- package/types/browser-ui/connector-editor.d.ts +65 -0
- package/types/browser-ui/connector-editors/anchors.d.ts +31 -0
- package/types/browser-ui/connector-editors/css-constants.d.ts +33 -0
- package/types/browser-ui/connector-editors/definitions.d.ts +74 -0
- package/types/browser-ui/connector-editors/editor-base.d.ts +177 -0
- package/types/browser-ui/connector-editors/index.d.ts +52 -0
- package/types/browser-ui/connector-editors/util.d.ts +33 -0
- package/types/browser-ui/connector-editors-bezier/bezier-editor.d.ts +82 -0
- package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +42 -0
- package/types/browser-ui/connector-editors-bezier/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/css-constants.d.ts +28 -0
- package/types/browser-ui/connector-editors-orthogonal/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/orthogonal-editor.d.ts +86 -0
- package/types/browser-ui/connector-editors-straight/auto-split-mode.d.ts +24 -0
- package/types/browser-ui/connector-editors-straight/click-split-mode.d.ts +20 -0
- package/types/browser-ui/connector-editors-straight/css-constants.d.ts +30 -0
- package/types/browser-ui/connector-editors-straight/definitions.d.ts +69 -0
- package/types/browser-ui/connector-editors-straight/index.d.ts +11 -0
- package/types/browser-ui/connector-editors-straight/straight-editor.d.ts +42 -0
- package/types/browser-ui/constants.d.ts +79 -0
- package/types/browser-ui/copy-paste/clipboard.d.ts +34 -0
- package/types/browser-ui/copy-paste/index.d.ts +2 -0
- package/types/browser-ui/copy-paste/transformer.d.ts +14 -0
- package/types/browser-ui/css-constants.d.ts +436 -0
- package/types/browser-ui/d.d.ts +2 -0
- package/types/browser-ui/definitions.d.ts +442 -0
- package/types/browser-ui/dialogs/binder.d.ts +49 -0
- package/types/browser-ui/dialogs/constants.d.ts +51 -0
- package/types/browser-ui/dialogs/dialogs.d.ts +30 -0
- package/types/browser-ui/dialogs/index.d.ts +3 -0
- package/types/browser-ui/drag-manager-2.d.ts +54 -0
- package/types/browser-ui/edge-handler-base.d.ts +168 -0
- package/types/browser-ui/edge-input-handler.d.ts +116 -0
- package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +22 -0
- package/types/browser-ui/edge-mappings/index.d.ts +1 -0
- package/types/browser-ui/edge-relocate-handler.d.ts +51 -0
- package/types/browser-ui/element-drag-handler-2.d.ts +254 -0
- package/types/browser-ui/element-dragger.d.ts +45 -0
- package/types/browser-ui/element-facade.d.ts +11 -0
- package/types/browser-ui/event-manager.d.ts +50 -0
- package/types/browser-ui/fixed-layer.d.ts +107 -0
- package/types/browser-ui/group-layout-adapter.d.ts +19 -0
- package/types/browser-ui/html-element-overlay.d.ts +32 -0
- package/types/browser-ui/icons/definitions.d.ts +59 -0
- package/types/browser-ui/icons/icon-renderer.d.ts +43 -0
- package/types/browser-ui/icons/index.d.ts +2 -0
- package/types/browser-ui/index.d.ts +48 -0
- package/types/browser-ui/pan-zoom-options.d.ts +262 -0
- package/types/browser-ui/pan-zoom.d.ts +674 -0
- package/types/browser-ui/paper-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/paper-renderer/index.d.ts +2 -0
- package/types/browser-ui/paper-renderer/paper.d.ts +50 -0
- package/types/browser-ui/pinch-listener.d.ts +33 -0
- package/types/browser-ui/plugins/background/available-backgrounds.d.ts +12 -0
- package/types/browser-ui/plugins/background/background-options.d.ts +62 -0
- package/types/browser-ui/plugins/background/background-plugin.d.ts +62 -0
- package/types/browser-ui/plugins/background/generated-grid-background.d.ts +230 -0
- package/types/browser-ui/plugins/background/index.d.ts +6 -0
- package/types/browser-ui/plugins/background/simple-background.d.ts +33 -0
- package/types/browser-ui/plugins/background/tiled-background.d.ts +118 -0
- package/types/browser-ui/plugins/browser-ui-plugin.d.ts +90 -0
- package/types/browser-ui/plugins/edge-routing/index.d.ts +66 -0
- package/types/browser-ui/plugins/index.d.ts +5 -0
- package/types/browser-ui/plugins/selected-edge-highlight/index.d.ts +1 -0
- package/types/browser-ui/plugins/selected-edge-highlight/selected-edge-highlight-plugin.d.ts +36 -0
- package/types/browser-ui/plugins/ui-states/index.d.ts +2 -0
- package/types/browser-ui/plugins/ui-states/ui-state.d.ts +14 -0
- package/types/browser-ui/plugins/ui-states/ui-states-plugin.d.ts +69 -0
- package/types/browser-ui/positioning-and-sizing-utils.d.ts +103 -0
- package/types/browser-ui/shape-library/index.d.ts +4 -0
- package/types/browser-ui/shape-library/shape-library-definitions.d.ts +243 -0
- package/types/browser-ui/shape-library/shape-library.d.ts +266 -0
- package/types/browser-ui/shape-library/shapes-basic.d.ts +7 -0
- package/types/browser-ui/shape-library/shapes-flowchart.d.ts +7 -0
- package/types/browser-ui/storage.d.ts +8 -0
- package/types/browser-ui/surface-renderer/anim/anim.d.ts +64 -0
- package/types/browser-ui/surface-renderer/anim/constants.d.ts +74 -0
- package/types/browser-ui/surface-renderer/anim/definitions.d.ts +134 -0
- package/types/browser-ui/surface-renderer/anim/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +23 -0
- package/types/browser-ui/surface-renderer/css-classes.d.ts +64 -0
- package/types/browser-ui/surface-renderer/decorators.d.ts +162 -0
- package/types/browser-ui/surface-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/surface-renderer/diagrams/constants.d.ts +28 -0
- package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +528 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-cell.d.ts +123 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +116 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-palette.d.ts +11 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +112 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +221 -0
- package/types/browser-ui/surface-renderer/diagrams/index.d.ts +25 -0
- package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +59 -0
- package/types/browser-ui/surface-renderer/diagrams/util.d.ts +15 -0
- package/types/browser-ui/surface-renderer/elastic-group-manager.d.ts +102 -0
- package/types/browser-ui/surface-renderer/index.d.ts +34 -0
- package/types/browser-ui/surface-renderer/params.d.ts +175 -0
- package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +26 -0
- package/types/browser-ui/surface-renderer/plugins/controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/drag-groups-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +25 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/index.d.ts +10 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso.d.ts +74 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/miniview-plugin.d.ts +235 -0
- package/types/browser-ui/surface-renderer/plugins/palette/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +17 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +55 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/border-drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +411 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/handle-gen.d.ts +15 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/resizing-tools-plugin.d.ts +185 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/util.d.ts +16 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +128 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/definitions.d.ts +90 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +64 -0
- package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +127 -0
- package/types/browser-ui/surface-renderer/shape-palette.d.ts +55 -0
- package/types/browser-ui/surface-renderer/surface-decorator.d.ts +35 -0
- package/types/browser-ui/surface-renderer/surface-events.d.ts +9 -0
- package/types/browser-ui/surface-renderer/surface-render-options.d.ts +125 -0
- package/types/browser-ui/surface-renderer/surface.d.ts +665 -0
- package/types/browser-ui/svg-component.d.ts +6 -0
- package/types/browser-ui/svg-element-connector.d.ts +16 -0
- package/types/browser-ui/svg-element-overlay.d.ts +55 -0
- package/types/browser-ui/svg-export/definitions.d.ts +153 -0
- package/types/browser-ui/svg-export/image-export-ui.d.ts +20 -0
- package/types/browser-ui/svg-export/image-exporter.d.ts +15 -0
- package/types/browser-ui/svg-export/index.d.ts +6 -0
- package/types/browser-ui/svg-export/svg-export-ui.d.ts +11 -0
- package/types/browser-ui/svg-export/svg-exporter.d.ts +8 -0
- package/types/browser-ui/svg-export/util.d.ts +23 -0
- package/types/browser-ui/svg-util.d.ts +27 -0
- package/types/browser-ui/templating/browser-ui-recado.d.ts +48 -0
- package/types/browser-ui/templating/custom-tag-definition.d.ts +32 -0
- package/types/browser-ui/templating/index.d.ts +11 -0
- package/types/browser-ui/templating/recado-template-renderer.d.ts +69 -0
- package/types/browser-ui/ui-path.d.ts +57 -0
- package/types/browser-ui/util.d.ts +4 -0
- package/types/browser-ui/wheel-listener.d.ts +2 -0
- package/types/charts/area/area-chart.d.ts +85 -0
- package/types/charts/area/index.d.ts +1 -0
- package/types/charts/bar-and-column/bar-chart.d.ts +34 -0
- package/types/charts/bar-and-column/bar-plot.d.ts +90 -0
- package/types/charts/bar-and-column/column-chart.d.ts +35 -0
- package/types/charts/bar-and-column/index.d.ts +3 -0
- package/types/charts/base-chart.d.ts +395 -0
- package/types/charts/base-xy-chart.d.ts +224 -0
- package/types/charts/bubble/bubble-chart.d.ts +30 -0
- package/types/charts/bubble/definitions.d.ts +32 -0
- package/types/charts/bubble/index.d.ts +2 -0
- package/types/charts/category-value-chart.d.ts +146 -0
- package/types/charts/chart-exporter.d.ts +38 -0
- package/types/charts/chart-zoom-controls.d.ts +23 -0
- package/types/charts/constants.d.ts +16 -0
- package/types/charts/css-classes.d.ts +312 -0
- package/types/charts/datasource.d.ts +61 -0
- package/types/charts/definitions.d.ts +261 -0
- package/types/charts/domain_scale_utilities.d.ts +72 -0
- package/types/charts/dual-value-chart.d.ts +60 -0
- package/types/charts/gauge/definitions.d.ts +108 -0
- package/types/charts/gauge/gauge-chart.d.ts +91 -0
- package/types/charts/gauge/index.d.ts +2 -0
- package/types/charts/index.d.ts +25 -0
- package/types/charts/legend.d.ts +120 -0
- package/types/charts/line/index.d.ts +1 -0
- package/types/charts/line/line-chart.d.ts +79 -0
- package/types/charts/markers.d.ts +13 -0
- package/types/charts/pie/index.d.ts +1 -0
- package/types/charts/pie/pie-chart.d.ts +146 -0
- package/types/charts/plot.d.ts +75 -0
- package/types/charts/sankey/index.d.ts +1 -0
- package/types/charts/sankey/preprocessor.d.ts +37 -0
- package/types/charts/sankey/sankey.d.ts +208 -0
- package/types/charts/scatter/definitions.d.ts +6 -0
- package/types/charts/scatter/index.d.ts +2 -0
- package/types/charts/scatter/scatter-chart.d.ts +16 -0
- package/types/charts/series/array-based-series.d.ts +95 -0
- package/types/charts/series/collation-series.d.ts +24 -0
- package/types/charts/series/definitions.d.ts +52 -0
- package/types/charts/series/dual-value-chart-series.d.ts +26 -0
- package/types/charts/series/index.d.ts +7 -0
- package/types/charts/series/record-based-series.d.ts +58 -0
- package/types/charts/series/series.d.ts +66 -0
- package/types/charts/series/summing-collation-series.d.ts +31 -0
- package/types/charts/series/summing-series.d.ts +19 -0
- package/types/charts/series-based-chart.d.ts +59 -0
- package/types/charts/tooltip.d.ts +167 -0
- package/types/charts/util.d.ts +149 -0
- package/types/core/astar/astar-path-finder.d.ts +37 -0
- package/types/core/astar/astar-util.d.ts +100 -0
- package/types/core/astar/candidate-finder.d.ts +16 -0
- package/types/core/astar/candidate-sorter.d.ts +10 -0
- package/types/core/astar/definitions.d.ts +185 -0
- package/types/core/astar/index.d.ts +3 -0
- package/types/core/astar/path-to-segments.d.ts +45 -0
- package/types/core/autosaver.d.ts +67 -0
- package/types/core/color-generator.d.ts +66 -0
- package/types/core/constants.d.ts +181 -0
- package/types/core/csv-loader.d.ts +84 -0
- package/types/core/datamodel/data-model.d.ts +23 -0
- package/types/core/datamodel/vertex-definition.d.ts +40 -0
- package/types/core/datasource.d.ts +87 -0
- package/types/core/event-constants.d.ts +308 -0
- package/types/core/event-generator.d.ts +102 -0
- package/types/core/filterable-dataset.d.ts +38 -0
- package/types/core/geom.d.ts +278 -0
- package/types/core/index.d.ts +39 -0
- package/types/core/io.d.ts +106 -0
- package/types/core/layout/absolute-layout.d.ts +91 -0
- package/types/core/layout/abstract-layout-adapter.d.ts +17 -0
- package/types/core/layout/abstract-layout.d.ts +192 -0
- package/types/core/layout/circular/circular-layout.d.ts +31 -0
- package/types/core/layout/circular/index.d.ts +1 -0
- package/types/core/layout/empty-layout.d.ts +17 -0
- package/types/core/layout/force-directed/force-directed-layout.d.ts +148 -0
- package/types/core/layout/force-directed/index.d.ts +1 -0
- package/types/core/layout/grid/definitions.d.ts +81 -0
- package/types/core/layout/grid/grid-layout.d.ts +60 -0
- package/types/core/layout/grid/index.d.ts +2 -0
- package/types/core/layout/hierarchical/abstract-hierarchical-layout.d.ts +90 -0
- package/types/core/layout/hierarchical/balloon-layout.d.ts +62 -0
- package/types/core/layout/hierarchical/definitions.d.ts +45 -0
- package/types/core/layout/hierarchical/hierarchical-layout.d.ts +102 -0
- package/types/core/layout/hierarchical/index.d.ts +5 -0
- package/types/core/layout/hierarchical/parent-relative-placement.d.ts +96 -0
- package/types/core/layout/hierarchy/assign-layers-stage.d.ts +26 -0
- package/types/core/layout/hierarchy/crossing-stage.d.ts +78 -0
- package/types/core/layout/hierarchy/definitions.d.ts +261 -0
- package/types/core/layout/hierarchy/edge-routing.d.ts +25 -0
- package/types/core/layout/hierarchy/hierarchy-layout-stage.d.ts +9 -0
- package/types/core/layout/hierarchy/hierarchy-layout.d.ts +87 -0
- package/types/core/layout/hierarchy/index.d.ts +11 -0
- package/types/core/layout/hierarchy/model.d.ts +167 -0
- package/types/core/layout/hierarchy/parent-relative-placement.d.ts +69 -0
- package/types/core/layout/hierarchy/placement-stage.d.ts +82 -0
- package/types/core/layout/hierarchy/util.d.ts +13 -0
- package/types/core/layout/hierarchy/vertex-set.d.ts +45 -0
- package/types/core/layout/index.d.ts +10 -0
- package/types/core/layout/layouts.d.ts +10 -0
- package/types/core/magnetizer.d.ts +232 -0
- package/types/core/model/anchor.d.ts +38 -0
- package/types/core/model/cluster.d.ts +19 -0
- package/types/core/model/defs.d.ts +8 -0
- package/types/core/model/djikstra.d.ts +26 -0
- package/types/core/model/floyd-warshall.d.ts +15 -0
- package/types/core/model/graph.d.ts +1166 -0
- package/types/core/model/path.d.ts +227 -0
- package/types/core/params.d.ts +476 -0
- package/types/core/renderer.d.ts +74 -0
- package/types/core/router/common.d.ts +104 -0
- package/types/core/router/direct-router.d.ts +12 -0
- package/types/core/router/index.d.ts +3 -0
- package/types/core/router/orthogonal-router.d.ts +46 -0
- package/types/core/rtree/definitions.d.ts +24 -0
- package/types/core/rtree/hilbert.d.ts +9 -0
- package/types/core/rtree/index.d.ts +4 -0
- package/types/core/rtree/rtree.d.ts +102 -0
- package/types/core/rtree/util.d.ts +55 -0
- package/types/core/search/index.d.ts +1 -0
- package/types/core/search/visuallyjs-search.d.ts +167 -0
- package/types/core/selection.d.ts +394 -0
- package/types/core/templates/abstract-entry.d.ts +19 -0
- package/types/core/templates/comment-entry.d.ts +11 -0
- package/types/core/templates/core.d.ts +162 -0
- package/types/core/templates/custom-tag.d.ts +74 -0
- package/types/core/templates/defs.d.ts +123 -0
- package/types/core/templates/each-entry.d.ts +23 -0
- package/types/core/templates/element-entry.d.ts +18 -0
- package/types/core/templates/elements.d.ts +14 -0
- package/types/core/templates/executions.d.ts +100 -0
- package/types/core/templates/expressions.d.ts +47 -0
- package/types/core/templates/fake-dom.d.ts +42 -0
- package/types/core/templates/headless.d.ts +15 -0
- package/types/core/templates/if-entry.d.ts +25 -0
- package/types/core/templates/index.d.ts +14 -0
- package/types/core/templates/parser.d.ts +84 -0
- package/types/core/templates/text-entry.d.ts +17 -0
- package/types/core/templates/tmpl-entry.d.ts +13 -0
- package/types/core/toolkit.d.ts +1314 -0
- package/types/core/undo-redo/compound-action.d.ts +19 -0
- package/types/core/undo-redo/edge-action.d.ts +62 -0
- package/types/core/undo-redo/group-action.d.ts +60 -0
- package/types/core/undo-redo/move-action.d.ts +18 -0
- package/types/core/undo-redo/node-group-action.d.ts +62 -0
- package/types/core/undo-redo/port-action.d.ts +29 -0
- package/types/core/undo-redo/renderer-vertex-removed-action.d.ts +17 -0
- package/types/core/undo-redo/set-type-action.d.ts +14 -0
- package/types/core/undo-redo/undo-redo.d.ts +203 -0
- package/types/core/undo-redo/update-action.d.ts +20 -0
- package/types/core/undo-redo/vertex-update-action.d.ts +12 -0
- package/types/core/util.d.ts +661 -0
- package/types/index.d.ts +16 -0
- package/types/l.d.ts +2 -0
- package/types/test-support/index.d.ts +1 -0
- package/types/test-support/test-support.d.ts +833 -0
- package/types/ui/common/abstract-segment.d.ts +88 -0
- package/types/ui/common/anchor.d.ts +280 -0
- package/types/ui/common/connector.d.ts +106 -0
- package/types/ui/common/index.d.ts +5 -0
- package/types/ui/common/overlay.d.ts +117 -0
- package/types/ui/common/paint-style.d.ts +33 -0
- package/types/ui/connector-bezier/abstract-bezier-connector.d.ts +68 -0
- package/types/ui/connector-bezier/bezier-connector.d.ts +34 -0
- package/types/ui/connector-bezier/bezier-segment.d.ts +31 -0
- package/types/ui/connector-bezier/bezier.d.ts +129 -0
- package/types/ui/connector-bezier/index.d.ts +6 -0
- package/types/ui/connector-bezier/operations.d.ts +18 -0
- package/types/ui/connector-bezier/quadratic-bezier-connector.d.ts +35 -0
- package/types/ui/connector-orthogonal/default-orthogonal-path-compute.d.ts +11 -0
- package/types/ui/connector-orthogonal/definitions.d.ts +120 -0
- package/types/ui/connector-orthogonal/index.d.ts +7 -0
- package/types/ui/connector-orthogonal/modern-source-target-relocator.d.ts +37 -0
- package/types/ui/connector-orthogonal/operations.d.ts +49 -0
- package/types/ui/connector-orthogonal/stub-calculators.d.ts +12 -0
- package/types/ui/connector-orthogonal/utils.d.ts +134 -0
- package/types/ui/connector-orthogonal/vertex-avoidance.d.ts +29 -0
- package/types/ui/connector-straight/index.d.ts +2 -0
- package/types/ui/connector-straight/operations.d.ts +55 -0
- package/types/ui/connector-straight/straight-connector.d.ts +121 -0
- package/types/ui/copy-paste/clipboard.d.ts +45 -0
- package/types/ui/copy-paste/copy-data.d.ts +93 -0
- package/types/ui/copy-paste/index.d.ts +2 -0
- package/types/ui/core/callbacks.d.ts +48 -0
- package/types/ui/core/component/component.d.ts +115 -0
- package/types/ui/core/connector/abstract-connector.d.ts +66 -0
- package/types/ui/core/connector/arc-segment.d.ts +39 -0
- package/types/ui/core/connector/connection-impl.d.ts +81 -0
- package/types/ui/core/connector/connections.d.ts +113 -0
- package/types/ui/core/connector/connectors.d.ts +205 -0
- package/types/ui/core/connector/operations.d.ts +0 -0
- package/types/ui/core/connector/segments.d.ts +24 -0
- package/types/ui/core/connector/straight-segment.d.ts +32 -0
- package/types/ui/core/constants.d.ts +181 -0
- package/types/ui/core/context.d.ts +26 -0
- package/types/ui/core/core-events.d.ts +7 -0
- package/types/ui/core/core.d.ts +1734 -0
- package/types/ui/core/css-constants.d.ts +149 -0
- package/types/ui/core/defaults.d.ts +242 -0
- package/types/ui/core/definitions.d.ts +540 -0
- package/types/ui/core/event-constants.d.ts +510 -0
- package/types/ui/core/factory/anchor-record-factory.d.ts +17 -0
- package/types/ui/core/factory/continuous-anchors.d.ts +27 -0
- package/types/ui/core/factory/overlay-factory.d.ts +8 -0
- package/types/ui/core/grid-profile.d.ts +28 -0
- package/types/ui/core/group-collapse-expand.d.ts +23 -0
- package/types/ui/core/group-sizer.d.ts +9 -0
- package/types/ui/core/index.d.ts +45 -0
- package/types/ui/core/magnetize-profile.d.ts +82 -0
- package/types/ui/core/overlay/arrow-overlay.d.ts +34 -0
- package/types/ui/core/overlay/custom-overlay.d.ts +38 -0
- package/types/ui/core/overlay/diamond-overlay.d.ts +14 -0
- package/types/ui/core/overlay/dot-overlay.d.ts +54 -0
- package/types/ui/core/overlay/ellipse-overlay.d.ts +60 -0
- package/types/ui/core/overlay/label-overlay.d.ts +37 -0
- package/types/ui/core/overlay/overlay.d.ts +131 -0
- package/types/ui/core/overlay/plain-arrow-overlay.d.ts +15 -0
- package/types/ui/core/overlay/rectangle-overlay.d.ts +66 -0
- package/types/ui/core/params.d.ts +223 -0
- package/types/ui/core/router/astar-path-finder.d.ts +29 -0
- package/types/ui/core/router/base-router.d.ts +100 -0
- package/types/ui/core/router/default-router.d.ts +38 -0
- package/types/ui/core/router/index.d.ts +5 -0
- package/types/ui/core/router/router-utils.d.ts +118 -0
- package/types/ui/core/router/router.d.ts +30 -0
- package/types/ui/core/type-descriptors.d.ts +83 -0
- package/types/ui/core/ui-model.d.ts +65 -0
- package/types/ui/core/view/common-options.d.ts +15 -0
- package/types/ui/core/view/edge-options.d.ts +126 -0
- package/types/ui/core/view/events.d.ts +159 -0
- package/types/ui/core/view/group-options.d.ts +75 -0
- package/types/ui/core/view/index.d.ts +35 -0
- package/types/ui/core/view/node-options.d.ts +20 -0
- package/types/ui/core/view/node-or-port-options.d.ts +28 -0
- package/types/ui/core/view/port-options.d.ts +51 -0
- package/types/ui/core/view/vertex-options.d.ts +28 -0
- package/types/ui/core/viewport.d.ts +297 -0
- package/types/ui/index.d.ts +9 -0
- package/types/ui/plugins/definitions.d.ts +118 -0
- package/types/ui/plugins/index.d.ts +2 -0
- package/types/ui/plugins/plugins.d.ts +7 -0
- package/types/ui/property-mappings/definitions.d.ts +28 -0
- package/types/ui/property-mappings/index.d.ts +2 -0
- package/types/ui/property-mappings/property-mapper.d.ts +16 -0
- package/types/ui/util/index.d.ts +3 -0
- package/types/ui/util/property-tracker.d.ts +8 -0
- package/types/ui/util/svg-constants.d.ts +111 -0
- package/types/ui/util/util.d.ts +69 -0
- package/types/version.d.ts +1 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the content for some template, via id.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export type TemplateResolver = (id: string) => string;
|
|
6
|
+
export type RecadoValueFormatter = (v: any, fmt: string) => any;
|
|
7
|
+
/**
|
|
8
|
+
* Constructor options for Recado instance.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface RecadoOptions {
|
|
12
|
+
templateResolver?: TemplateResolver;
|
|
13
|
+
templates?: Record<string, string>;
|
|
14
|
+
defaultTemplate?: string;
|
|
15
|
+
templateMacros?: Record<string, (d: any) => string>;
|
|
16
|
+
formatter?: RecadoValueFormatter;
|
|
17
|
+
/**
|
|
18
|
+
* The default namespace prefix to use for all elements. Defaults to null, meaning the implementation should just use its default. In the BrowserUIRecado class, this means that elements are created as HTML elements, and ordinarily in the BrowserUI package it is necessary to use an `svg:` prefix to get it to create an SVGElement, for instance `<svg:rect .../>`. In some use cases we know, though, that the templates are going to be SVG, like in the shape library. So to make it more user friendly, in those cases we support specifying that elements without a namespace will be automatically considered to be in the `svg` namespace. Users can write shapes like `<rect .../>`
|
|
19
|
+
*/
|
|
20
|
+
defaultNamespace?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const ATTRIBUTE_CONTEXT = "context";
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const ATTRIBUTE_LOOKUP = "lookup";
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare const ATTRIBUTE_DEFAULT = "default";
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const TYPE_ELEMENT = "element";
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare const TYPE_TEXT = "text";
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare const TYPE_TMPL = "tmpl";
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare const TYPE_EACH = "each";
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare const TYPE_IF = "if";
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
export declare const TYPE_ROOT = "root";
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
export declare const ATTRIBUTE_CLASS = "class";
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
export declare const ATTRIBUTE_STYLE = "style";
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export declare const PLACEHOLDER_VALUE = "$value";
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
export declare const PLACEHOLDER_KEY = "$key";
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
export declare const TYPE_ATTRIBUTE = "attribute";
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
export interface FragmentFacade {
|
|
82
|
+
toString(): string;
|
|
83
|
+
appendChild(el: TextNodeFacade | ElementFacade | CommentFacade): void;
|
|
84
|
+
childNodes: ArrayLike<SupportedElement>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
export interface ElementFacade {
|
|
90
|
+
childNodes: Array<ElementFacade | TextNodeFacade | CommentFacade>;
|
|
91
|
+
getAttribute(name: string): string;
|
|
92
|
+
setAttributeNS(ns: string, name: string, value: string): void;
|
|
93
|
+
setAttribute(name: string, value: string): void;
|
|
94
|
+
toString(): string;
|
|
95
|
+
appendChild(el: TextNodeFacade | ElementFacade | FragmentFacade | CommentFacade): void;
|
|
96
|
+
removeChild(el: TextNodeFacade | ElementFacade): void;
|
|
97
|
+
parentElement: ElementFacade;
|
|
98
|
+
after(el: TextNodeFacade | ElementFacade): void;
|
|
99
|
+
before(el: TextNodeFacade | ElementFacade | CommentFacade): void;
|
|
100
|
+
style: Record<string, any>;
|
|
101
|
+
nodeType: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
export interface TextNodeFacade {
|
|
107
|
+
toString(): string;
|
|
108
|
+
nodeValue: string;
|
|
109
|
+
parentElement: ElementFacade;
|
|
110
|
+
after(el: TextNodeFacade | ElementFacade): void;
|
|
111
|
+
nodeType: number;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export interface CommentFacade {
|
|
117
|
+
before(el: TextNodeFacade | ElementFacade | CommentFacade | FragmentFacade): void;
|
|
118
|
+
nodeType: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
export type SupportedElement = ElementFacade | TextNodeFacade | CommentFacade;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementEntry } from "./element-entry";
|
|
2
|
+
import { Recado } from "./core";
|
|
3
|
+
import { AttributeParseResult, ParseStack } from "./parser";
|
|
4
|
+
import { TemplateResolver } from "./defs";
|
|
5
|
+
import { UpdateResult, IExecution, IRootExecution, IEachExecution } from "./executions";
|
|
6
|
+
/**
|
|
7
|
+
* An `r-each` tag.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare class EachEntry extends ElementEntry {
|
|
11
|
+
key: string;
|
|
12
|
+
type: string;
|
|
13
|
+
static tag: string;
|
|
14
|
+
constructor(data: AttributeParseResult, instance: Recado, templateResolver: TemplateResolver, stack: ParseStack, parseIdStack: Array<string>);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function addEntryToEachExecution(e: IEachExecution, key: string, execution: IExecution): void;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export declare function addNewExecutionToEachExecution<T>(ie: IEachExecution, execution: IRootExecution, key: string, updateResult: UpdateResult<T>): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Recado } from "./core";
|
|
2
|
+
import { AttributeParseResult, ParseStack } from "./parser";
|
|
3
|
+
import { AbstractEntry } from './abstract-entry';
|
|
4
|
+
import { TemplateResolver } from "./defs";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class ElementEntry extends AbstractEntry {
|
|
9
|
+
protected templateResolver: TemplateResolver;
|
|
10
|
+
protected stack: ParseStack;
|
|
11
|
+
protected parseIdStack: Array<string>;
|
|
12
|
+
static type: string;
|
|
13
|
+
type: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
atts: Record<string, string>;
|
|
16
|
+
custom: boolean;
|
|
17
|
+
constructor(ta: AttributeParseResult, instance: Recado, templateResolver: TemplateResolver, stack: ParseStack, parseIdStack: Array<string>);
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AttributeParseResult } from "./parser";
|
|
2
|
+
import { AbstractEntry } from './abstract-entry';
|
|
3
|
+
import { Recado } from "./core";
|
|
4
|
+
import { ElementEntry } from "./element-entry";
|
|
5
|
+
import { TemplateResolver } from "./defs";
|
|
6
|
+
import { Constructable } from "../util";
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const Elements: {
|
|
11
|
+
construct: (tag: string, ta: AttributeParseResult, instance: Recado, templateResolver: TemplateResolver, stack: Array<AbstractEntry>, parseIdStack: Array<string>) => ElementEntry;
|
|
12
|
+
register: (name: string, conn: Constructable<ElementEntry>) => void;
|
|
13
|
+
exists: (tag: string) => boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { BindingResult, Recado } from "./core";
|
|
2
|
+
import { AbstractEntry } from './abstract-entry';
|
|
3
|
+
import { CommentFacade, ElementFacade, FragmentFacade, RecadoValueFormatter, SupportedElement, TextNodeFacade } from "./defs";
|
|
4
|
+
import { TextEntry } from './text-entry';
|
|
5
|
+
import { EachEntry } from './each-entry';
|
|
6
|
+
import { CustomTag, MountFunction } from "./custom-tag";
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface IExecution {
|
|
11
|
+
id: string;
|
|
12
|
+
children: Array<IExecution>;
|
|
13
|
+
el?: ElementFacade | TextNodeFacade;
|
|
14
|
+
updaters?: Array<Function>;
|
|
15
|
+
type: string;
|
|
16
|
+
entry: AbstractEntry;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export interface IExecutionWithBindings extends IExecution {
|
|
22
|
+
bindings: Record<string, BindingResult>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export interface IElementExecution extends IExecutionWithBindings {
|
|
28
|
+
el: ElementFacade;
|
|
29
|
+
type: "element";
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export interface ITextNodeExecution extends IExecutionWithBindings {
|
|
35
|
+
el: TextNodeFacade;
|
|
36
|
+
entry: TextEntry;
|
|
37
|
+
type: "text";
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export interface IEachExecution extends IExecution {
|
|
43
|
+
entryMap: Record<string, Array<IExecution>>;
|
|
44
|
+
type: "each";
|
|
45
|
+
placeholder: CommentFacade;
|
|
46
|
+
entry: EachEntry;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export interface ITmplExecution extends IExecution {
|
|
52
|
+
placeholder: CommentFacade;
|
|
53
|
+
type: "tmpl";
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
export interface IRootExecution extends IExecutionWithBindings {
|
|
59
|
+
type: "root";
|
|
60
|
+
fragment: FragmentFacade;
|
|
61
|
+
mountings: Array<{
|
|
62
|
+
mount: MountFunction;
|
|
63
|
+
el: ElementFacade;
|
|
64
|
+
parent: ElementFacade;
|
|
65
|
+
data: Record<string, any>;
|
|
66
|
+
context: Record<string, any>;
|
|
67
|
+
}>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare function setElementBindingResult(e: IElementExecution, name: string, value: string, isProperty: boolean): void;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export declare function setTextNodeBindingResult(e: ITextNodeExecution, value: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
export declare function clearExecution(instance: Recado, e: IExecution): Array<SupportedElement>;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
export declare function updateBindings(execution: IExecutionWithBindings, resolveValue: (k: string) => any, expander: (e: string) => any, formatter: RecadoValueFormatter): void;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
export type UpdateResult<T> = {
|
|
89
|
+
added: Array<{
|
|
90
|
+
el: SupportedElement;
|
|
91
|
+
}>;
|
|
92
|
+
removed: Array<{
|
|
93
|
+
el: SupportedElement;
|
|
94
|
+
}>;
|
|
95
|
+
elements: Array<[T, CustomTag]>;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
export declare function emptyUpdateResult<T>(): UpdateResult<T>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { RecadoValueFormatter } from "./defs";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export interface StackEntry {
|
|
6
|
+
t: string;
|
|
7
|
+
c: Array<StackEntry>;
|
|
8
|
+
e?: string;
|
|
9
|
+
v: any;
|
|
10
|
+
index?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export interface ParsedExpression {
|
|
16
|
+
left: StackEntry;
|
|
17
|
+
right: StackEntry;
|
|
18
|
+
comparator?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
Split the expression into its terms, nesting groups as necessary. The output of this is an object of the form
|
|
22
|
+
@internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseExpression(expression: string): StackEntry;
|
|
25
|
+
/**
|
|
26
|
+
* Entry point for parsing expressions.
|
|
27
|
+
* @param expression
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
export declare function processExpression(expression: string): ParsedExpression;
|
|
31
|
+
/**
|
|
32
|
+
* Evaluate a parsed expression. If the parsed expression has a comparator defined, the left and right expressions are
|
|
33
|
+
* evaluated separately, and then compared according to the comparator. Otherwise, the left expression is evaluated and its
|
|
34
|
+
* value is returned.
|
|
35
|
+
* @param expression
|
|
36
|
+
* @param variableResolver
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare function evaluateExpression(expression: ParsedExpression, variableResolver: (v: string) => any, expander: (e: string) => any, format: string, formatter: RecadoValueFormatter): any;
|
|
40
|
+
/**
|
|
41
|
+
* Evaluate a single expression, ie. an expression that is known to not contain a comparator. This is exposed for testing
|
|
42
|
+
* but is internal.
|
|
43
|
+
* @param expression
|
|
44
|
+
* @param variableResolver
|
|
45
|
+
* @internal
|
|
46
|
+
*/
|
|
47
|
+
export declare function evaluateSingleExpression(expression: Array<StackEntry>, variableResolver: (v: string) => any, expander: (v: string) => any, format: string, formatter: RecadoValueFormatter): any;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import { CommentFacade, ElementFacade, FragmentFacade, TextNodeFacade } from "./defs";
|
|
5
|
+
export declare class Fakement implements FragmentFacade {
|
|
6
|
+
childNodes: Array<ElementFacade | TextNodeFacade | CommentFacade>;
|
|
7
|
+
constructor();
|
|
8
|
+
removeChild(n: FakeElement): void;
|
|
9
|
+
appendChild(n: ElementFacade | TextNodeFacade): void;
|
|
10
|
+
insertAfter(ref: TextNodeFacade | ElementFacade, element: TextNodeFacade | ElementFacade): void;
|
|
11
|
+
insertBefore(ref: CommentFacade | ElementFacade, element: TextNodeFacade | ElementFacade): void;
|
|
12
|
+
toString(): string;
|
|
13
|
+
}
|
|
14
|
+
export declare class FakeElement extends Fakement implements ElementFacade {
|
|
15
|
+
nodeType: number;
|
|
16
|
+
parentElement: FakeElement;
|
|
17
|
+
tag: string;
|
|
18
|
+
atts: Record<string, string>;
|
|
19
|
+
style: Record<string, any>;
|
|
20
|
+
constructor(tag: string);
|
|
21
|
+
getAttribute(name: string): string;
|
|
22
|
+
setAttributeNS(ns: string, name: string, value: string): void;
|
|
23
|
+
setAttribute(name: string, value: string): void;
|
|
24
|
+
toString(): string;
|
|
25
|
+
after(element: TextNodeFacade | ElementFacade): void;
|
|
26
|
+
before(element: TextNodeFacade | ElementFacade): void;
|
|
27
|
+
}
|
|
28
|
+
export declare class FakeTextNode implements TextNodeFacade {
|
|
29
|
+
nodeValue: string;
|
|
30
|
+
parentElement: FakeElement;
|
|
31
|
+
constructor(nodeValue: string);
|
|
32
|
+
toString(): string;
|
|
33
|
+
after(element: TextNodeFacade | ElementFacade): void;
|
|
34
|
+
nodeType: number;
|
|
35
|
+
}
|
|
36
|
+
export declare class FakeComment implements CommentFacade {
|
|
37
|
+
nodeValue: string;
|
|
38
|
+
parentElement: FakeElement;
|
|
39
|
+
constructor(nodeValue: string);
|
|
40
|
+
before(element: TextNodeFacade | ElementFacade): void;
|
|
41
|
+
nodeType: number;
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FakeElement } from "./fake-dom";
|
|
2
|
+
import { Recado } from "./core";
|
|
3
|
+
import { CommentFacade, ElementFacade, FragmentFacade, TextNodeFacade } from "./defs";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class HeadlessRecado extends Recado {
|
|
8
|
+
_getDefaultTemplateResolver(): (id: string) => string;
|
|
9
|
+
ce(tag: string): ElementFacade;
|
|
10
|
+
cf(): FragmentFacade;
|
|
11
|
+
ctn(value: string): TextNodeFacade;
|
|
12
|
+
cc(content: string): CommentFacade;
|
|
13
|
+
removeElement(e: FakeElement): void;
|
|
14
|
+
removeTextNode(e: TextNodeFacade): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AttributeParseResult, ParseStack } from "./parser";
|
|
2
|
+
import { Recado } from "./core";
|
|
3
|
+
import { ElementEntry } from './element-entry';
|
|
4
|
+
import { CommentFacade, RecadoValueFormatter, TemplateResolver } from "./defs";
|
|
5
|
+
import { ParsedExpression } from "./expressions";
|
|
6
|
+
import { IExecution } from "./executions";
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare class IfEntry extends ElementEntry {
|
|
11
|
+
type: string;
|
|
12
|
+
static tag: string;
|
|
13
|
+
tag: string;
|
|
14
|
+
test: string;
|
|
15
|
+
expression: ParsedExpression;
|
|
16
|
+
constructor(data: AttributeParseResult, instance: Recado, templateResolver: TemplateResolver, stack: ParseStack, parseIdStack: Array<string>);
|
|
17
|
+
}
|
|
18
|
+
export interface IIfExecution extends IExecution {
|
|
19
|
+
resolution: boolean;
|
|
20
|
+
entry: IfEntry;
|
|
21
|
+
type: "if";
|
|
22
|
+
placeholder: CommentFacade;
|
|
23
|
+
defaultNamespace?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function resolveIfExecution(e: IIfExecution, templateData: Record<string, any>, expander: (e: string) => any, format: string, formatter: RecadoValueFormatter): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from "./defs";
|
|
2
|
+
export * from "./core";
|
|
3
|
+
export * from "./parser";
|
|
4
|
+
export * from "./abstract-entry";
|
|
5
|
+
export * from "./element-entry";
|
|
6
|
+
export * from "./comment-entry";
|
|
7
|
+
export * from "./text-entry";
|
|
8
|
+
export * from "./each-entry";
|
|
9
|
+
export * from "./if-entry";
|
|
10
|
+
export * from "./tmpl-entry";
|
|
11
|
+
export * from "./elements";
|
|
12
|
+
export * from "./custom-tag";
|
|
13
|
+
export * from './headless';
|
|
14
|
+
export * from './expressions';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Recado } from "./core";
|
|
2
|
+
import { AbstractEntry } from './abstract-entry';
|
|
3
|
+
import { ParsedExpression } from "./expressions";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* @param d
|
|
7
|
+
* @param attributesRe
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseAttributes(d: string, attributesRe: RegExp): Array<string>;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
* @param a
|
|
13
|
+
*/
|
|
14
|
+
export declare function peek<T>(a: Array<T>): T;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* @param stack
|
|
18
|
+
*/
|
|
19
|
+
export declare function isLoopPresent(stack: ParseStack): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export type AttributeParseResult = {
|
|
24
|
+
el: string;
|
|
25
|
+
atts: Record<string, string>;
|
|
26
|
+
bindings: Record<string, any>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* eg [ "$\{sourceExpression\}", "sourceExpression" ] - an array with the original source, and then the expression that has been extracted by stripping the delimiters, and then a flag indicating whether or not this expression should only be evaluated the first time and not on update
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
export type BindingExpression = [string, string, boolean];
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export type Binding = {
|
|
37
|
+
w: string;
|
|
38
|
+
expressions: Array<BindingExpression>;
|
|
39
|
+
id: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* add a variable expansion binding.
|
|
43
|
+
* @param bindingId
|
|
44
|
+
* @param match
|
|
45
|
+
* @param entry
|
|
46
|
+
* @param predicate
|
|
47
|
+
* @param instance
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare function _addBinding(bindingId: string, match: string, entry: any, predicate: any, instance: Recado): string;
|
|
51
|
+
/**
|
|
52
|
+
* Register, and expand a binding for, the given attribute.
|
|
53
|
+
* @param id
|
|
54
|
+
* @param value
|
|
55
|
+
* @param output
|
|
56
|
+
* @param predicate
|
|
57
|
+
* @param instance
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare function _bindOneAtt(id: string, value: string, output: AttributeParseResult, predicate: any, instance: Recado): void;
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
* @param el
|
|
64
|
+
* @param instance
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseAtts(el: string, instance: Recado): AttributeParseResult;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export type ParseStack = Array<AbstractEntry>;
|
|
71
|
+
/**
|
|
72
|
+
* A binding that has been compiled into an expression AST.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
export interface CompiledBinding {
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
expressions: Array<{
|
|
79
|
+
source: string;
|
|
80
|
+
expression: ParsedExpression;
|
|
81
|
+
once: boolean;
|
|
82
|
+
format: string;
|
|
83
|
+
}>;
|
|
84
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Recado } from "./core";
|
|
2
|
+
import { AbstractEntry } from './abstract-entry';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export type TextEntryOptions = {
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare class TextEntry extends AbstractEntry {
|
|
13
|
+
type: string;
|
|
14
|
+
static TEXT_BINDING_NAME: string;
|
|
15
|
+
value: string;
|
|
16
|
+
constructor(options: TextEntryOptions, instance: Recado);
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementEntry } from "./element-entry";
|
|
2
|
+
import { AttributeParseResult, ParseStack } from "./parser";
|
|
3
|
+
import { Recado } from "./core";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare class TmplEntry extends ElementEntry {
|
|
8
|
+
templateId: string;
|
|
9
|
+
lookup: string;
|
|
10
|
+
default: string;
|
|
11
|
+
static tag: string;
|
|
12
|
+
constructor(ta: AttributeParseResult, instance: Recado, templateResolver: (id: string) => string, stack: ParseStack, parseIdStack: Array<string>);
|
|
13
|
+
}
|