@pixerate/editor-svelte 0.123.0 → 0.124.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.
@@ -39,6 +39,7 @@
39
39
  defaultChartErrorBarValue,
40
40
  formatChartAmountList,
41
41
  isCartesianChart,
42
+ listChartMaps,
42
43
  suggestChartReferences,
43
44
  parseChartAmountList,
44
45
  type ChartAxis,
@@ -427,6 +428,29 @@
427
428
  </div>
428
429
  </div>
429
430
  {/if}
431
+ {#if spec.type === 'choropleth'}
432
+ {@const maps = listChartMaps()}
433
+ <div class="flex items-center gap-2">
434
+ <label for="{idPrefix}-map" class="{chartLabelClass} w-20 shrink-0">Map</label>
435
+ <select id="{idPrefix}-map" class={chartInputClass} value={spec.map} data-option="map" onchange={(e) => controller.update({ map: e.currentTarget.value })}>
436
+ {#each [...new Set([spec.map, ...maps.map((m) => m.id)])] as id (id)}
437
+ <option value={id}>{maps.find((m) => m.id === id)?.name ?? `${id} (not loaded)`}</option>
438
+ {/each}
439
+ </select>
440
+ </div>
441
+ <div class="flex items-center gap-2">
442
+ <label for="{idPrefix}-map-steps" class="{chartLabelClass} w-20 shrink-0">Classes</label>
443
+ <div class="min-w-0 flex-1">
444
+ <ChartCommitInput id="{idPrefix}-map-steps" value={String(spec.mapSteps)} inputmode="numeric" data-option="mapSteps" disabled={spec.mapThresholds.length > 0} oncommit={(text) => controller.update({ mapSteps: Number(text) }).ok} />
445
+ </div>
446
+ </div>
447
+ <div class="flex items-center gap-2">
448
+ <label for="{idPrefix}-map-breaks" class="{chartLabelClass} w-20 shrink-0">Breaks</label>
449
+ <div class="min-w-0 flex-1">
450
+ <ChartCommitInput id="{idPrefix}-map-breaks" value={spec.mapThresholds.join(', ')} placeholder="Equal classes" data-option="mapThresholds" oncommit={(text) => controller.update({ mapThresholds: text.trim() ? text.split(',').map((t) => Number(t.trim())) : [] }).ok} />
451
+ </div>
452
+ </div>
453
+ {/if}
430
454
  {#if spec.type === 'barrace'}
431
455
  <div class="flex items-center gap-2">
432
456
  <label for="{idPrefix}-race-top" class="{chartLabelClass} w-20 shrink-0">Bars</label>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-svelte",
3
- "version": "0.123.0",
3
+ "version": "0.124.0",
4
4
  "description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -168,7 +168,7 @@
168
168
  "@tiptap/extension-bubble-menu": "^2.27.3",
169
169
  "@tiptap/extension-placeholder": "^2.27.3",
170
170
  "@tiptap/starter-kit": "^2.27.3",
171
- "@pixerate/editor": "0.166.0"
171
+ "@pixerate/editor": "0.167.0"
172
172
  },
173
173
  "peerDependencies": {
174
174
  "@dagrejs/dagre": "^1.1.4",