layerchart 2.0.0-next.0 → 2.0.0-next.2
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/dist/actions/movable.d.ts +28 -0
- package/dist/actions/movable.js +91 -0
- package/dist/components/AnnotationLine.svelte +155 -0
- package/dist/components/AnnotationLine.svelte.d.ts +28 -0
- package/dist/components/AnnotationPoint.svelte +121 -0
- package/dist/components/AnnotationPoint.svelte.d.ts +32 -0
- package/dist/components/AnnotationRange.svelte +147 -0
- package/dist/components/AnnotationRange.svelte.d.ts +40 -0
- package/dist/components/Arc.svelte +344 -151
- package/dist/components/Arc.svelte.d.ts +138 -0
- package/dist/components/Area.svelte +165 -149
- package/dist/components/Area.svelte.d.ts +45 -0
- package/dist/components/Axis.svelte +287 -174
- package/dist/components/Axis.svelte.d.ts +116 -0
- package/dist/components/Bar.svelte +163 -107
- package/dist/components/Bar.svelte.d.ts +48 -0
- package/dist/components/Bars.svelte +54 -68
- package/dist/components/Bars.svelte.d.ts +27 -0
- package/dist/components/Blur.svelte +31 -7
- package/dist/components/Blur.svelte.d.ts +23 -21
- package/dist/components/Bounds.svelte +49 -19
- package/dist/components/Bounds.svelte.d.ts +24 -50
- package/dist/components/BrushContext.svelte +296 -168
- package/dist/components/BrushContext.svelte.d.ts +97 -65
- package/dist/components/Calendar.svelte +116 -59
- package/dist/components/Calendar.svelte.d.ts +50 -31
- package/dist/components/Chart.svelte +1289 -398
- package/dist/components/Chart.svelte.d.ts +535 -410
- package/dist/components/ChartClipPath.svelte +37 -15
- package/dist/components/ChartClipPath.svelte.d.ts +21 -19
- package/dist/components/Circle.svelte +124 -85
- package/dist/components/Circle.svelte.d.ts +52 -0
- package/dist/components/CircleClipPath.svelte +76 -16
- package/dist/components/CircleClipPath.svelte.d.ts +46 -0
- package/dist/components/ClipPath.svelte +60 -15
- package/dist/components/ClipPath.svelte.d.ts +40 -27
- package/dist/components/ColorRamp.svelte +75 -9
- package/dist/components/ColorRamp.svelte.d.ts +37 -19
- package/dist/components/ComputedStyles.svelte +17 -5
- package/dist/components/ComputedStyles.svelte.d.ts +11 -19
- package/dist/components/Connector.svelte +149 -0
- package/dist/components/Connector.svelte.d.ts +51 -0
- package/dist/components/Dagre.svelte +211 -122
- package/dist/components/Dagre.svelte.d.ts +119 -56
- package/dist/components/ForceSimulation.svelte +215 -90
- package/dist/components/ForceSimulation.svelte.d.ts +82 -35
- package/dist/components/Frame.svelte +33 -13
- package/dist/components/Frame.svelte.d.ts +13 -17
- package/dist/components/GeoCircle.svelte +29 -16
- package/dist/components/GeoCircle.svelte.d.ts +22 -24
- package/dist/components/GeoContext.svelte +113 -72
- package/dist/components/GeoContext.svelte.d.ts +49 -41
- package/dist/components/GeoEdgeFade.svelte +47 -12
- package/dist/components/GeoEdgeFade.svelte.d.ts +17 -19
- package/dist/components/GeoPath.svelte +157 -127
- package/dist/components/GeoPath.svelte.d.ts +48 -36
- package/dist/components/GeoPoint.svelte +52 -20
- package/dist/components/GeoPoint.svelte.d.ts +25 -22
- package/dist/components/GeoSpline.svelte +75 -26
- package/dist/components/GeoSpline.svelte.d.ts +29 -20
- package/dist/components/GeoTile.svelte +100 -49
- package/dist/components/GeoTile.svelte.d.ts +38 -23
- package/dist/components/GeoVisible.svelte +17 -9
- package/dist/components/GeoVisible.svelte.d.ts +10 -18
- package/dist/components/Graticule.svelte +28 -13
- package/dist/components/Graticule.svelte.d.ts +11 -52
- package/dist/components/Grid.svelte +226 -114
- package/dist/components/Grid.svelte.d.ts +70 -0
- package/dist/components/Group.svelte +132 -105
- package/dist/components/Group.svelte.d.ts +53 -0
- package/dist/components/Highlight.svelte +409 -307
- package/dist/components/Highlight.svelte.d.ts +107 -0
- package/dist/components/Hull.svelte +96 -45
- package/dist/components/Hull.svelte.d.ts +40 -30
- package/dist/components/Labels.svelte +125 -46
- package/dist/components/Labels.svelte.d.ts +70 -27
- package/dist/components/Legend.svelte +374 -190
- package/dist/components/Legend.svelte.d.ts +95 -44
- package/dist/components/Line.svelte +163 -125
- package/dist/components/Line.svelte.d.ts +75 -0
- package/dist/components/LinearGradient.svelte +153 -78
- package/dist/components/LinearGradient.svelte.d.ts +66 -31
- package/dist/components/Link.svelte +160 -104
- package/dist/components/Link.svelte.d.ts +54 -0
- package/dist/components/Marker.svelte +100 -39
- package/dist/components/Marker.svelte.d.ts +59 -27
- package/dist/components/MarkerWrapper.svelte +35 -0
- package/dist/components/MarkerWrapper.svelte.d.ts +18 -0
- package/dist/components/MonthPath.svelte +65 -20
- package/dist/components/MonthPath.svelte.d.ts +23 -17
- package/dist/components/MotionPath.svelte +80 -24
- package/dist/components/MotionPath.svelte.d.ts +46 -27
- package/dist/components/Pack.svelte +53 -17
- package/dist/components/Pack.svelte.d.ts +42 -21
- package/dist/components/Partition.svelte +64 -22
- package/dist/components/Partition.svelte.d.ts +49 -26
- package/dist/components/Pattern.svelte +297 -11
- package/dist/components/Pattern.svelte.d.ts +103 -19
- package/dist/components/Pie.svelte +122 -76
- package/dist/components/Pie.svelte.d.ts +65 -51
- package/dist/components/Point.svelte +20 -9
- package/dist/components/Point.svelte.d.ts +16 -20
- package/dist/components/Points.svelte +148 -137
- package/dist/components/Points.svelte.d.ts +45 -34
- package/dist/components/RadialGradient.svelte +143 -70
- package/dist/components/RadialGradient.svelte.d.ts +69 -31
- package/dist/components/Rect.svelte +121 -102
- package/dist/components/Rect.svelte.d.ts +36 -0
- package/dist/components/RectClipPath.svelte +82 -18
- package/dist/components/RectClipPath.svelte.d.ts +55 -0
- package/dist/components/Rule.svelte +105 -62
- package/dist/components/Rule.svelte.d.ts +40 -19
- package/dist/components/Sankey.svelte +132 -55
- package/dist/components/Sankey.svelte.d.ts +61 -31
- package/dist/components/Spline.svelte +281 -218
- package/dist/components/Spline.svelte.d.ts +95 -0
- package/dist/components/Text.svelte +437 -176
- package/dist/components/Text.svelte.d.ts +130 -0
- package/dist/components/Threshold.svelte +48 -16
- package/dist/components/Threshold.svelte.d.ts +29 -31
- package/dist/components/TileImage.svelte +103 -30
- package/dist/components/TileImage.svelte.d.ts +48 -23
- package/dist/components/TransformContext.svelte +365 -171
- package/dist/components/TransformControls.svelte +50 -26
- package/dist/components/TransformControls.svelte.d.ts +27 -19
- package/dist/components/Tree.svelte +74 -33
- package/dist/components/Tree.svelte.d.ts +42 -30
- package/dist/components/Treemap.svelte +119 -42
- package/dist/components/Treemap.svelte.d.ts +75 -27
- package/dist/components/Voronoi.svelte +106 -75
- package/dist/components/Voronoi.svelte.d.ts +40 -41
- package/dist/components/charts/ArcChart.svelte +464 -0
- package/dist/components/charts/ArcChart.svelte.d.ts +90 -0
- package/dist/components/charts/AreaChart.svelte +450 -393
- package/dist/components/charts/AreaChart.svelte.d.ts +61 -0
- package/dist/components/charts/BarChart.svelte +454 -389
- package/dist/components/charts/BarChart.svelte.d.ts +76 -0
- package/dist/components/charts/ChartAnnotations.svelte +37 -0
- package/dist/components/charts/ChartAnnotations.svelte.d.ts +10 -0
- package/dist/components/charts/DefaultTooltip.svelte +60 -0
- package/dist/components/charts/DefaultTooltip.svelte.d.ts +10 -0
- package/dist/components/charts/LineChart.svelte +369 -314
- package/dist/components/charts/LineChart.svelte.d.ts +53 -0
- package/dist/components/charts/PieChart.svelte +458 -316
- package/dist/components/charts/PieChart.svelte.d.ts +137 -353
- package/dist/components/charts/ScatterChart.svelte +334 -296
- package/dist/components/charts/ScatterChart.svelte.d.ts +39 -0
- package/dist/components/charts/index.d.ts +8 -0
- package/dist/components/charts/index.js +7 -0
- package/dist/components/charts/types.d.ts +253 -0
- package/dist/components/charts/utils.svelte.d.ts +30 -0
- package/dist/components/charts/utils.svelte.js +55 -0
- package/dist/components/index.d.ts +76 -4
- package/dist/components/index.js +76 -5
- package/dist/components/layout/Canvas.svelte +321 -155
- package/dist/components/layout/Canvas.svelte.d.ts +104 -55
- package/dist/components/layout/Html.svelte +82 -42
- package/dist/components/layout/Html.svelte.d.ts +39 -28
- package/dist/components/layout/Layer.svelte +39 -0
- package/dist/components/layout/Layer.svelte.d.ts +17 -0
- package/dist/components/layout/Svg.svelte +122 -70
- package/dist/components/layout/Svg.svelte.d.ts +53 -34
- package/dist/components/layout/WebGL.svelte +135 -0
- package/dist/components/layout/WebGL.svelte.d.ts +50 -0
- package/dist/components/tooltip/Tooltip.svelte +246 -78
- package/dist/components/tooltip/Tooltip.svelte.d.ts +149 -31
- package/dist/components/tooltip/TooltipContext.svelte +409 -271
- package/dist/components/tooltip/TooltipContext.svelte.d.ts +86 -55
- package/dist/components/tooltip/TooltipHeader.svelte +100 -11
- package/dist/components/tooltip/TooltipHeader.svelte.d.ts +43 -23
- package/dist/components/tooltip/TooltipItem.svelte +167 -27
- package/dist/components/tooltip/TooltipItem.svelte.d.ts +63 -31
- package/dist/components/tooltip/TooltipList.svelte +22 -3
- package/dist/components/tooltip/TooltipList.svelte.d.ts +6 -17
- package/dist/components/tooltip/TooltipSeparator.svelte +27 -1
- package/dist/components/tooltip/TooltipSeparator.svelte.d.ts +6 -15
- package/dist/components/tooltip/index.d.ts +6 -0
- package/dist/components/tooltip/index.js +6 -0
- package/dist/components/tooltip/tooltipMetaContext.d.ts +79 -0
- package/dist/components/tooltip/tooltipMetaContext.js +139 -0
- package/dist/components/types.d.ts +1 -0
- package/dist/components/types.js +1 -0
- package/dist/docs/Blockquote.svelte.d.ts +18 -14
- package/dist/docs/Code.svelte.d.ts +26 -22
- package/dist/docs/ConnectorSweepMenuField.svelte +17 -0
- package/dist/docs/ConnectorSweepMenuField.svelte.d.ts +7 -0
- package/dist/docs/ConnectorTypeMenuField.svelte +17 -0
- package/dist/docs/ConnectorTypeMenuField.svelte.d.ts +7 -0
- package/dist/docs/CurveMenuField.svelte +14 -3
- package/dist/docs/CurveMenuField.svelte.d.ts +9 -18
- package/dist/docs/GeoDebug.svelte +47 -42
- package/dist/docs/GeoDebug.svelte.d.ts +4 -16
- package/dist/docs/Header1.svelte.d.ts +27 -16
- package/dist/docs/Json.svelte.d.ts +20 -16
- package/dist/docs/Layout.svelte.d.ts +18 -13
- package/dist/docs/Link.svelte.d.ts +33 -21
- package/dist/docs/PathDataMenuField.svelte +14 -10
- package/dist/docs/PathDataMenuField.svelte.d.ts +8 -18
- package/dist/docs/Preview.svelte +20 -7
- package/dist/docs/Preview.svelte.d.ts +12 -22
- package/dist/docs/TilesetField.svelte.d.ts +21 -17
- package/dist/docs/TransformDebug.svelte +5 -6
- package/dist/docs/TransformDebug.svelte.d.ts +18 -14
- package/dist/docs/ViewSourceButton.svelte.d.ts +21 -17
- package/dist/types/d3-shape-extentions.d.ts +7 -0
- package/dist/utils/afterTick.d.ts +5 -0
- package/dist/utils/afterTick.js +8 -0
- package/dist/utils/arcText.svelte.d.ts +57 -0
- package/dist/utils/arcText.svelte.js +262 -0
- package/dist/utils/array.d.ts +9 -1
- package/dist/utils/array.js +13 -0
- package/dist/utils/attributes.d.ts +29 -0
- package/dist/utils/attributes.js +40 -0
- package/dist/utils/canvas.js +47 -10
- package/dist/utils/chart.d.ts +78 -0
- package/dist/utils/chart.js +512 -0
- package/dist/utils/color.d.ts +1 -0
- package/dist/utils/color.js +8 -0
- package/dist/utils/common.d.ts +3 -5
- package/dist/utils/common.js +3 -2
- package/dist/utils/connectorUtils.d.ts +21 -0
- package/dist/utils/connectorUtils.js +111 -0
- package/dist/utils/createId.d.ts +7 -0
- package/dist/utils/createId.js +9 -0
- package/dist/utils/debug.d.ts +1 -0
- package/dist/utils/debug.js +84 -0
- package/dist/utils/filterObject.d.ts +9 -0
- package/dist/utils/filterObject.js +12 -0
- package/dist/utils/graph/dagre.d.ts +34 -0
- package/dist/utils/graph/dagre.js +78 -0
- package/dist/utils/graph/dagre.test.d.ts +1 -0
- package/dist/utils/{graph.test.js → graph/dagre.test.js} +19 -33
- package/dist/utils/graph/sankey.d.ts +28 -0
- package/dist/utils/{graph.js → graph/sankey.js} +13 -41
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils/key.svelte.d.ts +3 -0
- package/dist/utils/key.svelte.js +11 -0
- package/dist/utils/legendPayload.d.ts +7 -0
- package/dist/utils/legendPayload.js +8 -0
- package/dist/utils/motion.svelte.d.ts +140 -0
- package/dist/utils/motion.svelte.js +180 -0
- package/dist/utils/motion.test.d.ts +1 -0
- package/dist/utils/motion.test.js +213 -0
- package/dist/utils/{rect.d.ts → rect.svelte.d.ts} +7 -4
- package/dist/utils/rect.svelte.js +105 -0
- package/dist/utils/scales.svelte.d.ts +90 -0
- package/dist/utils/{scales.js → scales.svelte.js} +100 -39
- package/dist/utils/stack.d.ts +2 -3
- package/dist/utils/stack.js +1 -1
- package/dist/utils/string.js +87 -0
- package/dist/utils/ticks.d.ts +8 -2
- package/dist/utils/ticks.js +28 -0
- package/dist/utils/ticks.test.d.ts +1 -0
- package/dist/utils/ticks.test.js +67 -0
- package/dist/utils/types.d.ts +81 -0
- package/package.json +25 -24
- package/dist/components/ChartContext.svelte +0 -295
- package/dist/components/ChartContext.svelte.d.ts +0 -139
- package/dist/components/TransformContext.svelte.d.ts +0 -158
- package/dist/stores/motionStore.d.ts +0 -30
- package/dist/stores/motionStore.js +0 -62
- package/dist/utils/graph.d.ts +0 -37
- package/dist/utils/rect.js +0 -107
- package/dist/utils/scales.d.ts +0 -66
- /package/dist/{utils/graph.test.d.ts → components/charts/types.js} +0 -0
|
@@ -2,54 +2,59 @@
|
|
|
2
2
|
import { Checkbox } from 'svelte-ux';
|
|
3
3
|
import { cls } from '@layerstack/tailwind';
|
|
4
4
|
import { format } from '@layerstack/utils';
|
|
5
|
+
import { getChartContext } from '../components/Chart.svelte';
|
|
6
|
+
import { getGeoContext } from '../components/GeoContext.svelte';
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
const ctx = getChartContext();
|
|
10
|
+
const geoCtx = getGeoContext();
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
const geo = geoContext();
|
|
12
|
+
let { class: className }: HTMLAttributes<HTMLElement> = $props();
|
|
11
13
|
|
|
12
|
-
let showCenter = false;
|
|
14
|
+
let showCenter = $state(false);
|
|
13
15
|
</script>
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
class={cls('bg-surface-300/50 rounded-sm m-1 backdrop-blur-sm p-2 tabular-nums',
|
|
17
|
-
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
17
|
+
{#if geoCtx.projection}
|
|
18
|
+
<div class={cls('bg-surface-300/50 rounded-sm m-1 backdrop-blur-sm p-2 tabular-nums', className)}>
|
|
19
|
+
<div class="grid gap-2 text-xs">
|
|
20
|
+
<div>
|
|
21
|
+
<span class="opacity-50">scale:</span>
|
|
22
|
+
{format(geoCtx.projection.scale(), 'decimal')}
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div>
|
|
26
|
+
<span class="opacity-50">translate:</span>
|
|
27
|
+
{#each geoCtx.projection.translate() as coord}
|
|
28
|
+
<div class="text-right">{format(coord, 'decimal')}</div>
|
|
29
|
+
{/each}
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div>
|
|
33
|
+
<span class="opacity-50">rotate:</span>
|
|
34
|
+
{#each geoCtx.projection.rotate() as angle}
|
|
35
|
+
<div class="text-right">{format(angle, 'decimal')}</div>
|
|
36
|
+
{/each}
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="grid grid-cols-[auto_1fr]">
|
|
40
|
+
<span class="opacity-50">center:</span>
|
|
41
|
+
<span class="text-right">
|
|
42
|
+
{geoCtx.projection.center?.()}
|
|
43
|
+
</span>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div>
|
|
47
|
+
<span class="opacity-50">long/lat: <Checkbox bind:checked={showCenter} size="xs" /></span>
|
|
48
|
+
{#each geoCtx.projection.invert?.([ctx.width / 2, ctx.height / 2]) ?? [] as coord}
|
|
49
|
+
<div class="text-right">{format(coord, 'decimal')}</div>
|
|
50
|
+
{/each}
|
|
51
|
+
</div>
|
|
47
52
|
</div>
|
|
48
53
|
</div>
|
|
49
|
-
</div>
|
|
50
54
|
|
|
51
|
-
{#if showCenter}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
{#if showCenter}
|
|
56
|
+
<div
|
|
57
|
+
class="absolute w-2 h-2 bg-danger/80 rounded-full z-1 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
58
|
+
></div>
|
|
59
|
+
{/if}
|
|
55
60
|
{/if}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
events: {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {};
|
|
10
|
-
};
|
|
11
|
-
export type GeoDebugProps = typeof __propDef.props;
|
|
12
|
-
export type GeoDebugEvents = typeof __propDef.events;
|
|
13
|
-
export type GeoDebugSlots = typeof __propDef.slots;
|
|
14
|
-
export default class GeoDebug extends SvelteComponentTyped<GeoDebugProps, GeoDebugEvents, GeoDebugSlots> {
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
declare const GeoDebug: import("svelte").Component<HTMLAttributes<HTMLElement>, {}, "">;
|
|
3
|
+
type GeoDebug = ReturnType<typeof GeoDebug>;
|
|
4
|
+
export default GeoDebug;
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
5
11
|
};
|
|
6
|
-
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {
|
|
10
|
-
default: {};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export type Header1Props = typeof __propDef.props;
|
|
14
|
-
export type Header1Events = typeof __propDef.events;
|
|
15
|
-
export type Header1Slots = typeof __propDef.slots;
|
|
16
|
-
export default class Header1 extends SvelteComponentTyped<Header1Props, Header1Events, Header1Slots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
17
13
|
}
|
|
18
|
-
|
|
14
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
+
default: any;
|
|
16
|
+
} ? Props extends Record<string, never> ? any : {
|
|
17
|
+
children?: any;
|
|
18
|
+
} : {});
|
|
19
|
+
declare const Header1: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
}, {
|
|
22
|
+
default: {};
|
|
23
|
+
}>, {
|
|
24
|
+
[evt: string]: CustomEvent<any>;
|
|
25
|
+
}, {
|
|
26
|
+
default: {};
|
|
27
|
+
}, {}, string>;
|
|
28
|
+
type Header1 = InstanceType<typeof Header1>;
|
|
29
|
+
export default Header1;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
7
11
|
};
|
|
8
|
-
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
};
|
|
13
|
-
export type JsonProps = typeof __propDef.props;
|
|
14
|
-
export type JsonEvents = typeof __propDef.events;
|
|
15
|
-
export type JsonSlots = typeof __propDef.slots;
|
|
16
|
-
export default class Json extends SvelteComponentTyped<JsonProps, JsonEvents, JsonSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
17
13
|
}
|
|
18
|
-
|
|
14
|
+
declare const Json: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
value: any;
|
|
17
|
+
defaultExpandedPaths?: string[] | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
}, {}, {}, string>;
|
|
21
|
+
type Json = InstanceType<typeof Json>;
|
|
22
|
+
export default Json;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
1
|
import blockquote from './Blockquote.svelte';
|
|
3
2
|
import a from './Link.svelte';
|
|
4
3
|
export { a, blockquote };
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
5
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
6
|
+
$$bindings?: Bindings;
|
|
7
|
+
} & Exports;
|
|
8
|
+
(internal: unknown, props: {
|
|
9
|
+
$$events?: Events;
|
|
10
|
+
$$slots?: Slots;
|
|
11
|
+
}): Exports & {
|
|
12
|
+
$set?: any;
|
|
13
|
+
$on?: any;
|
|
9
14
|
};
|
|
10
|
-
|
|
11
|
-
default: {};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export type LayoutProps = typeof __propDef.props;
|
|
15
|
-
export type LayoutEvents = typeof __propDef.events;
|
|
16
|
-
export type LayoutSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Layout extends SvelteComponentTyped<LayoutProps, LayoutEvents, LayoutSlots> {
|
|
15
|
+
z_$$bindings?: Bindings;
|
|
18
16
|
}
|
|
17
|
+
declare const Layout: $$__sveltets_2_IsomorphicComponent<any, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {
|
|
20
|
+
default: {};
|
|
21
|
+
}, {}, string>;
|
|
22
|
+
type Layout = InstanceType<typeof Layout>;
|
|
23
|
+
export default Layout;
|
|
@@ -1,27 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** @typedef {typeof __propDef.slots} LinkSlots */
|
|
4
|
-
export default class Link extends SvelteComponentTyped<{
|
|
1
|
+
export default Link;
|
|
2
|
+
type Link = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
5
3
|
[x: string]: any;
|
|
6
4
|
}, {
|
|
5
|
+
default: {};
|
|
6
|
+
}>, {
|
|
7
7
|
[evt: string]: CustomEvent<any>;
|
|
8
8
|
}, {
|
|
9
9
|
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
|
|
12
|
-
export type LinkProps = typeof __propDef.props;
|
|
13
|
-
export type LinkEvents = typeof __propDef.events;
|
|
14
|
-
export type LinkSlots = typeof __propDef.slots;
|
|
15
|
-
import { SvelteComponentTyped } from "svelte";
|
|
16
|
-
declare const __propDef: {
|
|
17
|
-
props: {
|
|
18
|
-
[x: string]: any;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
[evt: string]: CustomEvent<any>;
|
|
22
|
-
};
|
|
23
|
-
slots: {
|
|
24
|
-
default: {};
|
|
25
|
-
};
|
|
10
|
+
}> & {
|
|
11
|
+
$$bindings?: string | undefined;
|
|
26
12
|
};
|
|
27
|
-
|
|
13
|
+
declare const Link: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
}, {
|
|
16
|
+
default: {};
|
|
17
|
+
}>, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {
|
|
20
|
+
default: {};
|
|
21
|
+
}, {}, string>;
|
|
22
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
23
|
+
default: any;
|
|
24
|
+
} ? Props extends Record<string, never> ? any : {
|
|
25
|
+
children?: any;
|
|
26
|
+
} : {});
|
|
27
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
28
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
29
|
+
$$bindings?: Bindings;
|
|
30
|
+
} & Exports;
|
|
31
|
+
(internal: unknown, props: Props & {
|
|
32
|
+
$$events?: Events;
|
|
33
|
+
$$slots?: Slots;
|
|
34
|
+
}): Exports & {
|
|
35
|
+
$set?: any;
|
|
36
|
+
$on?: any;
|
|
37
|
+
};
|
|
38
|
+
z_$$bindings?: Bindings;
|
|
39
|
+
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import * as easings from 'svelte/easing';
|
|
4
|
-
|
|
5
4
|
import { MenuField } from 'svelte-ux';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
let {
|
|
7
|
+
value = $bindable(),
|
|
8
|
+
amplitude = 1,
|
|
9
|
+
frequency = 10,
|
|
10
|
+
phase = 0,
|
|
11
|
+
}: {
|
|
12
|
+
value?: any;
|
|
13
|
+
amplitude?: number;
|
|
14
|
+
frequency?: number;
|
|
15
|
+
phase?: number;
|
|
16
|
+
} = $props();
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
const mathOptions = $derived([
|
|
15
19
|
{
|
|
16
20
|
label: 'sin',
|
|
17
21
|
group: 'math',
|
|
@@ -53,7 +57,7 @@
|
|
|
53
57
|
group: 'math',
|
|
54
58
|
value: (x: number) => amplitude * Math.pow(x, frequency) + phase,
|
|
55
59
|
},
|
|
56
|
-
];
|
|
60
|
+
]);
|
|
57
61
|
|
|
58
62
|
const easingOptions = Object.entries(easings).map(([key, value]) => {
|
|
59
63
|
return {
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
};
|
|
64
68
|
});
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
const options = $derived([...mathOptions, ...easingOptions]);
|
|
67
71
|
|
|
68
72
|
// Select initial option
|
|
69
73
|
onMount(() => {
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
frequency?: number;
|
|
7
|
-
phase?: number;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
1
|
+
type $$ComponentProps = {
|
|
2
|
+
value?: any;
|
|
3
|
+
amplitude?: number;
|
|
4
|
+
frequency?: number;
|
|
5
|
+
phase?: number;
|
|
13
6
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export default class PathDataMenuField extends SvelteComponentTyped<PathDataMenuFieldProps, PathDataMenuFieldEvents, PathDataMenuFieldSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
7
|
+
declare const PathDataMenuField: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
|
+
type PathDataMenuField = ReturnType<typeof PathDataMenuField>;
|
|
9
|
+
export default PathDataMenuField;
|
package/dist/docs/Preview.svelte
CHANGED
|
@@ -10,12 +10,25 @@
|
|
|
10
10
|
|
|
11
11
|
import Code from './Code.svelte';
|
|
12
12
|
import Json from './Json.svelte';
|
|
13
|
+
import type { Snippet } from 'svelte';
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
let {
|
|
16
|
+
code,
|
|
17
|
+
data,
|
|
18
|
+
language = 'svelte',
|
|
19
|
+
highlightedCode = code ? Prism.highlight(code, Prism.languages.svelte, language) : '',
|
|
20
|
+
showCode = false,
|
|
21
|
+
class: className,
|
|
22
|
+
children,
|
|
23
|
+
}: {
|
|
24
|
+
code?: string;
|
|
25
|
+
data?: any;
|
|
26
|
+
language?: string;
|
|
27
|
+
highlightedCode?: string;
|
|
28
|
+
showCode?: boolean;
|
|
29
|
+
class?: string | null;
|
|
30
|
+
children: Snippet;
|
|
31
|
+
} = $props();
|
|
19
32
|
|
|
20
33
|
/**
|
|
21
34
|
* Custom JSON replacer (to use with JSON.stringify()) to convert `Date` instances to `new Date()`
|
|
@@ -41,9 +54,9 @@
|
|
|
41
54
|
}
|
|
42
55
|
</script>
|
|
43
56
|
|
|
44
|
-
<div class={cls('Preview border rounded-sm bg-surface-100',
|
|
57
|
+
<div class={cls('Preview border rounded-sm bg-surface-100', className)}>
|
|
45
58
|
<div class="p-4">
|
|
46
|
-
|
|
59
|
+
{@render children?.()}
|
|
47
60
|
</div>
|
|
48
61
|
|
|
49
62
|
{#if code && showCode}
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
1
|
import 'prism-svelte';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
events: {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {
|
|
16
|
-
default: {};
|
|
17
|
-
};
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type $$ComponentProps = {
|
|
4
|
+
code?: string;
|
|
5
|
+
data?: any;
|
|
6
|
+
language?: string;
|
|
7
|
+
highlightedCode?: string;
|
|
8
|
+
showCode?: boolean;
|
|
9
|
+
class?: string | null;
|
|
10
|
+
children: Snippet;
|
|
18
11
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export
|
|
22
|
-
export default class Preview extends SvelteComponentTyped<PreviewProps, PreviewEvents, PreviewSlots> {
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
12
|
+
declare const Preview: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
|
+
type Preview = ReturnType<typeof Preview>;
|
|
14
|
+
export default Preview;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
6
11
|
};
|
|
7
|
-
|
|
8
|
-
click: MouseEvent;
|
|
9
|
-
} & {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
13
|
-
};
|
|
14
|
-
export type TilesetFieldProps = typeof __propDef.props;
|
|
15
|
-
export type TilesetFieldEvents = typeof __propDef.events;
|
|
16
|
-
export type TilesetFieldSlots = typeof __propDef.slots;
|
|
17
|
-
export default class TilesetField extends SvelteComponentTyped<TilesetFieldProps, TilesetFieldEvents, TilesetFieldSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
18
13
|
}
|
|
19
|
-
|
|
14
|
+
declare const TilesetField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
doubleScale?: boolean;
|
|
16
|
+
serviceUrl?: Function;
|
|
17
|
+
}, {
|
|
18
|
+
click: MouseEvent;
|
|
19
|
+
} & {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
}, {}, {}, string>;
|
|
22
|
+
type TilesetField = InstanceType<typeof TilesetField>;
|
|
23
|
+
export default TilesetField;
|
|
@@ -2,22 +2,21 @@
|
|
|
2
2
|
import { cls } from '@layerstack/tailwind';
|
|
3
3
|
import { format } from '@layerstack/utils';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { getTransformContext } from '../components/TransformContext.svelte';
|
|
6
6
|
|
|
7
|
-
const transform =
|
|
8
|
-
const { translate, scale } = transform;
|
|
7
|
+
const transform = getTransformContext();
|
|
9
8
|
</script>
|
|
10
9
|
|
|
11
10
|
<div
|
|
12
11
|
class={cls('bg-surface-300/50 rounded-sm m-1 backdrop-blur-sm p-2 tabular-nums', $$props.class)}
|
|
13
12
|
>
|
|
14
13
|
<div class="grid gap-2 text-xs">
|
|
15
|
-
<div><span class="opacity-50">scale:</span> {format(
|
|
14
|
+
<div><span class="opacity-50">scale:</span> {format(transform.scale, 'decimal')}</div>
|
|
16
15
|
|
|
17
16
|
<div>
|
|
18
17
|
<span class="opacity-50">translate:</span>
|
|
19
|
-
<div class="text-right">{format(
|
|
20
|
-
<div class="text-right">{format(
|
|
18
|
+
<div class="text-right">{format(transform.translate.x, 'decimal')}</div>
|
|
19
|
+
<div class="text-right">{format(transform.translate.y, 'decimal')}</div>
|
|
21
20
|
</div>
|
|
22
21
|
</div>
|
|
23
22
|
</div>
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
5
11
|
};
|
|
6
|
-
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
};
|
|
9
|
-
slots: {};
|
|
10
|
-
};
|
|
11
|
-
export type TransformDebugProps = typeof __propDef.props;
|
|
12
|
-
export type TransformDebugEvents = typeof __propDef.events;
|
|
13
|
-
export type TransformDebugSlots = typeof __propDef.slots;
|
|
14
|
-
export default class TransformDebug extends SvelteComponentTyped<TransformDebugProps, TransformDebugEvents, TransformDebugSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
declare const TransformDebug: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}, {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
}, {}, {}, string>;
|
|
19
|
+
type TransformDebug = InstanceType<typeof TransformDebug>;
|
|
20
|
+
export default TransformDebug;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
1
|
import type { ComponentProps } from 'svelte';
|
|
3
2
|
import { Button } from 'svelte-ux';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
4
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
5
|
+
$$bindings?: Bindings;
|
|
6
|
+
} & Exports;
|
|
7
|
+
(internal: unknown, props: Props & {
|
|
8
|
+
$$events?: Events;
|
|
9
|
+
$$slots?: Slots;
|
|
10
|
+
}): Exports & {
|
|
11
|
+
$set?: any;
|
|
12
|
+
$on?: any;
|
|
10
13
|
};
|
|
11
|
-
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
};
|
|
14
|
-
slots: {};
|
|
15
|
-
};
|
|
16
|
-
export type ViewSourceButtonProps = typeof __propDef.props;
|
|
17
|
-
export type ViewSourceButtonEvents = typeof __propDef.events;
|
|
18
|
-
export type ViewSourceButtonSlots = typeof __propDef.slots;
|
|
19
|
-
export default class ViewSourceButton extends SvelteComponentTyped<ViewSourceButtonProps, ViewSourceButtonEvents, ViewSourceButtonSlots> {
|
|
14
|
+
z_$$bindings?: Bindings;
|
|
20
15
|
}
|
|
21
|
-
|
|
16
|
+
declare const ViewSourceButton: $$__sveltets_2_IsomorphicComponent<{
|
|
17
|
+
label: string;
|
|
18
|
+
source?: string | undefined;
|
|
19
|
+
href?: string | undefined;
|
|
20
|
+
icon: ComponentProps<Button>["icon"];
|
|
21
|
+
}, {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
}, {}, {}, string>;
|
|
24
|
+
type ViewSourceButton = InstanceType<typeof ViewSourceButton>;
|
|
25
|
+
export default ViewSourceButton;
|