@antv/infographic 0.2.10 → 0.2.11
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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/infographic.min.js +205 -176
- package/dist/infographic.min.js.map +1 -1
- package/esm/constants/index.js +4 -4
- package/esm/designs/components/Btn.js +2 -2
- package/esm/designs/components/BtnsGroup.js +2 -2
- package/esm/designs/components/Gap.js +1 -1
- package/esm/designs/components/Illus.js +2 -2
- package/esm/designs/components/ItemDesc.js +2 -2
- package/esm/designs/components/ItemIcon.js +2 -2
- package/esm/designs/components/ItemLabel.js +2 -2
- package/esm/designs/components/ItemValue.js +2 -2
- package/esm/designs/components/ItemsGroup.js +2 -2
- package/esm/designs/components/ShapesGroup.js +2 -2
- package/esm/designs/components/Title.js +3 -3
- package/esm/designs/components/index.js +11 -11
- package/esm/designs/decorations/index.js +3 -3
- package/esm/designs/decorations/simple-arrow.js +2 -2
- package/esm/designs/decorations/text-3d.js +2 -2
- package/esm/designs/decorations/triangle.js +2 -2
- package/esm/designs/defs/DropShadow.js +1 -1
- package/esm/designs/defs/LinearGradient.js +1 -1
- package/esm/designs/defs/index.js +2 -2
- package/esm/designs/index.js +5 -5
- package/esm/designs/items/BadgeCard.js +6 -6
- package/esm/designs/items/CandyCardLite.js +5 -5
- package/esm/designs/items/CapsuleItem.js +6 -6
- package/esm/designs/items/CircleNode.js +5 -5
- package/esm/designs/items/CircularProgress.js +5 -5
- package/esm/designs/items/CompactCard.js +6 -6
- package/esm/designs/items/DoneList.js +5 -5
- package/esm/designs/items/HorizontalIconArrow.js +6 -6
- package/esm/designs/items/HorizontalIconLine.js +6 -6
- package/esm/designs/items/IconBadge.js +5 -5
- package/esm/designs/items/IndexedCard.js +6 -6
- package/esm/designs/items/LCornerCard.js +5 -5
- package/esm/designs/items/LetterCard.js +5 -5
- package/esm/designs/items/LinedText.js +5 -5
- package/esm/designs/items/PillBadge.js +6 -6
- package/esm/designs/items/PlainText.js +4 -4
- package/esm/designs/items/ProgressCard.js +5 -5
- package/esm/designs/items/QuarterCircular.js +5 -5
- package/esm/designs/items/QuarterSimpleCard.js +5 -5
- package/esm/designs/items/RibbonCard.js +5 -5
- package/esm/designs/items/RoundedRectNode.js +5 -5
- package/esm/designs/items/SimpleCircleNode.js +4 -4
- package/esm/designs/items/SimpleHorizontalArrow.js +7 -7
- package/esm/designs/items/SimpleIllusItem.js +6 -6
- package/esm/designs/items/SimpleItem.js +6 -6
- package/esm/designs/items/SimpleVerticalArrow.js +7 -7
- package/esm/designs/items/UnderlineText.js +5 -5
- package/esm/designs/items/VerticalIconArrow.js +7 -7
- package/esm/designs/items/index.js +30 -30
- package/esm/designs/layouts/Align.js +2 -2
- package/esm/designs/layouts/Flex.js +2 -2
- package/esm/designs/layouts/index.js +2 -2
- package/esm/designs/structures/chart-bar.js +7 -7
- package/esm/designs/structures/chart-column.js +7 -7
- package/esm/designs/structures/chart-line.js +7 -7
- package/esm/designs/structures/chart-pie.js +6 -6
- package/esm/designs/structures/chart-wordcloud.js +6 -6
- package/esm/designs/structures/compare-binary-horizontal/dividers/index.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/dividers/vs.js +4 -4
- package/esm/designs/structures/compare-binary-horizontal/index.js +8 -8
- package/esm/designs/structures/compare-hierarchy-left-right.js +7 -7
- package/esm/designs/structures/compare-hierarchy-row.js +6 -6
- package/esm/designs/structures/compare-quadrant.js +5 -5
- package/esm/designs/structures/hierarchy-mindmap.js +6 -6
- package/esm/designs/structures/hierarchy-structure.js +6 -6
- package/esm/designs/structures/hierarchy-tree.js +6 -6
- package/esm/designs/structures/index.js +42 -42
- package/esm/designs/structures/list-column.js +5 -5
- package/esm/designs/structures/list-grid.js +5 -5
- package/esm/designs/structures/list-pyramid.js +5 -5
- package/esm/designs/structures/list-row.js +5 -5
- package/esm/designs/structures/list-sector.js +5 -5
- package/esm/designs/structures/list-waterfall.js +5 -5
- package/esm/designs/structures/list-zigzag.js +6 -6
- package/esm/designs/structures/relation-circle.js +5 -5
- package/esm/designs/structures/relation-dagre-flow.js +6 -6
- package/esm/designs/structures/relation-network.js +6 -6
- package/esm/designs/structures/sequence-ascending-stairs-3d.js +7 -7
- package/esm/designs/structures/sequence-ascending-steps.js +5 -5
- package/esm/designs/structures/sequence-circle-arrows.js +6 -6
- package/esm/designs/structures/sequence-circular.js +6 -6
- package/esm/designs/structures/sequence-color-snake-steps.js +6 -6
- package/esm/designs/structures/sequence-cylinders-3d.js +6 -6
- package/esm/designs/structures/sequence-filter-mesh.js +6 -6
- package/esm/designs/structures/sequence-funnel.js +6 -6
- package/esm/designs/structures/sequence-horizontal-zigzag.js +6 -6
- package/esm/designs/structures/sequence-mountain.js +6 -6
- package/esm/designs/structures/sequence-pyramid.js +6 -6
- package/esm/designs/structures/sequence-roadmap-vertical.js +7 -7
- package/esm/designs/structures/sequence-snake-steps.js +7 -7
- package/esm/designs/structures/sequence-stairs-front.js +6 -6
- package/esm/designs/structures/sequence-steps.js +7 -7
- package/esm/designs/structures/sequence-timeline.js +6 -6
- package/esm/designs/structures/sequence-zigzag-pucks-3d.js +6 -6
- package/esm/designs/structures/sequence-zigzag-steps.js +6 -6
- package/esm/designs/utils/color.js +3 -3
- package/esm/designs/utils/index.js +3 -3
- package/esm/editor/commands/UpdateElement.js +1 -1
- package/esm/editor/commands/UpdateText.js +2 -2
- package/esm/editor/commands/index.js +4 -4
- package/esm/editor/editor.js +1 -1
- package/esm/editor/index.js +3 -3
- package/esm/editor/interactions/brush-select.js +3 -3
- package/esm/editor/interactions/click-select.js +3 -3
- package/esm/editor/interactions/dblclick-edit-text.js +4 -4
- package/esm/editor/interactions/drag-element.js +5 -5
- package/esm/editor/interactions/hotkey-history.js +2 -2
- package/esm/editor/interactions/index.js +8 -8
- package/esm/editor/interactions/select-highlight.js +4 -4
- package/esm/editor/interactions/zoom-wheel.js +3 -3
- package/esm/editor/managers/command.js +1 -1
- package/esm/editor/managers/index.js +4 -4
- package/esm/editor/managers/interaction.js +2 -2
- package/esm/editor/managers/plugin.js +1 -1
- package/esm/editor/managers/state.js +2 -2
- package/esm/editor/plugins/edit-bar/components/button.js +1 -1
- package/esm/editor/plugins/edit-bar/components/color-picker.js +1 -1
- package/esm/editor/plugins/edit-bar/components/index.js +5 -5
- package/esm/editor/plugins/edit-bar/components/popover.js +2 -2
- package/esm/editor/plugins/edit-bar/components/select.js +1 -1
- package/esm/editor/plugins/edit-bar/edit-bar.js +5 -5
- package/esm/editor/plugins/edit-bar/edit-items/align-elements.js +5 -5
- package/esm/editor/plugins/edit-bar/edit-items/font-align.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/font-color.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/font-family.js +4 -4
- package/esm/editor/plugins/edit-bar/edit-items/font-size.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/icon-color.js +3 -3
- package/esm/editor/plugins/edit-bar/edit-items/index.js +6 -6
- package/esm/editor/plugins/edit-bar/index.js +2 -2
- package/esm/editor/plugins/index.js +3 -3
- package/esm/editor/plugins/resize-element.js +4 -4
- package/esm/editor/utils/data.js +1 -1
- package/esm/editor/utils/element.js +1 -1
- package/esm/editor/utils/event.js +1 -1
- package/esm/editor/utils/index.js +7 -7
- package/esm/exporter/font.d.ts +0 -13
- package/esm/exporter/font.js +20 -28
- package/esm/exporter/index.js +2 -2
- package/esm/exporter/png.js +2 -2
- package/esm/exporter/svg.js +2 -2
- package/esm/index.js +14 -14
- package/esm/jsx/components/Text.js +1 -1
- package/esm/jsx/components/index.js +7 -7
- package/esm/jsx/index.js +6 -6
- package/esm/jsx/layout.js +1 -1
- package/esm/jsx/renderer.js +4 -4
- package/esm/jsx/utils/bounds.js +4 -4
- package/esm/jsx/utils/children.js +1 -1
- package/esm/jsx/utils/element.js +2 -2
- package/esm/jsx/utils/index.js +10 -10
- package/esm/jsx/utils/is-fragment.js +1 -1
- package/esm/jsx-dev-runtime.js +1 -1
- package/esm/jsx-runtime.js +1 -1
- package/esm/options/index.js +1 -1
- package/esm/options/parser.js +4 -4
- package/esm/package.json +1 -0
- package/esm/renderer/composites/background.js +1 -1
- package/esm/renderer/composites/base.js +2 -2
- package/esm/renderer/composites/button.js +1 -1
- package/esm/renderer/composites/icon.js +3 -3
- package/esm/renderer/composites/illus.js +2 -2
- package/esm/renderer/composites/index.js +8 -8
- package/esm/renderer/composites/shape.js +3 -3
- package/esm/renderer/composites/svg.js +1 -1
- package/esm/renderer/composites/text.js +2 -2
- package/esm/renderer/constants/index.js +2 -2
- package/esm/renderer/fonts/index.js +4 -4
- package/esm/renderer/fonts/loader.js +3 -3
- package/esm/renderer/fonts/registry.js +1 -1
- package/esm/renderer/index.js +4 -4
- package/esm/renderer/palettes/built-in.js +1 -1
- package/esm/renderer/palettes/index.js +3 -3
- package/esm/renderer/palettes/utils.js +1 -1
- package/esm/renderer/renderer.js +3 -3
- package/esm/renderer/stylize/gradient.js +2 -2
- package/esm/renderer/stylize/index.js +3 -3
- package/esm/renderer/stylize/pattern.js +3 -3
- package/esm/renderer/stylize/patterns/diamond.js +1 -1
- package/esm/renderer/stylize/patterns/dot.js +1 -1
- package/esm/renderer/stylize/patterns/hex.js +1 -1
- package/esm/renderer/stylize/patterns/index.js +6 -6
- package/esm/renderer/stylize/patterns/line.js +1 -1
- package/esm/renderer/stylize/patterns/mosaic.js +1 -1
- package/esm/renderer/stylize/patterns/square.js +1 -1
- package/esm/renderer/stylize/rough.js +1 -1
- package/esm/renderer/utils/index.js +2 -2
- package/esm/resource/index.js +4 -4
- package/esm/resource/loader.js +6 -6
- package/esm/resource/loaders/image.js +1 -1
- package/esm/resource/loaders/index.js +4 -4
- package/esm/resource/loaders/remote.js +3 -3
- package/esm/resource/loaders/search.js +5 -5
- package/esm/resource/loaders/svg.js +1 -1
- package/esm/resource/utils/index.js +3 -3
- package/esm/resource/utils/parser.js +1 -1
- package/esm/resource/utils/ref.js +2 -2
- package/esm/runtime/Infographic.js +11 -11
- package/esm/runtime/index.js +1 -1
- package/esm/runtime/options.js +1 -1
- package/esm/runtime/utils.js +1 -1
- package/esm/ssr/index.js +1 -1
- package/esm/ssr/renderer.js +5 -5
- package/esm/syntax/index.js +4 -4
- package/esm/syntax/mapper.js +1 -1
- package/esm/syntax/relations.js +2 -2
- package/esm/templates/built-in.js +9 -9
- package/esm/templates/index.js +2 -2
- package/esm/themes/built-in.js +1 -1
- package/esm/themes/index.js +3 -3
- package/esm/utils/element.js +1 -1
- package/esm/utils/icon.js +2 -2
- package/esm/utils/index.js +21 -21
- package/esm/utils/measure-text.js +3 -3
- package/esm/utils/padding.js +3 -3
- package/esm/utils/recognizer.js +3 -3
- package/esm/utils/text.js +4 -4
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/exporter/font.d.ts +0 -13
- package/lib/exporter/font.js +17 -26
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/exporter/font.ts +21 -32
- package/src/version.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, getElementBounds, Group, Path, Text } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { getPaletteColor, getThemeColors } from '../utils';
|
|
5
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, getElementBounds, Group, Path, Text } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
5
|
+
import { registerStructure } from './registry.js';
|
|
6
6
|
export const ListSector = (props) => {
|
|
7
7
|
const { Item, data, outerRadius = 250, innerRadius = 120, startAngle = -90, endAngle = 270, gapAngle = 1, options, } = props;
|
|
8
8
|
const { title, items = [] } = data;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { registerStructure } from './registry.js';
|
|
6
6
|
export const ListWaterfall = (props) => {
|
|
7
7
|
const { Title, Item, data, columns = 4, gap = 20, stepOffset = 40 } = props;
|
|
8
8
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
4
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getColorPrimary, getThemeColors } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
3
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
4
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getColorPrimary, getThemeColors } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
const MAX_ITEMS = 6;
|
|
9
9
|
const ARROW_WIDTH = 700;
|
|
10
10
|
const ARROW_HEIGHT_DOWN = 330;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { registerStructure } from './registry.js';
|
|
6
6
|
export const RelationCircle = (props) => {
|
|
7
7
|
const { Title, Item, data, radius = 150, startMode = 'top' } = props;
|
|
8
8
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import { DagreLayout } from '@antv/layout';
|
|
3
|
-
import { Defs, getElementBounds, Group, Path, Polygon, Text } from '../../jsx';
|
|
4
|
-
import { BtnAdd, BtnsGroup, ItemsGroup } from '../components';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
3
|
+
import { Defs, getElementBounds, Group, Path, Polygon, Text } from '../../jsx/index.js';
|
|
4
|
+
import { BtnAdd, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
const DEFAULT_NODE_SEP = 50;
|
|
9
9
|
const DEFAULT_RANK_SEP = 70;
|
|
10
10
|
const DEFAULT_EDGE_SEP = 10;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import * as d3 from 'd3';
|
|
3
|
-
import { getElementBounds, Group, Path } from '../../jsx';
|
|
4
|
-
import { ItemsGroup } from '../components';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getColorPrimary } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
3
|
+
import { getElementBounds, Group, Path } from '../../jsx/index.js';
|
|
4
|
+
import { ItemsGroup } from '../components/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getColorPrimary } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
export const RelationNetwork = (props) => {
|
|
9
9
|
const { Title, Item, data, spacing = 120, showConnections = true, options, } = props;
|
|
10
10
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, getElementBounds, Group, Path } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components';
|
|
4
|
-
import { Text3d } from '../decorations';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getPaletteColor } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, getElementBounds, Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { Text3d } from '../decorations/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getPaletteColor } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
const CUBE_GAP_X = -118;
|
|
9
9
|
const CUBE_GAP_Y = 118;
|
|
10
10
|
const CUBE_WIDTH = 240;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { registerStructure } from './registry.js';
|
|
6
6
|
export const SequenceAscendingSteps = (props) => {
|
|
7
7
|
const { Title, Item, data, hGap = 0, vGap = 0 } = props;
|
|
8
8
|
const { title, desc, items = [] } = data;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Ellipse, getElementBounds, Group, Path } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Ellipse, getElementBounds, Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
import * as d3 from 'd3';
|
|
8
8
|
const ITEM_DISTANCE = 20;
|
|
9
9
|
const LINE_GAP = 5;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Ellipse, getElementBounds, Group, Path } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getPaletteColor } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Ellipse, getElementBounds, Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getPaletteColor } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
const ITEM_AREA_HORIZONTAL_PADDING = 100;
|
|
8
8
|
const CIRCLE_AREA_HORIZONTAL_PADDING = 50;
|
|
9
9
|
const INNER_ARC_PADDING = 6;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
2
|
-
import { Defs, getElementBounds, Group, Path, Rect } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, getElementBounds, Group, Path, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
export const SequenceColorSnakeSteps = (props) => {
|
|
8
8
|
const { Title, Item, data, gap = 0, rowGap = 0, itemsPerRow = 3, circleStrokeWidth = 18, options, } = props;
|
|
9
9
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { Defs, getElementBounds, Group, Path, Rect, Text } from '../../jsx';
|
|
4
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getColorPrimary, getPaletteColor } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
3
|
+
import { Defs, getElementBounds, Group, Path, Rect, Text } from '../../jsx/index.js';
|
|
4
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getColorPrimary, getPaletteColor } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
const calculateDepthOffset = (pairIndex, cylinderRx) => {
|
|
9
9
|
if (pairIndex === 0)
|
|
10
10
|
return 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
2
|
-
import { getElementBounds, Group, Path, Rect, Text } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getPaletteColor } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group, Path, Rect, Text } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getPaletteColor } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
// 常量配置
|
|
8
8
|
const SHAPE_CONFIG = {
|
|
9
9
|
WIDTH: 160,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
/**
|
|
3
3
|
* 序列漏斗结构(SequenceFunnel)
|
|
4
4
|
* 用途:
|
|
@@ -7,11 +7,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "@antv/infographic/jsx-runtime";
|
|
|
7
7
|
*/
|
|
8
8
|
import roundPolygon, { getSegments } from 'round-polygon';
|
|
9
9
|
import tinycolor from 'tinycolor2';
|
|
10
|
-
import { Defs, Group, Polygon, Rect } from '../../jsx';
|
|
11
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, } from '../components';
|
|
12
|
-
import { FlexLayout } from '../layouts';
|
|
13
|
-
import { getPaletteColor, getThemeColors } from '../utils';
|
|
14
|
-
import { registerStructure } from './registry';
|
|
10
|
+
import { Defs, Group, Polygon, Rect } from '../../jsx/index.js';
|
|
11
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, } from '../components/index.js';
|
|
12
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
13
|
+
import { getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
14
|
+
import { registerStructure } from './registry.js';
|
|
15
15
|
// Constants
|
|
16
16
|
const FUNNEL_CORNER_RADIUS = 6;
|
|
17
17
|
const ICON_SIZE = 32;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Ellipse, getElementBounds, Group, Path, Rect } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Ellipse, getElementBounds, Group, Path, Rect } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
export const SequenceHorizontalZigzag = (props) => {
|
|
8
8
|
const { Title, Item, data, gap = 30, cardPadding = 10, options } = props;
|
|
9
9
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import tinycolor from 'tinycolor2';
|
|
3
|
-
import { getElementBounds, Group, Text } from '../../jsx';
|
|
4
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getPaletteColor, getThemeColors } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
3
|
+
import { getElementBounds, Group, Text } from '../../jsx/index.js';
|
|
4
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
function Mountain(props) {
|
|
9
9
|
const { width, height, colorPrimary } = props;
|
|
10
10
|
const leftBottomColor = colorPrimary;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
2
|
import roundPolygon, { getSegments } from 'round-polygon';
|
|
3
3
|
import tinycolor from 'tinycolor2';
|
|
4
|
-
import { Defs, Group, Polygon, Rect } from '../../jsx';
|
|
5
|
-
import { BtnsGroup, ItemIcon, ItemsGroup } from '../components';
|
|
6
|
-
import { FlexLayout } from '../layouts';
|
|
7
|
-
import { getPaletteColor, getThemeColors } from '../utils';
|
|
8
|
-
import { registerStructure } from './registry';
|
|
4
|
+
import { Defs, Group, Polygon, Rect } from '../../jsx/index.js';
|
|
5
|
+
import { BtnsGroup, ItemIcon, ItemsGroup } from '../components/index.js';
|
|
6
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
7
|
+
import { getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
8
|
+
import { registerStructure } from './registry.js';
|
|
9
9
|
export const SequencePyramid = (props) => {
|
|
10
10
|
const { Title, Item, data, gap = 10, width = 700, pyramidWidth, itemHeight = 60, options, } = props;
|
|
11
11
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group, Path, Text, } from '../../jsx';
|
|
3
|
-
import { ItemIconCircle } from '../components';
|
|
4
|
-
import { Triangle } from '../decorations';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getPaletteColor } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group, Path, Text, } from '../../jsx/index.js';
|
|
3
|
+
import { ItemIconCircle } from '../components/index.js';
|
|
4
|
+
import { Triangle } from '../decorations/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getPaletteColor } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
const CONFIG = {
|
|
9
9
|
iconSize: 50,
|
|
10
10
|
roadWidth: 24,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { SimpleArrow } from '../decorations';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getColorPrimary } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { SimpleArrow } from '../decorations/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getColorPrimary } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
export const SequenceSnakeSteps = (props) => {
|
|
9
9
|
const { Title, Item, data, gap = 40, itemsPerRow = 3, rowGap = 80, options, } = props;
|
|
10
10
|
const { title, desc, items = [] } = data;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group, Path, Polygon, Rect, Text } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group, Path, Polygon, Rect, Text } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
export const SequenceStairsFront = (props) => {
|
|
8
8
|
const { Title, Item, data, options, gap = 16, perspectiveFactor = 0.2, width = 720, } = props;
|
|
9
9
|
const { title, desc, items = [] } = data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { getElementBounds, Group } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components';
|
|
4
|
-
import { SimpleArrow } from '../decorations';
|
|
5
|
-
import { FlexLayout } from '../layouts';
|
|
6
|
-
import { getColorPrimary } from '../utils';
|
|
7
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { getElementBounds, Group } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup } from '../components/index.js';
|
|
4
|
+
import { SimpleArrow } from '../decorations/index.js';
|
|
5
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
6
|
+
import { getColorPrimary } from '../utils/index.js';
|
|
7
|
+
import { registerStructure } from './registry.js';
|
|
8
8
|
export const SequenceSteps = (props) => {
|
|
9
9
|
const { Title, Item, data, gap = 40, options } = props;
|
|
10
10
|
const { title, desc, items = [] } = data;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Ellipse, getElementBounds, Group, Path, Text } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor, getPaletteColors } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Ellipse, getElementBounds, Group, Path, Text } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor, getPaletteColors } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
export const SequenceTimeline = (props) => {
|
|
8
8
|
const { Title, Item, data, gap = 10, options } = props;
|
|
9
9
|
const { title, desc, items = [] } = data;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, getElementBounds, Group, Path } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, getElementBounds, Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
const PUCK_WIDTH = 120;
|
|
8
8
|
const PUCK_HEIGHT = 108;
|
|
9
9
|
const ITEM_TO_PUCK_GAP = 30;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
2
|
-
import { Defs, Ellipse, getElementBounds, Group, Path } from '../../jsx';
|
|
3
|
-
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, ShapesGroup, } from '../components';
|
|
4
|
-
import { FlexLayout } from '../layouts';
|
|
5
|
-
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils';
|
|
6
|
-
import { registerStructure } from './registry';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "../../jsx-runtime.js";
|
|
2
|
+
import { Defs, Ellipse, getElementBounds, Group, Path } from '../../jsx/index.js';
|
|
3
|
+
import { BtnAdd, BtnRemove, BtnsGroup, ItemIcon, ItemsGroup, ShapesGroup, } from '../components/index.js';
|
|
4
|
+
import { FlexLayout } from '../layouts/index.js';
|
|
5
|
+
import { getColorPrimary, getPaletteColor, getThemeColors } from '../utils/index.js';
|
|
6
|
+
import { registerStructure } from './registry.js';
|
|
7
7
|
// W 型路径参数
|
|
8
8
|
const DX = 240;
|
|
9
9
|
const DY = 130;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getPaletteColor as _getPaletteColor } from '../../renderer';
|
|
2
|
-
import { generateThemeColors } from '../../themes';
|
|
3
|
-
import { isDarkColor } from '../../utils';
|
|
1
|
+
import { getPaletteColor as _getPaletteColor } from '../../renderer/index.js';
|
|
2
|
+
import { generateThemeColors } from '../../themes/index.js';
|
|
3
|
+
import { isDarkColor } from '../../utils/index.js';
|
|
4
4
|
const DEFAULT_COLOR = '#FF356A';
|
|
5
5
|
export function getColorPrimary(options) {
|
|
6
6
|
return options?.themeConfig?.colorPrimary || DEFAULT_COLOR;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './color';
|
|
2
|
-
export * from './hierarchy-color';
|
|
3
|
-
export * from './item';
|
|
1
|
+
export * from './color.js';
|
|
2
|
+
export * from './hierarchy-color.js';
|
|
3
|
+
export * from './item.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAttributes, getIconAttrs, getIconEntity, getTextElementProps, isEditableText, isIconElement, setAttributes, updateIconElement, updateTextElement, } from '../../utils';
|
|
1
|
+
import { getAttributes, getIconAttrs, getIconEntity, getTextElementProps, isEditableText, isIconElement, setAttributes, updateIconElement, updateTextElement, } from '../../utils/index.js';
|
|
2
2
|
export class UpdateElementCommand {
|
|
3
3
|
constructor(element, modified, original) {
|
|
4
4
|
this.element = element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getElementRole, getTextContent, setTextContent } from '../../utils';
|
|
2
|
-
import { getIndexesFromElement } from '../utils';
|
|
1
|
+
import { getElementRole, getTextContent, setTextContent } from '../../utils/index.js';
|
|
2
|
+
import { getIndexesFromElement } from '../utils/index.js';
|
|
3
3
|
export class UpdateTextCommand {
|
|
4
4
|
constructor(element, newText, originalText) {
|
|
5
5
|
this.element = element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './Batch';
|
|
2
|
-
export * from './UpdateElement';
|
|
3
|
-
export * from './UpdateOptions';
|
|
4
|
-
export * from './UpdateText';
|
|
1
|
+
export * from './Batch.js';
|
|
2
|
+
export * from './UpdateElement.js';
|
|
3
|
+
export * from './UpdateOptions.js';
|
|
4
|
+
export * from './UpdateText.js';
|
package/esm/editor/editor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandManager, InteractionManager, PluginManager, StateManager, } from './managers';
|
|
1
|
+
import { CommandManager, InteractionManager, PluginManager, StateManager, } from './managers/index.js';
|
|
2
2
|
export class Editor {
|
|
3
3
|
constructor(emitter, document, options) {
|
|
4
4
|
this.emitter = emitter;
|
package/esm/editor/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Editor } from './editor';
|
|
2
|
-
export * from './interactions';
|
|
3
|
-
export * from './plugins';
|
|
1
|
+
export { Editor } from './editor.js';
|
|
2
|
+
export * from './interactions/index.js';
|
|
3
|
+
export * from './plugins/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createElement, setAttributes } from '../../utils';
|
|
2
|
-
import { clientToViewport, getElementViewportBounds, getEventTarget, getSelectableTarget, } from '../utils';
|
|
3
|
-
import { Interaction } from './base';
|
|
1
|
+
import { createElement, setAttributes } from '../../utils/index.js';
|
|
2
|
+
import { clientToViewport, getElementViewportBounds, getEventTarget, getSelectableTarget, } from '../utils/index.js';
|
|
3
|
+
import { Interaction } from './base.js';
|
|
4
4
|
export class BrushSelect extends Interaction {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isEditingText } from '../../utils';
|
|
2
|
-
import { ClickHandler, getEventTarget } from '../utils';
|
|
3
|
-
import { Interaction } from './base';
|
|
1
|
+
import { isEditingText } from '../../utils/index.js';
|
|
2
|
+
import { ClickHandler, getEventTarget } from '../utils/index.js';
|
|
3
|
+
import { Interaction } from './base.js';
|
|
4
4
|
export class ClickSelect extends Interaction {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(...arguments);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getTextContent, getTextEntity, injectStyleOnce, isEditableText, } from '../../utils';
|
|
2
|
-
import { UpdateTextCommand } from '../commands';
|
|
3
|
-
import { ClickHandler, getEventTarget } from '../utils';
|
|
4
|
-
import { Interaction } from './base';
|
|
1
|
+
import { getTextContent, getTextEntity, injectStyleOnce, isEditableText, } from '../../utils/index.js';
|
|
2
|
+
import { UpdateTextCommand } from '../commands/index.js';
|
|
3
|
+
import { ClickHandler, getEventTarget } from '../utils/index.js';
|
|
4
|
+
import { Interaction } from './base.js';
|
|
5
5
|
export class DblClickEditText extends Interaction {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getCombinedBounds } from '../../jsx/utils/bounds';
|
|
2
|
-
import { createElement, getAttributes, isEditableText, isEditingText, setAttributes, } from '../../utils';
|
|
3
|
-
import { UpdateElementCommand } from '../commands';
|
|
4
|
-
import { clientToViewport, getElementViewportBounds, getEventTarget, } from '../utils';
|
|
5
|
-
import { Interaction } from './base';
|
|
1
|
+
import { getCombinedBounds } from '../../jsx/utils/bounds.js';
|
|
2
|
+
import { createElement, getAttributes, isEditableText, isEditingText, setAttributes, } from '../../utils/index.js';
|
|
3
|
+
import { UpdateElementCommand } from '../commands/index.js';
|
|
4
|
+
import { clientToViewport, getElementViewportBounds, getEventTarget, } from '../utils/index.js';
|
|
5
|
+
import { Interaction } from './base.js';
|
|
6
6
|
export class DragElement extends Interaction {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { Interaction } from './base';
|
|
2
|
-
export { BrushSelect } from './brush-select';
|
|
3
|
-
export { ClickSelect } from './click-select';
|
|
4
|
-
export { DblClickEditText } from './dblclick-edit-text';
|
|
5
|
-
export { DragElement } from './drag-element';
|
|
6
|
-
export { HotkeyHistory } from './hotkey-history';
|
|
7
|
-
export { SelectHighlight } from './select-highlight';
|
|
8
|
-
export { ZoomWheel } from './zoom-wheel';
|
|
1
|
+
export { Interaction } from './base.js';
|
|
2
|
+
export { BrushSelect } from './brush-select.js';
|
|
3
|
+
export { ClickSelect } from './click-select.js';
|
|
4
|
+
export { DblClickEditText } from './dblclick-edit-text.js';
|
|
5
|
+
export { DragElement } from './drag-element.js';
|
|
6
|
+
export { HotkeyHistory } from './hotkey-history.js';
|
|
7
|
+
export { SelectHighlight } from './select-highlight.js';
|
|
8
|
+
export { ZoomWheel } from './zoom-wheel.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getCombinedBounds } from '../../jsx/utils/bounds';
|
|
2
|
-
import { createElement, isEditableText, setAttributes } from '../../utils';
|
|
3
|
-
import { getElementViewportBounds } from '../utils';
|
|
4
|
-
import { Interaction } from './base';
|
|
1
|
+
import { getCombinedBounds } from '../../jsx/utils/bounds.js';
|
|
2
|
+
import { createElement, isEditableText, setAttributes } from '../../utils/index.js';
|
|
3
|
+
import { getElementViewportBounds } from '../utils/index.js';
|
|
4
|
+
import { Interaction } from './base.js';
|
|
5
5
|
export class SelectHighlight extends Interaction {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clamp } from 'lodash-es';
|
|
2
|
-
import { parsePadding } from '../../utils';
|
|
3
|
-
import { UpdateOptionsCommand } from '../commands';
|
|
4
|
-
import { Interaction } from './base';
|
|
2
|
+
import { parsePadding } from '../../utils/index.js';
|
|
3
|
+
import { UpdateOptionsCommand } from '../commands/index.js';
|
|
4
|
+
import { Interaction } from './base.js';
|
|
5
5
|
const MIN_VIEWBOX_SIZE = 1;
|
|
6
6
|
const MIN_PADDING = -5000;
|
|
7
7
|
const MAX_PADDING = 5000;
|