@limetech/lime-elements 40.20.0 → 40.20.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/limel-chart.cjs.entry.js +29 -18
  3. package/dist/cjs/limel-markdown.cjs.entry.js +2 -2
  4. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
  5. package/dist/cjs/{markdown-exporter-BWS2EBxq.js → markdown-exporter-CGNfjGr9.js} +80 -897
  6. package/dist/cjs/{markdown-parser-toAp9-Eq.js → markdown-parser-C14XF_G3.js} +994 -38
  7. package/dist/collection/components/chart/chart.css +20 -5
  8. package/dist/collection/components/chart/chart.js +3 -0
  9. package/dist/collection/components/chart/options.js +12 -16
  10. package/dist/collection/components/chart/theme.js +13 -1
  11. package/dist/esm/limel-chart.entry.js +29 -18
  12. package/dist/esm/limel-markdown.entry.js +2 -2
  13. package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
  14. package/dist/esm/{markdown-exporter-B2vFxSLw.js → markdown-exporter-DcFcD699.js} +80 -897
  15. package/dist/esm/{markdown-parser-Cw8iW5R9.js → markdown-parser-8aHA9IYo.js} +991 -33
  16. package/dist/lime-elements/lime-elements.esm.js +1 -1
  17. package/dist/lime-elements/{p-8514480b.entry.js → p-0887e0df.entry.js} +2 -2
  18. package/dist/lime-elements/{p-1d9bc526.entry.js → p-9edd79a8.entry.js} +1 -1
  19. package/dist/lime-elements/p-C9gctvIB.js +1 -0
  20. package/dist/lime-elements/{p-c2f993cc.entry.js → p-a891f3e8.entry.js} +1 -1
  21. package/dist/lime-elements/p-kiQd8Ntf.js +7 -0
  22. package/dist/types/components/chart/theme.d.ts +2 -2
  23. package/package.json +3 -3
  24. package/dist/lime-elements/p-Bd37Vplf.js +0 -7
  25. package/dist/lime-elements/p-CvHpvp0f.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [40.20.1](https://github.com/Lundalogik/lime-elements/compare/v40.20.0...v40.20.1) (2026-11-03)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **chart:** draw the chart inside its padding ([ba55f00](https://github.com/Lundalogik/lime-elements/commit/ba55f009a6cba072cf0b1855229aa32341c8e15e))
7
+ * **chart:** draw the item values in the color of the text ([9a04f53](https://github.com/Lundalogik/lime-elements/commit/9a04f5357fab50d46252ddf173bfbee0fce35c75))
8
+ * **chart:** give axis charts a height when their container has none ([bea5f33](https://github.com/Lundalogik/lime-elements/commit/bea5f33bf2d4ef09dd875dd4228ff17831adbd7b))
9
+ * **chart:** round each corner that --chart-item-border-radius gives ([c30f688](https://github.com/Lundalogik/lime-elements/commit/c30f688f70e084a3e8fc1217434f253e7ea730c1))
10
+ * **chart:** round the ends of a stacked bar ([c24bb9d](https://github.com/Lundalogik/lime-elements/commit/c24bb9d5d7cc706f2415e63e5b900e4f7d7f89ac))
11
+ * **chart:** show the pointer cursor only on the items of a pie ([dc7df44](https://github.com/Lundalogik/lime-elements/commit/dc7df44794ced3f95259621a8cd555fd2ff2b28f))
12
+
1
13
  ## [40.20.0](https://github.com/Lundalogik/lime-elements/compare/v40.19.0...v40.20.0) (2026-11-02)
2
14
 
3
15
  ### Features
@@ -50565,7 +50565,7 @@ function getAxisSeries(settings, theme) {
50565
50565
  return getLineSeries(settings, theme);
50566
50566
  }
50567
50567
  if (settings.type === 'dot') {
50568
- return getDotSeries(settings);
50568
+ return getDotSeries(settings, theme);
50569
50569
  }
50570
50570
  return getBarSeries(settings, theme);
50571
50571
  }
@@ -50580,7 +50580,7 @@ function getBarSeries(settings, theme) {
50580
50580
  borderRadius: theme.itemBorderRadius,
50581
50581
  },
50582
50582
  })),
50583
- label: getValueLabel(settings),
50583
+ label: getValueLabel(settings, theme),
50584
50584
  cursor: getSeriesCursor(items),
50585
50585
  emphasis: emphasis,
50586
50586
  blur: blur,
@@ -50596,7 +50596,7 @@ function getBarSeries(settings, theme) {
50596
50596
  seriesIndex: 1,
50597
50597
  };
50598
50598
  }
50599
- function getDotSeries(settings) {
50599
+ function getDotSeries(settings, theme) {
50600
50600
  const { items, orientation } = settings;
50601
50601
  const point = (index, value) => orientation === 'landscape' ? [index, value] : [value, index];
50602
50602
  const ends = {
@@ -50606,7 +50606,7 @@ function getDotSeries(settings) {
50606
50606
  value: point(index, getMaximumValue(item)),
50607
50607
  itemStyle: { color: item.color },
50608
50608
  })),
50609
- label: getValueLabel(settings),
50609
+ label: getValueLabel(settings, theme),
50610
50610
  cursor: getSeriesCursor(items),
50611
50611
  emphasis: emphasis,
50612
50612
  blur: blur,
@@ -50653,7 +50653,7 @@ function getLineSeries(settings, theme) {
50653
50653
  itemStyle: { color: item.color },
50654
50654
  })),
50655
50655
  areaStyle: area ? { color: color, opacity: AREA_OPACITY } : undefined,
50656
- label: getValueLabel(settings),
50656
+ label: getValueLabel(settings, theme),
50657
50657
  cursor: getSeriesCursor(items),
50658
50658
  emphasis: emphasis,
50659
50659
  blur: blur,
@@ -50689,11 +50689,7 @@ function drawScatter(settings, theme) {
50689
50689
  itemStyle: { color: item.color },
50690
50690
  };
50691
50691
  }),
50692
- label: {
50693
- show: settings.displayItemText || settings.displayItemValue,
50694
- position: 'top',
50695
- formatter: ({ dataIndex }) => getPointLabel(settings, items[dataIndex]),
50696
- },
50692
+ label: Object.assign(Object.assign({ show: settings.displayItemText || settings.displayItemValue, position: 'top' }, getLabelStyle(theme)), { formatter: ({ dataIndex }) => getPointLabel(settings, items[dataIndex]) }),
50697
50693
  cursor: getSeriesCursor(items),
50698
50694
  emphasis: emphasis,
50699
50695
  blur: blur,
@@ -50723,6 +50719,7 @@ function drawPie(settings, theme) {
50723
50719
  value: whole - sum,
50724
50720
  itemStyle: { color: theme.backgroundColor },
50725
50721
  emphasis: { disabled: true },
50722
+ cursor: getCursor(false),
50726
50723
  });
50727
50724
  }
50728
50725
  const innerRadius = settings.type === 'doughnut' ? '50%' : 0;
@@ -50915,12 +50912,11 @@ function getAxisName(settings, name, theme) {
50915
50912
  nameTextStyle: { color: theme.textColor },
50916
50913
  };
50917
50914
  }
50918
- function getValueLabel(settings) {
50919
- return {
50920
- show: settings.displayItemValue,
50921
- position: settings.orientation === 'landscape' ? 'top' : 'right',
50922
- formatter: ({ dataIndex }) => formatValue(settings.items[dataIndex], settings.type),
50923
- };
50915
+ function getValueLabel(settings, theme) {
50916
+ return Object.assign(Object.assign({ show: settings.displayItemValue, position: settings.orientation === 'landscape' ? 'top' : 'right' }, getLabelStyle(theme)), { formatter: ({ dataIndex }) => formatValue(settings.items[dataIndex], settings.type) });
50917
+ }
50918
+ function getLabelStyle(theme) {
50919
+ return { color: theme.textColor, textBorderWidth: 0 };
50924
50920
  }
50925
50921
  function getPointLabel(settings, item) {
50926
50922
  const parts = [];
@@ -51004,6 +51000,18 @@ function createThemeReader(root) {
51004
51000
  probe.style.width = '';
51005
51001
  return Number.isFinite(pixels) ? pixels : 0;
51006
51002
  };
51003
+ const resolveCorners = (value) => {
51004
+ probe.style.borderRadius = value;
51005
+ const style = getComputedStyle(probe);
51006
+ const corners = [
51007
+ style.borderTopLeftRadius,
51008
+ style.borderTopRightRadius,
51009
+ style.borderBottomRightRadius,
51010
+ style.borderBottomLeftRadius,
51011
+ ];
51012
+ probe.style.borderRadius = '';
51013
+ return corners.map((corner) => resolveLength(corner));
51014
+ };
51007
51015
  return {
51008
51016
  color: (value) => (isColor(value) ? resolveColor(value) : undefined),
51009
51017
  theme: () => ({
@@ -51014,7 +51022,7 @@ function createThemeReader(root) {
51014
51022
  backgroundColor: resolvePublicColor('--limel-chart-background-color'),
51015
51023
  dividerColor: resolvePublicColor('--limel-chart-item-divider-color'),
51016
51024
  surfaceColor: resolveColor('var(--limel-chart-surface-color)'),
51017
- itemBorderRadius: resolveLength('var(--limel-chart-item-border-radius)'),
51025
+ itemBorderRadius: resolveCorners('var(--limel-chart-item-border-radius)'),
51018
51026
  scatterItemSize: resolveLength('var(--limel-chart-scatter-item-size)'),
51019
51027
  fontFamily: getComputedStyle(root.host).fontFamily,
51020
51028
  npsColors: [
@@ -51073,7 +51081,7 @@ function paintToRgba(context, color) {
51073
51081
  return `rgba(${red}, ${green}, ${blue}, ${alpha / MAX_CHANNEL})`;
51074
51082
  }
51075
51083
 
51076
- const chartCss = () => `@charset "UTF-8";:host(limel-chart){--limel-chart-item-color:var( --chart-item-color, rgb(var(--contrast-1100), 0.8) );--limel-chart-axis-line-color:var( --chart-axis-line-color, rgb(var(--contrast-900), 0.4) );--limel-chart-background-color:var(--chart-background-color, transparent);--limel-chart-item-divider-color:var( --chart-item-divider-color, rgb(var(--contrast-100), 0.6) );--limel-chart-item-border-radius:var(--chart-item-border-radius, 0);--limel-chart-scatter-item-size:var(--chart-scatter-item-size, 0.5rem);--limel-chart-text-color:rgb(var(--contrast-1000));--limel-chart-line-color:rgb(var(--contrast-900));--limel-chart-surface-color:rgb(var(--contrast-100));--limel-chart-nps-detractors-color:rgb(var(--color-coral-default));--limel-chart-nps-passives-color:rgb(var(--color-amber-light));--limel-chart-nps-good-color:rgb(var(--color-lime-light));--limel-chart-nps-excellent-color:rgb(var(--color-lime-default));box-sizing:border-box;position:relative;display:flex;width:100%;height:100%;min-width:0;min-height:0}:host(limel-chart[type=bar]){--limel-chart-item-border-radius:var(--chart-item-border-radius, 0.125rem)}:host(limel-chart[type=stacked-bar]){--limel-chart-background-color:var( --chart-background-color, rgb(var(--contrast-800), 0.2) )}:host(limel-chart[type=stacked-bar][orientation=landscape]){min-height:0.5rem}:host(limel-chart[type=stacked-bar][orientation=portrait]){min-width:0.5rem}:host(limel-chart[type=pie]),:host(limel-chart[type=doughnut]),:host(limel-chart[type=ring]){--limel-chart-background-color:var( --chart-background-color, rgb(var(--contrast-200)) )}:host(limel-chart[type=nps]){--limel-chart-background-color:var( --chart-background-color, rgb(var(--contrast-100)) )}:host(limel-chart[type=pie]),:host(limel-chart[type=doughnut]),:host(limel-chart[type=ring]),:host(limel-chart[type=nps]){aspect-ratio:1}.plot{position:absolute;inset:0}table{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}limel-spinner{margin:auto}`;
51084
+ const chartCss = () => `@charset "UTF-8";:host(limel-chart){--limel-chart-item-color:var( --chart-item-color, rgb(var(--contrast-1100), 0.8) );--limel-chart-axis-line-color:var( --chart-axis-line-color, rgb(var(--contrast-900), 0.4) );--limel-chart-background-color:var(--chart-background-color, transparent);--limel-chart-item-divider-color:var( --chart-item-divider-color, rgb(var(--contrast-100), 0.6) );--limel-chart-item-border-radius:var(--chart-item-border-radius, 0);--limel-chart-scatter-item-size:var(--chart-scatter-item-size, 0.5rem);--limel-chart-text-color:rgb(var(--contrast-1000));--limel-chart-line-color:rgb(var(--contrast-900));--limel-chart-surface-color:rgb(var(--contrast-100));--limel-chart-nps-detractors-color:rgb(var(--color-coral-default));--limel-chart-nps-passives-color:rgb(var(--color-amber-light));--limel-chart-nps-good-color:rgb(var(--color-lime-light));--limel-chart-nps-excellent-color:rgb(var(--color-lime-default));box-sizing:border-box;position:relative;display:flex;width:100%;height:100%;min-width:0;min-height:0}:host(limel-chart[type=bar]){--limel-chart-item-border-radius:var(--chart-item-border-radius, 0.125rem)}:host(limel-chart[type=stacked-bar]){--limel-chart-background-color:var( --chart-background-color, rgb(var(--contrast-800), 0.2) )}:host(limel-chart[type=stacked-bar][orientation=landscape]),:host(limel-chart[type=stacked-bar][orientation=landscape]) .plot{min-height:0.5rem}:host(limel-chart[type=stacked-bar][orientation=portrait]),:host(limel-chart[type=stacked-bar][orientation=portrait]) .plot{min-width:0.5rem}:host(limel-chart[type=pie]),:host(limel-chart[type=doughnut]),:host(limel-chart[type=ring]){--limel-chart-background-color:var( --chart-background-color, rgb(var(--contrast-200)) )}:host(limel-chart[type=nps]){--limel-chart-background-color:var( --chart-background-color, rgb(var(--contrast-100)) )}:host(limel-chart[type=pie]),:host(limel-chart[type=doughnut]),:host(limel-chart[type=ring]),:host(limel-chart[type=nps]){aspect-ratio:1}:host(limel-chart[type=bar][data-fallback-height]),:host(limel-chart[type=dot][data-fallback-height]),:host(limel-chart[type=line][data-fallback-height]),:host(limel-chart[type=area][data-fallback-height]),:host(limel-chart[type=scatter][data-fallback-height]){aspect-ratio:2}.plot{flex-grow:1;contain:size}:host(limel-chart[type=stacked-bar]) .plot{border-radius:0.25rem;overflow:hidden}table{position:absolute;width:0;height:0;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap}limel-spinner{margin:auto}`;
51077
51085
 
51078
51086
  const orientations = ['horizontal', 'vertical'];
51079
51087
  const extensions = [
@@ -51291,6 +51299,9 @@ const Chart = class {
51291
51299
  }
51292
51300
  this.observeSize();
51293
51301
  const { clientWidth: width, clientHeight: height } = this.plot;
51302
+ if (width && !height) {
51303
+ this.host.toggleAttribute('data-fallback-height', true);
51304
+ }
51294
51305
  if (!width || !height) {
51295
51306
  return;
51296
51307
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index$1 = require('./index-BlsqxTB1.js');
4
- var markdownParser = require('./markdown-parser-toAp9-Eq.js');
4
+ var markdownParser = require('./markdown-parser-C14XF_G3.js');
5
5
  var config = require('./config-dit--4m5.js');
6
6
  var index = require('./index-DIiA99Er.js');
7
7
  var adaptColorContrast = require('./adapt-color-contrast-h6iwOfZd.js');
@@ -1138,7 +1138,7 @@ const Markdown = class {
1138
1138
  */
1139
1139
  async toMarkdown() {
1140
1140
  await this.rendering;
1141
- const { exportMarkdown } = await Promise.resolve().then(function () { return require('./markdown-exporter-BWS2EBxq.js'); });
1141
+ const { exportMarkdown } = await Promise.resolve().then(function () { return require('./markdown-exporter-CGNfjGr9.js'); });
1142
1142
  return exportMarkdown(this.rootElement, this.cachedCombinedWhitelist);
1143
1143
  }
1144
1144
  textChanged() {
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index$1 = require('./index-BlsqxTB1.js');
4
4
  var types = require('./types-C7gNcwzE.js');
5
- var markdownParser = require('./markdown-parser-toAp9-Eq.js');
5
+ var markdownParser = require('./markdown-parser-C14XF_G3.js');
6
6
  var cloneDeep = require('./cloneDeep-CiuKX6HE.js');
7
7
  var translations = require('./translations-CqJEWcfw.js');
8
8
  var index = require('./index-DIiA99Er.js');