layerchart 0.27.0 → 0.28.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,7 +91,7 @@ function getDefaultLabelProps() {
91
91
  y1={$yRange[0] || 0}
92
92
  y2={$yRange[1] || 0}
93
93
  {...lineProps}
94
- class={cls('rule stroke-gray-400', lineProps?.class)}
94
+ class={cls('rule stroke-surface-content/50', lineProps?.class)}
95
95
  />
96
96
  {/if}
97
97
 
@@ -102,7 +102,7 @@ function getDefaultLabelProps() {
102
102
  y1={placement === 'top' ? yRangeMin : yRangeMax}
103
103
  y2={placement === 'top' ? yRangeMin : yRangeMax}
104
104
  {...lineProps}
105
- class={cls('rule stroke-gray-400', lineProps?.class)}
105
+ class={cls('rule stroke-surface-content/50', lineProps?.class)}
106
106
  />
107
107
  {/if}
108
108
  {/if}
@@ -119,7 +119,7 @@ function getDefaultLabelProps() {
119
119
  x2={tickCoords.x}
120
120
  y2={yRangeMax}
121
121
  {...lineProps}
122
- class={cls('grid stroke-gray-200', lineProps?.class)}
122
+ class={cls('grid stroke-surface-content/10', lineProps?.class)}
123
123
  />
124
124
  {:else if orientation === 'vertical'}
125
125
  <line
@@ -128,7 +128,7 @@ function getDefaultLabelProps() {
128
128
  x2={$width}
129
129
  y2={tickCoords.y}
130
130
  {...lineProps}
131
- class={cls('grid stroke-gray-200', lineProps?.class)}
131
+ class={cls('grid stroke-surface-content/10', lineProps?.class)}
132
132
  />
133
133
  {/if}
134
134
  {/if}
@@ -140,7 +140,7 @@ function getDefaultLabelProps() {
140
140
  y1={tickCoords.y}
141
141
  x2={tickCoords.x}
142
142
  y2={tickCoords.y + (placement === 'top' ? -tickSize : tickSize)}
143
- class="tick stroke-gray-400"
143
+ class="tick stroke-surface-content/50"
144
144
  />
145
145
  {:else if orientation === 'vertical'}
146
146
  <line
@@ -148,7 +148,7 @@ function getDefaultLabelProps() {
148
148
  y1={tickCoords.y}
149
149
  x2={tickCoords.x + (placement === 'left' ? -tickSize : tickSize)}
150
150
  y2={tickCoords.y}
151
- class="tick stroke-gray-400"
151
+ class="tick stroke-surface-content/50"
152
152
  />
153
153
  {/if}
154
154
 
@@ -159,7 +159,7 @@ function getDefaultLabelProps() {
159
159
  {...getDefaultLabelProps()}
160
160
  {...labelProps}
161
161
  class={cls(
162
- 'label text-[10px] stroke-white [stroke-width:2px] font-light',
162
+ 'label text-[10px] stroke-surface-100 [stroke-width:2px] font-light',
163
163
  labelProps?.class
164
164
  )}
165
165
  />
@@ -51,7 +51,7 @@ $: cells = yearDays.map((date) => {
51
51
  fill={cell.color}
52
52
  on:mousemove={(e) => tooltip?.show(e, cell.data)}
53
53
  on:mouseleave={(e) => tooltip?.hide()}
54
- class="stroke-black/5"
54
+ class="stroke-surface-content/5"
55
55
  {...$$restProps}
56
56
  />
57
57
  {/each}
@@ -167,7 +167,10 @@ $: if ($tooltip.data) {
167
167
  spring
168
168
  {..._area}
169
169
  {...typeof area === 'object' ? area : null}
170
- class={cls(!area.fill && 'fill-black/5', typeof area === 'object' ? area.class : null)}
170
+ class={cls(
171
+ !area.fill && 'fill-surface-content/5',
172
+ typeof area === 'object' ? area.class : null
173
+ )}
171
174
  on:click
172
175
  />
173
176
  </slot>
@@ -184,7 +187,7 @@ $: if ($tooltip.data) {
184
187
  strokeWidth={typeof bar === 'object' ? bar.strokeWidth : null}
185
188
  radius={typeof bar === 'object' ? bar.radius : null}
186
189
  bar={$tooltip.data}
187
- class={cls(!bar.fill && 'fill-accent-500', typeof bar === 'object' ? bar.class : null)}
190
+ class={cls(!bar.fill && 'fill-primary', typeof bar === 'object' ? bar.class : null)}
188
191
  on:click
189
192
  />
190
193
  </slot>
@@ -201,7 +204,7 @@ $: if ($tooltip.data) {
201
204
  y2={line.y2}
202
205
  {...typeof lines === 'object' ? lines : null}
203
206
  class={cls(
204
- 'stroke-black/20 stroke-2 [stroke-dasharray:2,2] pointer-events-none',
207
+ 'stroke-surface-content/20 stroke-2 [stroke-dasharray:2,2] pointer-events-none',
205
208
  typeof lines === 'object' ? lines.class : null
206
209
  )}
207
210
  />
@@ -223,7 +226,7 @@ $: if ($tooltip.data) {
223
226
  {...typeof points === 'object' ? points : null}
224
227
  class={cls(
225
228
  'stroke-[6] stroke-white [paint-order:stroke] drop-shadow',
226
- !fill && 'fill-accent-500',
229
+ !fill && 'fill-primary',
227
230
  typeof points === 'object' ? points.class : null
228
231
  )}
229
232
  />
@@ -101,7 +101,7 @@ $: getTextProps = (item) => {
101
101
  <!-- TODO: Add labels for each item when array/stack? Use `getValue(item)` instead and iterate -->
102
102
  <Text
103
103
  value={getFormattedValue(item)}
104
- class="text-xs stroke-white [stroke-width:2px]"
104
+ class="text-xs stroke-surface-100 [stroke-width:2px]"
105
105
  {...getTextProps(item)}
106
106
  {...$$restProps}
107
107
  />
@@ -147,7 +147,7 @@ else {
147
147
  x={xScale(tick) + tickLabelOffset}
148
148
  y={height + tickSize + tickFontSize}
149
149
  style:font-size={tickFontSize}
150
- class={classes.label}
150
+ class={cls('fill-surface-content', classes.label)}
151
151
  >
152
152
  {tickFormat ? format(tick, tickFormat) : tick}
153
153
  </text>
@@ -158,7 +158,7 @@ else {
158
158
  y1={0}
159
159
  x2={xScale(tick)}
160
160
  y2={height + tickSize}
161
- class={cls('stroke-black', classes.tick)}
161
+ class={cls('stroke-surface-content', classes.tick)}
162
162
  />
163
163
  {/if}
164
164
  {/each}
@@ -11,8 +11,8 @@ export let source = sankey ? (d) => [d.source.x1, d.y0] : (d) => d.source;
11
11
  export let target = sankey ? (d) => [d.target.x0, d.y1] : (d) => d.target;
12
12
  /** Convenient property to swap x/y accessor logic */
13
13
  export let orientation = sankey ? 'horizontal' : 'vertical';
14
- export let x = sankey ? (d) => d[0] : (d) => (orientation === 'horizontal' ? d.y : d.x);
15
- export let y = sankey ? (d) => d[1] : (d) => (orientation === 'horizontal' ? d.x : d.y);
14
+ export let x = (d) => (sankey ? d[0] : orientation === 'horizontal' ? d.y : d.x);
15
+ export let y = (d) => (sankey ? d[1] : orientation === 'horizontal' ? d.x : d.y);
16
16
  export let curve = orientation === 'horizontal' ? curveBumpX : curveBumpY;
17
17
  export let tweened = undefined;
18
18
  $: tweenedOptions = tweened ? { interpolate: interpolatePath, ...tweened } : false;
@@ -22,4 +22,4 @@ $: pathData = `
22
22
  `;
23
23
  </script>
24
24
 
25
- <path d={pathData} fill="none" stroke="black" {...$$restProps} />
25
+ <path d={pathData} fill="none" class="stroke-surface-content/20" {...$$restProps} />
@@ -78,11 +78,11 @@ $: _links = $data.flatMap((d) => {
78
78
  const y = $yGet(d) + getOffset($yGet(d), offsetY, $yScale);
79
79
  return {
80
80
  source: {
81
- x: xMin + getOffset(xMin, offsetX, $xScale),
81
+ x: xMin + getOffset(xMin, offsetX, $xScale) + r,
82
82
  y,
83
83
  },
84
84
  target: {
85
- x: xMax + getOffset(xMax, offsetX, $xScale),
85
+ x: xMax + getOffset(xMax, offsetX, $xScale) - r,
86
86
  y: y,
87
87
  },
88
88
  };
@@ -112,7 +112,11 @@ $: _links = $data.flatMap((d) => {
112
112
  {#if links}
113
113
  <g class="link-group">
114
114
  {#each _links as link}
115
- <Link data={link} stroke="black" {...typeof links === 'object' ? links : null} />
115
+ <Link
116
+ data={link}
117
+ class="stroke-surface-content/50"
118
+ {...typeof links === 'object' ? links : null}
119
+ />
116
120
  {/each}
117
121
  </g>
118
122
  {/if}
@@ -1,4 +1,5 @@
1
- <script>import { getStringWidth } from '../utils/string';
1
+ <script>import { cls } from 'svelte-ux';
2
+ import { getStringWidth } from '../utils/string';
2
3
  /*
3
4
  TODO:
4
5
  - [ ] Handle styled text (use <slot /> to measure?)
@@ -123,7 +124,14 @@ function isValidXOrY(xOrY) {
123
124
  <!-- `paint-order: stroke` supports stroke outlining text -->
124
125
  <svg x={dx} y={dy} class="overflow-visible [paint-order:stroke]">
125
126
  {#if isValidXOrY(x) && isValidXOrY(y)}
126
- <text {x} {y} {transform} text-anchor={textAnchor} {...$$restProps}>
127
+ <text
128
+ {x}
129
+ {y}
130
+ {transform}
131
+ text-anchor={textAnchor}
132
+ {...$$restProps}
133
+ class={cls('fill-surface-content', $$props.class)}
134
+ >
127
135
  {#each wordsByLines as line, index}
128
136
  <tspan {x} dy={index === 0 ? startDy : lineHeight}>
129
137
  {line.words.join(' ')}
@@ -119,7 +119,10 @@ $: if ($tooltip?.data) {
119
119
  'bg-gray-900/90 backdrop-filter backdrop-blur-[2px] text-white',
120
120
  '[&_.label]:text-white/75',
121
121
  ],
122
- light: ['bg-white text-gray-800 border border-gray-500', '[&_.label]:text-black/50'],
122
+ light: [
123
+ 'bg-white text-gray-800 border border-gray-500',
124
+ '[&_.label]:text-surface-content/50',
125
+ ],
123
126
  none: '',
124
127
  }[variant],
125
128
  classes.container,
@@ -1,11 +1,13 @@
1
1
  <script>import { mdiInformation } from '@mdi/js';
2
- import { Icon } from 'svelte-ux';
3
- // console.log($$props, $$slots);
2
+ import { Icon, cls } from 'svelte-ux';
4
3
  </script>
5
4
 
6
5
  <div
7
- class="bg-accent-500/10 border-l-[6px] border-l-accent-500 border-accent-500/30 text-accent-900 px-4 py-2 border my-4 rounded flex items-center gap-2 text-sm"
6
+ class={cls(
7
+ 'bg-primary/10 border border-l-[6px] border-primary/30 border-l-primary text-primary px-4 py-2 my-4 rounded flex items-center gap-2 text-sm',
8
+ '[&>a]:font-medium [&>a]:underline [&>a]:decoration-dashed [&>a]:decoration-primary/50 [&>a]:underline-offset-2'
9
+ )}
8
10
  >
9
- <Icon data={mdiInformation} class="text-accent-500" />
11
+ <Icon data={mdiInformation} class="text-primary" />
10
12
  <slot />
11
13
  </div>
@@ -1,22 +1,30 @@
1
1
  <script>import Prism from 'prismjs';
2
2
  import 'prism-svelte';
3
- import { CopyButton, cls } from 'svelte-ux';
3
+ import { CopyButton, cls, getComponentTheme } from 'svelte-ux';
4
4
  export let source = null;
5
5
  export let language = 'svelte';
6
6
  export let highlightedSource = source
7
- ? Prism.highlight(source, Prism.languages[language], language)
7
+ ? Prism.highlight(source, Prism.languages[language] ?? Prism.languages.text, language)
8
8
  : '';
9
+ export let classes = {};
10
+ const theme = getComponentTheme('Code');
9
11
  </script>
10
12
 
11
- <div class={cls('rounded', $$restProps.class)}>
13
+ <div class={cls('Code', 'rounded', theme.root, classes.root, $$props.class)}>
12
14
  {#if source}
13
15
  <div class="relative">
14
- <pre class="language-{language} rounded" style="margin: 0; white-space: normal;">
15
- <code class="language-{language}">{@html highlightedSource}</code>
16
+ <pre
17
+ class={cls('language-{language} rounded', classes.pre)}
18
+ style="margin: 0; white-space: normal;">
19
+ <code class={cls('language-{language}', classes.code)}>{@html highlightedSource}</code>
16
20
  </pre>
17
21
 
18
- <div class="absolute top-0 right-0 p-2">
19
- <CopyButton value={source} class="text-white/70 hover:bg-white/20 py-1" size="sm" />
22
+ <div class="absolute top-0 right-0 p-2 z-10">
23
+ <CopyButton
24
+ value={source ?? ''}
25
+ class="text-white/70 hover:bg-surface-100/20 py-1 backdrop-blur-md"
26
+ size="sm"
27
+ />
20
28
  </div>
21
29
  </div>
22
30
  {/if}
@@ -6,6 +6,11 @@ declare const __propDef: {
6
6
  source?: string | null | undefined;
7
7
  language?: string | undefined;
8
8
  highlightedSource?: any;
9
+ classes?: {
10
+ root?: string | undefined;
11
+ pre?: string | undefined;
12
+ code?: string | undefined;
13
+ } | undefined;
9
14
  };
10
15
  events: {
11
16
  [evt: string]: CustomEvent<any>;
@@ -8,26 +8,28 @@ let showCenter = false;
8
8
 
9
9
  <div class={cls('bg-black/5 rounded m-1 backdrop-blur p-2', $$props.class)}>
10
10
  <div class="grid gap-2 ml-2 text-xs">
11
- <div><span class="text-black/50">scale:</span> {format($geo.scale(), 'decimal')}</div>
11
+ <div><span class="text-surface-content/50">scale:</span> {format($geo.scale(), 'decimal')}</div>
12
12
 
13
13
  <div>
14
- <span class="text-black/50">translate:</span>
14
+ <span class="text-surface-content/50">translate:</span>
15
15
  {#each $geo.translate() as coord}
16
16
  <div class="ml-2">{format(coord, 'decimal')}</div>
17
17
  {/each}
18
18
  </div>
19
19
 
20
20
  <div>
21
- <span class="text-black/50">rotate:</span>
21
+ <span class="text-surface-content/50">rotate:</span>
22
22
  {#each $geo.rotate() as angle}
23
23
  <div class="ml-2">{format(angle, 'decimal')}</div>
24
24
  {/each}
25
25
  </div>
26
26
 
27
- <div><span class="text-black/50">center:</span> {$geo.center?.()}</div>
27
+ <div><span class="text-surface-content/50">center:</span> {$geo.center?.()}</div>
28
28
 
29
29
  <div>
30
- <span class="text-black/50">long/lat: <Checkbox bind:checked={showCenter} size="xs" /></span>
30
+ <span class="text-surface-content/50"
31
+ >long/lat: <Checkbox bind:checked={showCenter} size="xs" /></span
32
+ >
31
33
  {#each $geo.invert?.([$width / 2, $height / 2]) as coord}
32
34
  <div class="ml-2">{format(coord, 'decimal')}</div>
33
35
  {/each}
@@ -2,6 +2,6 @@
2
2
  // console.log($$props, $$slots);
3
3
  </script>
4
4
 
5
- <a class="text-accent-500 font-medium" {...$$restProps}>
5
+ <a class="text-primary font-medium" {...$$restProps}>
6
6
  <slot />
7
7
  </a>
@@ -3,7 +3,8 @@
3
3
  import Prism from 'prismjs';
4
4
  import 'prism-svelte';
5
5
  import { mdiCodeTags, mdiTable } from '@mdi/js';
6
- import { Button, CopyButton, Dialog, Toggle, Tooltip } from 'svelte-ux';
6
+ import { Button, CopyButton, Dialog, Toggle, Tooltip, cls } from 'svelte-ux';
7
+ import Code from './Code.svelte';
7
8
  import Json from './Json.svelte';
8
9
  export let code = undefined;
9
10
  export let data = undefined;
@@ -20,36 +21,32 @@ catch (e) {
20
21
  }
21
22
  </script>
22
23
 
23
- <div class="border border-black/20 rounded bg-white">
24
+ <div class={cls('Preview border rounded bg-surface-100', $$props.class)}>
24
25
  <div class="p-4">
25
26
  <slot />
26
27
  </div>
27
28
 
28
29
  {#if code && showCode}
29
- <div class="relative">
30
- <pre
31
- class="language-{language} rounded"
32
- style="margin: 0; white-space: normal;"
33
- transition:slide|local>
34
- <code class="language-{language}">{@html highlightedCode}</code>
35
- </pre>
36
-
37
- <div class="absolute top-0 right-0 p-2">
38
- <CopyButton value={code} class="text-white/70 hover:bg-white/20 py-1" size="sm" />
39
- </div>
30
+ <div transition:slide class="bg-surface-200">
31
+ <Code source={code} highlightedSource={highlightedCode} classes={{ pre: 'rounded-t-none' }} />
40
32
  </div>
41
33
  {/if}
42
34
  </div>
43
35
 
44
36
  {#if code}
45
- <Button icon={mdiCodeTags} class=" text-black/60 py-1" on:click={() => (showCode = !showCode)}>
46
- {showCode ? 'Hide' : 'Show'} code
37
+ <Button
38
+ icon={mdiCodeTags}
39
+ class="text-surface-content/70 py-1"
40
+ on:click={() => (showCode = !showCode)}
41
+ >
42
+ {showCode ? 'Hide' : 'Show'} Code
47
43
  </Button>
48
44
  {/if}
49
45
 
50
46
  {#if data}
51
47
  <Toggle let:on={open} let:toggle>
52
- <Button icon={mdiTable} class=" text-black/60 py-1" on:click={toggle}>View data</Button>
48
+ <Button icon={mdiTable} class="text-surface-content/70 py-1" on:click={toggle}>View data</Button
49
+ >
53
50
  <Dialog
54
51
  {open}
55
52
  on:close={toggle}
@@ -62,7 +59,7 @@ catch (e) {
62
59
 
63
60
  {#if copyValue}
64
61
  <Tooltip title="Copy">
65
- <CopyButton value={copyValue} variant="fill-light" color="accent" />
62
+ <CopyButton value={copyValue} variant="fill-light" color="primary" />
66
63
  </Tooltip>
67
64
  {/if}
68
65
  </div>
@@ -70,7 +67,7 @@ catch (e) {
70
67
  <Json value={data} />
71
68
 
72
69
  <div slot="actions">
73
- <Button variant="fill" color="accent">Close</Button>
70
+ <Button variant="fill" color="primary">Close</Button>
74
71
  </div>
75
72
  </Dialog>
76
73
  </Toggle>
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
2
2
  import 'prism-svelte';
3
3
  declare const __propDef: {
4
4
  props: {
5
+ [x: string]: any;
5
6
  code?: string | undefined;
6
7
  data?: any | undefined;
7
8
  language?: string | undefined;
@@ -34,7 +34,7 @@ $: serviceOptions = {
34
34
  'satelllite-v9': mapboxv1('satellite-v9'),
35
35
  'satelllite-streets-v12': mapboxv1('satellite-streets-v12'),
36
36
  'navigation-day-v1': mapboxv1('navigation-day-v1'),
37
- 'navigation-night-v1': mapboxv1('navigation-night-v1')
37
+ 'navigation-night-v1': mapboxv1('navigation-night-v1'),
38
38
  },
39
39
  'mapbox v4': {
40
40
  'natural-earth-2': mapboxv4('mapbox.natural-earth-2'),
@@ -42,7 +42,7 @@ $: serviceOptions = {
42
42
  streets: mapboxv4('mapbox.mapbox-streets-v8'),
43
43
  terrain: mapboxv4('mapbox.mapbox-terrain-v2'),
44
44
  'terrain-dem': mapboxv4('mapbox.mapbox-terrain-dem-v1'),
45
- traffic: mapboxv4('mapbox.mapbox-traffic-v1')
45
+ traffic: mapboxv4('mapbox.mapbox-traffic-v1'),
46
46
  // 'transit (mapbox v4)': mapboxv4('mapbox.transit-v2'),
47
47
  },
48
48
  'National Map Services': {
@@ -50,7 +50,7 @@ $: serviceOptions = {
50
50
  'USGS Imagery Topo Base Map': nationalmap('USGSImageryTopo'),
51
51
  'USGS Imagery Only Base Map': nationalmap('USGSImageryOnly'),
52
52
  'USGS Shaded Relief': nationalmap('USGSShadedReliefOnly'),
53
- 'USGS Topo Base Map': nationalmap('USGSTopo')
53
+ 'USGS Topo Base Map': nationalmap('USGSTopo'),
54
54
  },
55
55
  ArcGIS: {
56
56
  'USA Topo Map': arcgis('USA_Topo_Maps'),
@@ -60,8 +60,8 @@ $: serviceOptions = {
60
60
  'World Shaded Relief': arcgis('World_Shaded_Relief'),
61
61
  'World Street Map': arcgis('World_Street_Map'),
62
62
  'World Terrain Base': arcgis('World_Terrain_Base'),
63
- 'World Topo Map': arcgis('World_Topo_Map')
64
- }
63
+ 'World Topo Map': arcgis('World_Topo_Map'),
64
+ },
65
65
  // 'ArcGIS Vector': {
66
66
  // 'Community Map', url: arcgisVector('World_Basemap_v2'),
67
67
  // }
@@ -87,7 +87,7 @@ $: serviceUrl = getServiceUrl(selected);
87
87
  {/each}
88
88
  </select>
89
89
  <div slot="append">
90
- <div class="text-[10px] text-black/50 text-center">2x</div>
90
+ <div class="text-[10px] text-surface-content/50 text-center">2x</div>
91
91
  <Switch bind:checked={doubleScale} size="md" />
92
92
  </div>
93
93
  </Field>
@@ -9,7 +9,7 @@ export let icon;
9
9
 
10
10
  {#if source}
11
11
  <Toggle let:on={open} let:toggle>
12
- <Button {icon} on:click={toggle} variant="fill-light" color="accent" size="sm">{label}</Button>
12
+ <Button {icon} on:click={toggle} variant="fill-light" color="primary" size="sm">{label}</Button>
13
13
  <Dialog
14
14
  {open}
15
15
  on:close={toggle}
@@ -18,11 +18,11 @@ export let icon;
18
18
  <div class="grid grid-cols-[1fr,auto] gap-3 items-center p-4">
19
19
  <div class="overflow-auto">
20
20
  <div class="text-lg font-semibold">{label}</div>
21
- <div class="text-xs text-black/50 truncate">{href}</div>
21
+ <div class="text-xs text-surface-content/50 truncate">{href}</div>
22
22
  </div>
23
23
 
24
24
  {#if href}
25
- <Button icon={mdiGithub} variant="fill-light" color="accent" {href} target="_blank">
25
+ <Button icon={mdiGithub} variant="fill-light" color="primary" {href} target="_blank">
26
26
  View on Github
27
27
  </Button>
28
28
  {/if}
@@ -33,13 +33,13 @@ export let icon;
33
33
  </div>
34
34
 
35
35
  <div slot="actions">
36
- <Button variant="fill" color="accent">Close</Button>
36
+ <Button variant="fill" color="primary">Close</Button>
37
37
  </div>
38
38
  </Dialog>
39
39
  </Toggle>
40
40
  {:else if href}
41
41
  <Tooltip title="Edit this page">
42
- <Button {icon} {href} target="_blank" variant="fill-light" color="accent" size="sm">
42
+ <Button {icon} {href} target="_blank" variant="fill-light" color="primary" size="sm">
43
43
  {label}
44
44
  </Button>
45
45
  </Tooltip>
@@ -1,5 +1,5 @@
1
1
  <script>import { Button, Tooltip, cls } from 'svelte-ux';
2
- import { mdiArrowULeftTop, mdiMagnifyPlusOutline, mdiMagnifyMinusOutline, mdiImageFilterCenterFocus } from '@mdi/js';
2
+ import { mdiArrowULeftTop, mdiMagnifyPlusOutline, mdiMagnifyMinusOutline, mdiImageFilterCenterFocus, } from '@mdi/js';
3
3
  export let zoom;
4
4
  export let placement = 'top-right';
5
5
  export let orientation = 'vertical';
@@ -7,7 +7,7 @@ export let orientation = 'vertical';
7
7
 
8
8
  <div
9
9
  class={cls(
10
- 'bg-black/5 rounded-full m-1 backdrop-blur z-10 flex',
10
+ 'bg-surface-content/5 rounded-full m-1 backdrop-blur z-10 flex',
11
11
  orientation === 'vertical' && 'flex-col',
12
12
  {
13
13
  'top-left': 'absolute top-0 left-0',
@@ -18,7 +18,7 @@ export let orientation = 'vertical';
18
18
  right: 'absolute top-1/2 right-0 -translate-y-1/2',
19
19
  'bottom-left': 'absolute bottom-0 left-0',
20
20
  bottom: 'absolute bottom-0 left-1/2 -translate-x-1/2',
21
- 'bottom-right': 'absolute bottom-0 right-0'
21
+ 'bottom-right': 'absolute bottom-0 right-0',
22
22
  }[placement]
23
23
  )}
24
24
  >
@@ -26,24 +26,28 @@ export let orientation = 'vertical';
26
26
  <Button
27
27
  icon={mdiMagnifyPlusOutline}
28
28
  on:click={() => zoom.increase()}
29
- class="text-black/50 p-2"
29
+ class="text-surface-content/50 p-2"
30
30
  />
31
31
  </Tooltip>
32
32
  <Tooltip title="Zoom out">
33
33
  <Button
34
34
  icon={mdiMagnifyMinusOutline}
35
35
  on:click={() => zoom.decrease()}
36
- class="text-black/50 p-2"
36
+ class="text-surface-content/50 p-2"
37
37
  />
38
38
  </Tooltip>
39
39
  <Tooltip title="Center">
40
40
  <Button
41
41
  icon={mdiImageFilterCenterFocus}
42
42
  on:click={() => zoom.translateCenter()}
43
- class="text-black/50 p-2"
43
+ class="text-surface-content/50 p-2"
44
44
  />
45
45
  </Tooltip>
46
46
  <Tooltip title="Reset">
47
- <Button icon={mdiArrowULeftTop} on:click={() => zoom.reset()} class="text-black/50 p-2" />
47
+ <Button
48
+ icon={mdiArrowULeftTop}
49
+ on:click={() => zoom.reset()}
50
+ class="text-surface-content/50 p-2"
51
+ />
48
52
  </Tooltip>
49
53
  </div>
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Sean Lynch <techniq35@gmail.com>",
5
5
  "license": "MIT",
6
6
  "repository": "techniq/layerchart",
7
- "version": "0.27.0",
7
+ "version": "0.28.0-next.1",
8
8
  "scripts": {
9
9
  "dev": "vite dev",
10
10
  "build": "vite build",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rollup/plugin-dsv": "^3.0.4",
22
- "@sveltejs/adapter-vercel": "^3.1.0",
22
+ "@sveltejs/adapter-auto": "^2.1.1",
23
23
  "@sveltejs/kit": "^1.27.6",
24
24
  "@sveltejs/package": "^2.2.2",
25
25
  "@svitejs/changesets-changelog-github-compact": "^1.1.0",
@@ -42,6 +42,7 @@
42
42
  "@types/shapefile": "^0.6.4",
43
43
  "@types/topojson-client": "^3.1.4",
44
44
  "autoprefixer": "^10.4.16",
45
+ "daisyui": "^4.4.19",
45
46
  "execa": "^8.0.1",
46
47
  "marked": "^10.0.0",
47
48
  "mdsvex": "^0.11.0",
@@ -66,7 +67,6 @@
66
67
  "@changesets/cli": "^2.26.2",
67
68
  "@mdi/js": "^7.3.67",
68
69
  "@types/d3-time": "^3.0.2",
69
- "@vercel/analytics": "^1.1.1",
70
70
  "d3-array": "^3.2.4",
71
71
  "d3-delaunay": "^6.0.4",
72
72
  "d3-dsv": "^3.0.1",
@@ -85,8 +85,9 @@
85
85
  "date-fns": "^2.30.0",
86
86
  "layercake": "^8.0.2",
87
87
  "lodash-es": "^4.17.21",
88
+ "posthog-js": "^1.95.1",
88
89
  "shapefile": "^0.6.6",
89
- "svelte-ux": "^0.56.0",
90
+ "svelte-ux": "0.58.0-next.3",
90
91
  "topojson-client": "^3.1.0"
91
92
  },
92
93
  "peerDependencies": {