@sveltia/ui 0.35.6 → 0.36.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 (58) hide show
  1. package/dist/components/alert/infobar.svelte +2 -2
  2. package/dist/components/button/button.svelte +1 -1
  3. package/dist/components/button/select-button-group.svelte +1 -1
  4. package/dist/components/button/split-button.svelte +3 -3
  5. package/dist/components/calendar/calendar.svelte +20 -23
  6. package/dist/components/dialog/dialog.svelte +4 -4
  7. package/dist/components/dialog/dialog.svelte.d.ts +1 -1
  8. package/dist/components/dialog/prompt-dialog.svelte.d.ts +1 -1
  9. package/dist/components/drawer/drawer.svelte +3 -3
  10. package/dist/components/grid/grid.svelte +1 -1
  11. package/dist/components/listbox/listbox.svelte +1 -1
  12. package/dist/components/menu/menu-button.svelte +1 -0
  13. package/dist/components/menu/menu-item-checkbox.svelte +1 -0
  14. package/dist/components/menu/menu-item-radio.svelte +1 -0
  15. package/dist/components/menu/menu-item.svelte +3 -2
  16. package/dist/components/menu/menu.svelte +1 -1
  17. package/dist/components/radio/radio-group.svelte +1 -1
  18. package/dist/components/resizable-pane/resizable-handle.svelte +6 -4
  19. package/dist/components/select/combobox.svelte +5 -5
  20. package/dist/components/select/select-tags.svelte +6 -7
  21. package/dist/components/slider/slider.svelte +6 -5
  22. package/dist/components/slider/slider.svelte.d.ts +1 -1
  23. package/dist/components/tabs/tab-list.svelte +1 -1
  24. package/dist/components/tabs/tab.svelte +1 -0
  25. package/dist/components/text-editor/code-editor.svelte +2 -2
  26. package/dist/components/text-editor/text-editor.svelte +2 -2
  27. package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte +2 -2
  28. package/dist/components/text-editor/toolbar/code-language-switcher.svelte +3 -3
  29. package/dist/components/text-editor/toolbar/format-text-button.svelte +2 -2
  30. package/dist/components/text-editor/toolbar/insert-link-button.svelte +8 -8
  31. package/dist/components/text-editor/toolbar/insert-menu-button.svelte +2 -2
  32. package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte +5 -5
  33. package/dist/components/text-editor/toolbar/toggle-block-menu-item.svelte +2 -2
  34. package/dist/components/text-editor/transformers/hr.test.js +0 -2
  35. package/dist/components/text-field/number-input.svelte +3 -3
  36. package/dist/components/text-field/password-input.svelte +2 -2
  37. package/dist/components/text-field/search-bar.svelte +2 -2
  38. package/dist/components/text-field/secret-input.svelte +2 -2
  39. package/dist/components/text-field/text-input.svelte +6 -4
  40. package/dist/components/text-field/text-input.svelte.d.ts +1 -1
  41. package/dist/components/toast/toast.svelte +2 -0
  42. package/dist/components/util/app-shell.svelte +10 -9
  43. package/dist/index.d.ts +0 -3
  44. package/dist/index.js +1 -2
  45. package/dist/locales/en.yaml +66 -0
  46. package/dist/locales/ja.yaml +66 -0
  47. package/dist/services/group.svelte.d.ts +99 -2
  48. package/dist/services/group.svelte.js +46 -31
  49. package/dist/services/group.test.js +107 -36
  50. package/dist/services/i18n.d.ts +0 -11
  51. package/dist/services/i18n.js +15 -51
  52. package/dist/services/i18n.test.js +2 -90
  53. package/dist/services/popup.test.js +0 -4
  54. package/package.json +19 -17
  55. package/dist/locales/en.d.ts +0 -77
  56. package/dist/locales/en.js +0 -77
  57. package/dist/locales/ja.d.ts +0 -77
  58. package/dist/locales/ja.js +0 -77
@@ -4,10 +4,10 @@
4
4
  import 'prismjs';
5
5
 
6
6
  import { $isCodeNode as isCodeNode } from '@lexical/code';
7
+ import { _ } from '@sveltia/i18n';
7
8
  import { $getNodeByKey as getNodeByKey, $getRoot as getRoot } from 'lexical';
8
9
  import prismComponents from 'prismjs/components';
9
10
  import { getContext } from 'svelte';
10
- import { _ } from 'svelte-i18n';
11
11
  import Option from '../../listbox/option.svelte';
12
12
  import Select from '../../select/select.svelte';
13
13
  import { focusEditor, loadCodeHighlighter } from '../core.js';
@@ -69,7 +69,7 @@
69
69
 
70
70
  <Select
71
71
  {disabled}
72
- aria-label={$_('_sui.text_editor.language')}
72
+ aria-label={_('_sui.text_editor.language')}
73
73
  value={selectedLanguage}
74
74
  onChange={async ({ detail: { value: lang } }) => {
75
75
  if (!editorStore.editor || selectedLanguage === lang) {
@@ -93,7 +93,7 @@
93
93
  }
94
94
  }}
95
95
  >
96
- <Option label={$_('_sui.text_editor.plain_text')} value="plain" dir="ltr" />
96
+ <Option label={_('_sui.text_editor.plain_text')} value="plain" dir="ltr" />
97
97
  {#each codeLanguages as { key, label, aliases } (key)}
98
98
  <Option
99
99
  {label}
@@ -1,7 +1,7 @@
1
1
  <script>
2
+ import { _ } from '@sveltia/i18n';
2
3
  import { FORMAT_TEXT_COMMAND } from 'lexical';
3
4
  import { getContext } from 'svelte';
4
- import { _ } from 'svelte-i18n';
5
5
  import Button from '../../button/button.svelte';
6
6
  import Icon from '../../icon/icon.svelte';
7
7
  import { AVAILABLE_BUTTONS } from '../constants.js';
@@ -32,7 +32,7 @@
32
32
 
33
33
  <Button
34
34
  iconic
35
- aria-label={$_(`_sui.text_editor.${AVAILABLE_BUTTONS[type].labelKey}`)}
35
+ aria-label={_(`_sui.text_editor.${AVAILABLE_BUTTONS[type].labelKey}`)}
36
36
  aria-controls="{editorStore.editorId}-lexical-root"
37
37
  disabled={!editorStore.useRichText}
38
38
  pressed={selectionTypeMatches}
@@ -1,6 +1,7 @@
1
1
  <script>
2
2
  import { LinkNode, TOGGLE_LINK_COMMAND } from '@lexical/link';
3
3
  import { $getNearestNodeOfType as getNearestNodeOfType } from '@lexical/utils';
4
+ import { _ } from '@sveltia/i18n';
4
5
  import { isMac, matchesShortcuts } from '@sveltia/utils/events';
5
6
  import {
6
7
  COMMAND_PRIORITY_NORMAL,
@@ -15,7 +16,6 @@
15
16
  $setSelection as setSelection,
16
17
  } from 'lexical';
17
18
  import { getContext } from 'svelte';
18
- import { _ } from 'svelte-i18n';
19
19
  import Button from '../../button/button.svelte';
20
20
  import Dialog from '../../dialog/dialog.svelte';
21
21
  import Icon from '../../icon/icon.svelte';
@@ -188,7 +188,7 @@
188
188
 
189
189
  <Button
190
190
  iconic
191
- aria-label={$_(`_sui.text_editor.${AVAILABLE_BUTTONS[type].labelKey}`)}
191
+ aria-label={_(`_sui.text_editor.${AVAILABLE_BUTTONS[type].labelKey}`)}
192
192
  aria-controls="{editorStore.editorId}-lexical-root"
193
193
  disabled={!editorStore.useRichText}
194
194
  pressed={selectionTypeMatches}
@@ -203,18 +203,18 @@
203
203
 
204
204
  <Dialog
205
205
  title={dialogMode === 'create'
206
- ? $_('_sui.text_editor.insert_link')
207
- : $_('_sui.text_editor.update_link')}
206
+ ? _('_sui.text_editor.insert_link')
207
+ : _('_sui.text_editor.update_link')}
208
208
  bind:open={openDialog}
209
209
  bind:value={anchorURL}
210
210
  okDisabled={!anchorURL}
211
- okLabel={dialogMode === 'create' ? $_('_sui.insert') : $_('_sui.update')}
211
+ okLabel={dialogMode === 'create' ? _('_sui.insert') : _('_sui.update')}
212
212
  onClose={(event) => {
213
213
  onDialogClose(event);
214
214
  }}
215
215
  >
216
216
  <div role="none">
217
- <label for="{id}-url">{$_('_sui.text_editor.url')}</label>
217
+ <label for="{id}-url">{_('_sui.text_editor.url')}</label>
218
218
  <TextInput
219
219
  id="{id}-url"
220
220
  bind:value={anchorURL}
@@ -227,7 +227,7 @@
227
227
  </div>
228
228
  {#if !hasAnchor}
229
229
  <div role="none">
230
- <label for="{id}-text">{$_('_sui.text_editor.text')}</label>
230
+ <label for="{id}-text">{_('_sui.text_editor.text')}</label>
231
231
  <TextInput
232
232
  id="{id}-text"
233
233
  bind:value={anchorText}
@@ -242,7 +242,7 @@
242
242
  {#if dialogMode !== 'create'}
243
243
  <Button
244
244
  variant="secondary"
245
- label={$_('_sui.remove')}
245
+ label={_('_sui.remove')}
246
246
  onclick={() => {
247
247
  removeLink();
248
248
  dialogMode = 'remove';
@@ -1,7 +1,7 @@
1
1
  <script>
2
+ import { _ } from '@sveltia/i18n';
2
3
  import { $insertNodes as insertNodes } from 'lexical';
3
4
  import { getContext } from 'svelte';
4
- import { _ } from 'svelte-i18n';
5
5
  import Icon from '../../icon/icon.svelte';
6
6
  import MenuButton from '../../menu/menu-button.svelte';
7
7
  import MenuItem from '../../menu/menu-item.svelte';
@@ -27,7 +27,7 @@
27
27
  const editorStore = getContext('editorStore');
28
28
  </script>
29
29
 
30
- <MenuButton disabled={!editorStore.useRichText} label={$_('_sui.insert')}>
30
+ <MenuButton disabled={!editorStore.useRichText} label={_('_sui.insert')}>
31
31
  {#snippet endIcon()}
32
32
  <Icon name="arrow_drop_down" class="small-arrow" />
33
33
  {/snippet}
@@ -1,7 +1,7 @@
1
1
  <script>
2
+ import { _ } from '@sveltia/i18n';
2
3
  import { unique } from '@sveltia/utils/array';
3
4
  import { getContext } from 'svelte';
4
- import { _ } from 'svelte-i18n';
5
5
  import ButtonGroup from '../../button/button-group.svelte';
6
6
  import Button from '../../button/button.svelte';
7
7
  import Divider from '../../divider/divider.svelte';
@@ -81,10 +81,10 @@
81
81
  );
82
82
  </script>
83
83
 
84
- <ToolbarWrapper disabled={disabled || readonly} aria-label={$_('_sui.text_editor.text_editor')}>
84
+ <ToolbarWrapper disabled={disabled || readonly} aria-label={_('_sui.text_editor.text_editor')}>
85
85
  <MenuButton
86
86
  disabled={!editorStore.useRichText}
87
- aria-label={$_('_sui.text_editor.show_text_style_options')}
87
+ aria-label={_('_sui.text_editor.show_text_style_options')}
88
88
  aria-controls="{editorStore.editorId}-lexical-root"
89
89
  >
90
90
  {#snippet startIcon()}
@@ -93,7 +93,7 @@
93
93
  />
94
94
  {/snippet}
95
95
  {#snippet popup()}
96
- <Menu aria-label={$_('_sui.text_editor.text_style_options')}>
96
+ <Menu aria-label={_('_sui.text_editor.text_style_options')}>
97
97
  {#each blockLevelButtons as type (type)}
98
98
  <ToggleBlockMenuItem {type} />
99
99
  {/each}
@@ -132,7 +132,7 @@
132
132
  iconic
133
133
  disabled={editorStore.hasConverterError}
134
134
  pressed={!editorStore.useRichText}
135
- aria-label={$_('_sui.text_editor.edit_in_markdown')}
135
+ aria-label={_('_sui.text_editor.edit_in_markdown')}
136
136
  onclick={() => {
137
137
  editorStore.useRichText = !editorStore.useRichText;
138
138
 
@@ -10,12 +10,12 @@
10
10
  $createQuoteNode as createQuoteNode,
11
11
  } from '@lexical/rich-text';
12
12
  import { $setBlocksType as setBlocksType } from '@lexical/selection';
13
+ import { _ } from '@sveltia/i18n';
13
14
  import {
14
15
  $createParagraphNode as createParagraphNode,
15
16
  $getSelection as getSelection,
16
17
  } from 'lexical';
17
18
  import { getContext } from 'svelte';
18
- import { _ } from 'svelte-i18n';
19
19
  import Icon from '../../icon/icon.svelte';
20
20
  import MenuItemCheckbox from '../../menu/menu-item-checkbox.svelte';
21
21
  import { AVAILABLE_BUTTONS } from '../constants.js';
@@ -94,7 +94,7 @@
94
94
 
95
95
  {#key selectionTypeMatches}
96
96
  <MenuItemCheckbox
97
- label={$_(`_sui.text_editor.${AVAILABLE_BUTTONS[type].labelKey}`)}
97
+ label={_(`_sui.text_editor.${AVAILABLE_BUTTONS[type].labelKey}`)}
98
98
  checked={selectionTypeMatches}
99
99
  onclick={() => {
100
100
  if (!selectionTypeMatches) {
@@ -7,12 +7,10 @@ import { HR } from './hr.js';
7
7
  vi.mock('@lexical/extension', () => {
8
8
  const mockHRNode = {
9
9
  __type: 'horizontalrule',
10
- // eslint-disable-next-line jsdoc/require-jsdoc
11
10
  selectNext: vi.fn(),
12
11
  };
13
12
 
14
13
  return {
15
- // eslint-disable-next-line jsdoc/require-jsdoc
16
14
  $createHorizontalRuleNode: vi.fn(() => mockHRNode),
17
15
  // eslint-disable-next-line jsdoc/require-jsdoc
18
16
  $isHorizontalRuleNode: (/** @type {{ __type: string; }} */ node) =>
@@ -5,8 +5,8 @@
5
5
  @see https://w3c.github.io/aria/#textbox
6
6
  -->
7
7
  <script>
8
+ import { _ } from '@sveltia/i18n';
8
9
  import { untrack } from 'svelte';
9
- import { _ } from 'svelte-i18n';
10
10
  import Button from '../button/button.svelte';
11
11
  import Icon from '../icon/icon.svelte';
12
12
  import TextInput from './text-input.svelte';
@@ -123,7 +123,7 @@
123
123
  <Button
124
124
  iconic
125
125
  disabled={disabled || readonly || Number.isNaN(Number(value)) || isMax}
126
- aria-label={$_('_sui.number_input.increase')}
126
+ aria-label={_('_sui.number_input.increase')}
127
127
  aria-controls={id}
128
128
  onclick={() => {
129
129
  increase();
@@ -140,7 +140,7 @@
140
140
  <Button
141
141
  iconic
142
142
  disabled={disabled || readonly || Number.isNaN(Number(value)) || isMin}
143
- aria-label={$_('_sui.number_input.decrease')}
143
+ aria-label={_('_sui.number_input.decrease')}
144
144
  aria-controls={id}
145
145
  onclick={() => {
146
146
  decrease();
@@ -6,7 +6,7 @@
6
6
  @see https://w3c.github.io/aria/#textbox
7
7
  -->
8
8
  <script>
9
- import { _ } from 'svelte-i18n';
9
+ import { _ } from '@sveltia/i18n';
10
10
  import Button from '../button/button.svelte';
11
11
  import Icon from '../icon/icon.svelte';
12
12
  import TextInput from './text-input.svelte';
@@ -83,7 +83,7 @@
83
83
  iconic
84
84
  disabled={disabled || readonly}
85
85
  pressed={passwordVisible}
86
- aria-label={$_(
86
+ aria-label={_(
87
87
  passwordVisible ? '_sui.password_input.hide_password' : '_sui.password_input.show_password',
88
88
  )}
89
89
  aria-controls={id}
@@ -7,7 +7,7 @@
7
7
  -->
8
8
 
9
9
  <script>
10
- import { _ } from 'svelte-i18n';
10
+ import { _ } from '@sveltia/i18n';
11
11
  import Button from '../button/button.svelte';
12
12
  import Icon from '../icon/icon.svelte';
13
13
  import TextInput from './text-input.svelte';
@@ -95,7 +95,7 @@
95
95
  {#if value}
96
96
  <Button
97
97
  iconic
98
- aria-label={$_('_sui.clear')}
98
+ aria-label={_('_sui.clear')}
99
99
  aria-controls={id}
100
100
  onclick={() => {
101
101
  value = '';
@@ -6,7 +6,7 @@
6
6
  @see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/-webkit-text-security
7
7
  -->
8
8
  <script>
9
- import { _ } from 'svelte-i18n';
9
+ import { _ } from '@sveltia/i18n';
10
10
  import Button from '../button/button.svelte';
11
11
  import Icon from '../icon/icon.svelte';
12
12
  import TextInput from './text-input.svelte';
@@ -79,7 +79,7 @@
79
79
  iconic
80
80
  disabled={disabled || readonly}
81
81
  pressed={show}
82
- aria-label={$_(show ? '_sui.secret_input.hide_secret' : '_sui.secret_input.show_secret')}
82
+ aria-label={_(show ? '_sui.secret_input.hide_secret' : '_sui.secret_input.show_secret')}
83
83
  aria-controls={id}
84
84
  onclick={() => {
85
85
  show = !show;
@@ -67,20 +67,22 @@
67
67
  * Handle the `input` event. If `debounce` is `true`, the event will be debounced by 300ms. We use
68
68
  * `oninputcapture` to ensure that the event is fired before any `oninput` handlers on parent
69
69
  * elements, including the Lexical editor.
70
- * @param {InputEvent} event The `input` event object.
70
+ * @param {Event} event The `input` event object.
71
71
  */
72
72
  const handleInput = (event) => {
73
+ const inputEvent = /** @type {InputEvent} */ (event);
74
+
73
75
  if (debounce) {
74
76
  clearTimeout(debounceTimer);
75
77
  debounceTimer = /** @type {number} */ (
76
78
  /** @type {unknown} */ (
77
79
  setTimeout(() => {
78
- fireInput(event);
80
+ fireInput(inputEvent);
79
81
  }, timeout)
80
82
  )
81
83
  );
82
84
  } else {
83
- fireInput(event);
85
+ fireInput(inputEvent);
84
86
  }
85
87
  };
86
88
  </script>
@@ -113,7 +115,7 @@
113
115
  aria-required={required}
114
116
  aria-invalid={invalid}
115
117
  oninputcapture={handleInput}
116
- use:activateKeyShortcuts={keyShortcuts}
118
+ {@attach activateKeyShortcuts(keyShortcuts)}
117
119
  />
118
120
  {#if ariaLabel && showInlineLabel}
119
121
  <span id="{id}-label" class="label" class:hidden={!!value} aria-hidden="true">
@@ -13,7 +13,7 @@ declare const TextInput: import("svelte").Component<TextInputProps & import("../
13
13
  * Input value.
14
14
  */
15
15
  value?: string | undefined;
16
- } & Record<string, any>, {}, "element" | "value">;
16
+ } & Record<string, any>, {}, "value" | "element">;
17
17
  type Props = {
18
18
  /**
19
19
  * Input value.
@@ -59,6 +59,7 @@
59
59
  /** @type {HTMLElement} */ (document.querySelector('.sui.toast-base.enabled')) ?? undefined;
60
60
 
61
61
  if (popover) {
62
+ // eslint-disable-next-line svelte/no-dom-manipulating
62
63
  popoverBase?.remove();
63
64
  } else {
64
65
  popover = popoverBase;
@@ -76,6 +77,7 @@
76
77
  }
77
78
 
78
79
  return () => {
80
+ // eslint-disable-next-line svelte/no-dom-manipulating
79
81
  toast?.remove();
80
82
  };
81
83
  });
@@ -36,8 +36,7 @@
36
36
  'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block',
37
37
  ];
38
38
 
39
- /** @type {HTMLElement | undefined} */
40
- let fontLoader = $state();
39
+ let fontLoaded = $state(false);
41
40
 
42
41
  onMount(() => {
43
42
  const mediaQuery = globalThis.matchMedia('(prefers-color-scheme: dark)');
@@ -60,7 +59,7 @@
60
59
  };
61
60
 
62
61
  globalThis.setTimeout(() => {
63
- fontLoader?.remove();
62
+ fontLoaded = true;
64
63
  }, 1000);
65
64
  });
66
65
  </script>
@@ -82,17 +81,19 @@
82
81
  <meta name="google" content="notranslate" />
83
82
  <link rel="preconnect" href="https://fonts.googleapis.com" />
84
83
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" />
85
- {#each stylesheets as href}
84
+ {#each stylesheets as href (href)}
86
85
  <link rel="preload" {href} as="style" />
87
86
  <link rel="stylesheet" {href} />
88
87
  {/each}
89
88
  </svelte:head>
90
89
 
91
- <!-- Preload fonts, including the icons -->
92
- <div bind:this={fontLoader} class="font-loader" aria-hidden="true" style:opacity="0">
93
- Loading <strong>Sveltia</strong> <em>UI</em>
94
- <span role="none" class="material-symbols-outlined">favorite</span>
95
- </div>
90
+ {#if !fontLoaded}
91
+ <!-- Preload fonts, including the icons -->
92
+ <div class="font-loader" aria-hidden="true" style:opacity="0">
93
+ Loading <strong>Sveltia</strong> <em>UI</em>
94
+ <span role="none" class="material-symbols-outlined">favorite</span>
95
+ </div>
96
+ {/if}
96
97
 
97
98
  <div
98
99
  {...restProps}
package/dist/index.d.ts CHANGED
@@ -78,6 +78,3 @@ export { default as EmptyState } from "./components/util/empty-state.svelte";
78
78
  export { default as Group } from "./components/util/group.svelte";
79
79
  export { default as Modal } from "./components/util/modal.svelte";
80
80
  export * from "./typedefs.js";
81
- import { initLocales } from './services/i18n.js';
82
- import { isRTL } from './services/i18n.js';
83
- export { initLocales, isRTL };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { initLocales, isRTL } from './services/i18n.js';
1
+ import { initLocales } from './services/i18n.js';
2
2
 
3
3
  initLocales();
4
4
 
@@ -81,7 +81,6 @@ export { default as AppShell } from './components/util/app-shell.svelte';
81
81
  export { default as EmptyState } from './components/util/empty-state.svelte';
82
82
  export { default as Group } from './components/util/group.svelte';
83
83
  export { default as Modal } from './components/util/modal.svelte';
84
- export { initLocales, isRTL };
85
84
 
86
85
  // eslint-disable-next-line import/export
87
86
  export * from './typedefs.js';
@@ -0,0 +1,66 @@
1
+ ok: OK
2
+ cancel: Cancel
3
+ close: Close
4
+ clear: Clear
5
+ insert: Insert
6
+ update: Update
7
+ remove: Remove
8
+ collapse: Collapse
9
+ expand: Expand
10
+ dismiss: Dismiss
11
+ calendar:
12
+ year: Year
13
+ previous_decade: Previous Decade
14
+ next_decade: Next Decade
15
+ month: Month
16
+ previous_month: Previous Month
17
+ next_month: Next Month
18
+ today: Today
19
+ split_button:
20
+ x_options: "{$name} Options"
21
+ more_options: More Options
22
+ combobox:
23
+ select_an_option: Select an option…
24
+ filter_options: Filter Options
25
+ no_matching_options: No matching options found
26
+ number_input:
27
+ decrease: Decrease
28
+ increase: Increase
29
+ password_input:
30
+ show_password: Show Password
31
+ hide_password: Hide Password
32
+ secret_input:
33
+ show_secret: Show Secret
34
+ hide_secret: Hide Secret
35
+ select_tags:
36
+ selected_options: Selected options
37
+ remove_x: "Remove {$name}"
38
+ text_editor:
39
+ text_editor: Text Editor
40
+ code_editor: Code Editor
41
+ text_style_options: Text Style Options
42
+ show_text_style_options: Show Text Style Options
43
+ paragraph: Paragraph
44
+ heading_1: Heading 1
45
+ heading_2: Heading 2
46
+ heading_3: Heading 3
47
+ heading_4: Heading 4
48
+ heading_5: Heading 5
49
+ heading_6: Heading 6
50
+ bulleted_list: Bulleted List
51
+ numbered_list: Numbered List
52
+ blockquote: Block Quote
53
+ code_block: Code Block
54
+ bold: Bold
55
+ italic: Italic
56
+ strikethrough: Strikethrough
57
+ code: Code
58
+ link: Link
59
+ insert_link: Insert Link
60
+ update_link: Update Link
61
+ text: Text
62
+ url: URL
63
+ edit_in_markdown: Edit in Markdown
64
+ converter_error: There was an error while enabling rich text mode. Please use the plain text editor instead.
65
+ language: Language
66
+ plain_text: Plain Text
@@ -0,0 +1,66 @@
1
+ ok: OK
2
+ cancel: キャンセル
3
+ close: 閉じる
4
+ clear: クリア
5
+ insert: 挿入
6
+ update: 更新
7
+ remove: 削除
8
+ collapse: 折り畳む
9
+ expand: 広げる
10
+ dismiss: 閉じる
11
+ calendar:
12
+ year: 年
13
+ previous_decade: 前の 10 年
14
+ next_decade: 次の 10 年
15
+ month: 月
16
+ previous_month: 前月
17
+ next_month: 翌月
18
+ today: 今日
19
+ split_button:
20
+ x_options: "{$name} オプション"
21
+ more_options: その他のオプション
22
+ combobox:
23
+ select_an_option: オプションを選択…
24
+ filter_options: オプションを絞り込み
25
+ no_matching_options: 一致するオプションは見つかりませんでした
26
+ number_input:
27
+ decrease: 減らす
28
+ increase: 増やす
29
+ password_input:
30
+ show_password: パスワードを表示
31
+ hide_password: パスワードを隠す
32
+ secret_input:
33
+ show_secret: シークレットを表示
34
+ hide_secret: シークレットを隠す
35
+ select_tags:
36
+ selected_options: 選択済みのオプション
37
+ remove_x: "{$name} を削除"
38
+ text_editor:
39
+ text_editor: テキストエディター
40
+ code_editor: コードエディター
41
+ text_style_options: テキストスタイルオプション
42
+ show_text_style_options: テキストスタイルオプションを表示
43
+ paragraph: 段落
44
+ heading_1: 見出し 1
45
+ heading_2: 見出し 2
46
+ heading_3: 見出し 3
47
+ heading_4: 見出し 4
48
+ heading_5: 見出し 5
49
+ heading_6: 見出し 6
50
+ bulleted_list: 番号なしリスト
51
+ numbered_list: 番号付きリスト
52
+ blockquote: ブロック引用
53
+ code_block: コードブロック
54
+ bold: 太字
55
+ italic: 斜体
56
+ strikethrough: 取り消し線
57
+ code: コード
58
+ link: リンク
59
+ insert_link: リンクを挿入
60
+ update_link: リンクを更新
61
+ text: テキスト
62
+ url: URL
63
+ edit_in_markdown: マークダウンで編集
64
+ converter_error: リッチテキストモードを有効化中に問題が発生しました。代わりにプレーンテキストエディターを使用してください。
65
+ language: 言語
66
+ plain_text: プレーンテキスト
@@ -1,3 +1,100 @@
1
1
  export function normalize(value: string): string;
2
- export function activateGroup(parent: HTMLElement, params?: object | undefined): ActionReturn;
3
- import type { ActionReturn } from 'svelte/action';
2
+ /**
3
+ * Implement keyboard and mouse interactions for a grouping composite widget.
4
+ */
5
+ export class Group {
6
+ /**
7
+ * Initialize a new `Group` instance.
8
+ * @param {HTMLElement} parent Parent element.
9
+ * @param {object} [options] Options.
10
+ * @param {boolean} [options.clickToSelect] Whether to select an item by clicking on it.
11
+ * @todo Check for added elements probably with `MutationObserver`.
12
+ */
13
+ constructor(parent: HTMLElement, { clickToSelect }?: {
14
+ clickToSelect?: boolean | undefined;
15
+ } | undefined);
16
+ parent: HTMLElement;
17
+ role: string;
18
+ multi: boolean;
19
+ id: string;
20
+ parentGroupSelector: string;
21
+ clickToSelect: boolean;
22
+ /** @type {(event: MouseEvent) => void} */
23
+ _onClick: (event: MouseEvent) => void;
24
+ /** @type {(event: KeyboardEvent) => void} */
25
+ _onKeyDown: (event: KeyboardEvent) => void;
26
+ orientation: string;
27
+ childRoles: string[];
28
+ childSelectedAttr: "aria-selected" | "aria-checked";
29
+ childSelectedProp: string;
30
+ focusChild: boolean;
31
+ selectFirst: boolean;
32
+ /**
33
+ * Activate the members.
34
+ */
35
+ activate(): void;
36
+ /**
37
+ * CSS selector to retrieve the members.
38
+ * @type {string}
39
+ */
40
+ get selector(): string;
41
+ /**
42
+ * List of all the members.
43
+ * @type {HTMLElement[]}
44
+ */
45
+ get allMembers(): HTMLElement[];
46
+ /**
47
+ * List of the enabled and visible members.
48
+ * @type {HTMLElement[]}
49
+ */
50
+ get activeMembers(): HTMLElement[];
51
+ /**
52
+ * Get the currently selected member.
53
+ * @type {HTMLElement | undefined}
54
+ */
55
+ get selected(): HTMLElement | undefined;
56
+ /**
57
+ * Whether the parent is disabled.
58
+ * @type {boolean}
59
+ */
60
+ get isDisabled(): boolean;
61
+ /**
62
+ * Whether the parent is read-only.
63
+ * @type {boolean}
64
+ */
65
+ get isReadOnly(): boolean;
66
+ /**
67
+ * Whether the widget is displayed in grid mode.
68
+ * @type {boolean}
69
+ */
70
+ get grid(): boolean;
71
+ /**
72
+ * Select (and move focus to) the given target.
73
+ * @param {(MouseEvent | KeyboardEvent)} event Triggered event.
74
+ * @param {HTMLElement} newTarget Target element.
75
+ */
76
+ selectTarget(event: (MouseEvent | KeyboardEvent), newTarget: HTMLElement): void;
77
+ /**
78
+ * Handle the `click` event on the widget.
79
+ * @param {MouseEvent} event `click` event.
80
+ */
81
+ onClick(event: MouseEvent): void;
82
+ /**
83
+ * Handle the `keydown` event on the widget.
84
+ * @param {KeyboardEvent} event `keydown` event.
85
+ */
86
+ onKeyDown(event: KeyboardEvent): void;
87
+ /**
88
+ * Clean up event listeners.
89
+ */
90
+ destroy(): void;
91
+ /**
92
+ * Called whenever the params are updated. Filter the items based on the search terms.
93
+ * @param {{ searchTerms: string }} params Updated params.
94
+ */
95
+ onUpdate({ searchTerms }: {
96
+ searchTerms: string;
97
+ }): void;
98
+ }
99
+ export function activateGroup(paramsOrGetter?: object | (() => object) | undefined): Attachment;
100
+ import type { Attachment } from 'svelte/attachments';