snice 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapters/react/camera-annotate.d.ts +27 -0
- package/adapters/react/camera-annotate.d.ts.map +1 -0
- package/adapters/react/camera-annotate.js +24 -0
- package/adapters/react/camera-annotate.js.map +1 -0
- package/adapters/react/camera-annotate.tsx +35 -0
- package/adapters/react/candlestick.d.ts +34 -0
- package/adapters/react/candlestick.d.ts.map +1 -0
- package/adapters/react/candlestick.js +24 -0
- package/adapters/react/candlestick.js.map +1 -0
- package/adapters/react/candlestick.tsx +42 -0
- package/adapters/react/components.d.ts +14 -0
- package/adapters/react/components.d.ts.map +1 -1
- package/adapters/react/components.js +7 -0
- package/adapters/react/components.js.map +1 -1
- package/adapters/react/components.ts +14 -0
- package/adapters/react/funnel.d.ts +31 -0
- package/adapters/react/funnel.d.ts.map +1 -0
- package/adapters/react/funnel.js +24 -0
- package/adapters/react/funnel.js.map +1 -0
- package/adapters/react/funnel.tsx +39 -0
- package/adapters/react/network-graph.d.ts +32 -0
- package/adapters/react/network-graph.d.ts.map +1 -0
- package/adapters/react/network-graph.js +24 -0
- package/adapters/react/network-graph.js.map +1 -0
- package/adapters/react/network-graph.tsx +40 -0
- package/adapters/react/sankey.d.ts +31 -0
- package/adapters/react/sankey.d.ts.map +1 -0
- package/adapters/react/sankey.js +24 -0
- package/adapters/react/sankey.js.map +1 -0
- package/adapters/react/sankey.tsx +39 -0
- package/adapters/react/time-range-picker.d.ts +33 -0
- package/adapters/react/time-range-picker.d.ts.map +1 -0
- package/adapters/react/time-range-picker.js +24 -0
- package/adapters/react/time-range-picker.js.map +1 -0
- package/adapters/react/time-range-picker.tsx +41 -0
- package/adapters/react/treemap.d.ts +30 -0
- package/adapters/react/treemap.d.ts.map +1 -0
- package/adapters/react/treemap.js +24 -0
- package/adapters/react/treemap.js.map +1 -0
- package/adapters/react/treemap.tsx +38 -0
- package/adapters/react/virtual-scroller.d.ts +1 -0
- package/adapters/react/virtual-scroller.d.ts.map +1 -1
- package/adapters/react/virtual-scroller.js +1 -1
- package/adapters/react/virtual-scroller.js.map +1 -1
- package/adapters/react/virtual-scroller.tsx +2 -1
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/alert/snice-alert.min.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/avatar/snice-avatar.js +1 -1
- package/dist/cdn/avatar/snice-avatar.min.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/badge/snice-badge.min.js +1 -1
- package/dist/cdn/banner/snice-banner.js +1 -1
- package/dist/cdn/banner/snice-banner.min.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +2 -2
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js.map +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +13 -13
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js.map +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/button/snice-button.min.js +1 -1
- package/dist/cdn/calendar/snice-calendar.js +1 -1
- package/dist/cdn/calendar/snice-calendar.min.js +1 -1
- package/dist/cdn/camera/snice-camera.js +1 -1
- package/dist/cdn/camera/snice-camera.min.js +1 -1
- package/dist/cdn/camera-annotate/README.md +27 -0
- package/dist/cdn/camera-annotate/snice-camera-annotate.js +730 -0
- package/dist/cdn/camera-annotate/snice-camera-annotate.js.map +1 -0
- package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +144 -0
- package/dist/cdn/camera-annotate/snice-camera-annotate.min.js.map +1 -0
- package/dist/cdn/candlestick/README.md +27 -0
- package/dist/cdn/candlestick/snice-candlestick.js +717 -0
- package/dist/cdn/candlestick/snice-candlestick.js.map +1 -0
- package/dist/cdn/candlestick/snice-candlestick.min.js +22 -0
- package/dist/cdn/candlestick/snice-candlestick.min.js.map +1 -0
- package/dist/cdn/card/snice-card.js +1 -1
- package/dist/cdn/card/snice-card.min.js +1 -1
- package/dist/cdn/carousel/snice-carousel.js +1 -1
- package/dist/cdn/carousel/snice-carousel.min.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chart/snice-chart.min.js +1 -1
- package/dist/cdn/chat/snice-chat.js +1 -1
- package/dist/cdn/chat/snice-chat.min.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
- package/dist/cdn/chip/snice-chip.js +1 -1
- package/dist/cdn/chip/snice-chip.min.js +1 -1
- package/dist/cdn/code-block/snice-code-block.js +1 -1
- package/dist/cdn/code-block/snice-code-block.min.js +1 -1
- package/dist/cdn/color-display/snice-color-display.js +1 -1
- package/dist/cdn/color-display/snice-color-display.min.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/snice-doc.js +1 -1
- package/dist/cdn/doc/snice-doc.min.js +1 -1
- package/dist/cdn/draw/snice-draw.js +1 -1
- package/dist/cdn/draw/snice-draw.min.js +1 -1
- package/dist/cdn/drawer/snice-drawer.js +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
- package/dist/cdn/funnel/README.md +27 -0
- package/dist/cdn/funnel/snice-funnel.js +424 -0
- package/dist/cdn/funnel/snice-funnel.js.map +1 -0
- package/dist/cdn/funnel/snice-funnel.min.js +20 -0
- package/dist/cdn/funnel/snice-funnel.min.js.map +1 -0
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
- package/dist/cdn/image/snice-image.js +1 -1
- package/dist/cdn/image/snice-image.min.js +1 -1
- package/dist/cdn/input/snice-input.js +1 -1
- package/dist/cdn/input/snice-input.min.js +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js +1 -1
- package/dist/cdn/layout/README.md +2 -2
- package/dist/cdn/layout/snice-layout.js +23 -6
- package/dist/cdn/layout/snice-layout.js.map +1 -1
- package/dist/cdn/layout/snice-layout.min.js +2 -2
- package/dist/cdn/layout/snice-layout.min.js.map +1 -1
- package/dist/cdn/link/snice-link.js +1 -1
- package/dist/cdn/link/snice-link.min.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
- package/dist/cdn/list/README.md +6 -2
- package/dist/cdn/list/snice-list.js +87 -10
- package/dist/cdn/list/snice-list.js.map +1 -1
- package/dist/cdn/list/snice-list.min.js +20 -6
- package/dist/cdn/list/snice-list.min.js.map +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/location/snice-location.min.js +1 -1
- package/dist/cdn/login/snice-login.js +1 -1
- package/dist/cdn/login/snice-login.min.js +1 -1
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +1 -1
- package/dist/cdn/menu/snice-menu.min.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/modal/snice-modal.min.js +1 -1
- package/dist/cdn/music-player/snice-music-player.js +1 -1
- package/dist/cdn/music-player/snice-music-player.min.js +1 -1
- package/dist/cdn/nav/README.md +2 -2
- package/dist/cdn/nav/snice-nav.js +23 -6
- package/dist/cdn/nav/snice-nav.js.map +1 -1
- package/dist/cdn/nav/snice-nav.min.js +2 -2
- package/dist/cdn/nav/snice-nav.min.js.map +1 -1
- package/dist/cdn/network-graph/README.md +27 -0
- package/dist/cdn/network-graph/snice-network-graph.js +788 -0
- package/dist/cdn/network-graph/snice-network-graph.js.map +1 -0
- package/dist/cdn/network-graph/snice-network-graph.min.js +13 -0
- package/dist/cdn/network-graph/snice-network-graph.min.js.map +1 -0
- package/dist/cdn/pagination/README.md +2 -2
- package/dist/cdn/pagination/snice-pagination.js +13 -13
- package/dist/cdn/pagination/snice-pagination.js.map +1 -1
- package/dist/cdn/pagination/snice-pagination.min.js +14 -14
- package/dist/cdn/pagination/snice-pagination.min.js.map +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/paint/snice-paint.min.js +1 -1
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress/snice-progress.min.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
- package/dist/cdn/radio/snice-radio.js +1 -1
- package/dist/cdn/radio/snice-radio.min.js +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +3 -3
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
- package/dist/cdn/sankey/README.md +27 -0
- package/dist/cdn/sankey/snice-sankey.js +679 -0
- package/dist/cdn/sankey/snice-sankey.js.map +1 -0
- package/dist/cdn/sankey/snice-sankey.min.js +21 -0
- package/dist/cdn/sankey/snice-sankey.min.js.map +1 -0
- package/dist/cdn/select/snice-select.js +1 -1
- package/dist/cdn/select/snice-select.min.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
- package/dist/cdn/slider/snice-slider.js +1 -1
- package/dist/cdn/slider/snice-slider.min.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/spinner/snice-spinner.min.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/stepper/README.md +6 -2
- package/dist/cdn/stepper/snice-stepper.js +77 -10
- package/dist/cdn/stepper/snice-stepper.js.map +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +13 -9
- package/dist/cdn/stepper/snice-stepper.min.js.map +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/switch/snice-switch.min.js +1 -1
- package/dist/cdn/table/snice-table.js +1 -1
- package/dist/cdn/table/snice-table.min.js +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tabs/snice-tabs.min.js +1 -1
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-range-picker/README.md +27 -0
- package/dist/cdn/time-range-picker/snice-time-range-picker.js +635 -0
- package/dist/cdn/time-range-picker/snice-time-range-picker.js.map +1 -0
- package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +34 -0
- package/dist/cdn/time-range-picker/snice-time-range-picker.min.js.map +1 -0
- package/dist/cdn/timeline/snice-timeline.js +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js +1 -1
- package/dist/cdn/timer/snice-timer.js +1 -1
- package/dist/cdn/timer/snice-timer.min.js +1 -1
- package/dist/cdn/toast/snice-toast.js +1 -1
- package/dist/cdn/toast/snice-toast.min.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
- package/dist/cdn/tree/README.md +5 -1
- package/dist/cdn/tree/snice-tree.js +4 -8
- package/dist/cdn/tree/snice-tree.js.map +1 -1
- package/dist/cdn/tree/snice-tree.min.js +5 -5
- package/dist/cdn/tree/snice-tree.min.js.map +1 -1
- package/dist/cdn/treemap/README.md +27 -0
- package/dist/cdn/treemap/snice-treemap.js +522 -0
- package/dist/cdn/treemap/snice-treemap.js.map +1 -0
- package/dist/cdn/treemap/snice-treemap.min.js +14 -0
- package/dist/cdn/treemap/snice-treemap.min.js.map +1 -0
- package/dist/cdn/virtual-scroller/README.md +2 -2
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +47 -16
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js.map +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +9 -9
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js.map +1 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -1
- package/dist/components/camera-annotate/snice-camera-annotate.d.ts +68 -0
- package/dist/components/camera-annotate/snice-camera-annotate.js +663 -0
- package/dist/components/camera-annotate/snice-camera-annotate.js.map +1 -0
- package/dist/components/camera-annotate/snice-camera-annotate.types.d.ts +50 -0
- package/dist/components/candlestick/snice-candlestick.d.ts +78 -0
- package/dist/components/candlestick/snice-candlestick.js +650 -0
- package/dist/components/candlestick/snice-candlestick.js.map +1 -0
- package/dist/components/candlestick/snice-candlestick.types.d.ts +40 -0
- package/dist/components/funnel/snice-funnel.d.ts +37 -0
- package/dist/components/funnel/snice-funnel.js +357 -0
- package/dist/components/funnel/snice-funnel.js.map +1 -0
- package/dist/components/funnel/snice-funnel.types.d.ts +28 -0
- package/dist/components/list/snice-list-item.d.ts +2 -0
- package/dist/components/list/snice-list-item.js +20 -2
- package/dist/components/list/snice-list-item.js.map +1 -1
- package/dist/components/nav/snice-nav.js +22 -5
- package/dist/components/nav/snice-nav.js.map +1 -1
- package/dist/components/network-graph/snice-network-graph.d.ts +80 -0
- package/dist/components/network-graph/snice-network-graph.js +721 -0
- package/dist/components/network-graph/snice-network-graph.js.map +1 -0
- package/dist/components/network-graph/snice-network-graph.types.d.ts +49 -0
- package/dist/components/pagination/snice-pagination.js +12 -12
- package/dist/components/sankey/snice-sankey.d.ts +46 -0
- package/dist/components/sankey/snice-sankey.js +612 -0
- package/dist/components/sankey/snice-sankey.js.map +1 -0
- package/dist/components/sankey/snice-sankey.types.d.ts +59 -0
- package/dist/components/stepper/snice-stepper.js +9 -3
- package/dist/components/stepper/snice-stepper.js.map +1 -1
- package/dist/components/time-range-picker/snice-time-range-picker.d.ts +67 -0
- package/dist/components/time-range-picker/snice-time-range-picker.js +568 -0
- package/dist/components/time-range-picker/snice-time-range-picker.js.map +1 -0
- package/dist/components/time-range-picker/snice-time-range-picker.types.d.ts +39 -0
- package/dist/components/treemap/snice-treemap.d.ts +49 -0
- package/dist/components/treemap/snice-treemap.js +455 -0
- package/dist/components/treemap/snice-treemap.js.map +1 -0
- package/dist/components/treemap/snice-treemap.types.d.ts +42 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.d.ts +5 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.js +47 -16
- package/dist/components/virtual-scroller/snice-virtual-scroller.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/components/camera-annotate.md +82 -0
- package/docs/ai/components/candlestick.md +79 -0
- package/docs/ai/components/funnel.md +86 -0
- package/docs/ai/components/network-graph.md +87 -0
- package/docs/ai/components/sankey.md +63 -0
- package/docs/ai/components/time-range-picker.md +78 -0
- package/docs/ai/components/treemap.md +78 -0
- package/docs/components/camera-annotate.md +186 -0
- package/docs/components/candlestick.md +196 -0
- package/docs/components/funnel.md +191 -0
- package/docs/components/network-graph.md +215 -0
- package/docs/components/sankey.md +201 -0
- package/docs/components/time-range-picker.md +213 -0
- package/docs/components/treemap.md +198 -0
- package/package.json +1 -1
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
import { __runInitializers, __esDecorate } from 'tslib';
|
|
2
|
+
import { element, property, query, dispatch, ready, dispose, watch, render, styles, html, css } from 'snice';
|
|
3
|
+
|
|
4
|
+
var cssContent = ":host{display:block;font-family:var(--snice-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);contain:layout style paint;width:100%;--candlestick-bg:var(--snice-color-background, rgb(255 255 255));--candlestick-text:var(--snice-color-text, rgb(23 23 23));--candlestick-text-secondary:var(--snice-color-text-secondary, rgb(82 82 82));--candlestick-border:var(--snice-color-border, rgb(226 226 226));--candlestick-grid:var(--snice-color-border, rgb(226 226 226));--candlestick-bullish:var(--snice-candlestick-bullish, rgb(22 163 74));--candlestick-bearish:var(--snice-candlestick-bearish, rgb(220 38 38))}.candlestick{position:relative;background:var(--candlestick-bg);overflow:hidden;user-select:none}.candlestick__svg{display:block;width:100%;height:100%}.candlestick__grid-line{stroke:var(--candlestick-grid);stroke-width:1px;stroke-dasharray:2 4;opacity:.5}.candlestick__axis-label{fill:var(--candlestick-text-secondary);font-size:.6875rem;font-family:inherit}.candlestick__axis-label--x{text-anchor:middle;dominant-baseline:hanging}.candlestick__axis-label--y{text-anchor:end;dominant-baseline:central}.candlestick__body{cursor:pointer;transition:opacity var(--snice-transition-fast, 150ms) ease}.candlestick__body:hover{opacity:.8}.candlestick__wick{stroke-width:1px;pointer-events:none}.candlestick__volume{opacity:.3}.candlestick__crosshair-h,.candlestick__crosshair-v{stroke:var(--candlestick-text-secondary);stroke-width:1px;stroke-dasharray:4 3;pointer-events:none;opacity:.6}.candlestick__crosshair-label{fill:var(--candlestick-text);font-size:.625rem;font-family:inherit;pointer-events:none}.candlestick__crosshair-label-bg{fill:var(--candlestick-bg);stroke:var(--candlestick-border);stroke-width:1px;pointer-events:none}.candlestick__tooltip{position:absolute;background:var(--candlestick-bg);border:1px solid var(--candlestick-border);border-radius:4px;padding:var(--snice-spacing-xs,.5rem);font-size:.75rem;color:var(--candlestick-text);pointer-events:none;z-index:10;box-shadow:var(--snice-shadow-md,0 4px 6px -1px rgb(0 0 0 / .1),0 2px 4px -2px rgb(0 0 0 / .1));white-space:nowrap;opacity:0;transition:opacity var(--snice-transition-fast, 150ms) ease}.candlestick__tooltip--visible{opacity:1}.candlestick__tooltip-row{display:flex;justify-content:space-between;gap:var(--snice-spacing-sm,.75rem);line-height:var(--snice-line-height-normal, 1.5)}.candlestick__tooltip-label{color:var(--candlestick-text-secondary)}.candlestick__tooltip-value{font-weight:var(--snice-font-weight-semibold,600)}.candlestick__tooltip-value--bullish{color:var(--candlestick-bullish)}.candlestick__tooltip-value--bearish{color:var(--candlestick-bearish)}.candlestick__body--animated,.candlestick__wick--animated{animation:.4s ease-out both candlestick-appear}.candlestick__volume--animated{animation:.4s ease-out both volume-appear}@keyframes candlestick-appear{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@keyframes volume-appear{from{opacity:0}to{opacity:.3}}";
|
|
5
|
+
|
|
6
|
+
const PADDING = { top: 16, right: 64, bottom: 32, left: 8 };
|
|
7
|
+
const VOLUME_HEIGHT_RATIO = 0.2;
|
|
8
|
+
const MIN_CANDLE_WIDTH = 3;
|
|
9
|
+
const MAX_CANDLE_WIDTH = 24;
|
|
10
|
+
let SniceCandlestick = (() => {
|
|
11
|
+
let _classDecorators = [element('snice-candlestick')];
|
|
12
|
+
let _classDescriptor;
|
|
13
|
+
let _classExtraInitializers = [];
|
|
14
|
+
let _classThis;
|
|
15
|
+
let _classSuper = HTMLElement;
|
|
16
|
+
let _instanceExtraInitializers = [];
|
|
17
|
+
let _data_decorators;
|
|
18
|
+
let _data_initializers = [];
|
|
19
|
+
let _data_extraInitializers = [];
|
|
20
|
+
let _showVolume_decorators;
|
|
21
|
+
let _showVolume_initializers = [];
|
|
22
|
+
let _showVolume_extraInitializers = [];
|
|
23
|
+
let _showGrid_decorators;
|
|
24
|
+
let _showGrid_initializers = [];
|
|
25
|
+
let _showGrid_extraInitializers = [];
|
|
26
|
+
let _showCrosshair_decorators;
|
|
27
|
+
let _showCrosshair_initializers = [];
|
|
28
|
+
let _showCrosshair_extraInitializers = [];
|
|
29
|
+
let _bullishColor_decorators;
|
|
30
|
+
let _bullishColor_initializers = [];
|
|
31
|
+
let _bullishColor_extraInitializers = [];
|
|
32
|
+
let _bearishColor_decorators;
|
|
33
|
+
let _bearishColor_initializers = [];
|
|
34
|
+
let _bearishColor_extraInitializers = [];
|
|
35
|
+
let _timeFormat_decorators;
|
|
36
|
+
let _timeFormat_initializers = [];
|
|
37
|
+
let _timeFormat_extraInitializers = [];
|
|
38
|
+
let _yAxisFormat_decorators;
|
|
39
|
+
let _yAxisFormat_initializers = [];
|
|
40
|
+
let _yAxisFormat_extraInitializers = [];
|
|
41
|
+
let _zoomEnabled_decorators;
|
|
42
|
+
let _zoomEnabled_initializers = [];
|
|
43
|
+
let _zoomEnabled_extraInitializers = [];
|
|
44
|
+
let _animation_decorators;
|
|
45
|
+
let _animation_initializers = [];
|
|
46
|
+
let _animation_extraInitializers = [];
|
|
47
|
+
let _containerEl_decorators;
|
|
48
|
+
let _containerEl_initializers = [];
|
|
49
|
+
let _containerEl_extraInitializers = [];
|
|
50
|
+
let _svgEl_decorators;
|
|
51
|
+
let _svgEl_initializers = [];
|
|
52
|
+
let _svgEl_extraInitializers = [];
|
|
53
|
+
let _chartContentEl_decorators;
|
|
54
|
+
let _chartContentEl_initializers = [];
|
|
55
|
+
let _chartContentEl_extraInitializers = [];
|
|
56
|
+
let _crosshairGroupEl_decorators;
|
|
57
|
+
let _crosshairGroupEl_initializers = [];
|
|
58
|
+
let _crosshairGroupEl_extraInitializers = [];
|
|
59
|
+
let _tooltipEl_decorators;
|
|
60
|
+
let _tooltipEl_initializers = [];
|
|
61
|
+
let _tooltipEl_extraInitializers = [];
|
|
62
|
+
let _emitCandleClick_decorators;
|
|
63
|
+
let _emitCandleHover_decorators;
|
|
64
|
+
let _emitCrosshairMove_decorators;
|
|
65
|
+
let _init_decorators;
|
|
66
|
+
let _cleanup_decorators;
|
|
67
|
+
let _onDataChange_decorators;
|
|
68
|
+
let _onDisplayChange_decorators;
|
|
69
|
+
let _renderContent_decorators;
|
|
70
|
+
let _componentStyles_decorators;
|
|
71
|
+
(class extends _classSuper {
|
|
72
|
+
static { _classThis = this; }
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
this.data = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _data_initializers, []));
|
|
76
|
+
this.showVolume = (__runInitializers(this, _data_extraInitializers), __runInitializers(this, _showVolume_initializers, false));
|
|
77
|
+
this.showGrid = (__runInitializers(this, _showVolume_extraInitializers), __runInitializers(this, _showGrid_initializers, true));
|
|
78
|
+
this.showCrosshair = (__runInitializers(this, _showGrid_extraInitializers), __runInitializers(this, _showCrosshair_initializers, true));
|
|
79
|
+
this.bullishColor = (__runInitializers(this, _showCrosshair_extraInitializers), __runInitializers(this, _bullishColor_initializers, ''));
|
|
80
|
+
this.bearishColor = (__runInitializers(this, _bullishColor_extraInitializers), __runInitializers(this, _bearishColor_initializers, ''));
|
|
81
|
+
this.timeFormat = (__runInitializers(this, _bearishColor_extraInitializers), __runInitializers(this, _timeFormat_initializers, 'auto'));
|
|
82
|
+
this.yAxisFormat = (__runInitializers(this, _timeFormat_extraInitializers), __runInitializers(this, _yAxisFormat_initializers, 'number'));
|
|
83
|
+
this.zoomEnabled = (__runInitializers(this, _yAxisFormat_extraInitializers), __runInitializers(this, _zoomEnabled_initializers, true));
|
|
84
|
+
this.animation = (__runInitializers(this, _zoomEnabled_extraInitializers), __runInitializers(this, _animation_initializers, true));
|
|
85
|
+
this.containerEl = (__runInitializers(this, _animation_extraInitializers), __runInitializers(this, _containerEl_initializers, void 0));
|
|
86
|
+
this.svgEl = (__runInitializers(this, _containerEl_extraInitializers), __runInitializers(this, _svgEl_initializers, void 0));
|
|
87
|
+
this.chartContentEl = (__runInitializers(this, _svgEl_extraInitializers), __runInitializers(this, _chartContentEl_initializers, void 0));
|
|
88
|
+
this.crosshairGroupEl = (__runInitializers(this, _chartContentEl_extraInitializers), __runInitializers(this, _crosshairGroupEl_initializers, void 0));
|
|
89
|
+
this.tooltipEl = (__runInitializers(this, _crosshairGroupEl_extraInitializers), __runInitializers(this, _tooltipEl_initializers, void 0));
|
|
90
|
+
// Internal state — plain fields, no @property
|
|
91
|
+
this.viewStart = (__runInitializers(this, _tooltipEl_extraInitializers), 0);
|
|
92
|
+
this.viewEnd = 0;
|
|
93
|
+
this.mouseX = -1;
|
|
94
|
+
this.mouseY = -1;
|
|
95
|
+
this.isDragging = false;
|
|
96
|
+
this.dragStartX = 0;
|
|
97
|
+
this.dragStartViewStart = 0;
|
|
98
|
+
this.dragStartViewEnd = 0;
|
|
99
|
+
this.resizeObserver = null;
|
|
100
|
+
this.svgWidth = 600;
|
|
101
|
+
this.svgHeight = 400;
|
|
102
|
+
this.lastDataLength = 0;
|
|
103
|
+
this.cachedData = [];
|
|
104
|
+
this.rafId = 0;
|
|
105
|
+
this.animateNext = true;
|
|
106
|
+
this.handleMouseMove = (e) => {
|
|
107
|
+
const svg = this.svgEl;
|
|
108
|
+
if (!svg)
|
|
109
|
+
return;
|
|
110
|
+
const ctm = svg.getScreenCTM();
|
|
111
|
+
if (ctm) {
|
|
112
|
+
const pt = new DOMPoint(e.clientX, e.clientY).matrixTransform(ctm.inverse());
|
|
113
|
+
this.mouseX = pt.x;
|
|
114
|
+
this.mouseY = pt.y;
|
|
115
|
+
}
|
|
116
|
+
if (this.isDragging && this.zoomEnabled) {
|
|
117
|
+
const dx = e.clientX - this.dragStartX;
|
|
118
|
+
const area = this.chartArea;
|
|
119
|
+
const viewSize = this.dragStartViewEnd - this.dragStartViewStart;
|
|
120
|
+
const candlesPerPx = viewSize / area.width;
|
|
121
|
+
const shift = Math.round(-dx * candlesPerPx);
|
|
122
|
+
let newStart = this.dragStartViewStart + shift;
|
|
123
|
+
let newEnd = this.dragStartViewEnd + shift;
|
|
124
|
+
if (newStart < 0) {
|
|
125
|
+
newStart = 0;
|
|
126
|
+
newEnd = viewSize;
|
|
127
|
+
}
|
|
128
|
+
if (newEnd > this.cachedData.length) {
|
|
129
|
+
newEnd = this.cachedData.length;
|
|
130
|
+
newStart = this.cachedData.length - viewSize;
|
|
131
|
+
}
|
|
132
|
+
const vs = Math.max(0, newStart);
|
|
133
|
+
const ve = Math.min(this.cachedData.length, newEnd);
|
|
134
|
+
if (vs !== this.viewStart || ve !== this.viewEnd) {
|
|
135
|
+
this.viewStart = vs;
|
|
136
|
+
this.viewEnd = ve;
|
|
137
|
+
this.rebuildChart();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
if (this.showCrosshair) {
|
|
142
|
+
const idx = this.xToIndex(this.mouseX);
|
|
143
|
+
const candle = this.visibleData[idx];
|
|
144
|
+
if (candle) {
|
|
145
|
+
const price = this.yToPrice(this.mouseY);
|
|
146
|
+
this.emitCrosshairMove(price, this.formatDate(candle.date), this.mouseX, this.mouseY);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Only update crosshair + tooltip via direct DOM manipulation — no re-render
|
|
150
|
+
if (this.rafId)
|
|
151
|
+
cancelAnimationFrame(this.rafId);
|
|
152
|
+
this.rafId = requestAnimationFrame(() => {
|
|
153
|
+
this.updateCrosshairDOM();
|
|
154
|
+
this.updateTooltipDOM();
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
this.handleMouseLeave = () => {
|
|
158
|
+
this.mouseX = -1;
|
|
159
|
+
this.mouseY = -1;
|
|
160
|
+
this.isDragging = false;
|
|
161
|
+
this.updateCrosshairDOM();
|
|
162
|
+
this.updateTooltipDOM();
|
|
163
|
+
};
|
|
164
|
+
this.handleMouseDown = (e) => {
|
|
165
|
+
if (!this.zoomEnabled)
|
|
166
|
+
return;
|
|
167
|
+
this.isDragging = true;
|
|
168
|
+
this.dragStartX = e.clientX;
|
|
169
|
+
this.dragStartViewStart = this.viewStart;
|
|
170
|
+
this.dragStartViewEnd = this.viewEnd;
|
|
171
|
+
};
|
|
172
|
+
this.handleMouseUp = () => {
|
|
173
|
+
this.isDragging = false;
|
|
174
|
+
};
|
|
175
|
+
this.handleWheel = (e) => {
|
|
176
|
+
if (!this.zoomEnabled)
|
|
177
|
+
return;
|
|
178
|
+
e.preventDefault();
|
|
179
|
+
const viewSize = this.viewEnd - this.viewStart;
|
|
180
|
+
const zoomFactor = e.deltaY > 0 ? 1.1 : 0.9;
|
|
181
|
+
let newSize = Math.round(viewSize * zoomFactor);
|
|
182
|
+
newSize = Math.max(10, Math.min(this.cachedData.length, newSize));
|
|
183
|
+
const area = this.chartArea;
|
|
184
|
+
const mouseRatio = (this.mouseX - area.x) / area.width;
|
|
185
|
+
const center = this.viewStart + viewSize * mouseRatio;
|
|
186
|
+
let newStart = Math.round(center - newSize * mouseRatio);
|
|
187
|
+
let newEnd = newStart + newSize;
|
|
188
|
+
if (newStart < 0) {
|
|
189
|
+
newStart = 0;
|
|
190
|
+
newEnd = newSize;
|
|
191
|
+
}
|
|
192
|
+
if (newEnd > this.cachedData.length) {
|
|
193
|
+
newEnd = this.cachedData.length;
|
|
194
|
+
newStart = this.cachedData.length - newSize;
|
|
195
|
+
}
|
|
196
|
+
this.viewStart = Math.max(0, newStart);
|
|
197
|
+
this.viewEnd = Math.min(this.cachedData.length, newEnd);
|
|
198
|
+
this.rebuildChart();
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
static {
|
|
202
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
203
|
+
_data_decorators = [property({ type: Array, attribute: false })];
|
|
204
|
+
_showVolume_decorators = [property({ type: Boolean })];
|
|
205
|
+
_showGrid_decorators = [property({ type: Boolean })];
|
|
206
|
+
_showCrosshair_decorators = [property({ type: Boolean })];
|
|
207
|
+
_bullishColor_decorators = [property()];
|
|
208
|
+
_bearishColor_decorators = [property()];
|
|
209
|
+
_timeFormat_decorators = [property()];
|
|
210
|
+
_yAxisFormat_decorators = [property()];
|
|
211
|
+
_zoomEnabled_decorators = [property({ type: Boolean })];
|
|
212
|
+
_animation_decorators = [property({ type: Boolean })];
|
|
213
|
+
_containerEl_decorators = [query('.candlestick')];
|
|
214
|
+
_svgEl_decorators = [query('.candlestick__svg')];
|
|
215
|
+
_chartContentEl_decorators = [query('.candlestick__chart-content')];
|
|
216
|
+
_crosshairGroupEl_decorators = [query('.candlestick__crosshair-group')];
|
|
217
|
+
_tooltipEl_decorators = [query('.candlestick__tooltip')];
|
|
218
|
+
_emitCandleClick_decorators = [dispatch('candle-click', { bubbles: true, composed: true })];
|
|
219
|
+
_emitCandleHover_decorators = [dispatch('candle-hover', { bubbles: true, composed: true })];
|
|
220
|
+
_emitCrosshairMove_decorators = [dispatch('crosshair-move', { bubbles: true, composed: true })];
|
|
221
|
+
_init_decorators = [ready()];
|
|
222
|
+
_cleanup_decorators = [dispose()];
|
|
223
|
+
_onDataChange_decorators = [watch('data')];
|
|
224
|
+
_onDisplayChange_decorators = [watch('showVolume', 'showGrid', 'bullishColor', 'bearishColor', 'timeFormat', 'yAxisFormat', 'animation')];
|
|
225
|
+
_renderContent_decorators = [render({ once: true })];
|
|
226
|
+
_componentStyles_decorators = [styles()];
|
|
227
|
+
__esDecorate(this, null, _emitCandleClick_decorators, { kind: "method", name: "emitCandleClick", static: false, private: false, access: { has: obj => "emitCandleClick" in obj, get: obj => obj.emitCandleClick }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
228
|
+
__esDecorate(this, null, _emitCandleHover_decorators, { kind: "method", name: "emitCandleHover", static: false, private: false, access: { has: obj => "emitCandleHover" in obj, get: obj => obj.emitCandleHover }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
229
|
+
__esDecorate(this, null, _emitCrosshairMove_decorators, { kind: "method", name: "emitCrosshairMove", static: false, private: false, access: { has: obj => "emitCrosshairMove" in obj, get: obj => obj.emitCrosshairMove }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
230
|
+
__esDecorate(this, null, _init_decorators, { kind: "method", name: "init", static: false, private: false, access: { has: obj => "init" in obj, get: obj => obj.init }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
231
|
+
__esDecorate(this, null, _cleanup_decorators, { kind: "method", name: "cleanup", static: false, private: false, access: { has: obj => "cleanup" in obj, get: obj => obj.cleanup }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
232
|
+
__esDecorate(this, null, _onDataChange_decorators, { kind: "method", name: "onDataChange", static: false, private: false, access: { has: obj => "onDataChange" in obj, get: obj => obj.onDataChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
233
|
+
__esDecorate(this, null, _onDisplayChange_decorators, { kind: "method", name: "onDisplayChange", static: false, private: false, access: { has: obj => "onDisplayChange" in obj, get: obj => obj.onDisplayChange }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
234
|
+
__esDecorate(this, null, _renderContent_decorators, { kind: "method", name: "renderContent", static: false, private: false, access: { has: obj => "renderContent" in obj, get: obj => obj.renderContent }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
235
|
+
__esDecorate(this, null, _componentStyles_decorators, { kind: "method", name: "componentStyles", static: false, private: false, access: { has: obj => "componentStyles" in obj, get: obj => obj.componentStyles }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
236
|
+
__esDecorate(null, null, _data_decorators, { kind: "field", name: "data", static: false, private: false, access: { has: obj => "data" in obj, get: obj => obj.data, set: (obj, value) => { obj.data = value; } }, metadata: _metadata }, _data_initializers, _data_extraInitializers);
|
|
237
|
+
__esDecorate(null, null, _showVolume_decorators, { kind: "field", name: "showVolume", static: false, private: false, access: { has: obj => "showVolume" in obj, get: obj => obj.showVolume, set: (obj, value) => { obj.showVolume = value; } }, metadata: _metadata }, _showVolume_initializers, _showVolume_extraInitializers);
|
|
238
|
+
__esDecorate(null, null, _showGrid_decorators, { kind: "field", name: "showGrid", static: false, private: false, access: { has: obj => "showGrid" in obj, get: obj => obj.showGrid, set: (obj, value) => { obj.showGrid = value; } }, metadata: _metadata }, _showGrid_initializers, _showGrid_extraInitializers);
|
|
239
|
+
__esDecorate(null, null, _showCrosshair_decorators, { kind: "field", name: "showCrosshair", static: false, private: false, access: { has: obj => "showCrosshair" in obj, get: obj => obj.showCrosshair, set: (obj, value) => { obj.showCrosshair = value; } }, metadata: _metadata }, _showCrosshair_initializers, _showCrosshair_extraInitializers);
|
|
240
|
+
__esDecorate(null, null, _bullishColor_decorators, { kind: "field", name: "bullishColor", static: false, private: false, access: { has: obj => "bullishColor" in obj, get: obj => obj.bullishColor, set: (obj, value) => { obj.bullishColor = value; } }, metadata: _metadata }, _bullishColor_initializers, _bullishColor_extraInitializers);
|
|
241
|
+
__esDecorate(null, null, _bearishColor_decorators, { kind: "field", name: "bearishColor", static: false, private: false, access: { has: obj => "bearishColor" in obj, get: obj => obj.bearishColor, set: (obj, value) => { obj.bearishColor = value; } }, metadata: _metadata }, _bearishColor_initializers, _bearishColor_extraInitializers);
|
|
242
|
+
__esDecorate(null, null, _timeFormat_decorators, { kind: "field", name: "timeFormat", static: false, private: false, access: { has: obj => "timeFormat" in obj, get: obj => obj.timeFormat, set: (obj, value) => { obj.timeFormat = value; } }, metadata: _metadata }, _timeFormat_initializers, _timeFormat_extraInitializers);
|
|
243
|
+
__esDecorate(null, null, _yAxisFormat_decorators, { kind: "field", name: "yAxisFormat", static: false, private: false, access: { has: obj => "yAxisFormat" in obj, get: obj => obj.yAxisFormat, set: (obj, value) => { obj.yAxisFormat = value; } }, metadata: _metadata }, _yAxisFormat_initializers, _yAxisFormat_extraInitializers);
|
|
244
|
+
__esDecorate(null, null, _zoomEnabled_decorators, { kind: "field", name: "zoomEnabled", static: false, private: false, access: { has: obj => "zoomEnabled" in obj, get: obj => obj.zoomEnabled, set: (obj, value) => { obj.zoomEnabled = value; } }, metadata: _metadata }, _zoomEnabled_initializers, _zoomEnabled_extraInitializers);
|
|
245
|
+
__esDecorate(null, null, _animation_decorators, { kind: "field", name: "animation", static: false, private: false, access: { has: obj => "animation" in obj, get: obj => obj.animation, set: (obj, value) => { obj.animation = value; } }, metadata: _metadata }, _animation_initializers, _animation_extraInitializers);
|
|
246
|
+
__esDecorate(null, null, _containerEl_decorators, { kind: "field", name: "containerEl", static: false, private: false, access: { has: obj => "containerEl" in obj, get: obj => obj.containerEl, set: (obj, value) => { obj.containerEl = value; } }, metadata: _metadata }, _containerEl_initializers, _containerEl_extraInitializers);
|
|
247
|
+
__esDecorate(null, null, _svgEl_decorators, { kind: "field", name: "svgEl", static: false, private: false, access: { has: obj => "svgEl" in obj, get: obj => obj.svgEl, set: (obj, value) => { obj.svgEl = value; } }, metadata: _metadata }, _svgEl_initializers, _svgEl_extraInitializers);
|
|
248
|
+
__esDecorate(null, null, _chartContentEl_decorators, { kind: "field", name: "chartContentEl", static: false, private: false, access: { has: obj => "chartContentEl" in obj, get: obj => obj.chartContentEl, set: (obj, value) => { obj.chartContentEl = value; } }, metadata: _metadata }, _chartContentEl_initializers, _chartContentEl_extraInitializers);
|
|
249
|
+
__esDecorate(null, null, _crosshairGroupEl_decorators, { kind: "field", name: "crosshairGroupEl", static: false, private: false, access: { has: obj => "crosshairGroupEl" in obj, get: obj => obj.crosshairGroupEl, set: (obj, value) => { obj.crosshairGroupEl = value; } }, metadata: _metadata }, _crosshairGroupEl_initializers, _crosshairGroupEl_extraInitializers);
|
|
250
|
+
__esDecorate(null, null, _tooltipEl_decorators, { kind: "field", name: "tooltipEl", static: false, private: false, access: { has: obj => "tooltipEl" in obj, get: obj => obj.tooltipEl, set: (obj, value) => { obj.tooltipEl = value; } }, metadata: _metadata }, _tooltipEl_initializers, _tooltipEl_extraInitializers);
|
|
251
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
252
|
+
_classThis = _classDescriptor.value;
|
|
253
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
254
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
255
|
+
}
|
|
256
|
+
emitCandleClick(candle, index) {
|
|
257
|
+
return { candle, index };
|
|
258
|
+
}
|
|
259
|
+
emitCandleHover(candle, index) {
|
|
260
|
+
return { candle, index };
|
|
261
|
+
}
|
|
262
|
+
emitCrosshairMove(price, date, x, y) {
|
|
263
|
+
return { price, date, x, y };
|
|
264
|
+
}
|
|
265
|
+
init() {
|
|
266
|
+
this.cachedData = this.data;
|
|
267
|
+
this.viewEnd = this.data.length;
|
|
268
|
+
this.viewStart = Math.max(0, this.viewEnd - 80);
|
|
269
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
270
|
+
this.measureSize();
|
|
271
|
+
this.rebuildChart();
|
|
272
|
+
});
|
|
273
|
+
if (this.containerEl) {
|
|
274
|
+
this.resizeObserver.observe(this.containerEl);
|
|
275
|
+
}
|
|
276
|
+
this.measureSize();
|
|
277
|
+
this.rebuildChart();
|
|
278
|
+
}
|
|
279
|
+
cleanup() {
|
|
280
|
+
this.resizeObserver?.disconnect();
|
|
281
|
+
if (this.rafId)
|
|
282
|
+
cancelAnimationFrame(this.rafId);
|
|
283
|
+
}
|
|
284
|
+
onDataChange() {
|
|
285
|
+
this.cachedData = this.data;
|
|
286
|
+
const dataLen = this.cachedData.length;
|
|
287
|
+
if (dataLen > 0 && dataLen !== this.lastDataLength) {
|
|
288
|
+
this.lastDataLength = dataLen;
|
|
289
|
+
this.viewEnd = dataLen;
|
|
290
|
+
this.viewStart = Math.max(0, dataLen - 80);
|
|
291
|
+
}
|
|
292
|
+
this.animateNext = true;
|
|
293
|
+
this.rebuildChart();
|
|
294
|
+
}
|
|
295
|
+
onDisplayChange() {
|
|
296
|
+
this.rebuildChart();
|
|
297
|
+
}
|
|
298
|
+
measureSize() {
|
|
299
|
+
if (!this.containerEl)
|
|
300
|
+
return;
|
|
301
|
+
const rect = this.containerEl.getBoundingClientRect();
|
|
302
|
+
if (rect.width > 0)
|
|
303
|
+
this.svgWidth = rect.width;
|
|
304
|
+
if (rect.height > 0)
|
|
305
|
+
this.svgHeight = rect.height;
|
|
306
|
+
}
|
|
307
|
+
get visibleData() {
|
|
308
|
+
return this.cachedData.slice(this.viewStart, this.viewEnd);
|
|
309
|
+
}
|
|
310
|
+
get chartArea() {
|
|
311
|
+
const volumeSpace = this.showVolume ? this.svgHeight * VOLUME_HEIGHT_RATIO : 0;
|
|
312
|
+
return {
|
|
313
|
+
x: PADDING.left,
|
|
314
|
+
y: PADDING.top,
|
|
315
|
+
width: this.svgWidth - PADDING.left - PADDING.right,
|
|
316
|
+
height: this.svgHeight - PADDING.top - PADDING.bottom - volumeSpace,
|
|
317
|
+
volumeY: this.svgHeight - PADDING.bottom - volumeSpace,
|
|
318
|
+
volumeHeight: volumeSpace
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
get priceRange() {
|
|
322
|
+
const visible = this.visibleData;
|
|
323
|
+
if (visible.length === 0)
|
|
324
|
+
return { min: 0, max: 100 };
|
|
325
|
+
let min = Infinity;
|
|
326
|
+
let max = -Infinity;
|
|
327
|
+
for (const d of visible) {
|
|
328
|
+
if (d.low < min)
|
|
329
|
+
min = d.low;
|
|
330
|
+
if (d.high > max)
|
|
331
|
+
max = d.high;
|
|
332
|
+
}
|
|
333
|
+
const padding = (max - min) * 0.05 || 1;
|
|
334
|
+
return { min: min - padding, max: max + padding };
|
|
335
|
+
}
|
|
336
|
+
get volumeMax() {
|
|
337
|
+
const visible = this.visibleData;
|
|
338
|
+
if (visible.length === 0)
|
|
339
|
+
return 1;
|
|
340
|
+
return Math.max(...visible.map(d => d.volume || 0)) || 1;
|
|
341
|
+
}
|
|
342
|
+
get candleWidth() {
|
|
343
|
+
const area = this.chartArea;
|
|
344
|
+
const count = this.visibleData.length || 1;
|
|
345
|
+
const totalWidth = area.width / count;
|
|
346
|
+
const bodyWidth = totalWidth * 0.7;
|
|
347
|
+
return Math.max(MIN_CANDLE_WIDTH, Math.min(MAX_CANDLE_WIDTH, bodyWidth));
|
|
348
|
+
}
|
|
349
|
+
priceToY(price) {
|
|
350
|
+
const { min, max } = this.priceRange;
|
|
351
|
+
const area = this.chartArea;
|
|
352
|
+
const ratio = (price - min) / (max - min);
|
|
353
|
+
return area.y + area.height * (1 - ratio);
|
|
354
|
+
}
|
|
355
|
+
yToPrice(y) {
|
|
356
|
+
const { min, max } = this.priceRange;
|
|
357
|
+
const area = this.chartArea;
|
|
358
|
+
const ratio = 1 - (y - area.y) / area.height;
|
|
359
|
+
return min + ratio * (max - min);
|
|
360
|
+
}
|
|
361
|
+
indexToX(index) {
|
|
362
|
+
const area = this.chartArea;
|
|
363
|
+
const count = this.visibleData.length || 1;
|
|
364
|
+
const step = area.width / count;
|
|
365
|
+
return area.x + step * index + step / 2;
|
|
366
|
+
}
|
|
367
|
+
xToIndex(x) {
|
|
368
|
+
const area = this.chartArea;
|
|
369
|
+
const count = this.visibleData.length || 1;
|
|
370
|
+
const step = area.width / count;
|
|
371
|
+
const idx = Math.floor((x - area.x) / step);
|
|
372
|
+
return Math.max(0, Math.min(count - 1, idx));
|
|
373
|
+
}
|
|
374
|
+
formatPrice(price) {
|
|
375
|
+
switch (this.yAxisFormat) {
|
|
376
|
+
case 'currency':
|
|
377
|
+
return price.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
378
|
+
case 'percent':
|
|
379
|
+
return price.toFixed(2) + '%';
|
|
380
|
+
default:
|
|
381
|
+
return price >= 1000 ? price.toLocaleString(undefined, { maximumFractionDigits: 2 }) : price.toFixed(2);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
formatDate(dateVal) {
|
|
385
|
+
const d = dateVal instanceof Date ? dateVal : new Date(dateVal);
|
|
386
|
+
if (isNaN(d.getTime()))
|
|
387
|
+
return String(dateVal);
|
|
388
|
+
const fmt = this.timeFormat;
|
|
389
|
+
if (fmt === 'date')
|
|
390
|
+
return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
|
|
391
|
+
if (fmt === 'time')
|
|
392
|
+
return d.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' });
|
|
393
|
+
if (fmt === 'datetime')
|
|
394
|
+
return d.toLocaleString(undefined, { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' });
|
|
395
|
+
if (fmt === 'month')
|
|
396
|
+
return d.toLocaleDateString(undefined, { month: 'short', year: '2-digit' });
|
|
397
|
+
if (fmt === 'year')
|
|
398
|
+
return d.getFullYear().toString();
|
|
399
|
+
// auto
|
|
400
|
+
return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
|
|
401
|
+
}
|
|
402
|
+
/** Rebuild the static chart SVG (candles, grid, axes, volume). Does NOT include crosshair. */
|
|
403
|
+
rebuildChart() {
|
|
404
|
+
if (!this.chartContentEl || !this.svgEl) {
|
|
405
|
+
requestAnimationFrame(() => this.rebuildChart());
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
const visible = this.visibleData;
|
|
409
|
+
let svg = '';
|
|
410
|
+
if (visible.length > 0) {
|
|
411
|
+
svg += this.buildGridLines();
|
|
412
|
+
svg += this.buildYAxis();
|
|
413
|
+
svg += this.buildXAxis();
|
|
414
|
+
svg += this.buildVolumeBars();
|
|
415
|
+
svg += this.buildCandles();
|
|
416
|
+
}
|
|
417
|
+
this.chartContentEl.innerHTML = svg;
|
|
418
|
+
// Update SVG viewBox
|
|
419
|
+
this.svgEl.setAttribute('viewBox', `0 0 ${this.svgWidth} ${this.svgHeight}`);
|
|
420
|
+
this.svgEl.setAttribute('aria-label', `Candlestick chart with ${this.cachedData.length} data points`);
|
|
421
|
+
// Update container height
|
|
422
|
+
if (this.containerEl) {
|
|
423
|
+
this.containerEl.style.height = `${this.svgHeight}px`;
|
|
424
|
+
}
|
|
425
|
+
// Consume animation flag after building candles
|
|
426
|
+
this.animateNext = false;
|
|
427
|
+
// Update crosshair after chart rebuild
|
|
428
|
+
this.updateCrosshairDOM();
|
|
429
|
+
this.updateTooltipDOM();
|
|
430
|
+
}
|
|
431
|
+
resetZoom() {
|
|
432
|
+
this.viewStart = 0;
|
|
433
|
+
this.viewEnd = this.cachedData.length;
|
|
434
|
+
this.rebuildChart();
|
|
435
|
+
}
|
|
436
|
+
zoomTo(startIndex, endIndex) {
|
|
437
|
+
this.viewStart = Math.max(0, startIndex);
|
|
438
|
+
this.viewEnd = Math.min(this.cachedData.length, endIndex);
|
|
439
|
+
this.rebuildChart();
|
|
440
|
+
}
|
|
441
|
+
/** Update crosshair overlay via direct DOM manipulation — no re-render needed */
|
|
442
|
+
updateCrosshairDOM() {
|
|
443
|
+
const group = this.crosshairGroupEl;
|
|
444
|
+
if (!group)
|
|
445
|
+
return;
|
|
446
|
+
if (!this.showCrosshair || this.mouseX < 0 || this.mouseY < 0) {
|
|
447
|
+
group.innerHTML = '';
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
const area = this.chartArea;
|
|
451
|
+
const totalChartBottom = area.y + area.height + area.volumeHeight;
|
|
452
|
+
const isInChart = this.mouseX >= area.x && this.mouseX <= area.x + area.width
|
|
453
|
+
&& this.mouseY >= area.y && this.mouseY <= totalChartBottom;
|
|
454
|
+
if (!isInChart) {
|
|
455
|
+
group.innerHTML = '';
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
458
|
+
const price = this.yToPrice(this.mouseY);
|
|
459
|
+
const idx = this.xToIndex(this.mouseX);
|
|
460
|
+
const candle = this.visibleData[idx];
|
|
461
|
+
const snapX = this.indexToX(idx);
|
|
462
|
+
let parts = '';
|
|
463
|
+
// Horizontal line
|
|
464
|
+
parts += `<line class="candlestick__crosshair-h" x1="${area.x}" y1="${this.mouseY}" x2="${area.x + area.width}" y2="${this.mouseY}" />`;
|
|
465
|
+
// Vertical line
|
|
466
|
+
parts += `<line class="candlestick__crosshair-v" x1="${snapX}" y1="${area.y}" x2="${snapX}" y2="${totalChartBottom}" />`;
|
|
467
|
+
// Price label
|
|
468
|
+
const priceLabel = this.formatPrice(price);
|
|
469
|
+
const labelX = this.svgWidth - PADDING.right + 4;
|
|
470
|
+
parts += `<rect class="candlestick__crosshair-label-bg" x="${labelX}" y="${this.mouseY - 9}" width="${PADDING.right - 8}" height="18" rx="2" />`;
|
|
471
|
+
parts += `<text class="candlestick__crosshair-label" x="${labelX + 4}" y="${this.mouseY + 4}">${priceLabel}</text>`;
|
|
472
|
+
// Date label
|
|
473
|
+
if (candle) {
|
|
474
|
+
const dateLabel = this.formatDate(candle.date);
|
|
475
|
+
const dateLabelY = totalChartBottom + 4;
|
|
476
|
+
parts += `<rect class="candlestick__crosshair-label-bg" x="${snapX - 36}" y="${dateLabelY}" width="72" height="18" rx="2" />`;
|
|
477
|
+
parts += `<text class="candlestick__crosshair-label" x="${snapX}" y="${dateLabelY + 13}" text-anchor="middle">${dateLabel}</text>`;
|
|
478
|
+
}
|
|
479
|
+
group.innerHTML = parts;
|
|
480
|
+
}
|
|
481
|
+
/** Update tooltip via direct DOM manipulation — no re-render needed */
|
|
482
|
+
updateTooltipDOM() {
|
|
483
|
+
const tooltip = this.tooltipEl;
|
|
484
|
+
if (!tooltip)
|
|
485
|
+
return;
|
|
486
|
+
const tooltipCandle = this.getTooltipCandle();
|
|
487
|
+
const hasTooltip = tooltipCandle !== null;
|
|
488
|
+
if (!hasTooltip) {
|
|
489
|
+
tooltip.classList.remove('candlestick__tooltip--visible');
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
const isBullish = tooltipCandle.close >= tooltipCandle.open;
|
|
493
|
+
const showVolumeInTooltip = this.showVolume && tooltipCandle.volume !== undefined;
|
|
494
|
+
const tooltipIdx = this.xToIndex(this.mouseX);
|
|
495
|
+
const tooltipX = this.indexToX(tooltipIdx);
|
|
496
|
+
const tooltipLeft = tooltipX + this.candleWidth + 12;
|
|
497
|
+
const tooltipFlip = tooltipLeft + 160 > this.svgWidth;
|
|
498
|
+
const tooltipFinalLeft = tooltipFlip ? tooltipX - this.candleWidth - 170 : tooltipLeft;
|
|
499
|
+
tooltip.style.left = `${Math.max(0, tooltipFinalLeft)}px`;
|
|
500
|
+
tooltip.style.top = `${PADDING.top}px`;
|
|
501
|
+
tooltip.classList.add('candlestick__tooltip--visible');
|
|
502
|
+
let rows = '';
|
|
503
|
+
rows += `<div class="candlestick__tooltip-row"><span class="candlestick__tooltip-label">Date</span><span class="candlestick__tooltip-value">${this.formatDate(tooltipCandle.date)}</span></div>`;
|
|
504
|
+
rows += `<div class="candlestick__tooltip-row"><span class="candlestick__tooltip-label">Open</span><span class="candlestick__tooltip-value">${this.formatPrice(tooltipCandle.open)}</span></div>`;
|
|
505
|
+
rows += `<div class="candlestick__tooltip-row"><span class="candlestick__tooltip-label">High</span><span class="candlestick__tooltip-value">${this.formatPrice(tooltipCandle.high)}</span></div>`;
|
|
506
|
+
rows += `<div class="candlestick__tooltip-row"><span class="candlestick__tooltip-label">Low</span><span class="candlestick__tooltip-value">${this.formatPrice(tooltipCandle.low)}</span></div>`;
|
|
507
|
+
const closeClass = isBullish ? 'candlestick__tooltip-value--bullish' : 'candlestick__tooltip-value--bearish';
|
|
508
|
+
rows += `<div class="candlestick__tooltip-row"><span class="candlestick__tooltip-label">Close</span><span class="candlestick__tooltip-value ${closeClass}">${this.formatPrice(tooltipCandle.close)}</span></div>`;
|
|
509
|
+
if (showVolumeInTooltip) {
|
|
510
|
+
rows += `<div class="candlestick__tooltip-row"><span class="candlestick__tooltip-label">Volume</span><span class="candlestick__tooltip-value">${tooltipCandle.volume?.toLocaleString() || '0'}</span></div>`;
|
|
511
|
+
}
|
|
512
|
+
tooltip.innerHTML = rows;
|
|
513
|
+
}
|
|
514
|
+
buildGridLines() {
|
|
515
|
+
if (!this.showGrid)
|
|
516
|
+
return '';
|
|
517
|
+
const area = this.chartArea;
|
|
518
|
+
const { min, max } = this.priceRange;
|
|
519
|
+
const ticks = 6;
|
|
520
|
+
const step = (max - min) / ticks;
|
|
521
|
+
let lines = '';
|
|
522
|
+
for (let i = 0; i <= ticks; i++) {
|
|
523
|
+
const price = min + step * i;
|
|
524
|
+
const y = this.priceToY(price);
|
|
525
|
+
lines += `<line class="candlestick__grid-line" x1="${area.x}" y1="${y}" x2="${area.x + area.width}" y2="${y}" />`;
|
|
526
|
+
}
|
|
527
|
+
return lines;
|
|
528
|
+
}
|
|
529
|
+
buildYAxis() {
|
|
530
|
+
const { min, max } = this.priceRange;
|
|
531
|
+
const ticks = 6;
|
|
532
|
+
const step = (max - min) / ticks;
|
|
533
|
+
let labels = '';
|
|
534
|
+
const labelX = this.svgWidth - PADDING.right + 8;
|
|
535
|
+
for (let i = 0; i <= ticks; i++) {
|
|
536
|
+
const price = min + step * i;
|
|
537
|
+
const y = this.priceToY(price);
|
|
538
|
+
labels += `<text class="candlestick__axis-label candlestick__axis-label--y" x="${labelX}" y="${y}">${this.formatPrice(price)}</text>`;
|
|
539
|
+
}
|
|
540
|
+
return labels;
|
|
541
|
+
}
|
|
542
|
+
buildXAxis() {
|
|
543
|
+
const visible = this.visibleData;
|
|
544
|
+
if (visible.length === 0)
|
|
545
|
+
return '';
|
|
546
|
+
const area = this.chartArea;
|
|
547
|
+
const labelY = area.y + area.height + area.volumeHeight + 16;
|
|
548
|
+
const maxLabels = Math.floor(area.width / 80);
|
|
549
|
+
const step = Math.max(1, Math.ceil(visible.length / maxLabels));
|
|
550
|
+
let labels = '';
|
|
551
|
+
for (let i = 0; i < visible.length; i += step) {
|
|
552
|
+
const x = this.indexToX(i);
|
|
553
|
+
labels += `<text class="candlestick__axis-label candlestick__axis-label--x" x="${x}" y="${labelY}">${this.formatDate(visible[i].date)}</text>`;
|
|
554
|
+
}
|
|
555
|
+
return labels;
|
|
556
|
+
}
|
|
557
|
+
buildCandles() {
|
|
558
|
+
const visible = this.visibleData;
|
|
559
|
+
if (visible.length === 0)
|
|
560
|
+
return '';
|
|
561
|
+
const cw = this.candleWidth;
|
|
562
|
+
const halfCw = cw / 2;
|
|
563
|
+
let parts = '';
|
|
564
|
+
for (let i = 0; i < visible.length; i++) {
|
|
565
|
+
const candle = visible[i];
|
|
566
|
+
const isBullish = candle.close >= candle.open;
|
|
567
|
+
const color = isBullish
|
|
568
|
+
? (this.bullishColor || 'var(--candlestick-bullish)')
|
|
569
|
+
: (this.bearishColor || 'var(--candlestick-bearish)');
|
|
570
|
+
const x = this.indexToX(i);
|
|
571
|
+
const highY = this.priceToY(candle.high);
|
|
572
|
+
const lowY = this.priceToY(candle.low);
|
|
573
|
+
const openY = this.priceToY(candle.open);
|
|
574
|
+
const closeY = this.priceToY(candle.close);
|
|
575
|
+
const bodyTop = Math.min(openY, closeY);
|
|
576
|
+
const bodyHeight = Math.max(1, Math.abs(closeY - openY));
|
|
577
|
+
const shouldAnimate = this.animation && this.animateNext;
|
|
578
|
+
const animDelay = shouldAnimate ? `animation-delay: ${i * 8}ms;` : '';
|
|
579
|
+
const wickAnimClass = shouldAnimate ? ' candlestick__wick--animated' : '';
|
|
580
|
+
const bodyAnimClass = shouldAnimate ? ' candlestick__body--animated' : '';
|
|
581
|
+
// Wick (high to low)
|
|
582
|
+
parts += `<line class="candlestick__wick${wickAnimClass}" x1="${x}" y1="${highY}" x2="${x}" y2="${lowY}" stroke="${color}" style="${animDelay}" />`;
|
|
583
|
+
// Body (open to close)
|
|
584
|
+
parts += `<rect class="candlestick__body${bodyAnimClass}" x="${x - halfCw}" y="${bodyTop}" width="${cw}" height="${bodyHeight}" fill="${color}" stroke="${color}" stroke-width="1" rx="1" style="${animDelay}" data-candle-index="${i}" />`;
|
|
585
|
+
}
|
|
586
|
+
return parts;
|
|
587
|
+
}
|
|
588
|
+
buildVolumeBars() {
|
|
589
|
+
if (!this.showVolume)
|
|
590
|
+
return '';
|
|
591
|
+
const visible = this.visibleData;
|
|
592
|
+
if (visible.length === 0)
|
|
593
|
+
return '';
|
|
594
|
+
const area = this.chartArea;
|
|
595
|
+
const volMax = this.volumeMax;
|
|
596
|
+
const cw = this.candleWidth;
|
|
597
|
+
const halfCw = cw / 2;
|
|
598
|
+
let parts = '';
|
|
599
|
+
for (let i = 0; i < visible.length; i++) {
|
|
600
|
+
const candle = visible[i];
|
|
601
|
+
const vol = candle.volume || 0;
|
|
602
|
+
const isBullish = candle.close >= candle.open;
|
|
603
|
+
const color = isBullish
|
|
604
|
+
? (this.bullishColor || 'var(--candlestick-bullish)')
|
|
605
|
+
: (this.bearishColor || 'var(--candlestick-bearish)');
|
|
606
|
+
const x = this.indexToX(i);
|
|
607
|
+
const barHeight = (vol / volMax) * area.volumeHeight;
|
|
608
|
+
const barY = area.volumeY + area.volumeHeight - barHeight;
|
|
609
|
+
const shouldAnimate = this.animation && this.animateNext;
|
|
610
|
+
const animDelay = shouldAnimate ? `animation-delay: ${i * 8}ms;` : '';
|
|
611
|
+
const animClass = shouldAnimate ? ' candlestick__volume--animated' : '';
|
|
612
|
+
parts += `<rect class="candlestick__volume${animClass}" x="${x - halfCw}" y="${barY}" width="${cw}" height="${barHeight}" fill="${color}" style="${animDelay}" />`;
|
|
613
|
+
}
|
|
614
|
+
return parts;
|
|
615
|
+
}
|
|
616
|
+
getTooltipCandle() {
|
|
617
|
+
if (this.mouseX < 0)
|
|
618
|
+
return null;
|
|
619
|
+
const area = this.chartArea;
|
|
620
|
+
if (this.mouseX < area.x || this.mouseX > area.x + area.width)
|
|
621
|
+
return null;
|
|
622
|
+
const idx = this.xToIndex(this.mouseX);
|
|
623
|
+
return this.visibleData[idx] || null;
|
|
624
|
+
}
|
|
625
|
+
renderContent() {
|
|
626
|
+
return html /*html*/ `
|
|
627
|
+
<div class="candlestick"
|
|
628
|
+
style="height: ${this.svgHeight}px;"
|
|
629
|
+
@mousemove=${this.handleMouseMove}
|
|
630
|
+
@mouseleave=${this.handleMouseLeave}
|
|
631
|
+
@mousedown=${this.handleMouseDown}
|
|
632
|
+
@mouseup=${this.handleMouseUp}
|
|
633
|
+
@wheel=${this.handleWheel}>
|
|
634
|
+
<svg class="candlestick__svg" viewBox="0 0 ${this.svgWidth} ${this.svgHeight}" preserveAspectRatio="none" role="img" aria-label="Candlestick chart with ${this.data.length} data points">
|
|
635
|
+
<g class="candlestick__chart-content"></g>
|
|
636
|
+
<g class="candlestick__crosshair-group"></g>
|
|
637
|
+
</svg>
|
|
638
|
+
<div class="candlestick__tooltip"></div>
|
|
639
|
+
</div>
|
|
640
|
+
`;
|
|
641
|
+
}
|
|
642
|
+
componentStyles() {
|
|
643
|
+
return css /*css*/ `${cssContent}`;
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
return _classThis;
|
|
647
|
+
})();
|
|
648
|
+
|
|
649
|
+
export { SniceCandlestick };
|
|
650
|
+
//# sourceMappingURL=snice-candlestick.js.map
|