@widgetic/editor 4.1.16 → 4.1.18
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.
- package/dist/components/PreviewChromeControls.svelte +2 -2
- package/dist/components/WidgetPreview.svelte +2 -2
- package/dist/components/editors/EmbedEditor.svelte +2 -1
- package/dist/components/editors/PropsEditor.svelte +127 -28
- package/dist/components/ic/AngleInputController.svelte +10 -6
- package/dist/components/ic/BrowserInputController.svelte +25 -112
- package/dist/components/ic/ColorPickerInputController.svelte +120 -48
- package/dist/components/ic/DatePickerInputController.svelte +18 -10
- package/dist/components/ic/DropdownInputController.svelte +2 -12
- package/dist/components/ic/FixedPositionInputController.svelte +1 -1
- package/dist/components/ic/FontInputController.svelte +42 -55
- package/dist/components/ic/InputControllerHeader.svelte +1 -1
- package/dist/components/ic/KnowledgeDocumentsInputController.svelte +7 -7
- package/dist/components/ic/NumberControls.svelte +92 -43
- package/dist/components/ic/NumberControls.svelte.d.ts +5 -1
- package/dist/components/ic/PositionInputController.svelte +24 -15
- package/dist/components/ic/RangeCalendarInputController.svelte +38 -18
- package/dist/components/ic/RoundedCornersInputController.svelte +2 -2
- package/dist/components/ic/SliderInputController.svelte +11 -4
- package/dist/components/ic/TextAreaInputController.svelte +40 -27
- package/dist/components/ic/TextAreaPreviewInputController.svelte +9 -8
- package/dist/components/ic/TextInputController.svelte +15 -2
- package/dist/components/ic/TimeInputController.svelte +1 -1
- package/dist/components/ic/VectorInputController.svelte +155 -27
- package/dist/components/ic/numberControlsSteps.d.ts +17 -0
- package/dist/components/ic/numberControlsSteps.js +23 -0
- package/dist/components/ic/shared/DropdownChevron.svelte +23 -0
- package/dist/components/ic/shared/DropdownChevron.svelte.d.ts +9 -0
- package/dist/components/ic/shared/EditorFileBrowserOverlay.svelte +132 -0
- package/dist/components/ic/shared/EditorFileBrowserOverlay.svelte.d.ts +27 -0
- package/dist/components/ic/shared/ItemGrid.svelte +2 -2
- package/dist/components/ic/shared/RecentItemsSection.svelte +6 -6
- package/dist/components/ic/shared/editableFieldClasses.d.ts +15 -0
- package/dist/components/ic/shared/editableFieldClasses.js +15 -0
- package/dist/components/ic/shared/index.d.ts +1 -0
- package/dist/components/ic/shared/index.js +1 -0
- package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte +41 -9
- package/dist/i18n/language.d.ts +260 -2
- package/dist/utils/angleMath.d.ts +2 -0
- package/dist/utils/angleMath.js +6 -0
- package/package.json +4 -4
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* The File Browser of the editor, laid over the props panel: the white surface of the panel, a header with the title
|
|
4
|
+
* and the X that closes it (at the end, centred in the height of the header, as in Figma), and the File Browser under
|
|
5
|
+
* it. Every control that picks a file (a file, an image, a vector) opens its browser through this, so they look and
|
|
6
|
+
* behave the same.
|
|
7
|
+
*
|
|
8
|
+
* The control fixes the type of file (`fileFilter`): the browser then draws no "Filter by" (the user cannot change the
|
|
9
|
+
* type) and the upload takes only that type. `fileFilter="all"` (any file) keeps the filter.
|
|
10
|
+
*/
|
|
11
|
+
import { Portal } from '@widgetic/design-system/components';
|
|
12
|
+
import { FileBrowser } from '@widgetic/file-browser';
|
|
13
|
+
import { IconX } from '@widgetic/design-system/icons';
|
|
14
|
+
import { useEditorMediaLibrary } from '../../../mediaLibraryContext';
|
|
15
|
+
import { useEditorLanguage } from '../../../i18n/language';
|
|
16
|
+
|
|
17
|
+
/** Where the overlay is drawn: the panel's own host (it then fills the panel), or any other element or id (a dialog). */
|
|
18
|
+
export let portalTarget: string | HTMLElement = 'portal-element';
|
|
19
|
+
/** The type of file the control takes: it decides what the browser lists, offers to filter by, and accepts as upload. */
|
|
20
|
+
export let fileFilter: 'all' | 'image' | 'video' | 'audio' | 'document' | 'font' | 'svg' = 'all';
|
|
21
|
+
/** Tells this browser from the others on the page (it keeps its own folder and sort between visits). */
|
|
22
|
+
export let instanceId: string;
|
|
23
|
+
/** The file the control has now: the browser keeps "use" disabled until a different one is picked. */
|
|
24
|
+
export let activeFileId: string | null = null;
|
|
25
|
+
/** The text of the button that hands the picked file to the control. */
|
|
26
|
+
export let addToEditorLabel: string | undefined = undefined;
|
|
27
|
+
/** Called when the user closes the browser without picking (the X, or a click outside when it is a dialog). */
|
|
28
|
+
export let onClose: () => void = () => {};
|
|
29
|
+
|
|
30
|
+
// The media library the editor was given (a partner's own storage, for instance), read through a getter because it
|
|
31
|
+
// reaches this component through context.
|
|
32
|
+
const getEditorMediaLibrary = useEditorMediaLibrary();
|
|
33
|
+
// The words of the editor in the language of the page, and the share of them that belongs to the File Browser inside it.
|
|
34
|
+
const { t, fileBrowser: fileBrowserLanguage } = useEditorLanguage();
|
|
35
|
+
|
|
36
|
+
/** Full-panel overlay when portaled to the props editor panel (not the document body). */
|
|
37
|
+
$: fillEditorPanel =
|
|
38
|
+
portalTarget === 'props-editor-file-browser-portal' ||
|
|
39
|
+
(portalTarget instanceof HTMLElement && portalTarget.id === 'props-editor-file-browser-portal');
|
|
40
|
+
/** The type is fixed by the control, so there is nothing to filter by; only "any file" can still be narrowed down. */
|
|
41
|
+
$: showFilters = fileFilter === 'all';
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<Portal target={portalTarget}>
|
|
45
|
+
<!-- Embedded in the props panel: neutral surface only (no dark scrim). Standalone portal: transparent overlay. -->
|
|
46
|
+
<div
|
|
47
|
+
class="editor-file-browser-overlay pointer-events-auto absolute inset-0 z-[999999] flex flex-col overflow-hidden p-0 {fillEditorPanel
|
|
48
|
+
? 'bg-background'
|
|
49
|
+
: 'bg-transparent'}"
|
|
50
|
+
>
|
|
51
|
+
{#if !fillEditorPanel}
|
|
52
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
53
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
54
|
+
<div class="editor-file-browser-backdrop absolute inset-0 bg-transparent" on:click={onClose}></div>
|
|
55
|
+
{/if}
|
|
56
|
+
|
|
57
|
+
<div
|
|
58
|
+
class="editor-file-browser-dialog editor-file-browser-dialog-animate relative z-[999999] flex min-h-0 w-full flex-col overflow-hidden border border-border bg-background"
|
|
59
|
+
class:absolute={fillEditorPanel}
|
|
60
|
+
class:inset-0={fillEditorPanel}
|
|
61
|
+
class:h-full={fillEditorPanel}
|
|
62
|
+
class:max-w-none={fillEditorPanel}
|
|
63
|
+
class:rounded-none={fillEditorPanel}
|
|
64
|
+
class:shadow-none={fillEditorPanel}
|
|
65
|
+
class:border-0={fillEditorPanel}
|
|
66
|
+
class:max-w-[520px]={!fillEditorPanel}
|
|
67
|
+
class:flex-1={!fillEditorPanel}
|
|
68
|
+
class:min-h-[550px]={fillEditorPanel}
|
|
69
|
+
class:self-center={!fillEditorPanel}
|
|
70
|
+
class:mx-auto={!fillEditorPanel}
|
|
71
|
+
class:rounded-xl={!fillEditorPanel}
|
|
72
|
+
class:shadow-md={!fillEditorPanel}
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
class="editor-file-browser-header relative flex h-[47px] shrink-0 items-center border-b border-border ps-4 pe-12"
|
|
76
|
+
>
|
|
77
|
+
<span class="text-body-medium text-foreground">{$t('editor.file.dialogTitle')}</span>
|
|
78
|
+
<!-- Figma: the X is a 24px button 12px from the end, centred in the height of the header -->
|
|
79
|
+
<button
|
|
80
|
+
type="button"
|
|
81
|
+
class="editor-file-browser-close press-feedback absolute top-1/2 end-3 flex size-6 -translate-y-1/2 items-center justify-center rounded-lg p-0 transition-colors duration-fast hover:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
|
|
82
|
+
on:click={onClose}
|
|
83
|
+
aria-label={$t('editor.file.closeDialog')}
|
|
84
|
+
>
|
|
85
|
+
<IconX class="size-4 stroke-2" />
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div class="editor-file-browser-body flex min-h-0 flex-1 flex-col overflow-hidden">
|
|
90
|
+
<!-- With a media library the File Browser keeps nothing about this visit (the filter it was left on, the
|
|
91
|
+
folder it was left in) in the page's localStorage: that storage belongs to the page this editor sits in,
|
|
92
|
+
which can be a partner's. Without one (the Widgetic site) it remembers them, as it always did. -->
|
|
93
|
+
<FileBrowser
|
|
94
|
+
class="h-full min-h-0 flex-1"
|
|
95
|
+
{instanceId}
|
|
96
|
+
initialFilter={fileFilter}
|
|
97
|
+
restrictUpload={fileFilter !== 'all'}
|
|
98
|
+
{showFilters}
|
|
99
|
+
useDemoContent={false}
|
|
100
|
+
mediaLibrary={getEditorMediaLibrary()}
|
|
101
|
+
persistHistory={!getEditorMediaLibrary()}
|
|
102
|
+
allowSelecting={true}
|
|
103
|
+
showAddToEditor={true}
|
|
104
|
+
maxSelections={1}
|
|
105
|
+
{activeFileId}
|
|
106
|
+
{addToEditorLabel}
|
|
107
|
+
locale={$fileBrowserLanguage.locale ?? undefined}
|
|
108
|
+
messages={$fileBrowserLanguage.messages ?? null}
|
|
109
|
+
on:select
|
|
110
|
+
/>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</Portal>
|
|
115
|
+
|
|
116
|
+
<style>
|
|
117
|
+
.editor-file-browser-dialog-animate {
|
|
118
|
+
transform-origin: center center;
|
|
119
|
+
animation: editor-file-browser-scale-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@keyframes editor-file-browser-scale-in {
|
|
123
|
+
from {
|
|
124
|
+
transform: scale(0.94);
|
|
125
|
+
opacity: 0;
|
|
126
|
+
}
|
|
127
|
+
to {
|
|
128
|
+
transform: scale(1);
|
|
129
|
+
opacity: 1;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const EditorFileBrowserOverlay: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
/** Where the overlay is drawn: the panel's own host (it then fills the panel), or any other element or id (a dialog). */ portalTarget?: string | HTMLElement;
|
|
16
|
+
/** The type of file the control takes: it decides what the browser lists, offers to filter by, and accepts as upload. */ fileFilter?: "all" | "image" | "video" | "audio" | "document" | "font" | "svg";
|
|
17
|
+
/** Tells this browser from the others on the page (it keeps its own folder and sort between visits). */ instanceId: string;
|
|
18
|
+
/** The file the control has now: the browser keeps "use" disabled until a different one is picked. */ activeFileId?: string | null;
|
|
19
|
+
/** The text of the button that hands the picked file to the control. */ addToEditorLabel?: string | undefined;
|
|
20
|
+
/** Called when the user closes the browser without picking (the X, or a click outside when it is a dialog). */ onClose?: () => void;
|
|
21
|
+
}, {
|
|
22
|
+
select: CustomEvent<any>;
|
|
23
|
+
} & {
|
|
24
|
+
[evt: string]: CustomEvent<any>;
|
|
25
|
+
}, {}, {}, string>;
|
|
26
|
+
type EditorFileBrowserOverlay = InstanceType<typeof EditorFileBrowserOverlay>;
|
|
27
|
+
export default EditorFileBrowserOverlay;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
tabindex="-1"
|
|
115
115
|
>
|
|
116
116
|
<IconCheck
|
|
117
|
-
class="size-4 shrink-0 stroke-
|
|
117
|
+
class="size-4 shrink-0 stroke-2 {selected
|
|
118
118
|
? 'text-foreground opacity-100'
|
|
119
119
|
: 'opacity-0'}"
|
|
120
120
|
/>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
tabindex="-1"
|
|
136
136
|
>
|
|
137
137
|
<IconCheck
|
|
138
|
-
class="size-4 shrink-0 stroke-
|
|
138
|
+
class="size-4 shrink-0 stroke-2 {selected
|
|
139
139
|
? 'text-foreground opacity-100'
|
|
140
140
|
: 'opacity-0'}"
|
|
141
141
|
/>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
tabindex="-1"
|
|
61
61
|
>
|
|
62
62
|
<IconCheck
|
|
63
|
-
class="size-4 shrink-0 stroke-
|
|
63
|
+
class="size-4 shrink-0 stroke-2 {selected
|
|
64
64
|
? 'text-foreground opacity-100'
|
|
65
65
|
: 'opacity-0'}"
|
|
66
66
|
/>
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
onItemDelete(item, e);
|
|
83
83
|
}}
|
|
84
84
|
>
|
|
85
|
-
<IconTrash class="size-4 stroke-
|
|
85
|
+
<IconTrash class="size-4 stroke-2" />
|
|
86
86
|
</IconButton>
|
|
87
87
|
{/if}
|
|
88
88
|
</div>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
tabindex="-1"
|
|
101
101
|
>
|
|
102
102
|
<IconCheck
|
|
103
|
-
class="size-4 shrink-0 stroke-
|
|
103
|
+
class="size-4 shrink-0 stroke-2 {selected
|
|
104
104
|
? 'text-foreground opacity-100'
|
|
105
105
|
: 'opacity-0'}"
|
|
106
106
|
/>
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
onItemDelete(item, e);
|
|
123
123
|
}}
|
|
124
124
|
>
|
|
125
|
-
<IconTrash class="size-4 stroke-
|
|
125
|
+
<IconTrash class="size-4 stroke-2" />
|
|
126
126
|
</IconButton>
|
|
127
127
|
{/if}
|
|
128
128
|
</div>
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
onItemDelete(item, e);
|
|
169
169
|
}}
|
|
170
170
|
>
|
|
171
|
-
<IconTrash class="size-3 stroke-[
|
|
171
|
+
<IconTrash class="size-3 stroke-[2.667]" />
|
|
172
172
|
</IconButton>
|
|
173
173
|
{/if}
|
|
174
174
|
</div>
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
onItemDelete(item, e);
|
|
206
206
|
}}
|
|
207
207
|
>
|
|
208
|
-
<IconTrash class="size-3 stroke-[
|
|
208
|
+
<IconTrash class="size-3 stroke-[2.667]" />
|
|
209
209
|
</IconButton>
|
|
210
210
|
{/if}
|
|
211
211
|
</div>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared surface + embedded input classes for input controllers whose text is editable.
|
|
3
|
+
* Hover and focus rings live on the outer surface; the inner control stays visually neutral.
|
|
4
|
+
*/
|
|
5
|
+
/** Default horizontal padding for a single-line editable field (matches Figma IC Number / Text). */
|
|
6
|
+
export declare const editableFieldSurfacePadding = "px-3";
|
|
7
|
+
/**
|
|
8
|
+
* Outer control surface: full-box hover, focus-within ring, soft accent fill.
|
|
9
|
+
* Pass extra layout classes (gap, pe-2, min-h-9, etc.) via `class` on the same element.
|
|
10
|
+
*/
|
|
11
|
+
export declare const editableFieldSurfaceClass = "flex h-9 w-full min-w-0 items-center rounded-lg bg-accent transition-colors duration-fast hover:bg-accent-hover focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background disabled:pointer-events-none disabled:opacity-50";
|
|
12
|
+
/**
|
|
13
|
+
* DS `Input` (and similar) embedded inside {@link editableFieldSurfaceClass}: no inner hover pill.
|
|
14
|
+
*/
|
|
15
|
+
export declare const embeddedInputClass = "h-full w-full min-w-0 border-0 bg-transparent px-0 text-body text-foreground shadow-none placeholder:text-muted-foreground hover:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared surface + embedded input classes for input controllers whose text is editable.
|
|
3
|
+
* Hover and focus rings live on the outer surface; the inner control stays visually neutral.
|
|
4
|
+
*/
|
|
5
|
+
/** Default horizontal padding for a single-line editable field (matches Figma IC Number / Text). */
|
|
6
|
+
export const editableFieldSurfacePadding = 'px-3';
|
|
7
|
+
/**
|
|
8
|
+
* Outer control surface: full-box hover, focus-within ring, soft accent fill.
|
|
9
|
+
* Pass extra layout classes (gap, pe-2, min-h-9, etc.) via `class` on the same element.
|
|
10
|
+
*/
|
|
11
|
+
export const editableFieldSurfaceClass = `flex h-9 w-full min-w-0 items-center rounded-lg bg-accent transition-colors duration-fast hover:bg-accent-hover focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 focus-within:ring-offset-background disabled:pointer-events-none disabled:opacity-50`;
|
|
12
|
+
/**
|
|
13
|
+
* DS `Input` (and similar) embedded inside {@link editableFieldSurfaceClass}: no inner hover pill.
|
|
14
|
+
*/
|
|
15
|
+
export const embeddedInputClass = 'h-full w-full min-w-0 border-0 bg-transparent px-0 text-body text-foreground shadow-none placeholder:text-muted-foreground hover:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0';
|
|
@@ -7,3 +7,4 @@
|
|
|
7
7
|
// Export shared components
|
|
8
8
|
export { default as RecentItemsSection } from './RecentItemsSection.svelte';
|
|
9
9
|
export { default as ItemGrid } from './ItemGrid.svelte';
|
|
10
|
+
export { editableFieldSurfaceClass, editableFieldSurfacePadding, embeddedInputClass } from './editableFieldClasses';
|
|
@@ -1,23 +1,55 @@
|
|
|
1
1
|
<!-- Figma Calendar 210:3967 / Calendar Day 210:3450 — editor panel calendar sizing. -->
|
|
2
|
+
<!--
|
|
3
|
+
The rules name the attributes Bits UI writes on the calendar: `data-calendar-*` on the single calendar,
|
|
4
|
+
`data-range-calendar-*` on the range calendar, and `data-bits-day` on the day of both.
|
|
5
|
+
A rule written for an attribute that is not in the DOM does nothing, and then the cells keep the 36px of the design
|
|
6
|
+
system and seven of them (252px) do not fit the 224px the Figma popover leaves for them.
|
|
7
|
+
-->
|
|
2
8
|
<style>
|
|
9
|
+
:global(.calendar-editor-fit [data-calendar-grid-row]),
|
|
10
|
+
:global(.calendar-editor-fit [data-range-calendar-grid-row]) {
|
|
11
|
+
display: flex;
|
|
12
|
+
width: 100%;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
gap: 0;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
max-width: 14rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:global(.calendar-editor-fit [data-calendar-head-cell]),
|
|
20
|
+
:global(.calendar-editor-fit [data-calendar-cell]),
|
|
21
|
+
:global(.calendar-editor-fit [data-range-calendar-head-cell]),
|
|
22
|
+
:global(.calendar-editor-fit [data-range-calendar-cell]) {
|
|
23
|
+
height: 2rem !important;
|
|
24
|
+
width: 2rem !important;
|
|
25
|
+
min-height: 2rem !important;
|
|
26
|
+
min-width: 2rem !important;
|
|
27
|
+
max-height: 2rem !important;
|
|
28
|
+
max-width: 2rem !important;
|
|
29
|
+
flex: 0 0 2rem;
|
|
30
|
+
padding: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
3
33
|
:global(.calendar-editor-fit [data-bits-day]) {
|
|
4
|
-
height: 2rem;
|
|
5
|
-
width: 2rem;
|
|
6
|
-
min-height: 2rem;
|
|
7
|
-
min-width: 2rem;
|
|
34
|
+
height: 2rem !important;
|
|
35
|
+
width: 2rem !important;
|
|
36
|
+
min-height: 2rem !important;
|
|
37
|
+
min-width: 2rem !important;
|
|
38
|
+
max-height: 2rem !important;
|
|
39
|
+
max-width: 2rem !important;
|
|
8
40
|
border-radius: var(--radius-lg);
|
|
9
41
|
font-size: inherit;
|
|
10
42
|
line-height: inherit;
|
|
11
43
|
}
|
|
12
44
|
|
|
13
|
-
:global(.calendar-editor-fit [data-
|
|
14
|
-
:global(.calendar-editor-fit
|
|
15
|
-
height: 1.5rem;
|
|
16
|
-
|
|
45
|
+
:global(.calendar-editor-fit [data-calendar-head-cell]),
|
|
46
|
+
:global(.calendar-editor-fit [data-range-calendar-head-cell]) {
|
|
47
|
+
height: 1.5rem !important;
|
|
48
|
+
min-height: 1.5rem !important;
|
|
49
|
+
max-height: 1.5rem !important;
|
|
17
50
|
font-weight: 500;
|
|
18
51
|
}
|
|
19
52
|
|
|
20
|
-
:global(.calendar-editor-fit [data-bits-calendar-row]),
|
|
21
53
|
:global(.calendar-editor-fit .mt-2.w-full) {
|
|
22
54
|
margin-top: 0.25rem;
|
|
23
55
|
}
|
package/dist/i18n/language.d.ts
CHANGED
|
@@ -283,7 +283,265 @@ export declare const EDITOR_CATALOGS: {
|
|
|
283
283
|
readonly 'editor.embed.helpLinkAria': "Read more about embedding";
|
|
284
284
|
readonly 'editor.schema.subtitleFont': "Subtitle Font";
|
|
285
285
|
};
|
|
286
|
-
readonly fileBrowser:
|
|
286
|
+
readonly fileBrowser: {
|
|
287
|
+
readonly 'action.cancel': "Cancel";
|
|
288
|
+
readonly 'action.create': "Create";
|
|
289
|
+
readonly 'action.delete': "Delete";
|
|
290
|
+
readonly 'action.done': "Done";
|
|
291
|
+
readonly 'action.download': "Download";
|
|
292
|
+
readonly 'action.move': "Move";
|
|
293
|
+
readonly 'action.rename': "Rename";
|
|
294
|
+
readonly 'action.tryAgain': "Try again";
|
|
295
|
+
readonly 'action.preview': "Preview";
|
|
296
|
+
readonly 'action.play': "Play";
|
|
297
|
+
readonly 'action.pause': "Pause";
|
|
298
|
+
readonly 'action.mute': "Mute";
|
|
299
|
+
readonly 'action.unmute': "Unmute";
|
|
300
|
+
readonly 'action.select': "Select";
|
|
301
|
+
readonly 'action.selected': "Selected";
|
|
302
|
+
readonly 'action.clearItems': "Clear items";
|
|
303
|
+
readonly 'action.addToEditor': "Add to Editor";
|
|
304
|
+
readonly 'list.separator': ", ";
|
|
305
|
+
readonly 'toast.inBackground': "This will happen in the background";
|
|
306
|
+
readonly 'toast.unknownError': "Unknown error occurred";
|
|
307
|
+
readonly 'toast.regionLabel': "Notifications";
|
|
308
|
+
readonly 'toast.closeLabel': "Close notification";
|
|
309
|
+
readonly 'search.placeholder': "Search\u2026";
|
|
310
|
+
readonly 'filter.by': "Filter by {type}";
|
|
311
|
+
readonly 'filterName.all': "All";
|
|
312
|
+
readonly 'filterName.image': "Image";
|
|
313
|
+
readonly 'filterName.audio': "Audio";
|
|
314
|
+
readonly 'filterName.video': "Video";
|
|
315
|
+
readonly 'filterName.document': "Document";
|
|
316
|
+
readonly 'filterName.font': "Font";
|
|
317
|
+
readonly 'filterName.svg': "SVG";
|
|
318
|
+
readonly 'filterOption.all': "All";
|
|
319
|
+
readonly 'filterOption.image': "Images";
|
|
320
|
+
readonly 'filterOption.video': "Videos";
|
|
321
|
+
readonly 'filterOption.document': "Docs";
|
|
322
|
+
readonly 'filterOption.audio': "Audio";
|
|
323
|
+
readonly 'filterOption.font': "Fonts";
|
|
324
|
+
readonly 'filterOption.svg': "SVG";
|
|
325
|
+
readonly 'sort.by': "Sort by";
|
|
326
|
+
readonly 'sort.orderAscending': "Click to order\nAscending";
|
|
327
|
+
readonly 'sort.orderDescending': "Click to order\nDescending";
|
|
328
|
+
readonly 'sort.name': "Name";
|
|
329
|
+
readonly 'sort.date': "Date";
|
|
330
|
+
readonly 'sort.size': "Size";
|
|
331
|
+
readonly 'breadcrumbs.back': "Back";
|
|
332
|
+
readonly 'breadcrumbs.forward': "Forward";
|
|
333
|
+
readonly 'breadcrumbs.root': "Files";
|
|
334
|
+
readonly 'breadcrumbs.label': "breadcrumb";
|
|
335
|
+
readonly 'empty.library': "No files yet";
|
|
336
|
+
readonly 'empty.libraryFiltered': "No files of this type";
|
|
337
|
+
readonly 'empty.folder': "No files in this folder";
|
|
338
|
+
readonly 'library.partialNotice': "Some files could not be loaded.";
|
|
339
|
+
readonly 'library.truncatedNotice': "Only the newest files are shown.";
|
|
340
|
+
readonly 'library.notSetUp': "The media library is not set up correctly.";
|
|
341
|
+
readonly 'library.defaultLabel': "Uploads";
|
|
342
|
+
readonly 'libraryError.loadFailed': "Could not load the files";
|
|
343
|
+
readonly 'libraryError.uploadFailed': "The upload failed";
|
|
344
|
+
readonly 'libraryError.renameFailed': "Could not rename the file";
|
|
345
|
+
readonly 'libraryError.deleteFailed': "Could not delete the file";
|
|
346
|
+
readonly 'libraryError.unreachable': "Could not reach the media library";
|
|
347
|
+
readonly 'libraryError.timeout': "The media library did not answer in time";
|
|
348
|
+
readonly 'libraryError.renameNotAllowed': "This media library does not allow renaming files";
|
|
349
|
+
readonly 'libraryError.deleteNotAllowed': "This media library does not allow deleting files";
|
|
350
|
+
readonly 'libraryError.fileGone': "The file is no longer in the list";
|
|
351
|
+
readonly 'libraryError.repeatedPage': "The media library keeps returning the same files, so the rest was not loaded";
|
|
352
|
+
readonly 'libraryError.accessToken': "Could not get an access token from the page";
|
|
353
|
+
readonly 'libraryError.accessTokenRenew': "Could not get a fresh access token from the page";
|
|
354
|
+
readonly 'libraryError.fileTooLarge': "Files over {limit} MB cannot be uploaded here yet";
|
|
355
|
+
readonly 'libraryError.uploadNotAllowed': "This media library does not accept uploads";
|
|
356
|
+
readonly 'size.bytes': "{size} Bytes";
|
|
357
|
+
readonly 'size.kb': "{size} KB";
|
|
358
|
+
readonly 'size.mb': "{size} MB";
|
|
359
|
+
readonly 'size.gb': "{size} GB";
|
|
360
|
+
readonly 'size.tb': "{size} TB";
|
|
361
|
+
readonly 'fileKind.any': "any";
|
|
362
|
+
readonly 'fileKind.image': "image";
|
|
363
|
+
readonly 'fileKind.video': "video";
|
|
364
|
+
readonly 'fileKind.audio': "audio";
|
|
365
|
+
readonly 'fileKind.document': "document";
|
|
366
|
+
readonly 'fileKind.font': "font";
|
|
367
|
+
readonly 'fileKind.svg': "SVG";
|
|
368
|
+
readonly 'fileTypes.allowed': "Allowed types: {types}";
|
|
369
|
+
readonly 'fileTypes.allowedSvg': "Allowed types: SVG files (.svg)";
|
|
370
|
+
readonly 'fileTypes.allowedDocument': "Allowed types: document files ({types})";
|
|
371
|
+
readonly 'fileTypes.addAll': "Add images ({images}), audio ({audio}), video ({video}), documents ({documents}), fonts ({fonts}) or vector graphics ({svg}).";
|
|
372
|
+
readonly 'fileTypes.fontNaming': "Font naming convention:\nFontFamily-Weight.extension\n\nExample:\nGeistMono-Black.ttf";
|
|
373
|
+
readonly 'upload.uploading': "Uploading\u2026";
|
|
374
|
+
readonly 'upload.foldersNotAllowed': "Folders cannot be uploaded";
|
|
375
|
+
readonly 'upload.invalidType': "Invalid file type. Please use {types} files only.";
|
|
376
|
+
readonly 'upload.dropActive': "Drop to upload {types} files";
|
|
377
|
+
readonly 'upload.dropActiveAny': "Drop to upload files";
|
|
378
|
+
readonly 'upload.button': "Upload {types} files";
|
|
379
|
+
readonly 'upload.buttonAny': "Upload files";
|
|
380
|
+
readonly 'upload.dragHint': "or drag and drop {types} files here";
|
|
381
|
+
readonly 'upload.dragHintAny': "or drag and drop files here";
|
|
382
|
+
readonly 'upload.chooseOrDrop': "Upload or drop {types} files here";
|
|
383
|
+
readonly 'upload.chooseOrDropAny': "Upload or drop files here";
|
|
384
|
+
readonly 'upload.chooseOrDropLink': "Upload";
|
|
385
|
+
readonly 'upload.panelTitle': "File Upload Progress";
|
|
386
|
+
readonly 'upload.progress': "{total, plural, other {{done}/# files uploaded}}";
|
|
387
|
+
readonly 'upload.failedCount': "{count} failed";
|
|
388
|
+
readonly 'upload.expandPanel': "Expand panel";
|
|
389
|
+
readonly 'upload.collapsePanel': "Collapse panel";
|
|
390
|
+
readonly 'upload.expandUploader': "Expand uploader";
|
|
391
|
+
readonly 'upload.collapseUploader': "Collapse uploader";
|
|
392
|
+
readonly 'upload.cancel': "Cancel upload";
|
|
393
|
+
readonly 'upload.retry': "Retry upload";
|
|
394
|
+
readonly 'upload.retryFailed': "Retry failed uploads?";
|
|
395
|
+
readonly 'upload.clearCompleted': "Clear completed uploads";
|
|
396
|
+
readonly 'upload.completedAlt': "Completed";
|
|
397
|
+
readonly 'upload.networkError': "Network error";
|
|
398
|
+
readonly 'upload.unknownError': "Unknown error";
|
|
399
|
+
readonly 'upload.skippedOne': "Skipped duplicate file: {name}";
|
|
400
|
+
readonly 'upload.skippedMany': "{count, plural, one {Skipped # duplicate file} other {Skipped # duplicate files}}";
|
|
401
|
+
readonly 'upload.time.lessThanSecond': "less than a second";
|
|
402
|
+
readonly 'upload.time.seconds': "{count, plural, one {# second} other {# seconds}}";
|
|
403
|
+
readonly 'upload.time.minutes': "{count, plural, one {# minute} other {# minutes}}";
|
|
404
|
+
readonly 'upload.timeLeft': "{time} left";
|
|
405
|
+
readonly 'upload.rowStarting': "Starting\u2026";
|
|
406
|
+
readonly 'upload.rowFinishingSized': "Finishing\u2026 \u00B7 {total}";
|
|
407
|
+
readonly 'upload.rowActive': "{percent} \u00B7 {sent} of {total}";
|
|
408
|
+
readonly 'upload.rowActiveWithTime': "{percent} \u00B7 {sent} of {total} \u00B7 {time}";
|
|
409
|
+
readonly 'upload.batchSummaryActive': "{total, plural, one {Uploading # file \u00B7 {percent}} other {Uploading # files \u00B7 {percent}}}";
|
|
410
|
+
readonly 'upload.complete': "Upload complete.";
|
|
411
|
+
readonly 'upload.removeFile': "Remove file";
|
|
412
|
+
readonly 'upload.uploadingProgress': "{total, plural, other {Uploading {done}/# files}}";
|
|
413
|
+
readonly 'upload.filesTotal': "{count, plural, one {# file} other {# files}}";
|
|
414
|
+
readonly 'upload.completeCount': "{done}/{total} complete";
|
|
415
|
+
readonly 'upload.failed': "Upload failed";
|
|
416
|
+
readonly 'upload.rowMeta': "{size} \u00B7 {detail}";
|
|
417
|
+
readonly 'dialog.delete.folderTitle': "Delete folder";
|
|
418
|
+
readonly 'dialog.delete.itemsTitle': "Delete items";
|
|
419
|
+
readonly 'dialog.delete.fileTitle': "Delete file";
|
|
420
|
+
readonly 'dialog.delete.folderMessage': "Delete '{name}' and all content inside?";
|
|
421
|
+
readonly 'dialog.delete.itemsMessage': "{count, plural, one {Are you sure you want to delete # item?} other {Are you sure you want to delete # items?}}";
|
|
422
|
+
readonly 'dialog.delete.fileMessage': "Delete '{name}'?";
|
|
423
|
+
readonly 'dialog.newFolder.title': "New folder";
|
|
424
|
+
readonly 'dialog.newFolder.placeholder': "folder name\u2026";
|
|
425
|
+
readonly 'dialog.newFolder.invalidTitle': "Invalid folder name";
|
|
426
|
+
readonly 'dialog.newFolder.required': "Folder name is required";
|
|
427
|
+
readonly 'dialog.newFolder.invalidCharacters': "Folder name can only contain letters, numbers, and spaces";
|
|
428
|
+
readonly 'dialog.newFolder.tooLong': "Folder name cannot exceed {max} characters";
|
|
429
|
+
readonly 'dialog.rename.title': "Rename";
|
|
430
|
+
readonly 'dialog.rename.filePlaceholder': "file name\u2026";
|
|
431
|
+
readonly 'dialog.rename.folderPlaceholder': "folder name\u2026";
|
|
432
|
+
readonly 'dialog.rename.invalidTitle': "Invalid name";
|
|
433
|
+
readonly 'dialog.rename.enterName': "Please enter a name";
|
|
434
|
+
readonly 'dialog.rename.enterDifferentName': "Please enter a different name";
|
|
435
|
+
readonly 'dialog.rename.enterValidName': "Please enter a valid name";
|
|
436
|
+
readonly 'dialog.rename.tooShort': "Name must be at least 1 character long";
|
|
437
|
+
readonly 'dialog.rename.tooLong': "Name must be {max} characters or less";
|
|
438
|
+
readonly 'dialog.close': "Close modal";
|
|
439
|
+
readonly 'toast.rename.started': "Renaming \"{name}\"\u2026";
|
|
440
|
+
readonly 'toast.rename.done': "Item renamed";
|
|
441
|
+
readonly 'toast.rename.doneDetail': "Successfully renamed \"{oldName}\" to \"{newName}\"";
|
|
442
|
+
readonly 'toast.rename.failed': "Rename failed";
|
|
443
|
+
readonly 'toast.rename.noChange': "No changes were made";
|
|
444
|
+
readonly 'toast.rename.noItem': "No valid item selected";
|
|
445
|
+
readonly 'toast.rename.unknownError': "An unknown error occurred";
|
|
446
|
+
readonly 'toast.delete.started': "{count, plural, one {Deleting \"{name}\"\u2026} other {Deleting # items\u2026}}";
|
|
447
|
+
readonly 'toast.delete.doneFolder': "Deleted folder \"{name}\"";
|
|
448
|
+
readonly 'toast.delete.doneFile': "Deleted \"{name}\"";
|
|
449
|
+
readonly 'toast.delete.doneMany': "{count, plural, one {Deleted # item} other {Deleted # items}}";
|
|
450
|
+
readonly 'toast.delete.doneFolderDetail': "Folder and its contents were deleted successfully";
|
|
451
|
+
readonly 'toast.delete.doneFileDetail': "Item was deleted successfully";
|
|
452
|
+
readonly 'toast.delete.doneManyDetail': "{count, plural, one {# item was deleted successfully} other {# items were deleted successfully}}";
|
|
453
|
+
readonly 'toast.delete.doneNames': "Deleted: {names}";
|
|
454
|
+
readonly 'toast.delete.failedOne': "Failed to delete \"{name}\"";
|
|
455
|
+
readonly 'toast.delete.failedMany': "{count, plural, one {Failed to delete # item} other {Failed to delete # items}}";
|
|
456
|
+
readonly 'toast.delete.failedNames': "Failed to delete: {names}";
|
|
457
|
+
readonly 'toast.delete.failedSome': "Some items could not be deleted";
|
|
458
|
+
readonly 'toast.delete.failedAll': "Failed to delete items";
|
|
459
|
+
readonly 'toast.folder.created': "Folder created";
|
|
460
|
+
readonly 'toast.folder.createdDetail': "Created folder \"{name}\"";
|
|
461
|
+
readonly 'toast.folder.failed': "Failed to create folder";
|
|
462
|
+
readonly 'toast.navigation.failed': "Navigation failed";
|
|
463
|
+
readonly 'toast.navigation.noFolder': "Could not find the target folder location";
|
|
464
|
+
readonly 'toast.navigation.error': "An error occurred while navigating to the target folder";
|
|
465
|
+
readonly 'toast.filesAdded': "Files added";
|
|
466
|
+
readonly 'toast.filesAddedDetail': "{count, plural, one {Added # file to the editor} other {Added # files to the editor}}";
|
|
467
|
+
readonly 'folder.currentLocation': "current location";
|
|
468
|
+
readonly 'folder.open': "Open folder {name}";
|
|
469
|
+
readonly 'folder.empty': "Empty";
|
|
470
|
+
readonly 'folder.itemCount': "{count, plural, one {# item} other {# items}}";
|
|
471
|
+
readonly 'item.previewLabel': "Preview {name}";
|
|
472
|
+
readonly 'item.deleteMissing': "Delete missing file";
|
|
473
|
+
readonly 'item.folder': "Folder";
|
|
474
|
+
readonly 'recent.title': "Recent files";
|
|
475
|
+
readonly 'recent.empty': "No recent files yet";
|
|
476
|
+
readonly 'newFolder.label': "New folder";
|
|
477
|
+
readonly 'search.noResults': "No results found";
|
|
478
|
+
readonly 'menu.open': "Open menu";
|
|
479
|
+
readonly 'menu.moreOptions': "More options";
|
|
480
|
+
readonly 'toolbar.moveMany': "{count, plural, one {Move # file} other {Move # files}}";
|
|
481
|
+
readonly 'toolbar.deleteMany': "{count, plural, one {Delete # file} other {Delete # files}}";
|
|
482
|
+
readonly 'selectedFiles.title': "Selected files";
|
|
483
|
+
readonly 'selectedFiles.empty': "No files selected";
|
|
484
|
+
readonly 'selectedFiles.count': "{count, plural, one {# file selected} other {# files selected}}";
|
|
485
|
+
readonly 'selectedFiles.confirmMany': "{count, plural, one {Use # file} other {Use # files}}";
|
|
486
|
+
readonly 'selectedFiles.remove': "Remove from selection";
|
|
487
|
+
readonly 'searchModal.placeholder': "Search files and folders\u2026";
|
|
488
|
+
readonly 'searchModal.jumpToFolder': "Jump to folder";
|
|
489
|
+
readonly 'searchModal.empty': "No files found";
|
|
490
|
+
readonly 'searchModal.clearQuery': "Clear search";
|
|
491
|
+
readonly 'moveDialog.titleOne': "Move \u201C{name}\u201D";
|
|
492
|
+
readonly 'moveDialog.titleMany': "{count, plural, one {Move # item} other {Move # items}}";
|
|
493
|
+
readonly 'moveDialog.rootName': "Files";
|
|
494
|
+
readonly 'moveDialog.movingTo': "Moving to {name}";
|
|
495
|
+
readonly 'moveDialog.confirmFolder': "Move folder";
|
|
496
|
+
readonly 'moveDialog.confirmItem': "Move to folder";
|
|
497
|
+
readonly 'moveDialog.confirmMany': "{count, plural, one {Move # item} other {Move # items}}";
|
|
498
|
+
readonly 'moveDialog.failedFolder': "Failed to move folder";
|
|
499
|
+
readonly 'moveDialog.failedItems': "Failed to move items";
|
|
500
|
+
readonly 'moveDialog.noTarget': "No target folder selected";
|
|
501
|
+
readonly 'moveDialog.noItems': "No items selected to move";
|
|
502
|
+
readonly 'moveDialog.pickDestination': "Please select a destination folder";
|
|
503
|
+
readonly 'moveDialog.noneMoved': "No items were moved successfully";
|
|
504
|
+
readonly 'moveDialog.partialTitle': "Some items moved";
|
|
505
|
+
readonly 'moveDialog.partialDetail': "{total, plural, other {Moved {moved} out of # items}}";
|
|
506
|
+
readonly 'moveDialog.doneFolder': "Folder moved";
|
|
507
|
+
readonly 'moveDialog.doneOne': "Item moved";
|
|
508
|
+
readonly 'moveDialog.doneMany': "Items moved";
|
|
509
|
+
readonly 'moveDialog.doneFolderDetail': "Moved folder \"{name}\" successfully";
|
|
510
|
+
readonly 'moveDialog.doneItemsDetail': "{count, plural, one {Moved # item successfully} other {Moved # items successfully}}";
|
|
511
|
+
readonly 'preview.audioFailed': "Audio failed to load";
|
|
512
|
+
readonly 'preview.audioUnsupported': "Your browser does not support the audio element.";
|
|
513
|
+
readonly 'preview.videoFailed': "Video failed to load";
|
|
514
|
+
readonly 'preview.videoUnsupported': "Your browser does not support the video tag.";
|
|
515
|
+
readonly 'preview.videoProgress': "Video progress";
|
|
516
|
+
readonly 'preview.fileNotFound': "File not found";
|
|
517
|
+
readonly 'preview.loading': "Loading\u2026";
|
|
518
|
+
readonly 'preview.textFailed': "Failed to load text file";
|
|
519
|
+
readonly 'preview.textFailedReason': "Failed to load text file: {reason}";
|
|
520
|
+
readonly 'preview.unavailable': "Preview not available for this file type.";
|
|
521
|
+
readonly 'preview.pdfLoading': "Loading PDF\u2026";
|
|
522
|
+
readonly 'preview.pdfFailed': "Failed to load PDF";
|
|
523
|
+
readonly 'preview.pdfPage': "Page {page} of {total}";
|
|
524
|
+
readonly 'preview.pdfPreviousPage': "Previous page";
|
|
525
|
+
readonly 'preview.pdfNextPage': "Next page";
|
|
526
|
+
readonly 'preview.metaSeparator': " \u00B7 ";
|
|
527
|
+
readonly 'preview.previousFile': "Previous file";
|
|
528
|
+
readonly 'preview.nextFile': "Next file";
|
|
529
|
+
readonly 'preview.dimensions': "{width} \u00D7 {height}";
|
|
530
|
+
readonly 'fontPreview.sample': "The quick brown fox jumps over the lazy dog";
|
|
531
|
+
readonly 'metadata.title': "File Information";
|
|
532
|
+
readonly 'metadata.name': "Name:";
|
|
533
|
+
readonly 'metadata.type': "Type:";
|
|
534
|
+
readonly 'metadata.size': "Size:";
|
|
535
|
+
readonly 'metadata.modified': "Last Modified:";
|
|
536
|
+
readonly 'metadata.notAvailable': "N/A";
|
|
537
|
+
readonly 'date.fewSecondsAgo': "A few seconds ago";
|
|
538
|
+
readonly 'date.hoursAgo': "{count, plural, one {# hour ago} other {# hours ago}}";
|
|
539
|
+
readonly 'date.daysAgo': "{count, plural, one {# day ago} other {# days ago}}";
|
|
540
|
+
readonly 'date.weeksAgo': "{count, plural, one {# week ago} other {# weeks ago}}";
|
|
541
|
+
readonly 'date.aboutAMonthAgo': "About a month ago";
|
|
542
|
+
readonly 'date.severalMonthsAgo': "Several months ago";
|
|
543
|
+
readonly 'date.overAYearAgo': "Over a year ago";
|
|
544
|
+
};
|
|
287
545
|
readonly shadEditor: {
|
|
288
546
|
readonly 'shadEditor.toolbar.undo': "Undo (\u2318Z)";
|
|
289
547
|
readonly 'shadEditor.toolbar.redo': "Redo (\u2318\u21E7Z)";
|
|
@@ -379,7 +637,7 @@ export declare const ALL_EDITOR_MESSAGES: Readonly<Record<string, string>>;
|
|
|
379
637
|
* the nearest real one), a value that is not text, a template that does not parse, or one that asks for a value the message
|
|
380
638
|
* is never given. An empty list means every message will be used. For a test or a build step of the page.
|
|
381
639
|
*/
|
|
382
|
-
export declare const checkEditorMessages: (messages: import("@widgetic/
|
|
640
|
+
export declare const checkEditorMessages: (messages: import("@widgetic/file-browser").MessageOverrides) => import("@widgetic/file-browser").MessageProblem[];
|
|
383
641
|
/**
|
|
384
642
|
* Called by the root component of an editor while it is created, so everything inside it speaks the page's language.
|
|
385
643
|
* The context belongs to one root component, so two editors on a page can speak two languages.
|