@limetech/lime-elements 39.45.2 → 40.0.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/lime-elements.cjs.js +1 -1
  3. package/dist/cjs/limel-action-bar_3.cjs.entry.js +1 -1
  4. package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-callout.cjs.entry.js +1 -1
  6. package/dist/cjs/limel-chart.cjs.entry.js +1 -1
  7. package/dist/cjs/limel-chip-set.cjs.entry.js +1 -1
  8. package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
  9. package/dist/cjs/limel-code-diff.cjs.entry.js +1 -1
  10. package/dist/cjs/limel-code-editor.cjs.entry.js +1 -1
  11. package/dist/cjs/limel-collapsible-section.cjs.entry.js +1 -1
  12. package/dist/cjs/limel-drag-handle.cjs.entry.js +1 -1
  13. package/dist/cjs/limel-email-viewer.cjs.entry.js +1 -1
  14. package/dist/cjs/limel-file-viewer.cjs.entry.js +701 -345
  15. package/dist/cjs/limel-file.cjs.entry.js +1 -1
  16. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
  17. package/dist/cjs/limel-form.cjs.entry.js +17 -43
  18. package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limel-picker.cjs.entry.js +1 -1
  20. package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
  21. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +40 -40
  22. package/dist/cjs/limel-slider.cjs.entry.js +140 -16
  23. package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
  24. package/dist/cjs/limel-table.cjs.entry.js +1 -1
  25. package/dist/cjs/limel-text-editor-link-menu.cjs.entry.js +1 -1
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/cjs/{translations-Bnw00bkf.js → translations-Do_D3pxu.js} +39 -2
  28. package/dist/collection/components/slider/slider.css +95 -0
  29. package/dist/collection/components/slider/slider.js +174 -21
  30. package/dist/collection/global/translations.js +15 -2
  31. package/dist/collection/translations/da.js +3 -0
  32. package/dist/collection/translations/de.js +3 -0
  33. package/dist/collection/translations/en.js +3 -0
  34. package/dist/collection/translations/fi.js +3 -0
  35. package/dist/collection/translations/fr.js +3 -0
  36. package/dist/collection/translations/nl.js +3 -0
  37. package/dist/collection/translations/no.js +3 -0
  38. package/dist/collection/translations/sv.js +3 -0
  39. package/dist/esm/lime-elements.js +1 -1
  40. package/dist/esm/limel-action-bar_3.entry.js +1 -1
  41. package/dist/esm/limel-ai-avatar.entry.js +1 -1
  42. package/dist/esm/limel-callout.entry.js +1 -1
  43. package/dist/esm/limel-chart.entry.js +1 -1
  44. package/dist/esm/limel-chip-set.entry.js +1 -1
  45. package/dist/esm/limel-chip_2.entry.js +1 -1
  46. package/dist/esm/limel-code-diff.entry.js +1 -1
  47. package/dist/esm/limel-code-editor.entry.js +1 -1
  48. package/dist/esm/limel-collapsible-section.entry.js +1 -1
  49. package/dist/esm/limel-drag-handle.entry.js +1 -1
  50. package/dist/esm/limel-email-viewer.entry.js +1 -1
  51. package/dist/esm/limel-file-viewer.entry.js +701 -345
  52. package/dist/esm/limel-file.entry.js +1 -1
  53. package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
  54. package/dist/esm/limel-form.entry.js +17 -43
  55. package/dist/esm/limel-list-item.entry.js +1 -1
  56. package/dist/esm/limel-picker.entry.js +1 -1
  57. package/dist/esm/limel-profile-picture.entry.js +1 -1
  58. package/dist/esm/limel-prosemirror-adapter.entry.js +40 -40
  59. package/dist/esm/limel-slider.entry.js +140 -16
  60. package/dist/esm/limel-snackbar.entry.js +1 -1
  61. package/dist/esm/limel-table.entry.js +1 -1
  62. package/dist/esm/limel-text-editor-link-menu.entry.js +1 -1
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/{translations-Cb9R_zmF.js → translations-DgqE77nk.js} +39 -2
  65. package/dist/lime-elements/lime-elements.esm.js +1 -1
  66. package/dist/lime-elements/{p-421612f9.entry.js → p-21b54196.entry.js} +4 -4
  67. package/dist/lime-elements/p-3e316685.entry.js +1 -0
  68. package/dist/lime-elements/{p-c8116a01.entry.js → p-565f688a.entry.js} +1 -1
  69. package/dist/lime-elements/{p-aa080a8f.entry.js → p-5dde5d72.entry.js} +1 -1
  70. package/dist/lime-elements/{p-31713caf.entry.js → p-5e432a44.entry.js} +1 -1
  71. package/dist/lime-elements/{p-4a09fb2e.entry.js → p-62a25deb.entry.js} +1 -1
  72. package/dist/lime-elements/{p-8aa4a38e.entry.js → p-72a1d432.entry.js} +1 -1
  73. package/dist/lime-elements/{p-9a04a686.entry.js → p-83bdbaf7.entry.js} +1 -1
  74. package/dist/lime-elements/{p-ca0b86ee.entry.js → p-8c3798ee.entry.js} +1 -1
  75. package/dist/lime-elements/{p-8aeeeb53.entry.js → p-8cf79fa1.entry.js} +1 -1
  76. package/dist/lime-elements/{p-7487d65d.entry.js → p-9ed9d0de.entry.js} +1 -1
  77. package/dist/lime-elements/p-DgqE77nk.js +1 -0
  78. package/dist/lime-elements/{p-2284caa7.entry.js → p-a6500046.entry.js} +1 -1
  79. package/dist/lime-elements/{p-e545c9e8.entry.js → p-b04c6602.entry.js} +1 -1
  80. package/dist/lime-elements/{p-d97df2cd.entry.js → p-b4b43404.entry.js} +1 -1
  81. package/dist/lime-elements/p-b6528083.entry.js +1 -0
  82. package/dist/lime-elements/{p-6722e6e2.entry.js → p-cafebc7d.entry.js} +1 -1
  83. package/dist/lime-elements/{p-2f223e46.entry.js → p-cdcd9880.entry.js} +1 -1
  84. package/dist/lime-elements/{p-2e5d5e79.entry.js → p-dd116bb1.entry.js} +1 -1
  85. package/dist/lime-elements/{p-d7bb4310.entry.js → p-dda63b8b.entry.js} +1 -1
  86. package/dist/lime-elements/{p-7f7e2180.entry.js → p-e8783848.entry.js} +1 -1
  87. package/dist/lime-elements/{p-19c81ded.entry.js → p-eeddce38.entry.js} +1 -1
  88. package/dist/lime-elements/{p-9ae7d11b.entry.js → p-f53d8bda.entry.js} +1 -1
  89. package/dist/lime-elements/{p-03fd2181.entry.js → p-fa4edcf5.entry.js} +1 -1
  90. package/dist/types/components/slider/slider.d.ts +67 -4
  91. package/dist/types/components.d.ts +25 -10
  92. package/dist/types/translations/da.d.ts +3 -0
  93. package/dist/types/translations/de.d.ts +3 -0
  94. package/dist/types/translations/en.d.ts +3 -0
  95. package/dist/types/translations/fi.d.ts +3 -0
  96. package/dist/types/translations/fr.d.ts +3 -0
  97. package/dist/types/translations/nl.d.ts +3 -0
  98. package/dist/types/translations/no.d.ts +3 -0
  99. package/dist/types/translations/sv.d.ts +3 -0
  100. package/package.json +9 -9
  101. package/dist/lime-elements/p-Cb9R_zmF.js +0 -1
  102. package/dist/lime-elements/p-ee58f0b4.entry.js +0 -1
  103. package/dist/lime-elements/p-f51b5651.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-BGxJfR2f.js';
2
- import { t as translate } from './translations-Cb9R_zmF.js';
2
+ import { t as translate } from './translations-DgqE77nk.js';
3
3
  import { g as getFileBackgroundColor, a as getFileColor, b as getFileExtensionTitle, c as getFileIcon } from './file-metadata-BHzkIH4g.js';
4
4
  import { f as formatBytes } from './format-bytes-u_sd2HMb.js';
5
5
  import { r as resizeImage } from './image-resize-BTSG--2-.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-BGxJfR2f.js';
2
- import { t as translate } from './translations-Cb9R_zmF.js';
2
+ import { t as translate } from './translations-DgqE77nk.js';
3
3
  import { g as getDefaultExportFromCjs } from './_commonjsHelpers-B85MJLTf.js';
4
4
  import './sv-CY-6-yEp.js';
5
5
  import { m as moment } from './moment-DQRNe8qq.js';
@@ -29153,8 +29153,15 @@ function NullField(props) {
29153
29153
  return null;
29154
29154
  }
29155
29155
 
29156
- // Static matchers for standard '.' separator used during normalization inside handleChange
29156
+ // Matches a string that ends in a . character, optionally followed by a sequence of
29157
+ // digits followed by any number of 0 characters up until the end of the line.
29158
+ // Ensuring that there is at least one prefixed character is important so that
29159
+ // you don't incorrectly match against "0".
29157
29160
  const trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/;
29161
+ // This is used for trimming the trailing 0 and . characters without affecting
29162
+ // the rest of the string. Its possible to use one RegEx with groups for this
29163
+ // functionality, but it is fairly complex compared to simply defining two
29164
+ // different matchers.
29158
29165
  const trailingCharMatcher = /[0.]0*$/;
29159
29166
  /**
29160
29167
  * The NumberField class has some special handling for dealing with trailing
@@ -29177,8 +29184,6 @@ function NumberField(props) {
29177
29184
  const { registry, onChange, formData, value: initialValue } = props;
29178
29185
  const [lastValue, setLastValue] = reactExports.useState(initialValue);
29179
29186
  const { StringField } = registry.fields;
29180
- const separator = getDecimalSeparator();
29181
- const escapedSeparator = separator === '.' ? '\\.' : separator;
29182
29187
  let value = formData;
29183
29188
  /** Handle the change from the `StringField` to properly convert to a number
29184
29189
  *
@@ -29187,11 +29192,9 @@ function NumberField(props) {
29187
29192
  const handleChange = reactExports.useCallback((newValue, path, errorSchema, id) => {
29188
29193
  // Cache the original value in component state
29189
29194
  setLastValue(newValue);
29190
- // Convert locale separator to standard '.' first
29191
- const standardValue = typeof newValue === 'string' ? newValue.replace(separator, '.') : newValue;
29192
29195
  // Normalize decimals that don't start with a zero character in advance so
29193
29196
  // that the rest of the normalization logic is simpler
29194
- const normalizedValue = `${standardValue}`.startsWith('.') ? `0${standardValue}` : standardValue;
29197
+ const normalizedValue = `${newValue}`.startsWith('.') ? `0${newValue}` : newValue;
29195
29198
  // Check that the value is a string (this can happen if the widget used is a
29196
29199
  // <select>, due to an enum declaration etc) then, if the value ends in a
29197
29200
  // trailing decimal point or multiple zeroes, strip the trailing values
@@ -29199,33 +29202,19 @@ function NumberField(props) {
29199
29202
  ? asNumber(normalizedValue.replace(trailingCharMatcher, ''))
29200
29203
  : asNumber(normalizedValue);
29201
29204
  onChange(processed, path, errorSchema, id);
29202
- }, [onChange, separator]);
29205
+ }, [onChange]);
29203
29206
  if (typeof lastValue === 'string' && typeof value === 'number') {
29204
29207
  // Construct a regular expression that checks for a string that consists
29205
- // of the formData value suffixed with zero or one locale separator characters and zero
29208
+ // of the formData value suffixed with zero or one '.' characters and zero
29206
29209
  // or more '0' characters
29207
- const re = new RegExp(`^(${String(value).replace('.', escapedSeparator)})?${escapedSeparator}?0*$`);
29210
+ const re = new RegExp(`^(${String(value).replace('.', '\\.')})?\\.?0*$`);
29208
29211
  // If the cached "lastValue" is a match, use that instead of the formData
29209
29212
  // value to prevent the input value from changing in the UI
29210
29213
  if (lastValue.match(re)) {
29211
29214
  value = lastValue;
29212
29215
  }
29213
29216
  }
29214
- // Format value to use the locale separator for rendering if it is a number
29215
- let displayValue = value;
29216
- if (typeof value === 'number' && separator !== '.') {
29217
- const { schema, uiSchema } = props;
29218
- const { schemaUtils } = registry;
29219
- const enumOptions = schemaUtils.isSelect(schema) ? optionsList(schema, uiSchema) : undefined;
29220
- const defaultWidget = enumOptions ? 'select' : 'text';
29221
- const { widget = defaultWidget } = getUiOptions(uiSchema);
29222
- // Do not convert the value to a locale-specific string for radio, select,
29223
- // or hidden widgets because option matching relies on the original numeric value.
29224
- if (widget !== 'radio' && widget !== 'select' && widget !== 'hidden') {
29225
- displayValue = String(value).replace('.', separator);
29226
- }
29227
- }
29228
- return jsxRuntimeExports.jsx(StringField, { ...props, formData: displayValue, onChange: handleChange });
29217
+ return jsxRuntimeExports.jsx(StringField, { ...props, formData: value, onChange: handleChange });
29229
29218
  }
29230
29219
 
29231
29220
  var q={af:"\u2061",applyfunction:"\u2061",ic:"\u2063",invisiblecomma:"\u2063",invisibletimes:"\u2062",it:"\u2062",lrm:"\u200E",negativemediumspace:"\u200B",negativethickspace:"\u200B",negativethinspace:"\u200B",negativeverythinspace:"\u200B",nobreak:"\u2060",rlm:"\u200F",shy:"\xAD",zerowidthspace:"\u200B",zwj:"\u200D",zwnj:"\u200C",downbreve:"\u0311",tdot:"\u20DB",tripledot:"\u20DB",dotdot:"\u20DC",tab:" ",newline:`
@@ -29318,12 +29307,6 @@ function getDefaultValue(translateString, type) {
29318
29307
  return translateString(TranslatableString.NewStringDefault);
29319
29308
  }
29320
29309
  }
29321
- function isAdditionalPropertySchema(schema) {
29322
- return Boolean(schema?.[ADDITIONAL_PROPERTY_FLAG]);
29323
- }
29324
- function getAdditionalPropertyOrder(schemaProperties) {
29325
- return Object.keys(schemaProperties).filter((property) => isAdditionalPropertySchema(schemaProperties[property]));
29326
- }
29327
29310
  /** The `ObjectFieldProperty` component is used to render the `SchemaField` for a child property of an object
29328
29311
  */
29329
29312
  function ObjectFieldPropertyFn(props) {
@@ -29388,15 +29371,10 @@ function ObjectField$1(props) {
29388
29371
  formDataRef.current = formData;
29389
29372
  const schema = reactExports.useMemo(() => schemaUtils.retrieveSchema(rawSchema, formData, true), [schemaUtils, rawSchema, formData]);
29390
29373
  const uiOptions = reactExports.useMemo(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
29391
- const schemaProperties = reactExports.useMemo(() => schema.properties ?? {}, [schema.properties]);
29374
+ const { properties: schemaProperties = {} } = schema;
29392
29375
  // All the children will use childFieldPathId if present in the props, falling back to the fieldPathId
29393
29376
  const childFieldPathId = props.childFieldPathId ?? fieldPathId;
29394
29377
  const lastRenamedProperty = reactExports.useRef({ previousKey: '', currentKey: undefined });
29395
- const [additionalPropertyOrder, setAdditionalPropertyOrder] = reactExports.useState(() => getAdditionalPropertyOrder(schemaProperties));
29396
- const definedPropertyOrder = reactExports.useMemo(() => {
29397
- const additionalPropertySet = new Set(getAdditionalPropertyOrder(schemaProperties));
29398
- return Object.keys(schemaProperties).filter((property) => !additionalPropertySet.has(property));
29399
- }, [schemaProperties]);
29400
29378
  const templateTitle = uiOptions.title ?? schema.title ?? title ?? name;
29401
29379
  const description = uiOptions.description ?? schema.description;
29402
29380
  const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
@@ -29459,7 +29437,6 @@ function ObjectField$1(props) {
29459
29437
  lastRenamedProperty.current.currentKey = newKey;
29460
29438
  lastRenamedProperty.current.previousKey = getAvailableKey(newKey, newFormData);
29461
29439
  }
29462
- setAdditionalPropertyOrder((order) => [...order, newKey]);
29463
29440
  onChange(newFormData, childFieldPathId.path);
29464
29441
  }, [formData, onChange, translateString, schemaUtils, childFieldPathId, getAvailableKey, schema]);
29465
29442
  /** Returns a callback function that deals with the rename of a key for an additional property for a schema. That
@@ -29488,7 +29465,6 @@ function ObjectField$1(props) {
29488
29465
  lastRenamedProperty.current.previousKey = oldKey;
29489
29466
  }
29490
29467
  lastRenamedProperty.current.currentKey = actualNewKey;
29491
- setAdditionalPropertyOrder((order) => order.map((property) => (property === oldKey ? actualNewKey : property)));
29492
29468
  onChange(renamedObj, childFieldPathId.path);
29493
29469
  }
29494
29470
  }, [onChange, childFieldPathId, getAvailableKey]);
@@ -29496,7 +29472,6 @@ function ObjectField$1(props) {
29496
29472
  * value for the path plus the key to be removed
29497
29473
  */
29498
29474
  const handleRemoveProperty = reactExports.useCallback((key) => {
29499
- setAdditionalPropertyOrder((order) => order.filter((property) => property !== key));
29500
29475
  onChange(ADDITIONAL_PROPERTY_KEY_REMOVE, [...childFieldPathId.path, key]);
29501
29476
  }, [onChange, childFieldPathId]);
29502
29477
  /** Returns the stable React key for a property. For the most recently renamed
@@ -29512,9 +29487,8 @@ function ObjectField$1(props) {
29512
29487
  }, []);
29513
29488
  if (!renderOptionalField || hasFormData) {
29514
29489
  try {
29515
- const definedPropertySet = new Set(definedPropertyOrder);
29516
- const currentAdditionalProperties = additionalPropertyOrder.filter((property) => Object.hasOwn(schemaProperties, property) && !definedPropertySet.has(property));
29517
- orderedProperties = orderProperties([...definedPropertyOrder, ...currentAdditionalProperties], uiOptions.order);
29490
+ const properties = Object.keys(schemaProperties);
29491
+ orderedProperties = orderProperties(properties, uiOptions.order);
29518
29492
  }
29519
29493
  catch (err) {
29520
29494
  return (jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsx("p", { className: 'rjsf-config-error', style: { color: 'red' }, children: jsxRuntimeExports.jsx(AZ, { options: { disableParsingRawHTML: true }, children: translateString(TranslatableString.InvalidObjectField, [name || 'root', err.message]) }) }), jsxRuntimeExports.jsx("pre", { children: JSON.stringify(schema) })] }));
@@ -29527,7 +29501,7 @@ function ObjectField$1(props) {
29527
29501
  title: uiOptions.label === false ? '' : templateTitle,
29528
29502
  description: uiOptions.label === false ? undefined : description,
29529
29503
  properties: orderedProperties.map((propertyName) => {
29530
- const addedByAdditionalProperties = isAdditionalPropertySchema(schema.properties?.[propertyName]);
29504
+ const addedByAdditionalProperties = Boolean(schema.properties?.[propertyName]?.[ADDITIONAL_PROPERTY_FLAG]);
29531
29505
  const fieldUiSchema = addedByAdditionalProperties ? uiSchema.additionalProperties : uiSchema[propertyName];
29532
29506
  const hidden = getUiOptions(fieldUiSchema).widget === 'hidden';
29533
29507
  const content = (jsxRuntimeExports.jsx(ObjectFieldProperty, { propertyName: propertyName, required: isRequired(schema, propertyName), schema: get(schema, [PROPERTIES_KEY, propertyName], {}), uiSchema: fieldUiSchema, errorSchema: get(errorSchema, [propertyName]), fieldPathId: childFieldPathId, formData: get(formData, [propertyName]), handleKeyRename: handleKeyRename, handleRemoveProperty: handleRemoveProperty, addedByAdditionalProperties: addedByAdditionalProperties, onChange: onChange, onBlur: onBlur, onFocus: onFocus, registry: registry, disabled: disabled, readonly: readonly, hideError: hideError }, getStableKey(propertyName)));
@@ -3,7 +3,7 @@ import { g as getIconName } from './get-icon-props-CgNJbSP4.js';
3
3
  import { c as createRandomString } from './random-string-JbKhhoXs.js';
4
4
  import { r as renderListComponent } from './render-list-component-CUJ2wdo4.js';
5
5
  import { C as CheckboxTemplate } from './checkbox.template-LN1xNaDw.js';
6
- import { t as translate } from './translations-Cb9R_zmF.js';
6
+ import { t as translate } from './translations-DgqE77nk.js';
7
7
  import { I as ImageTemplate } from './image.template-BXDvrqGw.js';
8
8
 
9
9
  const listItemCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}.boolean-input{--limel-boolean-input-box-size:1.25rem;--limel-boolean-input-gap-size:0.5rem;position:relative;isolation:isolate;display:flex;align-items:center;min-height:var(--limel-checkbox-min-height, 2.5rem);width:100%}.boolean-input input[type=checkbox],.boolean-input input[type=radio]{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;-webkit-appearance:none;-moz-appearance:none;appearance:none}label.boolean-input-label{min-width:var(--limel-boolean-input-box-size);min-height:var(--limel-boolean-input-box-size);padding-top:0.125rem;cursor:pointer;position:relative;width:100%;overflow-wrap:var(--limel-boolean-input-label-overflow-wrap, normal);font-size:var(--limel-theme-default-small-font-size);color:var(--limel-theme-text-primary-on-background-color);padding-left:calc(var(--limel-boolean-input-box-size) + var(--limel-boolean-input-gap-size))}.disabled:not([readonly]):not([readonly=true]) label.boolean-input-label{cursor:not-allowed;color:var(--limel-theme-text-disabled-color)}.required label.boolean-input-label:after{margin-left:0.0625rem;content:"*"}.invalid:not(.readonly) label.boolean-input-label{color:var(--limel-theme-error-text-color)}:host(limel-checkbox.hide-label) label.boolean-input-label,.hide-label label.boolean-input-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0;width:var(--limel-boolean-input-box-size)}.box{position:absolute;pointer-events:none;transition:border-color 0.4s ease 0.2s, background-color 0.2s ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease;display:inline-block;vertical-align:middle;width:var(--limel-boolean-input-box-size);height:var(--limel-boolean-input-box-size);margin-right:var(--limel-boolean-input-gap-size);border-radius:var(--limel-boolean-input-box-border-radius);border:0.125rem solid;border-color:var(--checkbox-unchecked-border-color, rgb(var(--contrast-900)));background-color:var(--limel-checkbox-background-color, rgb(var(--contrast-300)));}.checked .box,.boolean-input>input[type=checkbox]:checked+.box,.boolean-input>input[type=radio]:checked+.box{background-color:var(--lime-primary-color, var(--limel-theme-primary-color));border-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.disabled .box{opacity:0.4}.box{}.boolean-input:not(.disabled):hover .box{will-change:box-shadow;box-shadow:var(--button-shadow-hovered)}.boolean-input:not(.disabled):active .box{will-change:box-shadow;box-shadow:var(--button-shadow-pressed)}.box:before{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);content:"";position:absolute;inset:-0.1875rem;border-radius:inherit;}.boolean-input>input[type=checkbox]:focus-visible+.box:before,.boolean-input>input[type=radio]:focus-visible+.box:before{will-change:box-shadow;box-shadow:var(--shadow-depth-8-focused)}.box:after{transition:opacity 0.2s ease, width 0.4s ease, box-shadow 0.6s cubic-bezier(0.68, -0.55, 0, 1.87), transform 0.6s cubic-bezier(0.68, -0.55, 0, 1.87);content:"";position:absolute;inset:0;margin:auto;border-radius:1rem;opacity:0;background-color:rgb(var(--color-white));}.boolean-input:not(.disabled):hover .box:after{will-change:opacity, box-shadow, transform, width}:host(limel-checkbox){--limel-boolean-input-label-overflow-wrap:var( --checkbox-label-overflow-wrap, normal );min-height:var(--limel-checkbox-min-height, 2.5rem)}.box:after{height:0.125rem;width:0.25rem}.indeterminate .box:after{opacity:1;width:calc(var(--limel-boolean-input-box-size) - 0.5rem)}.checkbox{--limel-boolean-input-box-border-radius:0.25rem}.checkbox svg.check-mark{position:absolute;z-index:1;inset:0;transform:translate3d(-0.125rem, -0.125rem, 0);width:var(--limel-boolean-input-box-size);height:var(--limel-boolean-input-box-size);padding:0.25rem;color:rgb(var(--color-white));opacity:0;stroke-width:0.1875rem;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}.checkbox svg.check-mark path{stroke-dashoffset:29.7833;stroke-dasharray:29.7833;transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1)}.checkbox{}.checkbox:not(.indeterminate)>input[type=checkbox]:checked+.box svg.check-mark{opacity:1}.checkbox:not(.indeterminate)>input[type=checkbox]:checked+.box svg.check-mark path{stroke-dashoffset:0}limel-dynamic-label{margin-top:0.375rem;margin-left:-0.25rem}:host(limel-checkbox:focus),:host(limel-checkbox:focus-visible),:host(limel-checkbox:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-checkbox){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-checkbox:focus) limel-helper-line,:host(limel-checkbox:focus-visible) limel-helper-line,:host(limel-checkbox:focus-within) limel-helper-line,:host(limel-checkbox:hover) limel-helper-line{will-change:grid-template-rows}*,*:before,*:after{box-sizing:border-box}limel-list-item{min-height:2.5rem}limel-list-item:focus{outline:none}limel-list-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-list-item{transition:background-color 0.6s ease;position:relative;isolation:isolate;display:flex;align-items:center;gap:0.5rem;padding:0 1rem;background-color:rgb(var(--contrast-100))}limel-list-item:hover{z-index:1;transition:background-color 0.2s ease;border-radius:0.5rem}limel-list-item:focus,limel-list-item:focus-visible,limel-list-item:active{z-index:1;border-radius:0.5rem}limel-list-item:first-of-type{border-top-left-radius:0.5rem;border-top-right-radius:0.5rem}limel-list-item:last-of-type{border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem}limel-list-item:not([disabled]):not([disabled=true]){cursor:pointer}limel-list-item[disabled]:not([disabled=false]){cursor:not-allowed}limel-list-item[disabled]:not([disabled=false]){cursor:not-allowed}limel-list-item[disabled]:not([disabled=false]) .text,limel-list-item[disabled]:not([disabled=false]) limel-icon,limel-list-item[disabled]:not([disabled=false]) img,limel-list-item[disabled]:not([disabled=false]) .boolean-input{opacity:0.4}limel-list-item:not([disabled]):not([disabled=true]):hover,limel-list-item:not([disabled]):not([disabled=true]):focus-visible{background-color:rgb(var(--contrast-400))}limel-list-item[type=option]:before{transition:background-color 0.6s ease;content:"";position:absolute;inset:0;opacity:0.2;border-radius:0.5rem}limel-list-item[type=option][selected]:not([selected=false]):before{transition:background-color 0.2s ease;background-color:var(--mdc-theme-primary)}limel-list-item .text{flex-grow:1;min-width:0;display:flex;flex-direction:column;padding:0.5rem 0;color:var(--limel-theme-text-primary-on-background-color)}limel-list-item .label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--limel-theme-default-font-size);line-height:1rem}limel-list-item .description{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:var(--maxLinesSecondaryText);line-height:1rem;font-size:var(--limel-theme-default-small-font-size);opacity:0.6}limel-list-item limel-icon{color:var(--limel-theme-text-secondary-on-background-color);flex-shrink:0;margin-left:-0.5rem}limel-list-item limel-icon:has(+img){margin-left:0;position:absolute;top:0.125rem;left:0.125rem;padding:0.1875rem;width:1.25rem;background-color:rgb(var(--contrast-200), 0.8)}limel-list-item img{flex-shrink:0;object-fit:var(--list-item-image-object-fit, cover);border-radius:var(--list-item-image-border-radius, 50%);width:2rem;height:2rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.5)}limel-list-item limel-menu{margin-right:-0.5rem;order:var(--limel-list-item-menu-order, 3)}limel-list-item[role=menuitem] limel-list-item .label{font-size:var(--limel-theme-default-small-font-size)}.boolean-input,limel-radio-button{width:var(--limel-boolean-input-box-size) !important;margin-left:-0.25rem !important}.boolean-input.checkbox{margin-right:0.25rem}limel-list-item:has(limel-icon) .boolean-input,limel-list-item:has(img) .boolean-input{margin-right:-0.25rem;margin-left:0;order:2}.boolean-input .boolean-input-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0;width:var(--limel-boolean-input-box-size)}`;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as getElement } from './index-BGxJfR2f.js';
2
- import { t as translate } from './translations-Cb9R_zmF.js';
2
+ import { t as translate } from './translations-DgqE77nk.js';
3
3
  import { i as isDescendant } from './dom-B9Ofc5RB.js';
4
4
  import { E as ESCAPE, T as TAB, a as ENTER, A as ARROW_UP, b as ARROW_DOWN } from './keycodes-C4_9qUMP.js';
5
5
  import { c as createRandomString } from './random-string-JbKhhoXs.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-BGxJfR2f.js';
2
2
  import { i as isTypeAccepted } from './files-DnkFEKoB.js';
3
3
  import { g as getIconName } from './get-icon-props-CgNJbSP4.js';
4
- import { t as translate } from './translations-Cb9R_zmF.js';
4
+ import { t as translate } from './translations-DgqE77nk.js';
5
5
  import { c as createRandomString } from './random-string-JbKhhoXs.js';
6
6
  import { r as resizeImage } from './image-resize-BTSG--2-.js';
7
7
  import { I as ImageTemplate } from './image.template-BXDvrqGw.js';
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
2
2
  import { L as LevelMapping, E as EditorMenuTypes, i as isInlineImageTag, M as MouseButtons, e as editorMenuTypesArray } from './types-C_Yu8dOg.js';
3
3
  import { g as getLinkAttributes, m as markdownToHTML, s as sanitizeHTML } from './markdown-parser-DrxxGLF5.js';
4
4
  import { h as cloneDeep } from './cloneDeep-CL7UD3mR.js';
5
- import { t as translate } from './translations-Cb9R_zmF.js';
5
+ import { t as translate } from './translations-DgqE77nk.js';
6
6
  import { c as decodeHTML, e as decodeHTMLStrict } from './index-CbciMfiU.js';
7
7
  import { c as createRandomString } from './random-string-JbKhhoXs.js';
8
8
  import { i as isItem } from './is-item-CrvUOVvg.js';
@@ -23294,34 +23294,6 @@ class MarkdownSerializerState {
23294
23294
  let next = parent.child(index + 1);
23295
23295
  return m.isInSet(next.marks) && (!next.isText || /\S/.test(next.text));
23296
23296
  });
23297
- let leading = trailing;
23298
- trailing = "";
23299
- // If whitespace has to be expelled from the node, adjust
23300
- // leading and trailing accordingly.
23301
- if (node && node.isText && marks.some(mark => {
23302
- let info = this.getMark(mark.type.name);
23303
- return info && info.expelEnclosingWhitespace && !mark.isInSet(active);
23304
- })) {
23305
- let [_, lead, rest] = /^(\s*)(.*)$/m.exec(node.text);
23306
- if (lead) {
23307
- leading += lead;
23308
- node = rest ? node.withText(rest) : null;
23309
- if (!node)
23310
- marks = active;
23311
- }
23312
- }
23313
- if (node && node.isText && marks.some(mark => {
23314
- let info = this.getMark(mark.type.name);
23315
- return info && info.expelEnclosingWhitespace && !this.isMarkAhead(parent, index + 1, mark);
23316
- })) {
23317
- let [_, rest, trail] = /^(.*?)(\s*)$/m.exec(node.text);
23318
- if (trail) {
23319
- trailing = trail;
23320
- node = rest ? node.withText(rest) : null;
23321
- if (!node)
23322
- marks = active;
23323
- }
23324
- }
23325
23297
  let inner = marks.length ? marks[marks.length - 1] : null;
23326
23298
  let noEsc = inner && this.getMark(inner.type.name).escape === false;
23327
23299
  let len = marks.length - (noEsc ? 1 : 0);
@@ -23350,9 +23322,38 @@ class MarkdownSerializerState {
23350
23322
  let keep = 0;
23351
23323
  while (keep < Math.min(active.length, len) && marks[keep].eq(active[keep]))
23352
23324
  ++keep;
23325
+ let leading = trailing;
23326
+ trailing = "";
23327
+ // If whitespace has to be expelled from the node, adjust
23328
+ // leading and trailing accordingly.
23329
+ if (node && node.isText && marks.some(mark => {
23330
+ let info = this.getMark(mark.type.name);
23331
+ return info && info.expelEnclosingWhitespace && !active.some((m, i) => i < keep && m.eq(mark));
23332
+ })) {
23333
+ let [_, lead, rest] = /^(\s*)(.*)$/m.exec(node.text);
23334
+ if (lead) {
23335
+ leading += lead;
23336
+ node = rest ? node.withText(rest) : null;
23337
+ if (!node)
23338
+ marks = active;
23339
+ }
23340
+ }
23341
+ if (node && node.isText && marks.some(mark => {
23342
+ let info = this.getMark(mark.type.name);
23343
+ return info && info.expelEnclosingWhitespace && !this.isMarkAhead(parent, index + 1, mark);
23344
+ })) {
23345
+ let [_, rest, trail] = /^(.*?)(\s*)$/m.exec(node.text);
23346
+ if (trail) {
23347
+ trailing = trail;
23348
+ node = rest ? node.withText(rest) : null;
23349
+ if (!node)
23350
+ marks = active;
23351
+ }
23352
+ }
23353
23353
  // Close the marks that need to be closed
23354
- while (keep < active.length)
23355
- this.text(this.markString(active.pop(), false, parent, index), false);
23354
+ if (node || index == parent.childCount)
23355
+ while (keep < active.length)
23356
+ this.text(this.markString(active.pop(), false, parent, index), false);
23356
23357
  // Output any previously expelled trailing whitespace outside the marks
23357
23358
  if (leading)
23358
23359
  this.text(leading);
@@ -23372,15 +23373,14 @@ class MarkdownSerializerState {
23372
23373
  else
23373
23374
  this.render(node, parent, index);
23374
23375
  this.atBlockStart = false;
23375
- }
23376
- // After the first non-empty text node is rendered, the end of output
23377
- // is no longer at block start.
23378
- //
23379
- // FIXME: If a non-text node writes something to the output for this
23380
- // block, the end of output is also no longer at block start. But how
23381
- // can we detect that?
23382
- if ((node === null || node === void 0 ? void 0 : node.isText) && node.nodeSize > 0) {
23383
- this.atBlockStart = false;
23376
+ // After the first non-empty text node is rendered, the end of output
23377
+ // is no longer at block start.
23378
+ //
23379
+ // FIXME: If a non-text node writes something to the output for this
23380
+ // block, the end of output is also no longer at block start. But how
23381
+ // can we detect that?
23382
+ if (node.isText && node.nodeSize > 0)
23383
+ this.atBlockStart = false;
23384
23384
  }
23385
23385
  };
23386
23386
  parent.forEach(progress);
@@ -1,5 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-BGxJfR2f.js';
2
2
  import { c as createRandomString } from './random-string-JbKhhoXs.js';
3
+ import { t as translate } from './translations-DgqE77nk.js';
3
4
 
4
5
  /**
5
6
  *
@@ -48,12 +49,23 @@ function getPercentageClass(value) {
48
49
  return 'percent-90-100';
49
50
  }
50
51
 
51
- const sliderCss = () => `@charset "UTF-8";:host([displays-percentage-colors].percent-0){--lime-primary-color:var(--color-percent--0)}:host([displays-percentage-colors].percent-0-10){--lime-primary-color:var(--color-percent--0to10)}:host([displays-percentage-colors].percent-10-20){--lime-primary-color:var(--color-percent--10to20)}:host([displays-percentage-colors].percent-20-30){--lime-primary-color:var(--color-percent--20to30)}:host([displays-percentage-colors].percent-30-40){--lime-primary-color:var(--color-percent--30to40)}:host([displays-percentage-colors].percent-40-50){--lime-primary-color:var(--color-percent--40to50)}:host([displays-percentage-colors].percent-50-60){--lime-primary-color:var(--color-percent--50to60)}:host([displays-percentage-colors].percent-60-70){--lime-primary-color:var(--color-percent--60to70)}:host([displays-percentage-colors].percent-70-80){--lime-primary-color:var(--color-percent--70to80)}:host([displays-percentage-colors].percent-80-90){--lime-primary-color:var(--color-percent--80to90)}:host([displays-percentage-colors].percent-90-100){--lime-primary-color:var(--color-percent--90to100)}:host([displays-percentage-colors].percent-30-40) .indicator,:host([displays-percentage-colors].percent-40-50) .indicator,:host([displays-percentage-colors].percent-70-80) .indicator{color:rgb(var(--color-gray-darker))}:host([displays-percentage-colors].percent-50-60) .indicator,:host([displays-percentage-colors].percent-60-70) .indicator{color:rgb(var(--color-gray-dark))}:host([readonly]:not([readonly=false])) input[type=range]{cursor:default}:host([readonly]:not([readonly=false])) .track,:host([readonly]:not([readonly=false])) .active,:host([readonly]:not([readonly=false])) .indicator{height:0.75rem}:host([readonly]:not([readonly=false])) .indicator{box-shadow:none}:host([readonly]:not([readonly=false])) .knob{opacity:0}:host([readonly]:not([readonly=false])) .active{background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.thumb{position:absolute;left:calc(var(--slider-fraction) * 100%);top:0;bottom:0;width:0;z-index:1}.knob{transition:border-color 0.5s ease;position:absolute;top:50%;left:0;transform:translate3d(-50%, -50%, 0);width:1.25rem;height:1.25rem;border-radius:50%;border:0.5rem solid;border-color:var(--lime-primary-color, var(--limel-theme-primary-color));background-color:rgb(var(--contrast-100))}.knob:before,.knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0;height:0;border:0.375rem solid transparent}:host([disabled]:not([disabled=false])) .knob:before,:host([disabled]:not([disabled=false])) .knob:after{content:none}.knob:before{opacity:calc(var(--slider-fraction) * 100);left:-1rem;transform:rotate(90deg)}.knob:after{opacity:calc((1 - var(--slider-fraction)) * 100);right:-1rem;transform:rotate(-90deg)}.slider:hover .knob,.slider:has(input[type=range]:active) .knob,.slider:has(input[type=range]:focus) .knob{box-shadow:var(--button-shadow-normal)}.slider:hover .knob:before,.slider:has(input[type=range]:active) .knob:before,.slider:has(input[type=range]:focus) .knob:before{left:-1.5rem;border-top-color:rgb(var(--contrast-1400), 0.5)}.slider:hover .knob:after,.slider:has(input[type=range]:active) .knob:after,.slider:has(input[type=range]:focus) .knob:after{right:-1.5rem;border-top-color:rgb(var(--contrast-1400), 0.5)}.indicator{user-select:none;position:absolute;left:0;top:50%;z-index:1;transform:translate3d(-50%, -50%, 0);transform-origin:bottom center;transition:transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.5s ease;border-radius:1.25rem;padding:0 0.375rem;height:1.25rem;display:flex;align-items:center;white-space:nowrap;color:rgb(var(--color-white));font-size:0.6875rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color));box-shadow:var(--button-shadow-normal)}:host(:not([disabled]):not([readonly])) input[type=range]:active~.thumb .indicator,:host(:not([disabled]):not([readonly])) input[type=range]:focus~.thumb .indicator{transform:translate3d(-50%, calc(-100% - 0.75rem), 0) scale(1.25);box-shadow:var(--shadow-depth-16)}*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limel-slider){box-sizing:border-box;isolation:isolate;position:relative;display:flex;flex-direction:column}:host(limel-slider:not([invalid]):not([invalid=true])) .limel-notched-outline,:host(limel-slider[disabled]:not([disabled=false])) .limel-notched-outline{--limel-notched-outline-border-color:transparent;--limel-notched-outline-background-color:transparent}div[slot=content]{display:flex;flex-direction:column;width:100%;padding:0 0.25rem}.slider{position:relative;height:2.5rem;margin:0 0.75rem}input[type=range]{position:absolute;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2;margin:0;appearance:none}:host([disabled]:not([disabled=false])) input[type=range]{cursor:not-allowed}:host([disabled]:not([disabled=false])) .track .active{opacity:0.5}:host([disabled]:not([disabled=false])) .indicator{border-radius:0.125rem;box-shadow:var(--button-shadow-pressed)}.track{transition:background-color 0.5s ease;display:flex;align-items:center;justify-content:space-between;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:0.5rem;border-radius:1rem;background-color:rgba(var(--contrast-700), 0.6)}.track:before,.track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.track:before{left:-0.75rem}.track:after{right:-0.75rem}.track .active{transition:background-color 0.5s ease;position:absolute;height:100%;width:calc(var(--slider-fraction) * 100%);border-radius:inherit;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.step-dot{transform:translateX(-50%);border-radius:50%;height:0.25rem;width:0.25rem;background-color:rgb(var(--contrast-100), 0.6)}.step-dot:first-of-type,.step-dot:last-of-type{opacity:0}.range-labels{display:flex;justify-content:space-between;margin-top:-0.75rem;width:100%}.range-labels .min,.range-labels .max{line-height:1;font-size:0.75rem;color:var(--limel-notched-outline-label-color, rgb(var(--contrast-1200)))}:host(limel-slider:focus),:host(limel-slider:focus-visible),:host(limel-slider:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-slider){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-slider:focus) limel-helper-line,:host(limel-slider:focus-visible) limel-helper-line,:host(limel-slider:focus-within) limel-helper-line,:host(limel-slider:hover) limel-helper-line{will-change:grid-template-rows}`;
52
+ const sliderCss = () => `@charset "UTF-8";:host([displays-percentage-colors].percent-0){--lime-primary-color:var(--color-percent--0)}:host([displays-percentage-colors].percent-0-10){--lime-primary-color:var(--color-percent--0to10)}:host([displays-percentage-colors].percent-10-20){--lime-primary-color:var(--color-percent--10to20)}:host([displays-percentage-colors].percent-20-30){--lime-primary-color:var(--color-percent--20to30)}:host([displays-percentage-colors].percent-30-40){--lime-primary-color:var(--color-percent--30to40)}:host([displays-percentage-colors].percent-40-50){--lime-primary-color:var(--color-percent--40to50)}:host([displays-percentage-colors].percent-50-60){--lime-primary-color:var(--color-percent--50to60)}:host([displays-percentage-colors].percent-60-70){--lime-primary-color:var(--color-percent--60to70)}:host([displays-percentage-colors].percent-70-80){--lime-primary-color:var(--color-percent--70to80)}:host([displays-percentage-colors].percent-80-90){--lime-primary-color:var(--color-percent--80to90)}:host([displays-percentage-colors].percent-90-100){--lime-primary-color:var(--color-percent--90to100)}:host([displays-percentage-colors].percent-30-40) .indicator,:host([displays-percentage-colors].percent-40-50) .indicator,:host([displays-percentage-colors].percent-70-80) .indicator{color:rgb(var(--color-gray-darker))}:host([displays-percentage-colors].percent-50-60) .indicator,:host([displays-percentage-colors].percent-60-70) .indicator{color:rgb(var(--color-gray-dark))}:host([readonly]:not([readonly=false])) input[type=range]{cursor:default}:host([readonly]:not([readonly=false])) .track,:host([readonly]:not([readonly=false])) .active,:host([readonly]:not([readonly=false])) .indicator{height:0.75rem}:host([readonly]:not([readonly=false])) .indicator{box-shadow:none}:host([readonly]:not([readonly=false])) .knob{opacity:0}:host([readonly]:not([readonly=false])) .active{background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.thumb{position:absolute;left:calc(var(--slider-fraction) * 100%);top:0;bottom:0;width:0;z-index:1}.knob{transition:border-color 0.5s ease;position:absolute;top:50%;left:0;transform:translate3d(-50%, -50%, 0);width:1.25rem;height:1.25rem;border-radius:50%;border:0.5rem solid;border-color:var(--lime-primary-color, var(--limel-theme-primary-color));background-color:rgb(var(--contrast-100))}.knob:before,.knob:after{transition:all 0.2s ease 0.2s;content:"";display:block;position:absolute;top:0;bottom:0;margin:auto;width:0;height:0;border:0.375rem solid transparent}:host([disabled]:not([disabled=false])) .knob:before,:host([disabled]:not([disabled=false])) .knob:after{content:none}.knob:before{opacity:calc(var(--slider-fraction) * 100);left:-1rem;transform:rotate(90deg)}.knob:after{opacity:calc((1 - var(--slider-fraction)) * 100);right:-1rem;transform:rotate(-90deg)}.slider:hover .knob,.slider:has(input[type=range]:active) .knob,.slider:has(input[type=range]:focus) .knob{box-shadow:var(--button-shadow-normal)}.slider:hover .knob:before,.slider:has(input[type=range]:active) .knob:before,.slider:has(input[type=range]:focus) .knob:before{left:-1.5rem;border-top-color:rgb(var(--contrast-1400), 0.5)}.slider:hover .knob:after,.slider:has(input[type=range]:active) .knob:after,.slider:has(input[type=range]:focus) .knob:after{right:-1.5rem;border-top-color:rgb(var(--contrast-1400), 0.5)}.indicator{user-select:none;position:absolute;left:0;top:50%;z-index:1;transform:translate3d(-50%, -50%, 0);transform-origin:bottom center;transition:transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.5s ease;border-radius:1.25rem;padding:0 0.375rem;height:1.25rem;min-width:1.25rem;display:flex;align-items:center;justify-content:center;white-space:nowrap;color:rgb(var(--color-white));font-size:0.6875rem;background-color:var(--lime-primary-color, var(--limel-theme-primary-color));box-shadow:var(--button-shadow-normal)}:host(:not([disabled]):not([readonly])) input[type=range]:active~.thumb .indicator,:host(:not([disabled]):not([readonly])) input[type=range]:focus~.thumb .indicator{transform:translate3d(-50%, calc(-100% - 0.75rem), 0) scale(1.25);box-shadow:var(--shadow-depth-16)}*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limel-slider){box-sizing:border-box;isolation:isolate;position:relative;display:flex;flex-direction:column}:host(limel-slider:not([invalid]):not([invalid=true])) .limel-notched-outline,:host(limel-slider[disabled]:not([disabled=false])) .limel-notched-outline{--limel-notched-outline-border-color:transparent;--limel-notched-outline-background-color:transparent}div[slot=content]{display:flex;flex-direction:column;width:100%;padding:0 0.25rem}.slider{position:relative;height:2.5rem;margin:0 0.75rem}input[type=range]{position:absolute;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2;margin:0;appearance:none}:host([disabled]:not([disabled=false])) input[type=range]{cursor:not-allowed}:host([disabled]:not([disabled=false])) .track .active{opacity:0.5}:host([disabled]:not([disabled=false])) .indicator{border-radius:0.125rem;box-shadow:var(--button-shadow-pressed)}.track{transition:background-color 0.5s ease;display:flex;align-items:center;justify-content:space-between;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:0.5rem;border-radius:1rem;background-color:rgba(var(--contrast-700), 0.6)}.track:before,.track:after{content:"";display:inline-block;position:absolute;top:0;bottom:0;margin:auto;width:0.375rem;height:0.375rem;border-radius:50%;background-color:rgba(var(--contrast-700), 0.6)}.track:before{left:-0.75rem}.track:after{right:-0.75rem}.track .active{transition:background-color 0.5s ease;position:absolute;height:100%;width:calc(var(--slider-fraction) * 100%);border-radius:inherit;background-color:var(--lime-primary-color, var(--limel-theme-primary-color))}.step-dot{transform:translateX(-50%);border-radius:50%;height:0.25rem;width:0.25rem;background-color:rgb(var(--contrast-100), 0.6)}.step-dot:first-of-type,.step-dot:last-of-type{opacity:0}.range-labels{display:flex;justify-content:space-between;margin-top:-0.75rem;width:100%}.range-labels .min,.range-labels .max{line-height:1;font-size:0.75rem;color:var(--limel-notched-outline-label-color, rgb(var(--contrast-1200)))}:host(.has-clear-button) div[slot=content]{padding-right:calc(1rem + 0.25rem)}:host(.is-unset) .track .active{width:0}:host(.is-unset) .thumb{left:50%}button.clear-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}button.clear-button:focus{outline:none}button.clear-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.clear-button:not([disabled]){transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--contrast-1100));background-color:rgba(var(--contrast-700), 0.6)}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):focus,button.clear-button:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-1000))}button.clear-button:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button.clear-button:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.clear-button:not([disabled]):hover,button.clear-button:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.clear-button:not([disabled]):focus-visible{background-color:rgb(var(--contrast-1000))}button.clear-button{position:absolute;inset:0.75rem 0 0 auto;display:flex;align-items:center;justify-content:center;height:1rem;width:1rem;border-radius:50%}button.clear-button svg{width:calc(1rem - 0.25rem);height:calc(1rem - 0.25rem);fill:currentColor}button.clear-button:before{content:"";position:absolute;inset:0 auto 0 0;margin:auto;height:0.125rem;width:0.25rem;background-color:rgba(var(--contrast-700), 0.6);transform:translate(-100%, 0)}button.clear-button[disabled]{color:rgb(var(--contrast-1000));background-color:rgb(var(--contrast-600));cursor:not-allowed}:host(limel-slider:focus),:host(limel-slider:focus-visible),:host(limel-slider:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limel-slider){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limel-slider:focus) limel-helper-line,:host(limel-slider:focus-visible) limel-helper-line,:host(limel-slider:focus-within) limel-helper-line,:host(limel-slider:hover) limel-helper-line{will-change:grid-template-rows}`;
52
53
 
53
54
  const DEFAULT_FACTOR = 1;
54
55
  const DEFAULT_MAX_VALUE = 100;
55
56
  const DEFAULT_MIN_VALUE = 0;
56
57
  const MAX_VISIBLE_STEP_DOTS = 20;
58
+ /**
59
+ * Whether the slider holds a value at all. `Number.isFinite` is typed
60
+ * `(number: unknown) => boolean`, so it tests the right thing but narrows
61
+ * nothing; this does, which lets the unset check double as proof that what
62
+ * remains is a number the arithmetic can use. `null`, `undefined` and `NaN`
63
+ * all mean unset.
64
+ * @param value - the slider's `value` prop, which may not be a number.
65
+ */
66
+ const isSetValue = (value) => {
67
+ return Number.isFinite(value);
68
+ };
57
69
  const Slider = class {
58
70
  constructor(hostRef) {
59
71
  registerInstance(this, hostRef);
@@ -80,6 +92,9 @@ const Slider = class {
80
92
  this.factor = DEFAULT_FACTOR;
81
93
  /**
82
94
  * Set to `true` to indicate that the slider is required.
95
+ * A required slider does not offer the clear button, since a required
96
+ * value cannot be unset. It can still be initialized unset (with a
97
+ * non-finite `value`) to prompt the user to make a choice.
83
98
  */
84
99
  this.required = false;
85
100
  /**
@@ -96,6 +111,10 @@ const Slider = class {
96
111
  * Unit to display next to the value
97
112
  */
98
113
  this.unit = '';
114
+ /**
115
+ * Defines the language for translations of the accessible labels.
116
+ */
117
+ this.language = 'en';
99
118
  /**
100
119
  * The maximum value allowed
101
120
  */
@@ -104,6 +123,37 @@ const Slider = class {
104
123
  * The minimum value allowed
105
124
  */
106
125
  this.valuemin = DEFAULT_MIN_VALUE;
126
+ /**
127
+ * `true` while the value on display is one the consumer has been told
128
+ * about — either it came from the `value` prop, or it has been emitted on
129
+ * `change`. It is `false` from the moment the slider becomes unset until a
130
+ * value is committed again.
131
+ *
132
+ * The native input always holds a value, so while unset it rests at the
133
+ * midpoint. A press that lands on that midpoint, or a drag that returns to
134
+ * it before releasing, leaves the input's value untouched and fires neither
135
+ * `input` nor `change`. Without this flag such an interaction is swallowed:
136
+ * the slider either stays unset, or shows a number the consumer never
137
+ * received.
138
+ */
139
+ this.valueIsCommitted = false;
140
+ this.syncStateFromValue = () => {
141
+ const value = this.value;
142
+ if (!isSetValue(value)) {
143
+ this.enterUnsetState();
144
+ return;
145
+ }
146
+ this.isUnset = false;
147
+ this.valueIsCommitted = true;
148
+ this.displayValue = this.multiplyByFactor(value);
149
+ this.setPercentageClass(value);
150
+ };
151
+ this.enterUnsetState = () => {
152
+ this.isUnset = true;
153
+ this.valueIsCommitted = false;
154
+ this.displayValue = this.getRestingDisplayValue();
155
+ this.percentageClass = undefined;
156
+ };
107
157
  this.renderStepDots = (min, max) => {
108
158
  if (!this.step) {
109
159
  return;
@@ -121,24 +171,87 @@ const Slider = class {
121
171
  }
122
172
  return (h("limel-helper-line", { helperText: this.helperText, helperTextId: this.helperTextId, invalid: this.invalid }));
123
173
  };
174
+ /**
175
+ * A required slider must hold a value, so it offers no way to clear it,
176
+ * and a readonly one cannot be edited at all. The styling needs the same
177
+ * answer to reserve room for the button, so both read it from here rather
178
+ * than each deriving it — the stylesheet cannot see a parsed prop, only
179
+ * the attribute string, and `required="false"` is a present attribute.
180
+ */
181
+ this.hasClearButton = () => {
182
+ return !this.readonly && !this.required;
183
+ };
184
+ this.renderClearButton = () => {
185
+ if (!this.hasClearButton()) {
186
+ return;
187
+ }
188
+ const label = this.label
189
+ ? translate.get('clear-value-of', this.language, {
190
+ label: this.label,
191
+ })
192
+ : translate.get('clear-value', this.language);
193
+ return (h("button", { type: "button", id: this.clearButtonId, class: "clear-button", "aria-label": label, onClick: this.handleClear, disabled: this.isUnset || this.disabled }, h("svg", { viewBox: "0 0 32 32", "aria-hidden": "true", focusable: "false" }, h("path", { d: "M7.219 5.781L5.78 7.22 14.563 16 5.78 24.781 7.22 26.22 16 17.437l8.781 8.782 1.438-1.438L17.437 16l8.782-8.781L24.78 5.78 16 14.563z" })), h("limel-tooltip", { elementId: this.clearButtonId, label: label })));
194
+ };
124
195
  this.handleInput = (event) => {
125
196
  event.stopPropagation();
126
197
  const input = event.target;
127
198
  const value = Number(input.value);
199
+ this.isUnset = false;
128
200
  this.displayValue = value;
129
201
  this.setPercentageClass(value / this.factor);
130
202
  };
131
203
  this.handleChange = (event) => {
132
204
  event.stopPropagation();
133
205
  const input = event.target;
134
- let value = Number(input.value);
206
+ this.commitValue(Number(input.value));
207
+ };
208
+ this.handleClick = (event) => {
209
+ if (this.valueIsCommitted) {
210
+ return;
211
+ }
212
+ // The interaction is over and the value on display still hasn't
213
+ // reached the consumer, so the native input never fired a `change`.
214
+ // Commit what it holds. The click is left to bubble, so consumers
215
+ // listening for clicks still see it.
216
+ const input = event.target;
217
+ this.commitValue(Number(input.value));
218
+ };
219
+ /**
220
+ * Leaves the unset state and emits the value, keeping the rendered state
221
+ * and the emitted value in step so the two cannot diverge.
222
+ * @param displayValue - the value held by the native input, already
223
+ * multiplied by `factor`.
224
+ */
225
+ this.commitValue = (displayValue) => {
135
226
  const step = this.multiplyByFactor(this.step);
136
- if (!this.isMultipleOfStep(value, step)) {
137
- value = this.roundToStep(value, step);
227
+ const min = this.multiplyByFactor(this.valuemin);
228
+ let value = displayValue;
229
+ // Steps are counted from `valuemin`, not from zero — a range of 1–5 in
230
+ // steps of 2 stops at 1, 3 and 5. Rounding against zero would push
231
+ // every one of those to the next even number, past `valuemax`.
232
+ if (!this.isMultipleOfStep(value - min, step)) {
233
+ value = min + this.roundToStep(value - min, step);
138
234
  }
235
+ this.valueIsCommitted = true;
236
+ this.isUnset = false;
237
+ this.displayValue = value;
238
+ this.setPercentageClass(value / this.factor);
139
239
  this.change.emit(value / this.factor);
140
240
  };
241
+ this.handleClear = (event) => {
242
+ var _a;
243
+ event.stopPropagation();
244
+ this.enterUnsetState();
245
+ this.change.emit(null);
246
+ // Move focus to the slider itself so keyboard users can immediately
247
+ // set a new value, and so assistive tech announces the now-unset state
248
+ // instead of focus falling to the body when the button self-disables.
249
+ (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.focus();
250
+ };
141
251
  this.getContainerClassList = () => {
252
+ return Object.assign({ 'is-unset': this.isUnset, 'has-clear-button': this.hasClearButton() }, this.getPercentageClassList());
253
+ };
254
+ this.getPercentageClassList = () => {
142
255
  if (!this.percentageClass) {
143
256
  return {};
144
257
  }
@@ -149,12 +262,18 @@ const Slider = class {
149
262
  this.multiplyByFactor = (value) => {
150
263
  return Math.round(value * this.factor);
151
264
  };
152
- this.getValue = () => {
153
- let value = this.value;
154
- if (!Number.isFinite(value)) {
155
- value = this.valuemin;
156
- }
157
- return value;
265
+ /**
266
+ * The display value the thumb rests at while unset: the midpoint of the
267
+ * range, so both arrow-key directions are live (unlike anchoring at the
268
+ * minimum). Aligned to the step — native range inputs default to a step of
269
+ * 1 — so it matches a real input value and the first key press doesn't jump.
270
+ */
271
+ this.getRestingDisplayValue = () => {
272
+ const min = this.multiplyByFactor(this.valuemin);
273
+ const max = this.multiplyByFactor(this.valuemax);
274
+ const midpoint = (min + max) / 2;
275
+ const step = this.step ? this.multiplyByFactor(this.step) : 1;
276
+ return min + Math.round((midpoint - min) / step) * step;
158
277
  };
159
278
  this.getFraction = () => {
160
279
  const min = this.multiplyByFactor(this.valuemin);
@@ -178,10 +297,10 @@ const Slider = class {
178
297
  };
179
298
  this.labelId = createRandomString();
180
299
  this.helperTextId = createRandomString();
300
+ this.clearButtonId = createRandomString();
181
301
  }
182
302
  componentWillLoad() {
183
- this.displayValue = this.multiplyByFactor(this.getValue());
184
- this.setPercentageClass(this.getValue());
303
+ this.syncStateFromValue();
185
304
  }
186
305
  render() {
187
306
  const min = this.multiplyByFactor(this.valuemin);
@@ -194,13 +313,18 @@ const Slider = class {
194
313
  if (this.disabled || this.readonly) {
195
314
  inputProps.disabled = true;
196
315
  }
197
- return (h(Host, { key: 'b525c7a5774b9832788a9fb18c3f00798e910d81', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'e0d97ce8992401fc85b370971a503cb4968bc182', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !!this.value, hasFloatingLabel: true }, h("div", { key: 'fe53bc1695fdc29c42139677d0e0dd76ba17ec9e', slot: "content" }, h("div", { key: '45effbc8e70d5be0fbbbd30fac34d7a9cf7ef2a8', class: "slider", style: { '--slider-fraction': `${fraction}` } }, h("input", Object.assign({ key: '0e7b5da8cca6f95df8528d478619e0e1cc41ee7e', type: "range", min: min, max: max, value: this.displayValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperText
316
+ return (h(Host, { key: 'eecd22982d9180f24f947fd2ab9af9a25e64647e', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '848578a10d64a4af81e296c9f961e9be788484a7', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, disabled: this.disabled, readonly: this.readonly, hasValue: !this.isUnset, hasFloatingLabel: true }, h("div", { key: '7ad977107b79fc9ca416562d5c7905b4a962053c', slot: "content" }, h("div", { key: 'dcb137a44b5244e63a4c8a95341d3918dc65445c', class: "slider", style: { '--slider-fraction': `${fraction}` } }, h("input", Object.assign({ key: '73af46f062991f3c715d13c0f44b0fb9478dc37c', type: "range", min: min, max: max, value: this.displayValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperText
198
317
  ? this.helperTextId
199
- : undefined, onInput: this.handleInput, onChange: this.handleChange }, inputProps)), h("div", { key: '7a064053a0e89209813c68637991f0e23c6ec877', class: "track" }, h("div", { key: '042a6185e0fa842bcd077cefe0934116827432fa', class: "active" }), this.renderStepDots(min, max)), h("div", { key: '09f11ca04aa46a02f498507acae7d84e37210f14', class: "thumb" }, h("div", { key: 'd1b2513e6694a3bb0bba05a97139cc5fecca62e5', class: "knob" }), h("div", { key: 'cc135f641c78e80c9b57e86369e6cdf2cbf152a1', class: "indicator", "aria-hidden": "true" }, this.displayValue))), h("div", { key: '76baf35402525fc825667f04a7fdea5d1ff551cc', class: "range-labels" }, h("span", { key: 'c7d50a897ae0dcea864b8d98fca72cd1aef19f3b', class: "min" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { key: '65c5dee93cc75c978eaf9c6dc7be89f734e74913', class: "max" }, this.multiplyByFactor(this.valuemax), this.unit)))), this.renderHelperLine()));
318
+ : undefined, "aria-valuetext": this.isUnset
319
+ ? translate.get('value-not-set', this.language)
320
+ : undefined, ref: (el) => {
321
+ this.inputElement = el;
322
+ }, onInput: this.handleInput, onChange: this.handleChange, onClick: this.handleClick }, inputProps)), h("div", { key: 'e9fb2af7f43cc040c382930d336c8eb903bc0162', class: "track" }, h("div", { key: '2cec88a4b8c99296473bbd9b064bccd0a6450b8f', class: "active" }), this.renderStepDots(min, max)), h("div", { key: '5a090fb0528478450510ff0240e6b5499a177238', class: "thumb" }, h("div", { key: 'fde6792041312183af0328d9fc75d19d2553bf46', class: "knob" }), h("div", { key: 'de717ffa20723870bb27aa22e99fe9fe5ebdd563', class: "indicator", "aria-hidden": "true" }, this.isUnset
323
+ ? '\u2194\uFE0E'
324
+ : this.displayValue))), h("div", { key: 'd0c38d092fecc4bf9690680d8541c8d658056f08', class: "range-labels" }, h("span", { key: '581387615da0cdaf105a568e02212f8bdd22eeb6', class: "min" }, this.multiplyByFactor(this.valuemin), this.unit), h("span", { key: '33c5673d8e56995bffdc35340381f2e87ae0918c', class: "max" }, this.multiplyByFactor(this.valuemax), this.unit)))), this.renderClearButton(), this.renderHelperLine()));
200
325
  }
201
326
  watchValue() {
202
- this.displayValue = this.multiplyByFactor(this.getValue());
203
- this.setPercentageClass(this.getValue());
327
+ this.syncStateFromValue();
204
328
  }
205
329
  static get watchers() { return {
206
330
  "value": [{
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, a as getElement } from './index-BGxJfR2f.js';
2
- import { t as translate } from './translations-Cb9R_zmF.js';
2
+ import { t as translate } from './translations-DgqE77nk.js';
3
3
  import { c as createRandomString } from './random-string-JbKhhoXs.js';
4
4
 
5
5
  /**
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement
2
2
  import { p as pickBy, n as negate, h as has } from './pickBy-C4C3CM4m.js';
3
3
  import { _ as _mapLayout } from './layout-C4zsCPOF.js';
4
4
  import { i as isEqual } from './isEqual-4tbMaaf_.js';
5
- import { t as translate } from './translations-Cb9R_zmF.js';
5
+ import { t as translate } from './translations-DgqE77nk.js';
6
6
  import './_baseIteratee-CEZRuq23.js';
7
7
  import './_baseIsEqual-B6bIeexY.js';
8
8
  import './eq-CZ30nDJE.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-BGxJfR2f.js';
2
- import { t as translate } from './translations-Cb9R_zmF.js';
2
+ import { t as translate } from './translations-DgqE77nk.js';
3
3
  import { a as ENTER, E as ESCAPE } from './keycodes-C4_9qUMP.js';
4
4
 
5
5
  const editorLinkMenuCss = () => `:host(limel-text-editor-link-menu){animation:fade 0.2s ease forwards;animation-delay:0.1s;opacity:0;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;max-width:calc(100vw - 2rem);border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--shadow-depth-16)}.actions{display:flex;justify-content:end;gap:0.5rem}@keyframes fade{0%{scale:0.86;opacity:0}100%{scale:1;opacity:1}}`;