@synopackageland/sdk 0.9.6 → 0.9.7

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.
@@ -22,6 +22,16 @@ export declare const backgroundCatalogs: Record<import("..").UiLocale, {
22
22
  state_failed: string;
23
23
  state_canceled: string;
24
24
  state_interrupted: string;
25
+ state_paused: string;
26
+ pausing: string;
27
+ pause: string;
28
+ resume: string;
29
+ progressItems: {
30
+ one: string;
31
+ other: string;
32
+ };
33
+ progressBytes: string;
34
+ progressItem: string;
25
35
  limits: string;
26
36
  errors: {
27
37
  jobs_busy: string;
@@ -0,0 +1,27 @@
1
+ export declare const FILE_STATION_APP = "SYNO.SDS.App.FileStation3.Instance";
2
+ /** The DSM desktop global (SYNO.SDS) the App window runs in; absent outside DSM. */
3
+ export interface DsmDesktop {
4
+ AppLaunch?: (id: string, params?: {
5
+ opendir: string;
6
+ } | {
7
+ openfile: string;
8
+ }) => void;
9
+ StatusNotifier?: {
10
+ isAppEnabled?: (id: string) => boolean;
11
+ isAppLaunchable?: (id: string) => boolean;
12
+ };
13
+ }
14
+ export interface FileStationOptions {
15
+ /** The volume mount the path is under, when known; otherwise /volumeN is stripped. */
16
+ mount?: string;
17
+ /** Defaults to the page's SYNO.SDS. */
18
+ desktop?: DsmDesktop;
19
+ }
20
+ /** The File Station path for a NAS absolute path. #recycle, spaces and UTF-8
21
+ * stay literal: this is a JS value, not a URL. */
22
+ export declare function fileStationPath(path: string, mount?: string): string;
23
+ /** Opens File Station showing the folder. False when nothing was launched:
24
+ * outside DSM, an empty path, or File Station disabled or not launchable. */
25
+ export declare function openFolderInFileStation(path: string, options?: FileStationOptions): boolean;
26
+ /** Opens File Station at the file's folder with the file selected. False as for openFolderInFileStation. */
27
+ export declare function openFileInFileStation(path: string, options?: FileStationOptions): boolean;
@@ -5,3 +5,20 @@ export declare function uiLocale(locale: string): UiLocale;
5
5
  /** The catalogs of one capability by locale, typed by its en catalog. Each
6
6
  * capability globs its own folder, so a bundle carries only what it imports. */
7
7
  export declare function catalogs<T>(files: Record<string, unknown>, _en: T): Record<UiLocale, T>;
8
+ /** SDK catalogs with an App's catalogs (files by path, as import.meta.glob
9
+ * returns them) layered over them key by key. A key missing from a locale
10
+ * falls back to the merged en catalog. */
11
+ export declare function mergeCatalogs<T extends object>(base: Record<UiLocale, T>, files: Record<string, unknown>): Record<UiLocale, T & Record<string, unknown>>;
12
+ /** A message, or its plural forms selected by the count value (Intl plural
13
+ * categories; other is required). */
14
+ export type Message = string | {
15
+ zero?: string;
16
+ one?: string;
17
+ two?: string;
18
+ few?: string;
19
+ many?: string;
20
+ other: string;
21
+ };
22
+ /** Fills {key} placeholders from values; a placeholder without a value stays
23
+ * visible. Plural forms are chosen by values.count in the given locale. */
24
+ export declare function format(message: Message, values: Record<string, string | number>, locale?: string): string;
@@ -7,13 +7,13 @@ export type { FileTransport } from './files/transfers';
7
7
  export { createBackgroundSaveFacade } from './delegate/facade';
8
8
  export { createNasProvider } from './nas/provider';
9
9
  export { createFileTransfers } from './files/transfers';
10
+ export { FILE_STATION_APP, fileStationPath, openFolderInFileStation, openFileInFileStation, type DsmDesktop, type FileStationOptions } from './dsm/file-station';
10
11
  export { createBackgroundPickerProvider } from './background/picker-provider';
11
12
  export { scopedPicker } from './delegate/scoped-picker';
12
13
  export { requestKey } from './background/request-key';
13
14
  export { shellPages, activePage, type ShellPage, type ShellFeatureFlags } from './shell/pages';
14
- export { uiLocale, uiLocales, catalogs, type UiLocale } from './i18n';
15
+ export { uiLocale, uiLocales, catalogs, mergeCatalogs, format, type Message, type UiLocale } from './i18n';
15
16
  export { nasCopy, nasErrorCopy, nasCatalogs, type NasCopy } from './nas/locale';
16
- export { format } from './nas/i18n';
17
17
  export { shellCopy, shellCatalogs, type ShellCopy } from './shell/i18n';
18
18
  export { identityCopy, identityCatalogs, type IdentityCopy, type IdentityNotice } from './identity/i18n';
19
19
  export { backgroundCopy, backgroundErrorCopy, backgroundCatalogs, type BackgroundCopy } from './background/i18n';
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .app-shell[data-v-05f63ca5]{height:100%;min-width:0;grid-template-rows:minmax(0,1fr)}.app-shell[data-v-05f63ca5]>div{min-height:0}.app-shell[data-v-05f63ca5] main{display:flex;flex-direction:column;overflow:hidden}.app-page[data-v-05f63ca5]{flex:1 1 auto;min-height:0;overflow-y:auto}.app-page-content[data-v-05f63ca5]{padding-bottom:var(--ui-space-6, 24px)}.file-browser[data-v-94161ba0]{min-width:0;color:var(--ui-text)}.file-toolbar[data-v-94161ba0]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px);margin-block:var(--ui-space-3, 12px)}.file-location[data-v-94161ba0]{flex-wrap:nowrap;align-items:center;gap:var(--ui-space-1, 4px)}.file-path[data-v-94161ba0]{flex:1;min-width:0;margin-inline-start:var(--ui-space-2, 8px)}.file-columns[data-v-94161ba0]{display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,3fr);gap:var(--ui-space-3, 12px);height:clamp(240px,60vh,400px)}.file-tree[data-v-94161ba0]{min-width:0;overflow:auto;border-inline-end:1px solid var(--ui-border)}.file-content[data-v-94161ba0]{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto}.file-empty[data-v-94161ba0]{display:flex;flex-direction:column;align-items:center;gap:var(--ui-space-2, 8px);padding-block:var(--ui-space-6, 24px);color:var(--ui-text-muted)}.file-name[data-v-94161ba0]{display:inline-flex;align-items:center;gap:var(--ui-space-2, 8px);overflow-wrap:anywhere}.file-bytes[data-v-94161ba0]{font-variant-numeric:tabular-nums}.file-selection[data-v-94161ba0]{overflow-wrap:anywhere}@media(max-width:600px){.file-columns[data-v-94161ba0]{grid-template-columns:minmax(0,1fr);height:auto}.file-content[data-v-94161ba0] th:nth-child(2),.file-content[data-v-94161ba0] td:nth-child(2),.file-content[data-v-94161ba0] th:nth-child(3),.file-content[data-v-94161ba0] td:nth-child(3){display:none}.file-tree[data-v-94161ba0]{height:clamp(96px,25vh,180px);border-inline-end:0;border-bottom:1px solid var(--ui-border)}.file-content[data-v-94161ba0]{height:clamp(200px,45vh,360px)}}.nas-picker-content[data-v-535a0e54]{max-height:65vh;overflow:auto}.save-message[data-v-535a0e54]{--ui-text-secondary:var(--ui-text)}.save-consent[data-v-535a0e54]{color:var(--ui-text);margin-block:0 var(--ui-space-4,16px)}.files-actions[data-v-699931fa]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px)}.files-path[data-v-699931fa]{overflow-wrap:anywhere}.identity-login[data-v-f7afcf5e]{max-width:36rem;margin-inline:auto;padding:var(--ui-space-4, 16px);overflow:auto;max-height:100%;color:var(--ui-text);font-family:var(--ui-font-sans);font-size:13px;line-height:1.5}.identity-login p[data-v-f7afcf5e]{margin-block:var(--ui-space-4, 16px);overflow-wrap:anywhere}.integration-jobs[data-v-7954713f]{overflow-wrap:anywhere;min-width:0}.bg-schedules[data-v-7954713f]{margin-block-start:var(--ui-space-6,24px);min-width:0;overflow-wrap:anywhere}.bg-schedules .integration-jobs[data-v-7954713f]{display:grid;gap:var(--ui-space-4,16px);padding-inline-start:var(--ui-space-5,20px)}.bg-schedules .integration-jobs li[data-v-7954713f]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ui-space-2,8px);min-width:0}.bg-schedules p[data-v-7954713f],.bg-schedules li>span[data-v-7954713f]{min-width:0;max-width:100%}.bg-schedules h3[data-v-7954713f]{font-size:15px;font-weight:600}.bg-schedule-form[data-v-7954713f]{margin-block:var(--ui-space-4,16px)}.delegate-panel[data-v-d79ee942]{min-width:0;overflow-wrap:anywhere}h3[data-v-d79ee942]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.section-heading[data-v-d79ee942]{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.records[data-v-d79ee942]{list-style:none;padding:0;margin:0}.records li[data-v-d79ee942]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px);padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.records li>div[data-v-d79ee942],.records li>span[data-v-d79ee942],.destination[data-v-d79ee942]{min-width:0;max-width:100%;overflow-wrap:anywhere}.records p[data-v-d79ee942]{margin:var(--ui-space-2,8px) 0 0}.background-save-panel[data-v-c38db985]{min-width:0;overflow-wrap:anywhere}.save-message[data-v-c38db985]{--ui-text-secondary:var(--ui-text)}h3[data-v-c38db985]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.save-actions[data-v-c38db985],.save-records li[data-v-c38db985]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.save-actions[data-v-c38db985]{justify-content:flex-start}.save-records[data-v-c38db985]{list-style:none;margin:0;padding:0}.save-records li[data-v-c38db985]{padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.save-records li>div[data-v-c38db985]{min-width:0;max-width:100%}.save-records p[data-v-c38db985]{margin:var(--ui-space-2,8px) 0}.authorization-view[data-v-e16b5f7d]{display:flex;flex-direction:column;gap:12px}.authorization-body[data-v-e16b5f7d]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text);text-wrap:pretty}.authorization-status[data-v-e16b5f7d],.authorization-failed[data-v-e16b5f7d]{color:var(--ui-text)}.authorization-content[data-v-e16b5f7d]{display:flex;flex-direction:column;height:100%;min-height:0}.authorization-content[data-v-e16b5f7d] .app-shell{flex:1;min-height:0;height:auto}.authorization-setting[data-v-f031e7c7]{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.authorization-revoke-body[data-v-f031e7c7]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text)}.authorization-state[data-v-f031e7c7]{display:inline-flex;align-items:center;gap:6px;color:var(--ui-text)}
1
+ .app-shell[data-v-05f63ca5]{height:100%;min-width:0;grid-template-rows:minmax(0,1fr)}.app-shell[data-v-05f63ca5]>div{min-height:0}.app-shell[data-v-05f63ca5] main{display:flex;flex-direction:column;overflow:hidden}.app-page[data-v-05f63ca5]{flex:1 1 auto;min-height:0;overflow-y:auto}.app-page-content[data-v-05f63ca5]{padding-bottom:var(--ui-space-6, 24px)}.file-browser[data-v-c689761c]{min-width:0;color:var(--ui-text)}.file-toolbar[data-v-c689761c]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px);margin-block:var(--ui-space-3, 12px)}.file-location[data-v-c689761c]{flex-wrap:nowrap;align-items:center;gap:var(--ui-space-1, 4px)}.file-path[data-v-c689761c]{flex:1;min-width:0;margin-inline-start:var(--ui-space-2, 8px)}.file-columns[data-v-c689761c]{display:grid;grid-template-columns:minmax(140px,1fr) minmax(0,3fr);gap:var(--ui-space-3, 12px);height:clamp(240px,60vh,400px)}.file-tree[data-v-c689761c]{min-width:0;overflow:auto;border-inline-end:1px solid var(--ui-border)}.file-content[data-v-c689761c]{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:auto}.file-empty[data-v-c689761c]{display:flex;flex-direction:column;align-items:center;gap:var(--ui-space-2, 8px);padding-block:var(--ui-space-6, 24px);color:var(--ui-text-muted)}.file-name[data-v-c689761c]{display:inline-flex;align-items:center;gap:var(--ui-space-2, 8px);overflow-wrap:anywhere}.file-bytes[data-v-c689761c]{font-variant-numeric:tabular-nums}.file-selection[data-v-c689761c]{overflow-wrap:anywhere}@media(max-width:600px){.file-columns[data-v-c689761c]{grid-template-columns:minmax(0,1fr);height:auto}.file-content[data-v-c689761c] th:nth-child(2),.file-content[data-v-c689761c] td:nth-child(2),.file-content[data-v-c689761c] th:nth-child(3),.file-content[data-v-c689761c] td:nth-child(3){display:none}.file-tree[data-v-c689761c]{height:clamp(96px,25vh,180px);border-inline-end:0;border-bottom:1px solid var(--ui-border)}.file-content[data-v-c689761c]{height:clamp(200px,45vh,360px)}}.nas-picker-content[data-v-535a0e54]{max-height:65vh;overflow:auto}.save-message[data-v-535a0e54]{--ui-text-secondary:var(--ui-text)}.save-consent[data-v-535a0e54]{color:var(--ui-text);margin-block:0 var(--ui-space-4,16px)}.files-actions[data-v-699931fa]{display:flex;flex-wrap:wrap;gap:var(--ui-space-2, 8px)}.files-path[data-v-699931fa]{overflow-wrap:anywhere}.identity-login[data-v-f7afcf5e]{max-width:36rem;margin-inline:auto;padding:var(--ui-space-4, 16px);overflow:auto;max-height:100%;color:var(--ui-text);font-family:var(--ui-font-sans);font-size:13px;line-height:1.5}.identity-login p[data-v-f7afcf5e]{margin-block:var(--ui-space-4, 16px);overflow-wrap:anywhere}.integration-jobs[data-v-c2688562]{overflow-wrap:anywhere;min-width:0}.bg-schedules[data-v-c2688562]{margin-block-start:var(--ui-space-6,24px);min-width:0;overflow-wrap:anywhere}.bg-schedules .integration-jobs[data-v-c2688562]{display:grid;gap:var(--ui-space-4,16px);padding-inline-start:var(--ui-space-5,20px)}.bg-schedules .integration-jobs li[data-v-c2688562]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--ui-space-2,8px);min-width:0}.bg-schedules p[data-v-c2688562],.bg-schedules li>span[data-v-c2688562]{min-width:0;max-width:100%}.bg-schedules h3[data-v-c2688562]{font-size:15px;font-weight:600}.bg-schedule-form[data-v-c2688562]{margin-block:var(--ui-space-4,16px)}.delegate-panel[data-v-d79ee942]{min-width:0;overflow-wrap:anywhere}h3[data-v-d79ee942]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.section-heading[data-v-d79ee942]{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.records[data-v-d79ee942]{list-style:none;padding:0;margin:0}.records li[data-v-d79ee942]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px);padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.records li>div[data-v-d79ee942],.records li>span[data-v-d79ee942],.destination[data-v-d79ee942]{min-width:0;max-width:100%;overflow-wrap:anywhere}.records p[data-v-d79ee942]{margin:var(--ui-space-2,8px) 0 0}.background-save-panel[data-v-c38db985]{min-width:0;overflow-wrap:anywhere}.save-message[data-v-c38db985]{--ui-text-secondary:var(--ui-text)}h3[data-v-c38db985]{font-size:var(--ui-font-size-base,14px);font-weight:600;margin:var(--ui-space-6,24px) 0 var(--ui-space-3,12px)}.save-actions[data-v-c38db985],.save-records li[data-v-c38db985]{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:var(--ui-space-3,12px)}.save-actions[data-v-c38db985]{justify-content:flex-start}.save-records[data-v-c38db985]{list-style:none;margin:0;padding:0}.save-records li[data-v-c38db985]{padding-block:var(--ui-space-4,16px);border-bottom:1px solid var(--ui-border)}.save-records li>div[data-v-c38db985]{min-width:0;max-width:100%}.save-records p[data-v-c38db985]{margin:var(--ui-space-2,8px) 0}.authorization-view[data-v-e16b5f7d]{display:flex;flex-direction:column;gap:12px}.authorization-body[data-v-e16b5f7d]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text);text-wrap:pretty}.authorization-status[data-v-e16b5f7d],.authorization-failed[data-v-e16b5f7d]{color:var(--ui-text)}.authorization-content[data-v-e16b5f7d]{display:flex;flex-direction:column;height:100%;min-height:0}.authorization-content[data-v-e16b5f7d] .app-shell{flex:1;min-height:0;height:auto}.authorization-setting[data-v-f031e7c7]{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.authorization-revoke-body[data-v-f031e7c7]{margin:0;font-size:13px;line-height:1.6;color:var(--ui-text)}.authorization-state[data-v-f031e7c7]{display:inline-flex;align-items:center;gap:6px;color:var(--ui-text)}