@antv/infographic 0.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/esm/constants/element.d.ts +11 -0
- package/esm/constants/element.js +1 -0
- package/esm/constants/index.d.ts +1 -0
- package/esm/constants/index.js +1 -0
- package/esm/designs/components/Btn.d.ts +7 -0
- package/esm/designs/components/Btn.js +25 -0
- package/esm/designs/components/BtnsGroup.d.ts +5 -0
- package/esm/designs/components/BtnsGroup.js +5 -0
- package/esm/designs/components/Gap.d.ts +13 -0
- package/esm/designs/components/Gap.js +9 -0
- package/esm/designs/components/Illus.d.ts +6 -0
- package/esm/designs/components/Illus.js +13 -0
- package/esm/designs/components/ItemDesc.d.ts +7 -0
- package/esm/designs/components/ItemDesc.js +19 -0
- package/esm/designs/components/ItemIcon.d.ts +10 -0
- package/esm/designs/components/ItemIcon.js +29 -0
- package/esm/designs/components/ItemLabel.d.ts +6 -0
- package/esm/designs/components/ItemLabel.js +17 -0
- package/esm/designs/components/ItemValue.d.ts +8 -0
- package/esm/designs/components/ItemValue.js +18 -0
- package/esm/designs/components/ItemsGroup.d.ts +5 -0
- package/esm/designs/components/ItemsGroup.js +5 -0
- package/esm/designs/components/Title.d.ts +11 -0
- package/esm/designs/components/Title.js +32 -0
- package/esm/designs/components/index.d.ts +10 -0
- package/esm/designs/components/index.js +10 -0
- package/esm/designs/decorations/index.d.ts +3 -0
- package/esm/designs/decorations/index.js +3 -0
- package/esm/designs/decorations/simple-arrow.d.ts +6 -0
- package/esm/designs/decorations/simple-arrow.js +23 -0
- package/esm/designs/decorations/text-3d.d.ts +82 -0
- package/esm/designs/decorations/text-3d.js +13 -0
- package/esm/designs/decorations/triangle.d.ts +6 -0
- package/esm/designs/decorations/triangle.js +15 -0
- package/esm/designs/defs/DropShadow.d.ts +12 -0
- package/esm/designs/defs/DropShadow.js +5 -0
- package/esm/designs/defs/LinearGradient.d.ts +8 -0
- package/esm/designs/defs/LinearGradient.js +11 -0
- package/esm/designs/defs/index.d.ts +2 -0
- package/esm/designs/defs/index.js +2 -0
- package/esm/designs/index.d.ts +6 -0
- package/esm/designs/index.js +5 -0
- package/esm/designs/items/BadgeCard.d.ts +11 -0
- package/esm/designs/items/BadgeCard.js +33 -0
- package/esm/designs/items/CandyCardLite.d.ts +8 -0
- package/esm/designs/items/CandyCardLite.js +13 -0
- package/esm/designs/items/CapsuleItem.d.ts +10 -0
- package/esm/designs/items/CapsuleItem.js +56 -0
- package/esm/designs/items/CircleNode.d.ts +8 -0
- package/esm/designs/items/CircleNode.js +33 -0
- package/esm/designs/items/CircularProgress.d.ts +9 -0
- package/esm/designs/items/CircularProgress.js +24 -0
- package/esm/designs/items/CompactCard.d.ts +10 -0
- package/esm/designs/items/CompactCard.js +24 -0
- package/esm/designs/items/DoneList.d.ts +10 -0
- package/esm/designs/items/DoneList.js +20 -0
- package/esm/designs/items/HorizontalIconArrow.d.ts +7 -0
- package/esm/designs/items/HorizontalIconArrow.js +67 -0
- package/esm/designs/items/HorizontalIconLine.d.ts +7 -0
- package/esm/designs/items/HorizontalIconLine.js +40 -0
- package/esm/designs/items/IconBadge.d.ts +10 -0
- package/esm/designs/items/IconBadge.js +20 -0
- package/esm/designs/items/IndexedCard.d.ts +20 -0
- package/esm/designs/items/IndexedCard.js +62 -0
- package/esm/designs/items/LCornerCard.d.ts +8 -0
- package/esm/designs/items/LCornerCard.js +40 -0
- package/esm/designs/items/LetterCard.d.ts +16 -0
- package/esm/designs/items/LetterCard.js +54 -0
- package/esm/designs/items/PillBadge.d.ts +10 -0
- package/esm/designs/items/PillBadge.js +43 -0
- package/esm/designs/items/PlainText.d.ts +9 -0
- package/esm/designs/items/PlainText.js +16 -0
- package/esm/designs/items/ProgressCard.d.ts +12 -0
- package/esm/designs/items/ProgressCard.js +48 -0
- package/esm/designs/items/QuarterCircular.d.ts +10 -0
- package/esm/designs/items/QuarterCircular.js +145 -0
- package/esm/designs/items/QuarterSimpleCard.d.ts +11 -0
- package/esm/designs/items/QuarterSimpleCard.js +117 -0
- package/esm/designs/items/RibbonCard.d.ts +11 -0
- package/esm/designs/items/RibbonCard.js +24 -0
- package/esm/designs/items/RoundedRectNode.d.ts +9 -0
- package/esm/designs/items/RoundedRectNode.js +24 -0
- package/esm/designs/items/SimpleHorizontalArrow.d.ts +9 -0
- package/esm/designs/items/SimpleHorizontalArrow.js +41 -0
- package/esm/designs/items/SimpleIllusItem.d.ts +10 -0
- package/esm/designs/items/SimpleIllusItem.js +21 -0
- package/esm/designs/items/SimpleItem.d.ts +13 -0
- package/esm/designs/items/SimpleItem.js +112 -0
- package/esm/designs/items/SimpleVerticalArrow.d.ts +9 -0
- package/esm/designs/items/SimpleVerticalArrow.js +37 -0
- package/esm/designs/items/UnderlineText.d.ts +8 -0
- package/esm/designs/items/UnderlineText.js +45 -0
- package/esm/designs/items/VerticalIconArrow.d.ts +9 -0
- package/esm/designs/items/VerticalIconArrow.js +60 -0
- package/esm/designs/items/index.d.ts +28 -0
- package/esm/designs/items/index.js +27 -0
- package/esm/designs/items/registry.d.ts +4 -0
- package/esm/designs/items/registry.js +10 -0
- package/esm/designs/items/types.d.ts +24 -0
- package/esm/designs/items/types.js +1 -0
- package/esm/designs/layouts/Align.d.ts +9 -0
- package/esm/designs/layouts/Align.js +79 -0
- package/esm/designs/layouts/Flex.d.ts +11 -0
- package/esm/designs/layouts/Flex.js +204 -0
- package/esm/designs/layouts/index.d.ts +2 -0
- package/esm/designs/layouts/index.js +2 -0
- package/esm/designs/structures/chart-column.d.ts +12 -0
- package/esm/designs/structures/chart-column.js +68 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/index.d.ts +5 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/index.js +4 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.d.ts +4 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.js +19 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.d.ts +4 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.js +19 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/types.d.ts +11 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/types.js +9 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/vs.d.ts +4 -0
- package/esm/designs/structures/compare-binary-horizontal/dividers/vs.js +14 -0
- package/esm/designs/structures/compare-binary-horizontal/index.d.ts +12 -0
- package/esm/designs/structures/compare-binary-horizontal/index.js +86 -0
- package/esm/designs/structures/compare-hierarchy-left-right.d.ts +18 -0
- package/esm/designs/structures/compare-hierarchy-left-right.js +140 -0
- package/esm/designs/structures/compare-hierarchy-row.d.ts +17 -0
- package/esm/designs/structures/compare-hierarchy-row.js +74 -0
- package/esm/designs/structures/hierarchy-tree.d.ts +41 -0
- package/esm/designs/structures/hierarchy-tree.js +296 -0
- package/esm/designs/structures/index.d.ts +32 -0
- package/esm/designs/structures/index.js +31 -0
- package/esm/designs/structures/list-column.d.ts +9 -0
- package/esm/designs/structures/list-column.js +34 -0
- package/esm/designs/structures/list-grid.d.ts +9 -0
- package/esm/designs/structures/list-grid.js +47 -0
- package/esm/designs/structures/list-pyramid.d.ts +8 -0
- package/esm/designs/structures/list-pyramid.js +59 -0
- package/esm/designs/structures/list-row.d.ts +8 -0
- package/esm/designs/structures/list-row.js +36 -0
- package/esm/designs/structures/list-sector.d.ts +11 -0
- package/esm/designs/structures/list-sector.js +147 -0
- package/esm/designs/structures/list-waterfall.d.ts +9 -0
- package/esm/designs/structures/list-waterfall.js +55 -0
- package/esm/designs/structures/quadrant.d.ts +14 -0
- package/esm/designs/structures/quadrant.js +96 -0
- package/esm/designs/structures/registry.d.ts +4 -0
- package/esm/designs/structures/registry.js +10 -0
- package/esm/designs/structures/relation-circle.d.ts +8 -0
- package/esm/designs/structures/relation-circle.js +77 -0
- package/esm/designs/structures/relation-network.d.ts +19 -0
- package/esm/designs/structures/relation-network.js +92 -0
- package/esm/designs/structures/sequence-ascending-stairs-3d.d.ts +7 -0
- package/esm/designs/structures/sequence-ascending-stairs-3d.js +63 -0
- package/esm/designs/structures/sequence-ascending-steps.d.ts +8 -0
- package/esm/designs/structures/sequence-ascending-steps.js +32 -0
- package/esm/designs/structures/sequence-circle-arrows.d.ts +9 -0
- package/esm/designs/structures/sequence-circle-arrows.js +198 -0
- package/esm/designs/structures/sequence-circular.d.ts +13 -0
- package/esm/designs/structures/sequence-circular.js +171 -0
- package/esm/designs/structures/sequence-color-snake-steps.d.ts +11 -0
- package/esm/designs/structures/sequence-color-snake-steps.js +90 -0
- package/esm/designs/structures/sequence-cylinders-3d.d.ts +15 -0
- package/esm/designs/structures/sequence-cylinders-3d.js +277 -0
- package/esm/designs/structures/sequence-filter-mesh.d.ts +7 -0
- package/esm/designs/structures/sequence-filter-mesh.js +217 -0
- package/esm/designs/structures/sequence-horizontal-zigzag.d.ts +8 -0
- package/esm/designs/structures/sequence-horizontal-zigzag.js +153 -0
- package/esm/designs/structures/sequence-mountain.d.ts +11 -0
- package/esm/designs/structures/sequence-mountain.js +281 -0
- package/esm/designs/structures/sequence-pyramid.d.ts +10 -0
- package/esm/designs/structures/sequence-pyramid.js +94 -0
- package/esm/designs/structures/sequence-roadmap-vertical.d.ts +9 -0
- package/esm/designs/structures/sequence-roadmap-vertical.js +151 -0
- package/esm/designs/structures/sequence-snake-steps.d.ts +9 -0
- package/esm/designs/structures/sequence-snake-steps.js +78 -0
- package/esm/designs/structures/sequence-steps.d.ts +7 -0
- package/esm/designs/structures/sequence-steps.js +47 -0
- package/esm/designs/structures/sequence-timeline.d.ts +8 -0
- package/esm/designs/structures/sequence-timeline.js +64 -0
- package/esm/designs/structures/sequence-zigzag-pucks-3d.d.ts +7 -0
- package/esm/designs/structures/sequence-zigzag-pucks-3d.js +70 -0
- package/esm/designs/structures/sequence-zigzag-steps.d.ts +9 -0
- package/esm/designs/structures/sequence-zigzag-steps.js +126 -0
- package/esm/designs/structures/types.d.ts +19 -0
- package/esm/designs/structures/types.js +1 -0
- package/esm/designs/title/index.d.ts +1 -0
- package/esm/designs/title/index.js +1 -0
- package/esm/designs/title/types.d.ts +4 -0
- package/esm/designs/title/types.js +1 -0
- package/esm/designs/types.d.ts +29 -0
- package/esm/designs/types.js +1 -0
- package/esm/designs/utils/color.d.ts +8 -0
- package/esm/designs/utils/color.js +26 -0
- package/esm/designs/utils/hierarchy-color.d.ts +61 -0
- package/esm/designs/utils/hierarchy-color.js +101 -0
- package/esm/designs/utils/index.d.ts +3 -0
- package/esm/designs/utils/index.js +3 -0
- package/esm/designs/utils/item.d.ts +14 -0
- package/esm/designs/utils/item.js +49 -0
- package/esm/index.d.ts +13 -0
- package/esm/index.js +9 -0
- package/esm/jsx-runtime.d.ts +1 -0
- package/esm/jsx-runtime.js +1 -0
- package/esm/options/index.d.ts +2 -0
- package/esm/options/index.js +1 -0
- package/esm/options/parser.d.ts +2 -0
- package/esm/options/parser.js +113 -0
- package/esm/options/types.d.ts +45 -0
- package/esm/options/types.js +1 -0
- package/esm/renderer/composites/background.d.ts +1 -0
- package/esm/renderer/composites/background.js +26 -0
- package/esm/renderer/composites/button.d.ts +1 -0
- package/esm/renderer/composites/button.js +68 -0
- package/esm/renderer/composites/icon.d.ts +6 -0
- package/esm/renderer/composites/icon.js +37 -0
- package/esm/renderer/composites/illus.d.ts +3 -0
- package/esm/renderer/composites/illus.js +79 -0
- package/esm/renderer/composites/index.d.ts +7 -0
- package/esm/renderer/composites/index.js +7 -0
- package/esm/renderer/composites/shape.d.ts +4 -0
- package/esm/renderer/composites/shape.js +45 -0
- package/esm/renderer/composites/svg.d.ts +2 -0
- package/esm/renderer/composites/svg.js +6 -0
- package/esm/renderer/composites/text.d.ts +6 -0
- package/esm/renderer/composites/text.js +102 -0
- package/esm/renderer/constants/data-url.d.ts +5 -0
- package/esm/renderer/constants/data-url.js +1 -0
- package/esm/renderer/constants/index.d.ts +2 -0
- package/esm/renderer/constants/index.js +2 -0
- package/esm/renderer/fonts/built-in.d.ts +2 -0
- package/esm/renderer/fonts/built-in.js +37 -0
- package/esm/renderer/fonts/index.d.ts +4 -0
- package/esm/renderer/fonts/index.js +6 -0
- package/esm/renderer/fonts/loader.d.ts +4 -0
- package/esm/renderer/fonts/loader.js +54 -0
- package/esm/renderer/fonts/registry.d.ts +24 -0
- package/esm/renderer/fonts/registry.js +45 -0
- package/esm/renderer/fonts/types.d.ts +9 -0
- package/esm/renderer/fonts/types.js +1 -0
- package/esm/renderer/fonts/utils.d.ts +4 -0
- package/esm/renderer/fonts/utils.js +35 -0
- package/esm/renderer/index.d.ts +4 -0
- package/esm/renderer/index.js +3 -0
- package/esm/renderer/palettes/built-in.d.ts +3 -0
- package/esm/renderer/palettes/built-in.js +81 -0
- package/esm/renderer/palettes/index.d.ts +5 -0
- package/esm/renderer/palettes/index.js +4 -0
- package/esm/renderer/palettes/registry.d.ts +3 -0
- package/esm/renderer/palettes/registry.js +7 -0
- package/esm/renderer/palettes/types.d.ts +1 -0
- package/esm/renderer/palettes/types.js +1 -0
- package/esm/renderer/palettes/utils.d.ts +2 -0
- package/esm/renderer/palettes/utils.js +14 -0
- package/esm/renderer/renderer.d.ts +11 -0
- package/esm/renderer/renderer.js +207 -0
- package/esm/renderer/stylize/gradient.d.ts +2 -0
- package/esm/renderer/stylize/gradient.js +102 -0
- package/esm/renderer/stylize/index.d.ts +3 -0
- package/esm/renderer/stylize/index.js +3 -0
- package/esm/renderer/stylize/pattern.d.ts +3 -0
- package/esm/renderer/stylize/pattern.js +57 -0
- package/esm/renderer/stylize/patterns/diamond.d.ts +2 -0
- package/esm/renderer/stylize/patterns/diamond.js +23 -0
- package/esm/renderer/stylize/patterns/dot.d.ts +2 -0
- package/esm/renderer/stylize/patterns/dot.js +31 -0
- package/esm/renderer/stylize/patterns/hex.d.ts +2 -0
- package/esm/renderer/stylize/patterns/hex.js +22 -0
- package/esm/renderer/stylize/patterns/index.d.ts +6 -0
- package/esm/renderer/stylize/patterns/index.js +6 -0
- package/esm/renderer/stylize/patterns/line.d.ts +2 -0
- package/esm/renderer/stylize/patterns/line.js +39 -0
- package/esm/renderer/stylize/patterns/mosaic.d.ts +2 -0
- package/esm/renderer/stylize/patterns/mosaic.js +36 -0
- package/esm/renderer/stylize/patterns/square.d.ts +2 -0
- package/esm/renderer/stylize/patterns/square.js +22 -0
- package/esm/renderer/stylize/rough.d.ts +2 -0
- package/esm/renderer/stylize/rough.js +108 -0
- package/esm/renderer/types/index.d.ts +3 -0
- package/esm/renderer/types/index.js +1 -0
- package/esm/renderer/types/renderer.d.ts +6 -0
- package/esm/renderer/types/renderer.js +1 -0
- package/esm/renderer/types/stylize.d.ts +42 -0
- package/esm/renderer/types/stylize.js +1 -0
- package/esm/renderer/types/text.d.ts +3 -0
- package/esm/renderer/types/text.js +1 -0
- package/esm/renderer/utils/attrs.d.ts +2 -0
- package/esm/renderer/utils/attrs.js +21 -0
- package/esm/renderer/utils/id.d.ts +1 -0
- package/esm/renderer/utils/id.js +3 -0
- package/esm/renderer/utils/index.d.ts +2 -0
- package/esm/renderer/utils/index.js +2 -0
- package/esm/resource/index.d.ts +5 -0
- package/esm/resource/index.js +4 -0
- package/esm/resource/loader.d.ts +6 -0
- package/esm/resource/loader.js +54 -0
- package/esm/resource/loaders/image.d.ts +1 -0
- package/esm/resource/loaders/image.js +70 -0
- package/esm/resource/loaders/index.d.ts +3 -0
- package/esm/resource/loaders/index.js +3 -0
- package/esm/resource/loaders/remote.d.ts +1 -0
- package/esm/resource/loaders/remote.js +35 -0
- package/esm/resource/loaders/svg.d.ts +1 -0
- package/esm/resource/loaders/svg.js +12 -0
- package/esm/resource/registry.d.ts +3 -0
- package/esm/resource/registry.js +7 -0
- package/esm/resource/types/font.d.ts +12 -0
- package/esm/resource/types/font.js +1 -0
- package/esm/resource/types/index.d.ts +1 -0
- package/esm/resource/types/index.js +1 -0
- package/esm/resource/types/resource.d.ts +7 -0
- package/esm/resource/types/resource.js +1 -0
- package/esm/resource/utils/data-uri.d.ts +2 -0
- package/esm/resource/utils/data-uri.js +22 -0
- package/esm/resource/utils/hash.d.ts +1 -0
- package/esm/resource/utils/hash.js +11 -0
- package/esm/resource/utils/index.d.ts +4 -0
- package/esm/resource/utils/index.js +4 -0
- package/esm/resource/utils/parser.d.ts +2 -0
- package/esm/resource/utils/parser.js +6 -0
- package/esm/resource/utils/ref.d.ts +3 -0
- package/esm/resource/utils/ref.js +14 -0
- package/esm/runtime/Infographic.d.ts +15 -0
- package/esm/runtime/Infographic.js +45 -0
- package/esm/runtime/index.d.ts +1 -0
- package/esm/runtime/index.js +1 -0
- package/esm/templates/built-in.d.ts +1 -0
- package/esm/templates/built-in.js +693 -0
- package/esm/templates/hierarchy-tree.d.ts +2 -0
- package/esm/templates/hierarchy-tree.js +65 -0
- package/esm/templates/index.d.ts +3 -0
- package/esm/templates/index.js +2 -0
- package/esm/templates/registry.d.ts +4 -0
- package/esm/templates/registry.js +10 -0
- package/esm/templates/types.d.ts +3 -0
- package/esm/templates/types.js +1 -0
- package/esm/themes/built-in.d.ts +1 -0
- package/esm/themes/built-in.js +9 -0
- package/esm/themes/generator.d.ts +2 -0
- package/esm/themes/generator.js +82 -0
- package/esm/themes/index.d.ts +4 -0
- package/esm/themes/index.js +3 -0
- package/esm/themes/registry.d.ts +4 -0
- package/esm/themes/registry.js +10 -0
- package/esm/themes/types.d.ts +60 -0
- package/esm/themes/types.js +1 -0
- package/esm/types/attrs.d.ts +53 -0
- package/esm/types/attrs.js +1 -0
- package/esm/types/data.d.ts +17 -0
- package/esm/types/data.js +1 -0
- package/esm/types/element.d.ts +8 -0
- package/esm/types/element.js +1 -0
- package/esm/types/index.d.ts +5 -0
- package/esm/types/index.js +1 -0
- package/esm/types/padding.d.ts +2 -0
- package/esm/types/padding.js +1 -0
- package/esm/types/resource.d.ts +6 -0
- package/esm/types/resource.js +1 -0
- package/esm/utils/color.d.ts +2 -0
- package/esm/utils/color.js +19 -0
- package/esm/utils/data.d.ts +5 -0
- package/esm/utils/data.js +16 -0
- package/esm/utils/get-types.d.ts +7 -0
- package/esm/utils/get-types.js +47 -0
- package/esm/utils/icon.d.ts +6 -0
- package/esm/utils/icon.js +34 -0
- package/esm/utils/index.d.ts +11 -0
- package/esm/utils/index.js +11 -0
- package/esm/utils/item.d.ts +30 -0
- package/esm/utils/item.js +45 -0
- package/esm/utils/join.d.ts +1 -0
- package/esm/utils/join.js +6 -0
- package/esm/utils/padding.d.ts +2 -0
- package/esm/utils/padding.js +20 -0
- package/esm/utils/recognizer.d.ts +24 -0
- package/esm/utils/recognizer.js +52 -0
- package/esm/utils/svg.d.ts +8 -0
- package/esm/utils/svg.js +73 -0
- package/esm/utils/text.d.ts +2 -0
- package/esm/utils/text.js +115 -0
- package/esm/utils/uuid.d.ts +1 -0
- package/esm/utils/uuid.js +10 -0
- package/lib/constants/element.d.ts +11 -0
- package/lib/constants/element.js +2 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +17 -0
- package/lib/designs/components/Btn.d.ts +7 -0
- package/lib/designs/components/Btn.js +30 -0
- package/lib/designs/components/BtnsGroup.d.ts +5 -0
- package/lib/designs/components/BtnsGroup.js +9 -0
- package/lib/designs/components/Gap.d.ts +13 -0
- package/lib/designs/components/Gap.js +13 -0
- package/lib/designs/components/Illus.d.ts +6 -0
- package/lib/designs/components/Illus.js +17 -0
- package/lib/designs/components/ItemDesc.d.ts +7 -0
- package/lib/designs/components/ItemDesc.js +23 -0
- package/lib/designs/components/ItemIcon.d.ts +10 -0
- package/lib/designs/components/ItemIcon.js +34 -0
- package/lib/designs/components/ItemLabel.d.ts +6 -0
- package/lib/designs/components/ItemLabel.js +21 -0
- package/lib/designs/components/ItemValue.d.ts +8 -0
- package/lib/designs/components/ItemValue.js +22 -0
- package/lib/designs/components/ItemsGroup.d.ts +5 -0
- package/lib/designs/components/ItemsGroup.js +9 -0
- package/lib/designs/components/Title.d.ts +11 -0
- package/lib/designs/components/Title.js +36 -0
- package/lib/designs/components/index.d.ts +10 -0
- package/lib/designs/components/index.js +26 -0
- package/lib/designs/decorations/index.d.ts +3 -0
- package/lib/designs/decorations/index.js +19 -0
- package/lib/designs/decorations/simple-arrow.d.ts +6 -0
- package/lib/designs/decorations/simple-arrow.js +27 -0
- package/lib/designs/decorations/text-3d.d.ts +82 -0
- package/lib/designs/decorations/text-3d.js +17 -0
- package/lib/designs/decorations/triangle.d.ts +6 -0
- package/lib/designs/decorations/triangle.js +19 -0
- package/lib/designs/defs/DropShadow.d.ts +12 -0
- package/lib/designs/defs/DropShadow.js +9 -0
- package/lib/designs/defs/LinearGradient.d.ts +8 -0
- package/lib/designs/defs/LinearGradient.js +15 -0
- package/lib/designs/defs/index.d.ts +2 -0
- package/lib/designs/defs/index.js +18 -0
- package/lib/designs/index.d.ts +6 -0
- package/lib/designs/index.js +21 -0
- package/lib/designs/items/BadgeCard.d.ts +11 -0
- package/lib/designs/items/BadgeCard.js +40 -0
- package/lib/designs/items/CandyCardLite.d.ts +8 -0
- package/lib/designs/items/CandyCardLite.js +17 -0
- package/lib/designs/items/CapsuleItem.d.ts +10 -0
- package/lib/designs/items/CapsuleItem.js +60 -0
- package/lib/designs/items/CircleNode.d.ts +8 -0
- package/lib/designs/items/CircleNode.js +40 -0
- package/lib/designs/items/CircularProgress.d.ts +9 -0
- package/lib/designs/items/CircularProgress.js +28 -0
- package/lib/designs/items/CompactCard.d.ts +10 -0
- package/lib/designs/items/CompactCard.js +28 -0
- package/lib/designs/items/DoneList.d.ts +10 -0
- package/lib/designs/items/DoneList.js +24 -0
- package/lib/designs/items/HorizontalIconArrow.d.ts +7 -0
- package/lib/designs/items/HorizontalIconArrow.js +71 -0
- package/lib/designs/items/HorizontalIconLine.d.ts +7 -0
- package/lib/designs/items/HorizontalIconLine.js +44 -0
- package/lib/designs/items/IconBadge.d.ts +10 -0
- package/lib/designs/items/IconBadge.js +27 -0
- package/lib/designs/items/IndexedCard.d.ts +20 -0
- package/lib/designs/items/IndexedCard.js +69 -0
- package/lib/designs/items/LCornerCard.d.ts +8 -0
- package/lib/designs/items/LCornerCard.js +44 -0
- package/lib/designs/items/LetterCard.d.ts +16 -0
- package/lib/designs/items/LetterCard.js +61 -0
- package/lib/designs/items/PillBadge.d.ts +10 -0
- package/lib/designs/items/PillBadge.js +47 -0
- package/lib/designs/items/PlainText.d.ts +9 -0
- package/lib/designs/items/PlainText.js +20 -0
- package/lib/designs/items/ProgressCard.d.ts +12 -0
- package/lib/designs/items/ProgressCard.js +55 -0
- package/lib/designs/items/QuarterCircular.d.ts +10 -0
- package/lib/designs/items/QuarterCircular.js +149 -0
- package/lib/designs/items/QuarterSimpleCard.d.ts +11 -0
- package/lib/designs/items/QuarterSimpleCard.js +121 -0
- package/lib/designs/items/RibbonCard.d.ts +11 -0
- package/lib/designs/items/RibbonCard.js +31 -0
- package/lib/designs/items/RoundedRectNode.d.ts +9 -0
- package/lib/designs/items/RoundedRectNode.js +28 -0
- package/lib/designs/items/SimpleHorizontalArrow.d.ts +9 -0
- package/lib/designs/items/SimpleHorizontalArrow.js +45 -0
- package/lib/designs/items/SimpleIllusItem.d.ts +10 -0
- package/lib/designs/items/SimpleIllusItem.js +25 -0
- package/lib/designs/items/SimpleItem.d.ts +13 -0
- package/lib/designs/items/SimpleItem.js +116 -0
- package/lib/designs/items/SimpleVerticalArrow.d.ts +9 -0
- package/lib/designs/items/SimpleVerticalArrow.js +41 -0
- package/lib/designs/items/UnderlineText.d.ts +8 -0
- package/lib/designs/items/UnderlineText.js +49 -0
- package/lib/designs/items/VerticalIconArrow.d.ts +9 -0
- package/lib/designs/items/VerticalIconArrow.js +64 -0
- package/lib/designs/items/index.d.ts +28 -0
- package/lib/designs/items/index.js +43 -0
- package/lib/designs/items/registry.d.ts +4 -0
- package/lib/designs/items/registry.js +15 -0
- package/lib/designs/items/types.d.ts +24 -0
- package/lib/designs/items/types.js +2 -0
- package/lib/designs/layouts/Align.d.ts +9 -0
- package/lib/designs/layouts/Align.js +82 -0
- package/lib/designs/layouts/Flex.d.ts +11 -0
- package/lib/designs/layouts/Flex.js +207 -0
- package/lib/designs/layouts/index.d.ts +2 -0
- package/lib/designs/layouts/index.js +18 -0
- package/lib/designs/structures/chart-column.d.ts +12 -0
- package/lib/designs/structures/chart-column.js +75 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/index.d.ts +5 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/index.js +23 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.d.ts +4 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.js +23 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.d.ts +4 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.js +23 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/types.d.ts +11 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/types.js +14 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/vs.d.ts +4 -0
- package/lib/designs/structures/compare-binary-horizontal/dividers/vs.js +21 -0
- package/lib/designs/structures/compare-binary-horizontal/index.d.ts +12 -0
- package/lib/designs/structures/compare-binary-horizontal/index.js +90 -0
- package/lib/designs/structures/compare-hierarchy-left-right.d.ts +18 -0
- package/lib/designs/structures/compare-hierarchy-left-right.js +144 -0
- package/lib/designs/structures/compare-hierarchy-row.d.ts +17 -0
- package/lib/designs/structures/compare-hierarchy-row.js +78 -0
- package/lib/designs/structures/hierarchy-tree.d.ts +41 -0
- package/lib/designs/structures/hierarchy-tree.js +333 -0
- package/lib/designs/structures/index.d.ts +32 -0
- package/lib/designs/structures/index.js +47 -0
- package/lib/designs/structures/list-column.d.ts +9 -0
- package/lib/designs/structures/list-column.js +38 -0
- package/lib/designs/structures/list-grid.d.ts +9 -0
- package/lib/designs/structures/list-grid.js +51 -0
- package/lib/designs/structures/list-pyramid.d.ts +8 -0
- package/lib/designs/structures/list-pyramid.js +63 -0
- package/lib/designs/structures/list-row.d.ts +8 -0
- package/lib/designs/structures/list-row.js +40 -0
- package/lib/designs/structures/list-sector.d.ts +11 -0
- package/lib/designs/structures/list-sector.js +151 -0
- package/lib/designs/structures/list-waterfall.d.ts +9 -0
- package/lib/designs/structures/list-waterfall.js +59 -0
- package/lib/designs/structures/quadrant.d.ts +14 -0
- package/lib/designs/structures/quadrant.js +100 -0
- package/lib/designs/structures/registry.d.ts +4 -0
- package/lib/designs/structures/registry.js +15 -0
- package/lib/designs/structures/relation-circle.d.ts +8 -0
- package/lib/designs/structures/relation-circle.js +81 -0
- package/lib/designs/structures/relation-network.d.ts +19 -0
- package/lib/designs/structures/relation-network.js +129 -0
- package/lib/designs/structures/sequence-ascending-stairs-3d.d.ts +7 -0
- package/lib/designs/structures/sequence-ascending-stairs-3d.js +67 -0
- package/lib/designs/structures/sequence-ascending-steps.d.ts +8 -0
- package/lib/designs/structures/sequence-ascending-steps.js +36 -0
- package/lib/designs/structures/sequence-circle-arrows.d.ts +9 -0
- package/lib/designs/structures/sequence-circle-arrows.js +235 -0
- package/lib/designs/structures/sequence-circular.d.ts +13 -0
- package/lib/designs/structures/sequence-circular.js +175 -0
- package/lib/designs/structures/sequence-color-snake-steps.d.ts +11 -0
- package/lib/designs/structures/sequence-color-snake-steps.js +94 -0
- package/lib/designs/structures/sequence-cylinders-3d.d.ts +15 -0
- package/lib/designs/structures/sequence-cylinders-3d.js +284 -0
- package/lib/designs/structures/sequence-filter-mesh.d.ts +7 -0
- package/lib/designs/structures/sequence-filter-mesh.js +221 -0
- package/lib/designs/structures/sequence-horizontal-zigzag.d.ts +8 -0
- package/lib/designs/structures/sequence-horizontal-zigzag.js +157 -0
- package/lib/designs/structures/sequence-mountain.d.ts +11 -0
- package/lib/designs/structures/sequence-mountain.js +288 -0
- package/lib/designs/structures/sequence-pyramid.d.ts +10 -0
- package/lib/designs/structures/sequence-pyramid.js +134 -0
- package/lib/designs/structures/sequence-roadmap-vertical.d.ts +9 -0
- package/lib/designs/structures/sequence-roadmap-vertical.js +155 -0
- package/lib/designs/structures/sequence-snake-steps.d.ts +9 -0
- package/lib/designs/structures/sequence-snake-steps.js +82 -0
- package/lib/designs/structures/sequence-steps.d.ts +7 -0
- package/lib/designs/structures/sequence-steps.js +51 -0
- package/lib/designs/structures/sequence-timeline.d.ts +8 -0
- package/lib/designs/structures/sequence-timeline.js +68 -0
- package/lib/designs/structures/sequence-zigzag-pucks-3d.d.ts +7 -0
- package/lib/designs/structures/sequence-zigzag-pucks-3d.js +74 -0
- package/lib/designs/structures/sequence-zigzag-steps.d.ts +9 -0
- package/lib/designs/structures/sequence-zigzag-steps.js +130 -0
- package/lib/designs/structures/types.d.ts +19 -0
- package/lib/designs/structures/types.js +2 -0
- package/lib/designs/title/index.d.ts +1 -0
- package/lib/designs/title/index.js +2 -0
- package/lib/designs/title/types.d.ts +4 -0
- package/lib/designs/title/types.js +2 -0
- package/lib/designs/types.d.ts +29 -0
- package/lib/designs/types.js +2 -0
- package/lib/designs/utils/color.d.ts +8 -0
- package/lib/designs/utils/color.js +32 -0
- package/lib/designs/utils/hierarchy-color.d.ts +61 -0
- package/lib/designs/utils/hierarchy-color.js +105 -0
- package/lib/designs/utils/index.d.ts +3 -0
- package/lib/designs/utils/index.js +19 -0
- package/lib/designs/utils/item.d.ts +14 -0
- package/lib/designs/utils/item.js +54 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +39 -0
- package/lib/jsx-runtime.d.ts +1 -0
- package/lib/jsx-runtime.js +17 -0
- package/lib/options/index.d.ts +2 -0
- package/lib/options/index.js +5 -0
- package/lib/options/parser.d.ts +2 -0
- package/lib/options/parser.js +116 -0
- package/lib/options/types.d.ts +45 -0
- package/lib/options/types.js +2 -0
- package/lib/renderer/composites/background.d.ts +1 -0
- package/lib/renderer/composites/background.js +29 -0
- package/lib/renderer/composites/button.d.ts +1 -0
- package/lib/renderer/composites/button.js +71 -0
- package/lib/renderer/composites/icon.d.ts +6 -0
- package/lib/renderer/composites/icon.js +41 -0
- package/lib/renderer/composites/illus.d.ts +3 -0
- package/lib/renderer/composites/illus.js +82 -0
- package/lib/renderer/composites/index.d.ts +7 -0
- package/lib/renderer/composites/index.js +22 -0
- package/lib/renderer/composites/shape.d.ts +4 -0
- package/lib/renderer/composites/shape.js +50 -0
- package/lib/renderer/composites/svg.d.ts +2 -0
- package/lib/renderer/composites/svg.js +9 -0
- package/lib/renderer/composites/text.d.ts +6 -0
- package/lib/renderer/composites/text.js +107 -0
- package/lib/renderer/constants/data-url.d.ts +5 -0
- package/lib/renderer/constants/data-url.js +2 -0
- package/lib/renderer/constants/index.d.ts +2 -0
- package/lib/renderer/constants/index.js +18 -0
- package/lib/renderer/fonts/built-in.d.ts +2 -0
- package/lib/renderer/fonts/built-in.js +40 -0
- package/lib/renderer/fonts/index.d.ts +4 -0
- package/lib/renderer/fonts/index.js +20 -0
- package/lib/renderer/fonts/loader.d.ts +4 -0
- package/lib/renderer/fonts/loader.js +60 -0
- package/lib/renderer/fonts/registry.d.ts +24 -0
- package/lib/renderer/fonts/registry.js +53 -0
- package/lib/renderer/fonts/types.d.ts +9 -0
- package/lib/renderer/fonts/types.js +2 -0
- package/lib/renderer/fonts/utils.d.ts +4 -0
- package/lib/renderer/fonts/utils.js +40 -0
- package/lib/renderer/index.d.ts +4 -0
- package/lib/renderer/index.js +21 -0
- package/lib/renderer/palettes/built-in.d.ts +3 -0
- package/lib/renderer/palettes/built-in.js +85 -0
- package/lib/renderer/palettes/index.d.ts +5 -0
- package/lib/renderer/palettes/index.js +9 -0
- package/lib/renderer/palettes/registry.d.ts +3 -0
- package/lib/renderer/palettes/registry.js +11 -0
- package/lib/renderer/palettes/types.d.ts +1 -0
- package/lib/renderer/palettes/types.js +2 -0
- package/lib/renderer/palettes/utils.d.ts +2 -0
- package/lib/renderer/palettes/utils.js +18 -0
- package/lib/renderer/renderer.d.ts +11 -0
- package/lib/renderer/renderer.js +211 -0
- package/lib/renderer/stylize/gradient.d.ts +2 -0
- package/lib/renderer/stylize/gradient.js +108 -0
- package/lib/renderer/stylize/index.d.ts +3 -0
- package/lib/renderer/stylize/index.js +9 -0
- package/lib/renderer/stylize/pattern.d.ts +3 -0
- package/lib/renderer/stylize/pattern.js +97 -0
- package/lib/renderer/stylize/patterns/diamond.d.ts +2 -0
- package/lib/renderer/stylize/patterns/diamond.js +27 -0
- package/lib/renderer/stylize/patterns/dot.d.ts +2 -0
- package/lib/renderer/stylize/patterns/dot.js +35 -0
- package/lib/renderer/stylize/patterns/hex.d.ts +2 -0
- package/lib/renderer/stylize/patterns/hex.js +26 -0
- package/lib/renderer/stylize/patterns/index.d.ts +6 -0
- package/lib/renderer/stylize/patterns/index.js +15 -0
- package/lib/renderer/stylize/patterns/line.d.ts +2 -0
- package/lib/renderer/stylize/patterns/line.js +43 -0
- package/lib/renderer/stylize/patterns/mosaic.d.ts +2 -0
- package/lib/renderer/stylize/patterns/mosaic.js +40 -0
- package/lib/renderer/stylize/patterns/square.d.ts +2 -0
- package/lib/renderer/stylize/patterns/square.js +26 -0
- package/lib/renderer/stylize/rough.d.ts +2 -0
- package/lib/renderer/stylize/rough.js +114 -0
- package/lib/renderer/types/index.d.ts +3 -0
- package/lib/renderer/types/index.js +2 -0
- package/lib/renderer/types/renderer.d.ts +6 -0
- package/lib/renderer/types/renderer.js +2 -0
- package/lib/renderer/types/stylize.d.ts +42 -0
- package/lib/renderer/types/stylize.js +2 -0
- package/lib/renderer/types/text.d.ts +3 -0
- package/lib/renderer/types/text.js +2 -0
- package/lib/renderer/utils/attrs.d.ts +2 -0
- package/lib/renderer/utils/attrs.js +24 -0
- package/lib/renderer/utils/id.d.ts +1 -0
- package/lib/renderer/utils/id.js +6 -0
- package/lib/renderer/utils/index.d.ts +2 -0
- package/lib/renderer/utils/index.js +18 -0
- package/lib/resource/index.d.ts +5 -0
- package/lib/resource/index.js +26 -0
- package/lib/resource/loader.d.ts +6 -0
- package/lib/resource/loader.js +57 -0
- package/lib/resource/loaders/image.d.ts +1 -0
- package/lib/resource/loaders/image.js +73 -0
- package/lib/resource/loaders/index.d.ts +3 -0
- package/lib/resource/loaders/index.js +19 -0
- package/lib/resource/loaders/remote.d.ts +1 -0
- package/lib/resource/loaders/remote.js +38 -0
- package/lib/resource/loaders/svg.d.ts +1 -0
- package/lib/resource/loaders/svg.js +15 -0
- package/lib/resource/registry.d.ts +3 -0
- package/lib/resource/registry.js +11 -0
- package/lib/resource/types/font.d.ts +12 -0
- package/lib/resource/types/font.js +2 -0
- package/lib/resource/types/index.d.ts +1 -0
- package/lib/resource/types/index.js +2 -0
- package/lib/resource/types/resource.d.ts +7 -0
- package/lib/resource/types/resource.js +2 -0
- package/lib/resource/utils/data-uri.d.ts +2 -0
- package/lib/resource/utils/data-uri.js +25 -0
- package/lib/resource/utils/hash.d.ts +1 -0
- package/lib/resource/utils/hash.js +14 -0
- package/lib/resource/utils/index.d.ts +4 -0
- package/lib/resource/utils/index.js +20 -0
- package/lib/resource/utils/parser.d.ts +2 -0
- package/lib/resource/utils/parser.js +9 -0
- package/lib/resource/utils/ref.d.ts +3 -0
- package/lib/resource/utils/ref.js +18 -0
- package/lib/runtime/Infographic.d.ts +15 -0
- package/lib/runtime/Infographic.js +49 -0
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.js +17 -0
- package/lib/templates/built-in.d.ts +1 -0
- package/lib/templates/built-in.js +695 -0
- package/lib/templates/hierarchy-tree.d.ts +2 -0
- package/lib/templates/hierarchy-tree.js +68 -0
- package/lib/templates/index.d.ts +3 -0
- package/lib/templates/index.js +18 -0
- package/lib/templates/registry.d.ts +4 -0
- package/lib/templates/registry.js +15 -0
- package/lib/templates/types.d.ts +3 -0
- package/lib/templates/types.js +2 -0
- package/lib/themes/built-in.d.ts +1 -0
- package/lib/themes/built-in.js +11 -0
- package/lib/themes/generator.d.ts +2 -0
- package/lib/themes/generator.js +86 -0
- package/lib/themes/index.d.ts +4 -0
- package/lib/themes/index.js +21 -0
- package/lib/themes/registry.d.ts +4 -0
- package/lib/themes/registry.js +15 -0
- package/lib/themes/types.d.ts +60 -0
- package/lib/themes/types.js +2 -0
- package/lib/types/attrs.d.ts +53 -0
- package/lib/types/attrs.js +2 -0
- package/lib/types/data.d.ts +17 -0
- package/lib/types/data.js +2 -0
- package/lib/types/element.d.ts +8 -0
- package/lib/types/element.js +2 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.js +2 -0
- package/lib/types/padding.d.ts +2 -0
- package/lib/types/padding.js +2 -0
- package/lib/types/resource.d.ts +6 -0
- package/lib/types/resource.js +2 -0
- package/lib/utils/color.d.ts +2 -0
- package/lib/utils/color.js +23 -0
- package/lib/utils/data.d.ts +5 -0
- package/lib/utils/data.js +22 -0
- package/lib/utils/get-types.d.ts +7 -0
- package/lib/utils/get-types.js +50 -0
- package/lib/utils/icon.d.ts +6 -0
- package/lib/utils/icon.js +40 -0
- package/lib/utils/index.d.ts +11 -0
- package/lib/utils/index.js +27 -0
- package/lib/utils/item.d.ts +30 -0
- package/lib/utils/item.js +53 -0
- package/lib/utils/join.d.ts +1 -0
- package/lib/utils/join.js +9 -0
- package/lib/utils/padding.d.ts +2 -0
- package/lib/utils/padding.js +23 -0
- package/lib/utils/recognizer.d.ts +24 -0
- package/lib/utils/recognizer.js +79 -0
- package/lib/utils/svg.d.ts +8 -0
- package/lib/utils/svg.js +83 -0
- package/lib/utils/text.d.ts +2 -0
- package/lib/utils/text.js +121 -0
- package/lib/utils/uuid.d.ts +1 -0
- package/lib/utils/uuid.js +13 -0
- package/package.json +69 -0
- package/src/constants/element.ts +11 -0
- package/src/constants/index.ts +1 -0
- package/src/designs/components/Btn.tsx +32 -0
- package/src/designs/components/BtnsGroup.tsx +9 -0
- package/src/designs/components/Gap.tsx +17 -0
- package/src/designs/components/Illus.tsx +21 -0
- package/src/designs/components/ItemDesc.tsx +37 -0
- package/src/designs/components/ItemIcon.tsx +53 -0
- package/src/designs/components/ItemLabel.tsx +29 -0
- package/src/designs/components/ItemValue.tsx +37 -0
- package/src/designs/components/ItemsGroup.tsx +9 -0
- package/src/designs/components/Title.tsx +77 -0
- package/src/designs/components/index.ts +10 -0
- package/src/designs/decorations/index.ts +3 -0
- package/src/designs/decorations/simple-arrow.tsx +57 -0
- package/src/designs/decorations/text-3d.tsx +158 -0
- package/src/designs/decorations/triangle.tsx +40 -0
- package/src/designs/defs/DropShadow.tsx +33 -0
- package/src/designs/defs/LinearGradient.tsx +31 -0
- package/src/designs/defs/index.ts +2 -0
- package/src/designs/index.ts +6 -0
- package/src/designs/items/BadgeCard.tsx +165 -0
- package/src/designs/items/CandyCardLite.tsx +88 -0
- package/src/designs/items/CapsuleItem.tsx +148 -0
- package/src/designs/items/CircleNode.tsx +107 -0
- package/src/designs/items/CircularProgress.tsx +106 -0
- package/src/designs/items/CompactCard.tsx +147 -0
- package/src/designs/items/DoneList.tsx +69 -0
- package/src/designs/items/HorizontalIconArrow.tsx +225 -0
- package/src/designs/items/HorizontalIconLine.tsx +152 -0
- package/src/designs/items/IconBadge.tsx +125 -0
- package/src/designs/items/IndexedCard.tsx +210 -0
- package/src/designs/items/LCornerCard.tsx +109 -0
- package/src/designs/items/LetterCard.tsx +187 -0
- package/src/designs/items/PillBadge.tsx +138 -0
- package/src/designs/items/PlainText.tsx +53 -0
- package/src/designs/items/ProgressCard.tsx +198 -0
- package/src/designs/items/QuarterCircular.tsx +284 -0
- package/src/designs/items/QuarterSimpleCard.tsx +210 -0
- package/src/designs/items/RibbonCard.tsx +151 -0
- package/src/designs/items/RoundedRectNode.tsx +79 -0
- package/src/designs/items/SimpleHorizontalArrow.tsx +150 -0
- package/src/designs/items/SimpleIllusItem.tsx +78 -0
- package/src/designs/items/SimpleItem.tsx +336 -0
- package/src/designs/items/SimpleVerticalArrow.tsx +147 -0
- package/src/designs/items/UnderlineText.tsx +126 -0
- package/src/designs/items/VerticalIconArrow.tsx +227 -0
- package/src/designs/items/index.ts +28 -0
- package/src/designs/items/prompt.md +891 -0
- package/src/designs/items/registry.ts +15 -0
- package/src/designs/items/types.ts +28 -0
- package/src/designs/layouts/Align.tsx +104 -0
- package/src/designs/layouts/Flex.tsx +274 -0
- package/src/designs/layouts/index.tsx +2 -0
- package/src/designs/structures/chart-column.tsx +186 -0
- package/src/designs/structures/compare-binary-horizontal/dividers/index.ts +5 -0
- package/src/designs/structures/compare-binary-horizontal/dividers/pros-cons-arrow.tsx +46 -0
- package/src/designs/structures/compare-binary-horizontal/dividers/pros-cons-fold.tsx +68 -0
- package/src/designs/structures/compare-binary-horizontal/dividers/types.ts +26 -0
- package/src/designs/structures/compare-binary-horizontal/dividers/vs.tsx +57 -0
- package/src/designs/structures/compare-binary-horizontal/index.tsx +271 -0
- package/src/designs/structures/compare-hierarchy-left-right.tsx +362 -0
- package/src/designs/structures/compare-hierarchy-row.tsx +220 -0
- package/src/designs/structures/hierarchy-tree.tsx +594 -0
- package/src/designs/structures/index.ts +32 -0
- package/src/designs/structures/list-column.tsx +89 -0
- package/src/designs/structures/list-grid.tsx +118 -0
- package/src/designs/structures/list-pyramid.tsx +132 -0
- package/src/designs/structures/list-row.tsx +90 -0
- package/src/designs/structures/list-sector.tsx +296 -0
- package/src/designs/structures/list-waterfall.tsx +140 -0
- package/src/designs/structures/prompt.md +996 -0
- package/src/designs/structures/quadrant.tsx +241 -0
- package/src/designs/structures/registry.ts +15 -0
- package/src/designs/structures/relation-circle.tsx +150 -0
- package/src/designs/structures/relation-network.tsx +191 -0
- package/src/designs/structures/sequence-ascending-stairs-3d.tsx +241 -0
- package/src/designs/structures/sequence-ascending-steps.tsx +81 -0
- package/src/designs/structures/sequence-circle-arrows.tsx +392 -0
- package/src/designs/structures/sequence-circular.tsx +368 -0
- package/src/designs/structures/sequence-color-snake-steps.tsx +223 -0
- package/src/designs/structures/sequence-cylinders-3d.tsx +804 -0
- package/src/designs/structures/sequence-filter-mesh.tsx +443 -0
- package/src/designs/structures/sequence-horizontal-zigzag.tsx +310 -0
- package/src/designs/structures/sequence-mountain.tsx +567 -0
- package/src/designs/structures/sequence-pyramid.tsx +222 -0
- package/src/designs/structures/sequence-roadmap-vertical.tsx +338 -0
- package/src/designs/structures/sequence-snake-steps.tsx +191 -0
- package/src/designs/structures/sequence-steps.tsx +122 -0
- package/src/designs/structures/sequence-timeline.tsx +189 -0
- package/src/designs/structures/sequence-zigzag-pucks-3d.tsx +261 -0
- package/src/designs/structures/sequence-zigzag-steps.tsx +280 -0
- package/src/designs/structures/types.ts +25 -0
- package/src/designs/title/index.ts +1 -0
- package/src/designs/title/types.ts +4 -0
- package/src/designs/types.ts +27 -0
- package/src/designs/utils/color.ts +53 -0
- package/src/designs/utils/hierarchy-color.ts +127 -0
- package/src/designs/utils/index.ts +3 -0
- package/src/designs/utils/item.ts +66 -0
- package/src/index.ts +13 -0
- package/src/jsx-runtime.ts +1 -0
- package/src/options/index.ts +2 -0
- package/src/options/parser.ts +163 -0
- package/src/options/types.ts +47 -0
- package/src/renderer/composites/background.ts +33 -0
- package/src/renderer/composites/button.ts +99 -0
- package/src/renderer/composites/icon.ts +61 -0
- package/src/renderer/composites/illus.ts +119 -0
- package/src/renderer/composites/index.ts +7 -0
- package/src/renderer/composites/shape.ts +80 -0
- package/src/renderer/composites/svg.ts +12 -0
- package/src/renderer/composites/text.ts +160 -0
- package/src/renderer/constants/data-url.ts +5 -0
- package/src/renderer/constants/index.ts +2 -0
- package/src/renderer/fonts/built-in.ts +41 -0
- package/src/renderer/fonts/index.ts +15 -0
- package/src/renderer/fonts/loader.ts +64 -0
- package/src/renderer/fonts/registry.ts +51 -0
- package/src/renderer/fonts/types.ts +20 -0
- package/src/renderer/fonts/utils.ts +39 -0
- package/src/renderer/index.ts +4 -0
- package/src/renderer/palettes/built-in.ts +86 -0
- package/src/renderer/palettes/index.ts +6 -0
- package/src/renderer/palettes/registry.ts +11 -0
- package/src/renderer/palettes/types.ts +4 -0
- package/src/renderer/palettes/utils.ts +21 -0
- package/src/renderer/renderer.ts +325 -0
- package/src/renderer/stylize/gradient.ts +131 -0
- package/src/renderer/stylize/index.ts +3 -0
- package/src/renderer/stylize/pattern.ts +82 -0
- package/src/renderer/stylize/patterns/diamond.ts +29 -0
- package/src/renderer/stylize/patterns/dot.ts +37 -0
- package/src/renderer/stylize/patterns/hex.ts +29 -0
- package/src/renderer/stylize/patterns/index.ts +6 -0
- package/src/renderer/stylize/patterns/line.ts +46 -0
- package/src/renderer/stylize/patterns/mosaic.ts +45 -0
- package/src/renderer/stylize/patterns/square.ts +29 -0
- package/src/renderer/stylize/rough.ts +149 -0
- package/src/renderer/types/index.ts +3 -0
- package/src/renderer/types/renderer.ts +7 -0
- package/src/renderer/types/stylize.ts +43 -0
- package/src/renderer/types/text.ts +3 -0
- package/src/renderer/utils/attrs.ts +27 -0
- package/src/renderer/utils/id.ts +3 -0
- package/src/renderer/utils/index.ts +2 -0
- package/src/resource/index.ts +5 -0
- package/src/resource/loader.ts +64 -0
- package/src/resource/loaders/image.ts +87 -0
- package/src/resource/loaders/index.ts +3 -0
- package/src/resource/loaders/remote.ts +40 -0
- package/src/resource/loaders/svg.ts +13 -0
- package/src/resource/registry.ts +11 -0
- package/src/resource/types/font.ts +23 -0
- package/src/resource/types/index.ts +1 -0
- package/src/resource/types/resource.ts +9 -0
- package/src/resource/utils/data-uri.ts +26 -0
- package/src/resource/utils/hash.ts +11 -0
- package/src/resource/utils/index.ts +4 -0
- package/src/resource/utils/parser.ts +9 -0
- package/src/resource/utils/ref.ts +15 -0
- package/src/runtime/Infographic.tsx +65 -0
- package/src/runtime/index.ts +1 -0
- package/src/templates/built-in.ts +696 -0
- package/src/templates/hierarchy-tree.ts +70 -0
- package/src/templates/index.ts +3 -0
- package/src/templates/registry.ts +15 -0
- package/src/templates/types.ts +11 -0
- package/src/themes/built-in.ts +10 -0
- package/src/themes/generator.ts +131 -0
- package/src/themes/index.ts +4 -0
- package/src/themes/registry.ts +15 -0
- package/src/themes/types.ts +66 -0
- package/src/types/attrs.ts +56 -0
- package/src/types/data.ts +19 -0
- package/src/types/element.ts +13 -0
- package/src/types/index.ts +5 -0
- package/src/types/padding.ts +3 -0
- package/src/types/resource.ts +8 -0
- package/src/utils/color.ts +21 -0
- package/src/utils/data.ts +21 -0
- package/src/utils/get-types.ts +67 -0
- package/src/utils/icon.ts +51 -0
- package/src/utils/index.ts +11 -0
- package/src/utils/item.ts +56 -0
- package/src/utils/join.ts +6 -0
- package/src/utils/padding.ts +21 -0
- package/src/utils/recognizer.ts +70 -0
- package/src/utils/svg.ts +104 -0
- package/src/utils/text.ts +150 -0
- package/src/utils/uuid.ts +11 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SequenceSnakeSteps = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@antv/infographic-jsx/jsx-runtime");
|
|
5
|
+
const infographic_jsx_1 = require("@antv/infographic-jsx");
|
|
6
|
+
const components_1 = require("../components");
|
|
7
|
+
const decorations_1 = require("../decorations");
|
|
8
|
+
const layouts_1 = require("../layouts");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const registry_1 = require("./registry");
|
|
11
|
+
const SequenceSnakeSteps = (props) => {
|
|
12
|
+
const { Title, Item, data, gap = 40, itemsPerRow = 3, rowGap = 80, options, } = props;
|
|
13
|
+
const { title, desc, items = [] } = data;
|
|
14
|
+
const titleContent = Title ? (0, jsx_runtime_1.jsx)(Title, { title: title, desc: desc }) : null;
|
|
15
|
+
const colorPrimary = (0, utils_1.getColorPrimary)(options);
|
|
16
|
+
const btnBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0] }));
|
|
17
|
+
const itemBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(Item, { indexes: [0], data: data, datum: items[0], positionH: "center" }));
|
|
18
|
+
const btnElements = [];
|
|
19
|
+
const itemElements = [];
|
|
20
|
+
const decorElements = [];
|
|
21
|
+
const arrowWidth = 25;
|
|
22
|
+
const arrowHeight = 25;
|
|
23
|
+
items.forEach((item, index) => {
|
|
24
|
+
const rowIndex = Math.floor(index / itemsPerRow);
|
|
25
|
+
const colIndex = index % itemsPerRow;
|
|
26
|
+
const isReversedRow = rowIndex % 2 === 1;
|
|
27
|
+
const actualColIndex = isReversedRow
|
|
28
|
+
? itemsPerRow - 1 - colIndex
|
|
29
|
+
: colIndex;
|
|
30
|
+
const itemX = actualColIndex * (itemBounds.width + gap);
|
|
31
|
+
const itemY = rowIndex * (itemBounds.height + rowGap);
|
|
32
|
+
const indexes = [index];
|
|
33
|
+
itemElements.push((0, jsx_runtime_1.jsx)(Item, { indexes: indexes, datum: item, data: data, x: itemX, y: itemY, positionH: "center" }));
|
|
34
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnRemove, { indexes: indexes, x: itemX + (itemBounds.width - btnBounds.width) / 2, y: itemY + itemBounds.height + 10 }));
|
|
35
|
+
if (index === 0) {
|
|
36
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: indexes, x: itemX + (itemBounds.width - btnBounds.width) / 2, y: itemY - btnBounds.height - 10 }));
|
|
37
|
+
}
|
|
38
|
+
if (index < items.length - 1) {
|
|
39
|
+
const nextRowIndex = Math.floor((index + 1) / itemsPerRow);
|
|
40
|
+
const nextColIndex = (index + 1) % itemsPerRow;
|
|
41
|
+
const isNextReversedRow = nextRowIndex % 2 === 1;
|
|
42
|
+
const nextActualColIndex = isNextReversedRow
|
|
43
|
+
? itemsPerRow - 1 - nextColIndex
|
|
44
|
+
: nextColIndex;
|
|
45
|
+
const nextItemX = nextActualColIndex * (itemBounds.width + gap);
|
|
46
|
+
const isSameRow = rowIndex === nextRowIndex;
|
|
47
|
+
if (isSameRow) {
|
|
48
|
+
const isRightToLeft = isReversedRow;
|
|
49
|
+
const arrowX = isRightToLeft
|
|
50
|
+
? nextItemX + itemBounds.width + (gap - arrowWidth) / 2
|
|
51
|
+
: itemX + itemBounds.width + (gap - arrowWidth) / 2;
|
|
52
|
+
const arrowY = itemY + itemBounds.height / 2 - arrowHeight / 2;
|
|
53
|
+
decorElements.push((0, jsx_runtime_1.jsx)(decorations_1.SimpleArrow, { x: arrowX, y: arrowY, width: arrowWidth, height: arrowHeight, colorPrimary: colorPrimary, rotation: isRightToLeft ? 180 : 0 }));
|
|
54
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [index + 1], x: arrowX + (arrowWidth - btnBounds.width) / 2, y: itemY - btnBounds.height - 10 }));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
const turnArrowX = itemX + itemBounds.width / 2 - arrowWidth / 2;
|
|
58
|
+
const turnArrowY = itemY + itemBounds.height + (rowGap - arrowHeight) / 2;
|
|
59
|
+
decorElements.push((0, jsx_runtime_1.jsx)(decorations_1.SimpleArrow, { x: turnArrowX, y: turnArrowY, width: arrowWidth, height: arrowHeight, colorPrimary: colorPrimary, rotation: 90 }));
|
|
60
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [index + 1], x: turnArrowX + (arrowWidth - btnBounds.width) / 2, y: turnArrowY + (arrowHeight - btnBounds.height) / 2 }));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
if (items.length > 0) {
|
|
65
|
+
const lastIndex = items.length - 1;
|
|
66
|
+
const lastRowIndex = Math.floor(lastIndex / itemsPerRow);
|
|
67
|
+
const lastColIndex = lastIndex % itemsPerRow;
|
|
68
|
+
const isLastReversedRow = lastRowIndex % 2 === 1;
|
|
69
|
+
const lastActualColIndex = isLastReversedRow
|
|
70
|
+
? itemsPerRow - 1 - lastColIndex
|
|
71
|
+
: lastColIndex;
|
|
72
|
+
const lastItemX = lastActualColIndex * (itemBounds.width + gap);
|
|
73
|
+
const lastItemY = lastRowIndex * (itemBounds.height + rowGap);
|
|
74
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [items.length], x: lastItemX + (itemBounds.width - btnBounds.width) / 2, y: lastItemY + itemBounds.height + btnBounds.height + 20 }));
|
|
75
|
+
}
|
|
76
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", children: [titleContent, (0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: decorElements }), (0, jsx_runtime_1.jsx)(components_1.ItemsGroup, { children: itemElements }), (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnElements })] })] }));
|
|
77
|
+
};
|
|
78
|
+
exports.SequenceSnakeSteps = SequenceSnakeSteps;
|
|
79
|
+
(0, registry_1.registerStructure)('sequence-snake-steps', {
|
|
80
|
+
component: exports.SequenceSnakeSteps,
|
|
81
|
+
composites: ['title', 'item'],
|
|
82
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @jsxImportSource @antv/infographic-jsx */
|
|
2
|
+
import type { ComponentType } from '@antv/infographic-jsx';
|
|
3
|
+
import type { BaseStructureProps } from './types';
|
|
4
|
+
export interface SequenceStepsProps extends BaseStructureProps {
|
|
5
|
+
gap?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const SequenceSteps: ComponentType<SequenceStepsProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SequenceSteps = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@antv/infographic-jsx/jsx-runtime");
|
|
5
|
+
const infographic_jsx_1 = require("@antv/infographic-jsx");
|
|
6
|
+
const components_1 = require("../components");
|
|
7
|
+
const decorations_1 = require("../decorations");
|
|
8
|
+
const layouts_1 = require("../layouts");
|
|
9
|
+
const utils_1 = require("../utils");
|
|
10
|
+
const registry_1 = require("./registry");
|
|
11
|
+
const SequenceSteps = (props) => {
|
|
12
|
+
const { Title, Item, data, gap = 40, options } = props;
|
|
13
|
+
const { title, desc, items = [] } = data;
|
|
14
|
+
const titleContent = Title ? (0, jsx_runtime_1.jsx)(Title, { title: title, desc: desc }) : null;
|
|
15
|
+
const colorPrimary = (0, utils_1.getColorPrimary)(options);
|
|
16
|
+
const btnBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0] }));
|
|
17
|
+
const itemBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(Item, { indexes: [0], data: data, datum: items[0], positionH: "center" }));
|
|
18
|
+
const btnElements = [];
|
|
19
|
+
const itemElements = [];
|
|
20
|
+
const decorElements = [];
|
|
21
|
+
const arrowWidth = 25;
|
|
22
|
+
const arrowHeight = 25;
|
|
23
|
+
const topMargin = Math.max(btnBounds.height + 20, 30);
|
|
24
|
+
items.forEach((item, index) => {
|
|
25
|
+
const itemX = index * (itemBounds.width + gap);
|
|
26
|
+
const indexes = [index];
|
|
27
|
+
itemElements.push((0, jsx_runtime_1.jsx)(Item, { indexes: indexes, datum: item, data: data, x: itemX, y: topMargin, positionH: "center" }));
|
|
28
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnRemove, { indexes: indexes, x: itemX + (itemBounds.width - btnBounds.width) / 2, y: topMargin + itemBounds.height + 10 }));
|
|
29
|
+
if (index === 0) {
|
|
30
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: indexes, x: itemX + (itemBounds.width - btnBounds.width) / 2, y: topMargin - btnBounds.height - 10 }));
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: indexes, x: itemX - gap / 2 - btnBounds.width / 2, y: topMargin - btnBounds.height - 10 }));
|
|
34
|
+
}
|
|
35
|
+
if (index < items.length - 1) {
|
|
36
|
+
const arrowX = itemX + itemBounds.width + (gap - arrowWidth) / 2;
|
|
37
|
+
const arrowY = topMargin + itemBounds.height / 2 - arrowHeight / 2;
|
|
38
|
+
decorElements.push((0, jsx_runtime_1.jsx)(decorations_1.SimpleArrow, { x: arrowX, y: arrowY, width: arrowWidth, height: arrowHeight, colorPrimary: colorPrimary }));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
if (items.length > 0) {
|
|
42
|
+
const lastItemX = (items.length - 1) * (itemBounds.width + gap);
|
|
43
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [items.length], x: lastItemX + itemBounds.width + (gap - btnBounds.width) / 2, y: topMargin - btnBounds.height - 10 }));
|
|
44
|
+
}
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", children: [titleContent, (0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: decorElements }), (0, jsx_runtime_1.jsx)(components_1.ItemsGroup, { children: itemElements }), (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnElements })] })] }));
|
|
46
|
+
};
|
|
47
|
+
exports.SequenceSteps = SequenceSteps;
|
|
48
|
+
(0, registry_1.registerStructure)('sequence-steps', {
|
|
49
|
+
component: exports.SequenceSteps,
|
|
50
|
+
composites: ['title', 'item'],
|
|
51
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @jsxImportSource @antv/infographic-jsx */
|
|
2
|
+
import type { ComponentType } from '@antv/infographic-jsx';
|
|
3
|
+
import type { BaseStructureProps } from './types';
|
|
4
|
+
export interface SequenceTimelineProps extends BaseStructureProps {
|
|
5
|
+
gap?: number;
|
|
6
|
+
lineOffset?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const SequenceTimeline: ComponentType<SequenceTimelineProps>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SequenceTimeline = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@antv/infographic-jsx/jsx-runtime");
|
|
5
|
+
const infographic_jsx_1 = require("@antv/infographic-jsx");
|
|
6
|
+
const components_1 = require("../components");
|
|
7
|
+
const layouts_1 = require("../layouts");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const registry_1 = require("./registry");
|
|
10
|
+
const SequenceTimeline = (props) => {
|
|
11
|
+
const { Title, Item, data, gap = 10, options } = props;
|
|
12
|
+
const { title, desc, items = [] } = data;
|
|
13
|
+
const titleContent = Title ? (0, jsx_runtime_1.jsx)(Title, { title: title, desc: desc }) : null;
|
|
14
|
+
const colorPrimary = (0, utils_1.getColorPrimary)(options);
|
|
15
|
+
const palette = (0, utils_1.getPaletteColors)(options);
|
|
16
|
+
const btnBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0] }));
|
|
17
|
+
const itemBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(Item, { indexes: [0], data: data, datum: items[0], positionH: "normal" }));
|
|
18
|
+
const btnElements = [];
|
|
19
|
+
const itemElements = [];
|
|
20
|
+
const decorElements = [];
|
|
21
|
+
const stepLabelX = 10;
|
|
22
|
+
const timelineX = stepLabelX + 70 + 10;
|
|
23
|
+
const itemX = timelineX + 30;
|
|
24
|
+
const nodeRadius = 6;
|
|
25
|
+
// Add continuous timeline line first (so it appears behind the dots)
|
|
26
|
+
if (items.length > 1) {
|
|
27
|
+
const firstNodeY = itemBounds.height / 2 + nodeRadius;
|
|
28
|
+
const lastNodeY = (items.length - 1) * (itemBounds.height + gap) +
|
|
29
|
+
itemBounds.height / 2 -
|
|
30
|
+
nodeRadius;
|
|
31
|
+
const continuousLinePath = `M ${timelineX} ${firstNodeY} L ${timelineX} ${lastNodeY}`;
|
|
32
|
+
const linearGradientId = 'gradient-timeline-line';
|
|
33
|
+
const totalHeight = lastNodeY - firstNodeY;
|
|
34
|
+
// Generate gradient stops for each item
|
|
35
|
+
const gradientStops = items.map((_, index) => {
|
|
36
|
+
const nodeY = index * (itemBounds.height + gap) + itemBounds.height / 2;
|
|
37
|
+
const offset = ((nodeY - firstNodeY) / totalHeight) * 100;
|
|
38
|
+
const color = (0, utils_1.getPaletteColor)(options, [index]);
|
|
39
|
+
return (0, jsx_runtime_1.jsx)("stop", { offset: `${offset}%`, stopColor: color || colorPrimary });
|
|
40
|
+
});
|
|
41
|
+
decorElements.push((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Defs, { children: (0, jsx_runtime_1.jsx)("linearGradient", { id: linearGradientId, x1: timelineX, y1: firstNodeY, x2: timelineX, y2: lastNodeY, gradientUnits: "userSpaceOnUse", children: gradientStops }) }), (0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: continuousLinePath, stroke: `url(#${linearGradientId})`, strokeWidth: 2, width: 1, height: lastNodeY - firstNodeY })] }));
|
|
42
|
+
}
|
|
43
|
+
items.forEach((item, index) => {
|
|
44
|
+
const itemY = index * (itemBounds.height + gap);
|
|
45
|
+
const nodeY = itemY + itemBounds.height / 2;
|
|
46
|
+
const indexes = [index];
|
|
47
|
+
decorElements.push((0, jsx_runtime_1.jsx)(infographic_jsx_1.Text, { x: stepLabelX, y: nodeY, width: 70, fontSize: 18, fontWeight: "bold", alignHorizontal: "left", alignVertical: "center", fill: palette[index % palette.length], children: `STEP ${index + 1}` }));
|
|
48
|
+
itemElements.push((0, jsx_runtime_1.jsx)(Item, { indexes: indexes, datum: item, data: data, x: itemX, y: itemY, positionH: "normal" }));
|
|
49
|
+
decorElements.push((0, jsx_runtime_1.jsx)(infographic_jsx_1.Ellipse, { x: timelineX - nodeRadius, y: nodeY - nodeRadius, width: nodeRadius * 2, height: nodeRadius * 2, fill: palette[index % palette.length] }));
|
|
50
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnRemove, { indexes: indexes, x: itemX - btnBounds.width - 10, y: itemY + (itemBounds.height - btnBounds.height) / 2 }));
|
|
51
|
+
if (index === 0) {
|
|
52
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: indexes, x: itemX + (itemBounds.width - btnBounds.width) / 2, y: itemY - btnBounds.height - 10 }));
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: indexes, x: itemX + (itemBounds.width - btnBounds.width) / 2, y: itemY - gap / 2 - btnBounds.height / 2 }));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
if (items.length > 0) {
|
|
59
|
+
const lastItemY = (items.length - 1) * (itemBounds.height + gap);
|
|
60
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [items.length], x: itemX + (itemBounds.width - btnBounds.width) / 2, y: lastItemY + itemBounds.height + 10 }));
|
|
61
|
+
}
|
|
62
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", children: [titleContent, (0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: decorElements }), (0, jsx_runtime_1.jsx)(components_1.ItemsGroup, { children: itemElements }), (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnElements })] })] }));
|
|
63
|
+
};
|
|
64
|
+
exports.SequenceTimeline = SequenceTimeline;
|
|
65
|
+
(0, registry_1.registerStructure)('sequence-timeline', {
|
|
66
|
+
component: exports.SequenceTimeline,
|
|
67
|
+
composites: ['title', 'item'],
|
|
68
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @jsxImportSource @antv/infographic-jsx */
|
|
2
|
+
import type { ComponentType } from '@antv/infographic-jsx';
|
|
3
|
+
import type { BaseStructureProps } from './types';
|
|
4
|
+
export interface SequenceZigzagPucks3dProps extends BaseStructureProps {
|
|
5
|
+
gap?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const SequenceZigzagPucks3d: ComponentType<SequenceZigzagPucks3dProps>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SequenceZigzagPucks3d = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@antv/infographic-jsx/jsx-runtime");
|
|
5
|
+
const infographic_jsx_1 = require("@antv/infographic-jsx");
|
|
6
|
+
const components_1 = require("../components");
|
|
7
|
+
const layouts_1 = require("../layouts");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const registry_1 = require("./registry");
|
|
10
|
+
const PUCK_WIDTH = 120;
|
|
11
|
+
const PUCK_HEIGHT = 108;
|
|
12
|
+
const ITEM_TO_PUCK_GAP = 30;
|
|
13
|
+
const PUCK_TOP_PATH = 'M0 34.4903C0 37.8781 0.849901 41.1522 2.43491 44.2451C4.23514 47.7639 6.98606 51.0482 10.5164 54.0008C21.3317 63.0477 39.4607 68.9799 59.9998 68.9799C80.5391 68.9799 98.6691 63.0477 109.483 54.0008C113.013 51.0482 115.765 47.7639 117.564 44.2451C119.149 41.1522 120 37.8781 120 34.4903C120 15.4417 93.1366 0 59.9998 0C26.8632 0 0 15.4417 0 34.4903Z';
|
|
14
|
+
const PUCK_MIDDLE_PATH = 'M0 34.4904V53.9996C0 57.3885 0.849901 60.6616 2.43491 63.7555C9.75384 78.0548 32.7566 88.4909 59.9998 88.4909C87.2438 88.4909 110.246 78.0548 117.564 63.7555C119.149 60.6616 120 57.3885 120 53.9996V34.4904C120 37.8781 119.149 41.1522 117.564 44.2451C115.765 47.7639 113.013 51.0482 109.483 54.0008C98.6691 63.0477 80.5391 68.9799 59.9998 68.9799C39.4607 68.9799 21.3317 63.0477 10.5164 54.0008C6.98606 51.0482 4.23514 47.7639 2.43491 44.2451C0.849901 41.1522 0 37.8781 0 34.4904Z';
|
|
15
|
+
const PUCK_BOTTOM_PATH = 'M0 53.9996V73.5106C0 92.5595 26.8632 108 59.9998 108C93.1366 108 120 92.5595 120 73.5106V53.9996C120 57.3885 119.149 60.6616 117.564 63.7555C110.246 78.0548 87.2438 88.4909 59.9998 88.4909C32.7566 88.4909 9.75384 78.0548 2.43491 63.7555C0.849901 60.6616 0 57.3885 0 53.9996Z';
|
|
16
|
+
const DropShadowFilter = ((0, jsx_runtime_1.jsxs)("filter", { id: "sequence-zigzag-pucks-3d-shadow-filter", x: "-50%", y: "-50%", width: "200%", height: "200%", filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB", children: [(0, jsx_runtime_1.jsx)("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }), (0, jsx_runtime_1.jsx)("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), (0, jsx_runtime_1.jsx)("feOffset", { dx: "-7", dy: "7" }), (0, jsx_runtime_1.jsx)("feGaussianBlur", { stdDeviation: "7.5" }), (0, jsx_runtime_1.jsx)("feComposite", { in2: "hardAlpha", operator: "out" }), (0, jsx_runtime_1.jsx)("feColorMatrix", { type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow" }), (0, jsx_runtime_1.jsx)("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow", result: "shape" })] }));
|
|
17
|
+
const SequenceZigzagPucks3d = (props) => {
|
|
18
|
+
const { Title, Item, data, options, gap = 80 } = props;
|
|
19
|
+
const puckWidth = PUCK_WIDTH;
|
|
20
|
+
const puckHeight = PUCK_HEIGHT;
|
|
21
|
+
const { title, desc, items = [] } = data;
|
|
22
|
+
const titleContent = Title ? (0, jsx_runtime_1.jsx)(Title, { title: title, desc: desc }) : null;
|
|
23
|
+
const colorPrimary = (0, utils_1.getColorPrimary)(options);
|
|
24
|
+
if (items.length === 0) {
|
|
25
|
+
const btnAddElement = (0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0], x: 0, y: 0 });
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Defs, { children: DropShadowFilter }), titleContent, (0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnAddElement }) })] }));
|
|
27
|
+
}
|
|
28
|
+
const itemBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(Item, { indexes: [0], data: data, datum: items[0], positionH: "center" }));
|
|
29
|
+
const btnBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0] }));
|
|
30
|
+
const btnElements = [];
|
|
31
|
+
const itemElements = [];
|
|
32
|
+
const puckElements = [];
|
|
33
|
+
let minY = Infinity;
|
|
34
|
+
let maxY = -Infinity;
|
|
35
|
+
const itemHeight = itemBounds.height + ITEM_TO_PUCK_GAP + puckHeight;
|
|
36
|
+
items.forEach((item, index) => {
|
|
37
|
+
const indexes = [index];
|
|
38
|
+
const currentColor = (0, utils_1.getPaletteColor)(options, indexes);
|
|
39
|
+
const isEven = index % 2 === 0;
|
|
40
|
+
const puckX = index * (puckWidth + gap);
|
|
41
|
+
const puckY = isEven ? 0 : itemBounds.height + ITEM_TO_PUCK_GAP;
|
|
42
|
+
minY = Math.min(minY, puckY);
|
|
43
|
+
const gradientId1 = `puck-gradient-middle-${index}`;
|
|
44
|
+
const gradientId2 = `puck-gradient-bottom-${index}`;
|
|
45
|
+
puckElements.push((0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { x: puckX, y: puckY, id: `puck-${index}`, width: puckWidth, height: puckHeight, filter: "url(#sequence-zigzag-pucks-3d-shadow-filter)", children: [(0, jsx_runtime_1.jsxs)(infographic_jsx_1.Defs, { children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: gradientId1, x1: "115", y1: "55.9991", x2: "15.0002", y2: "55.9991", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "0", stopColor: currentColor || colorPrimary }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: currentColor || colorPrimary, stopOpacity: "0.6" })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: gradientId2, x1: "115", y1: "72.1803", x2: "15.0002", y2: "72.1803", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { offset: "0", stopColor: "#F4F4FB" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#8E8C90" })] })] }), (0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { width: PUCK_WIDTH, height: PUCK_HEIGHT, children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: PUCK_TOP_PATH, fill: currentColor || colorPrimary }), (0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: PUCK_MIDDLE_PATH, fill: `url(#${gradientId1})` }), (0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: PUCK_BOTTOM_PATH, fill: `url(#${gradientId2})` }), (0, jsx_runtime_1.jsx)("text", { x: 65, y: 40, width: 50, height: 50, fontSize: 40, fontWeight: "bold", fill: "#FFFFFF", textAnchor: "middle", dominantBaseline: "middle", transform: "rotate(-15 65 40) scale(1, 0.8)", children: index + 1 })] })] }));
|
|
46
|
+
const itemX = puckX + (puckWidth - itemBounds.width) / 2;
|
|
47
|
+
const itemY = isEven
|
|
48
|
+
? puckY + puckHeight + ITEM_TO_PUCK_GAP
|
|
49
|
+
: puckY - ITEM_TO_PUCK_GAP - itemBounds.height;
|
|
50
|
+
maxY = Math.max(maxY, itemY + itemBounds.height);
|
|
51
|
+
itemElements.push((0, jsx_runtime_1.jsx)(Item, { indexes: indexes, datum: item, data: data, x: itemX, y: itemY, positionH: "center" }));
|
|
52
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnRemove, { indexes: indexes, x: itemX + itemBounds.width - btnBounds.width / 2, y: itemY + itemBounds.height - btnBounds.height / 2 }));
|
|
53
|
+
if (index === 0) {
|
|
54
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0], x: puckX + puckWidth / 2 - btnBounds.width / 2 - (gap + puckWidth) / 2, y: puckY + puckHeight / 2 - btnBounds.height / 2 }));
|
|
55
|
+
}
|
|
56
|
+
if (index < items.length - 1) {
|
|
57
|
+
const nextIsEven = (index + 1) % 2 === 0;
|
|
58
|
+
const nextPuckY = nextIsEven ? 0 : itemHeight;
|
|
59
|
+
const btnAddX = puckX + puckWidth + gap / 2 - btnBounds.width / 2;
|
|
60
|
+
const btnAddY = (puckY + puckHeight / 2 + nextPuckY + puckHeight / 2) / 2 -
|
|
61
|
+
btnBounds.height / 2;
|
|
62
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [index + 1], x: btnAddX, y: btnAddY }));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [items.length], x: puckX + puckWidth + gap / 2 - btnBounds.width / 2, y: puckY + puckHeight / 2 - btnBounds.height / 2 }));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", gap: 30, children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Defs, { children: DropShadowFilter }), titleContent, (0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { x: 0, y: 0, children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: puckElements }), (0, jsx_runtime_1.jsx)(components_1.ItemsGroup, { children: itemElements }), (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnElements })] })] }));
|
|
69
|
+
};
|
|
70
|
+
exports.SequenceZigzagPucks3d = SequenceZigzagPucks3d;
|
|
71
|
+
(0, registry_1.registerStructure)('sequence-zigzag-pucks-3d', {
|
|
72
|
+
component: exports.SequenceZigzagPucks3d,
|
|
73
|
+
composites: ['title', 'item'],
|
|
74
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @jsxImportSource @antv/infographic-jsx */
|
|
2
|
+
import type { ComponentType } from '@antv/infographic-jsx';
|
|
3
|
+
import type { BaseStructureProps } from './types';
|
|
4
|
+
export interface SequenceZigzagStepsProps extends BaseStructureProps {
|
|
5
|
+
dx?: number;
|
|
6
|
+
dy?: number;
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const SequenceZigzagSteps: ComponentType<SequenceZigzagStepsProps>;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SequenceZigzagSteps = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@antv/infographic-jsx/jsx-runtime");
|
|
5
|
+
const infographic_jsx_1 = require("@antv/infographic-jsx");
|
|
6
|
+
const components_1 = require("../components");
|
|
7
|
+
const layouts_1 = require("../layouts");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
|
+
const registry_1 = require("./registry");
|
|
10
|
+
// W 型路径参数
|
|
11
|
+
const DX = 240;
|
|
12
|
+
const DY = 130;
|
|
13
|
+
const ITEM_TO_PATH_GAP = 105;
|
|
14
|
+
// W 型路径宽度
|
|
15
|
+
const W_PATH_W = 12;
|
|
16
|
+
// 光晕尺寸 (Ellipse W/H)
|
|
17
|
+
const GLOW_W = 120; // 椭圆宽度 (水平对角线)
|
|
18
|
+
const GLOW_H = 50; // 椭圆高度 (垂直对角线)
|
|
19
|
+
const GLOW_OPACITY = 0.6; // 控制光晕的透明度,实现颜色调淡
|
|
20
|
+
// 原始装饰性 Path 的 D 属性
|
|
21
|
+
const DECO_PATH_1 = 'M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z';
|
|
22
|
+
const DECO_PATH_2 = 'M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z';
|
|
23
|
+
// 装饰元素的偏移量 - 改为正值
|
|
24
|
+
const DECO_OFFSET_X = 70 + W_PATH_W / 2;
|
|
25
|
+
const DECO_OFFSET_Y = 40 + W_PATH_W / 2;
|
|
26
|
+
// 滤镜定义
|
|
27
|
+
const GlowFilter = ((0, jsx_runtime_1.jsx)("filter", { id: "sequence-zigzag-glow-filter", x: "-50%", y: "-50%", width: "200%", height: "200%", children: (0, jsx_runtime_1.jsx)("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "15", result: "blur" }) }));
|
|
28
|
+
const SequenceZigzagSteps = (props) => {
|
|
29
|
+
const { Title, Item, data, options, dx = DX, dy = DY, iconSize = 30 } = props;
|
|
30
|
+
const { title, desc, items = [] } = data;
|
|
31
|
+
const titleContent = Title ? (0, jsx_runtime_1.jsx)(Title, { title: title, desc: desc }) : null;
|
|
32
|
+
const colorPrimary = (0, utils_1.getColorPrimary)(options);
|
|
33
|
+
if (items.length === 0) {
|
|
34
|
+
const btnAddElement = (0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0], x: 0, y: 0 });
|
|
35
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Defs, { children: GlowFilter }), titleContent, (0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnAddElement }) })] }));
|
|
36
|
+
}
|
|
37
|
+
const itemBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(Item, { indexes: [0], data: data, datum: items[0] }));
|
|
38
|
+
const btnBounds = (0, infographic_jsx_1.getElementBounds)((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [0] }));
|
|
39
|
+
const btnElements = [];
|
|
40
|
+
const itemElements = [];
|
|
41
|
+
const pathElements = [];
|
|
42
|
+
const decoElements = [];
|
|
43
|
+
const iconElements = [];
|
|
44
|
+
let currentX = 0;
|
|
45
|
+
let currentY = 0;
|
|
46
|
+
let pathD = '';
|
|
47
|
+
let minPathY = Infinity;
|
|
48
|
+
let maxItemY = -Infinity;
|
|
49
|
+
let minDecoX = Infinity;
|
|
50
|
+
let minDecoY = Infinity;
|
|
51
|
+
const pathPoints = [];
|
|
52
|
+
// Pass 1: 计算路径点和装饰元素的边界
|
|
53
|
+
items.forEach((item, index) => {
|
|
54
|
+
const cx = currentX;
|
|
55
|
+
const cy = currentY;
|
|
56
|
+
pathPoints.push({ x: cx, y: cy });
|
|
57
|
+
minPathY = Math.min(minPathY, cy);
|
|
58
|
+
// 计算装饰元素的位置
|
|
59
|
+
const decoX = cx - DECO_OFFSET_X;
|
|
60
|
+
const decoY = cy - DECO_OFFSET_Y;
|
|
61
|
+
minDecoX = Math.min(minDecoX, decoX);
|
|
62
|
+
minDecoY = Math.min(minDecoY, decoY);
|
|
63
|
+
const isPeak = index % 2 === 0;
|
|
64
|
+
if (index < items.length - 1) {
|
|
65
|
+
currentX += dx;
|
|
66
|
+
currentY = isPeak ? currentY + dy : currentY - dy;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
// 计算偏移量以确保所有元素都在正坐标
|
|
70
|
+
const offsetX = Math.max(0, -minDecoX);
|
|
71
|
+
const offsetY = Math.max(0, -minDecoY);
|
|
72
|
+
currentX = 0;
|
|
73
|
+
currentY = 0;
|
|
74
|
+
// Pass 2: 放置元素,应用偏移量
|
|
75
|
+
items.forEach((item, index) => {
|
|
76
|
+
const indexes = [index];
|
|
77
|
+
const pathPoint = pathPoints[index];
|
|
78
|
+
const cx = pathPoint.x + offsetX;
|
|
79
|
+
const cy = pathPoint.y + offsetY;
|
|
80
|
+
const currentColor = (0, utils_1.getPaletteColor)(options, indexes);
|
|
81
|
+
// 装饰元素 - 确保坐标为正值
|
|
82
|
+
const decoX = Math.max(0, cx - DECO_OFFSET_X);
|
|
83
|
+
const decoY = Math.max(0, cy - DECO_OFFSET_Y);
|
|
84
|
+
const glowX = 10;
|
|
85
|
+
const glowY = GLOW_H + 10;
|
|
86
|
+
const { colorPrimaryBg } = (0, utils_1.getThemeColors)({
|
|
87
|
+
colorPrimary: currentColor,
|
|
88
|
+
});
|
|
89
|
+
decoElements.push((0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { x: decoX, y: decoY, id: `deco-group-${index}`, width: 140, height: 110, children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Ellipse, { x: glowX, y: glowY, width: GLOW_W, height: GLOW_H, fill: currentColor || colorPrimary, filter: "url(#sequence-zigzag-glow-filter)", opacity: GLOW_OPACITY }), (0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: DECO_PATH_1, fill: currentColor || colorPrimary }), (0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: DECO_PATH_2, fill: '#fff' }), (0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: DECO_PATH_2, fill: colorPrimaryBg || colorPrimaryBg })] }));
|
|
90
|
+
// Icon 元素
|
|
91
|
+
if (item.icon) {
|
|
92
|
+
const iconX = Math.max(0, cx - iconSize / 2 - W_PATH_W / 2);
|
|
93
|
+
const iconY = Math.max(0, cy - iconSize / 2 - W_PATH_W / 2);
|
|
94
|
+
iconElements.push((0, jsx_runtime_1.jsx)(components_1.ItemIcon, { x: iconX, y: iconY, size: iconSize, indexes: indexes, fill: currentColor }));
|
|
95
|
+
}
|
|
96
|
+
// Item 元素和按钮
|
|
97
|
+
const itemX = cx - itemBounds.width / 2 - W_PATH_W / 2;
|
|
98
|
+
const itemY = Math.max(0, cy + ITEM_TO_PATH_GAP - W_PATH_W / 2);
|
|
99
|
+
maxItemY = Math.max(maxItemY, itemY + itemBounds.height);
|
|
100
|
+
if (index === 0) {
|
|
101
|
+
pathD = `M ${cx} ${cy}`;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
pathD += ` L ${cx} ${cy}`;
|
|
105
|
+
}
|
|
106
|
+
itemElements.push((0, jsx_runtime_1.jsx)(Item, { indexes: indexes, datum: item, data: data, x: itemX, y: itemY }));
|
|
107
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnRemove, { indexes: indexes, x: Math.max(0, itemX + itemBounds.width - btnBounds.width / 2), y: Math.max(0, itemY + itemBounds.height - btnBounds.height / 2) }));
|
|
108
|
+
if (index < items.length - 1) {
|
|
109
|
+
const nextPoint = pathPoints[index + 1];
|
|
110
|
+
const nextCx = nextPoint.x + offsetX;
|
|
111
|
+
const nextCy = nextPoint.y + offsetY;
|
|
112
|
+
const btnAddX = Math.max(0, cx + (nextCx - cx) / 2 - btnBounds.width / 2);
|
|
113
|
+
const btnAddY = Math.max(0, cy + (nextCy - cy) / 2 - btnBounds.height / 2);
|
|
114
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [index + 1], x: btnAddX, y: btnAddY }));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
btnElements.push((0, jsx_runtime_1.jsx)(components_1.BtnAdd, { indexes: [items.length], x: Math.max(0, itemX + itemBounds.width + dx / 4), y: Math.max(0, itemY + itemBounds.height / 2 - btnBounds.height / 2) }));
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
if (pathD) {
|
|
121
|
+
const finalX = (pathPoints[pathPoints.length - 1]?.x || 0) + offsetX;
|
|
122
|
+
pathElements.push((0, jsx_runtime_1.jsx)(infographic_jsx_1.Path, { d: pathD, stroke: "#f3f2f1", strokeWidth: W_PATH_W, fill: "none", width: finalX, height: maxItemY - Math.min(minPathY + offsetY, 0) }));
|
|
123
|
+
}
|
|
124
|
+
return ((0, jsx_runtime_1.jsxs)(layouts_1.FlexLayout, { id: "infographic-container", flexDirection: "column", justifyContent: "center", alignItems: "center", gap: 30, children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Defs, { children: GlowFilter }), titleContent, (0, jsx_runtime_1.jsxs)(infographic_jsx_1.Group, { x: 0, y: 0, children: [(0, jsx_runtime_1.jsx)(infographic_jsx_1.Group, { children: [...pathElements, ...decoElements, ...iconElements] }), (0, jsx_runtime_1.jsx)(components_1.ItemsGroup, { children: itemElements }), (0, jsx_runtime_1.jsx)(components_1.BtnsGroup, { children: btnElements })] })] }));
|
|
125
|
+
};
|
|
126
|
+
exports.SequenceZigzagSteps = SequenceZigzagSteps;
|
|
127
|
+
(0, registry_1.registerStructure)('sequence-zigzag-steps', {
|
|
128
|
+
component: exports.SequenceZigzagSteps,
|
|
129
|
+
composites: ['title', 'item'],
|
|
130
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentType } from '@antv/infographic-jsx';
|
|
2
|
+
import type { ParsedInfographicOptions } from '../../options';
|
|
3
|
+
import type { Data } from '../../types';
|
|
4
|
+
import { TitleProps } from '../components';
|
|
5
|
+
import type { BaseItemProps } from '../items';
|
|
6
|
+
export interface BaseStructureProps {
|
|
7
|
+
Title?: ComponentType<Pick<TitleProps, 'title' | 'desc'>>;
|
|
8
|
+
Item: ComponentType<Omit<BaseItemProps, 'themeColors'> & Partial<Pick<BaseItemProps, 'themeColors'>>>;
|
|
9
|
+
Items: ComponentType<Omit<BaseItemProps, 'themeColors'>>[];
|
|
10
|
+
data: Data;
|
|
11
|
+
options: ParsedInfographicOptions;
|
|
12
|
+
}
|
|
13
|
+
export interface Structure {
|
|
14
|
+
component: ComponentType<BaseStructureProps>;
|
|
15
|
+
composites: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface StructureOptions {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './types';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComponentType } from '@antv/infographic-jsx';
|
|
2
|
+
import type { Item, ItemOptions } from './items';
|
|
3
|
+
import type { Structure, StructureOptions } from './structures';
|
|
4
|
+
import { TitleOptions } from './title';
|
|
5
|
+
export interface DesignOptions {
|
|
6
|
+
/** 结构 */
|
|
7
|
+
structure?: string | WithType<StructureOptions>;
|
|
8
|
+
/** 标题 */
|
|
9
|
+
title?: string | WithType<TitleOptions>;
|
|
10
|
+
/** 数据项 */
|
|
11
|
+
item?: string | WithType<ItemOptions>;
|
|
12
|
+
/** 针对层级布局,不同层级使用不同 item */
|
|
13
|
+
items?: (string | WithType<ItemOptions>)[];
|
|
14
|
+
}
|
|
15
|
+
export interface ParsedDesignsOptions {
|
|
16
|
+
structure: WithProps<Structure>;
|
|
17
|
+
title: {
|
|
18
|
+
component: ComponentType<any> | null;
|
|
19
|
+
};
|
|
20
|
+
item: WithProps<Item>;
|
|
21
|
+
items: WithProps<Item>[];
|
|
22
|
+
}
|
|
23
|
+
type WithType<T> = T & {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
type WithProps<T> = T & {
|
|
27
|
+
props?: any;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ParsedInfographicOptions } from '../../options';
|
|
2
|
+
export declare function getColorPrimary(options: ParsedInfographicOptions): string;
|
|
3
|
+
export declare function getPaletteColors(options: ParsedInfographicOptions): string[];
|
|
4
|
+
export declare function getPaletteColor(options: ParsedInfographicOptions, indexes: number[]): string | undefined;
|
|
5
|
+
export declare function getThemeColors(colors: {
|
|
6
|
+
colorPrimary?: string;
|
|
7
|
+
colorBg?: string;
|
|
8
|
+
}, options?: ParsedInfographicOptions): import("../../themes").ThemeColors;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getColorPrimary = getColorPrimary;
|
|
4
|
+
exports.getPaletteColors = getPaletteColors;
|
|
5
|
+
exports.getPaletteColor = getPaletteColor;
|
|
6
|
+
exports.getThemeColors = getThemeColors;
|
|
7
|
+
const renderer_1 = require("../../renderer");
|
|
8
|
+
const themes_1 = require("../../themes");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const DEFAULT_COLOR = '#1890FF';
|
|
11
|
+
function getColorPrimary(options) {
|
|
12
|
+
return options?.themeConfig?.colorPrimary || DEFAULT_COLOR;
|
|
13
|
+
}
|
|
14
|
+
function getPaletteColors(options) {
|
|
15
|
+
const { themeConfig = {}, data } = options;
|
|
16
|
+
const { colorPrimary, palette } = themeConfig;
|
|
17
|
+
if (!palette || palette.length === 0) {
|
|
18
|
+
return Array(data?.items?.length || 1).fill(colorPrimary || DEFAULT_COLOR);
|
|
19
|
+
}
|
|
20
|
+
return data.items.map((_, i) => (0, renderer_1.getPaletteColor)(palette, [i], data.items.length) || DEFAULT_COLOR);
|
|
21
|
+
}
|
|
22
|
+
function getPaletteColor(options, indexes) {
|
|
23
|
+
return (0, renderer_1.getPaletteColor)(options?.themeConfig?.palette, indexes, options.data?.items?.length);
|
|
24
|
+
}
|
|
25
|
+
function getThemeColors(colors, options) {
|
|
26
|
+
const { colorBg = options?.themeConfig?.colorBg || 'white', colorPrimary = options ? getColorPrimary(options) : 'black', } = colors;
|
|
27
|
+
return (0, themes_1.generateThemeColors)({
|
|
28
|
+
colorPrimary: colorPrimary,
|
|
29
|
+
isDarkMode: (0, utils_1.isDarkColor)(colorBg),
|
|
30
|
+
colorBg: colorBg,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 层级结构着色模式类型
|
|
3
|
+
*/
|
|
4
|
+
export type HierarchyColorMode = 'level' | 'branch' | 'node' | 'node-flat';
|
|
5
|
+
/**
|
|
6
|
+
* 层级节点信息接口
|
|
7
|
+
*/
|
|
8
|
+
export interface HierarchyNode {
|
|
9
|
+
/** 节点深度(层级),从 0 开始 */
|
|
10
|
+
depth: number;
|
|
11
|
+
/** 节点原始索引路径,如 [0, 1, 2] 表示根节点的第2个子节点的第3个子节点 */
|
|
12
|
+
originalIndexes: number[];
|
|
13
|
+
/** 节点在树中的扁平化序号(可选),用于 node-flat 模式 */
|
|
14
|
+
flatIndex?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 根据层级着色模式获取节点的颜色索引
|
|
18
|
+
*
|
|
19
|
+
* @param node - 层级节点信息
|
|
20
|
+
* @param mode - 着色模式
|
|
21
|
+
* @returns 用于获取调色板颜色的索引数组
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* // 按层级着色
|
|
26
|
+
* const indexes = getHierarchyColorIndexes({ depth: 2, originalIndexes: [0, 1, 2] }, 'level');
|
|
27
|
+
* // 返回 [2],表示使用第3个层级的颜色
|
|
28
|
+
*
|
|
29
|
+
* // 按分支着色
|
|
30
|
+
* const indexes = getHierarchyColorIndexes({ depth: 3, originalIndexes: [0, 1, 2, 0] }, 'branch');
|
|
31
|
+
* // 返回 [2],表示继承第2个二级分支的颜色
|
|
32
|
+
*
|
|
33
|
+
* // 按节点着色(层级路径)
|
|
34
|
+
* const indexes = getHierarchyColorIndexes({ depth: 2, originalIndexes: [0, 1, 2] }, 'node');
|
|
35
|
+
* // 返回 [0, 1, 2],使用完整路径
|
|
36
|
+
*
|
|
37
|
+
* // 按节点着色(扁平序号)
|
|
38
|
+
* const indexes = getHierarchyColorIndexes({ depth: 2, originalIndexes: [0, 1, 2], flatIndex: 5 }, 'node-flat');
|
|
39
|
+
* // 返回 [5],使用扁平化的序号
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function getHierarchyColorIndexes(node: HierarchyNode, mode: HierarchyColorMode): number[];
|
|
43
|
+
/**
|
|
44
|
+
* 从 d3 hierarchy 节点中提取层级节点信息
|
|
45
|
+
*
|
|
46
|
+
* @param d3Node - d3.hierarchy 生成的节点对象
|
|
47
|
+
* @returns 层级节点信息
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* const root = d3.hierarchy(data);
|
|
52
|
+
* const nodes = root.descendants();
|
|
53
|
+
*
|
|
54
|
+
* nodes.forEach(node => {
|
|
55
|
+
* const hierarchyNode = extractHierarchyNode(node);
|
|
56
|
+
* const colorIndexes = getHierarchyColorIndexes(hierarchyNode, 'branch');
|
|
57
|
+
* const color = getPaletteColor(options, colorIndexes);
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function extractHierarchyNode(d3Node: any): HierarchyNode;
|