@antcde/component-library 0.1.25-rc.1 → 0.1.25-rc.11

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 (33) hide show
  1. package/dist/index.js +11063 -10296
  2. package/dist/types/src/components/BaseAntInput.types.d.ts +111 -0
  3. package/dist/types/src/components/BaseAntInput.vue.d.ts +2 -80
  4. package/dist/types/src/components/BaseAppCardSkeleton.vue.d.ts +6 -0
  5. package/dist/types/src/components/BaseResizePanel.vue.d.ts +19 -18
  6. package/dist/types/src/components/FilePreviewContent/_PreviewDetails.vue.d.ts +18 -0
  7. package/dist/types/src/components/FilePreviewContent/_PreviewMeta.vue.d.ts +13 -0
  8. package/dist/types/src/components/FilePreviewContent/_PreviewUsages.vue.d.ts +13 -0
  9. package/dist/types/src/components/FilePreviewContent/fileFormat.d.ts +7 -0
  10. package/dist/types/src/components/FilePreviewContent/index.vue.d.ts +20 -14
  11. package/dist/types/src/components/FilePreviewContent/types.d.ts +27 -0
  12. package/dist/types/src/components/FilePreviewContent/usePreviewDetails.d.ts +49 -0
  13. package/dist/types/src/components/UnifiedWindow/_WindowPresetMenu.vue.d.ts +11 -0
  14. package/dist/types/src/components/UnifiedWindow/_WindowTabs.vue.d.ts +16 -0
  15. package/dist/types/src/components/UnifiedWindow/index.vue.d.ts +3 -9
  16. package/dist/types/src/components/UnifiedWindow/types.d.ts +11 -0
  17. package/dist/types/src/components/UnifiedWindow/useNativeFullscreen.d.ts +18 -0
  18. package/dist/types/src/components/UnifiedWindow/useWindowDrag.d.ts +8 -0
  19. package/dist/types/src/components/_BaseAntInputField.vue.d.ts +36 -0
  20. package/dist/types/src/components/_BaseAntInputLabel.vue.d.ts +6 -0
  21. package/dist/types/src/components/useResizePanel.d.ts +38 -0
  22. package/dist/types/src/index.d.ts +1 -1
  23. package/lib/PdfViewer/PdfViewer.vue +245 -0
  24. package/lib/PdfViewer/_PdfToolbar.vue +196 -0
  25. package/lib/PdfViewer/canvasBudget.ts +57 -0
  26. package/lib/PdfViewer/index.ts +5 -0
  27. package/lib/PdfViewer/labels.ts +52 -0
  28. package/lib/PdfViewer/usePdfDocument.ts +239 -0
  29. package/lib/PdfViewer/usePdfKeyboard.ts +38 -0
  30. package/lib/PdfViewer/usePdfRaster.ts +85 -0
  31. package/lib/PdfViewer/usePdfTransform.ts +238 -0
  32. package/lib/test/mocks/createMockContext.ts +2 -0
  33. package/package.json +29 -22
@@ -0,0 +1,111 @@
1
+ export declare enum InputTypes {
2
+ text = "text",
3
+ autocomplete = "autocomplete",
4
+ password = "password",
5
+ email = "email",
6
+ number = "number",
7
+ url = "url",
8
+ tel = "tel",
9
+ date = "date",
10
+ time = "time",
11
+ datetime_local = "datetime-local",
12
+ week = "week",
13
+ month = "month",
14
+ color = "color",
15
+ checkbox = "checkbox",
16
+ radio = "radio",
17
+ file = "file",
18
+ range = "range",
19
+ search = "search",
20
+ hidden = "hidden",
21
+ image = "image",
22
+ button = "button",
23
+ submit = "submit",
24
+ reset = "reset",
25
+ select = "select",
26
+ textarea = "textarea",
27
+ textfield = "text-field",
28
+ datepicker = "datepicker",
29
+ timepicker = "timepicker",
30
+ datetimepicker = "datetimepicker",
31
+ switch = "switch",
32
+ slider = "slider",
33
+ rate = "rate",
34
+ upload = "upload",
35
+ cascader = "cascader",
36
+ combobox = "combobox",
37
+ custom = "custom"
38
+ }
39
+ /** These render one identical v-text-field, differing only in the html type. */
40
+ export declare const TEXT_FIELD_TYPES: string[];
41
+ export interface SelectItem {
42
+ id: string;
43
+ title: string;
44
+ value: string;
45
+ }
46
+ export interface BaseAntInputProps {
47
+ topMargin?: string;
48
+ required?: boolean;
49
+ /**
50
+ * Text for the required marker's tooltip and screen-reader label. Pass this to
51
+ * keep the component off the host's translation keys; when omitted it falls
52
+ * back to `common.requiredField`, and to English if the host lacks that key.
53
+ */
54
+ requiredLabel?: string;
55
+ readonly?: boolean;
56
+ label?: string;
57
+ /**
58
+ * Accessible name for usages with no visible `label`. Ignored when `label` is
59
+ * set — the visible text is the name in that case.
60
+ */
61
+ ariaLabel?: string;
62
+ /**
63
+ * HTML autofill token (`username`, `current-password`, `given-name`, …).
64
+ * Needed as an explicit prop because the field branches bind props one by one
65
+ * rather than spreading `$attrs`, so a bare attribute never reached the input.
66
+ */
67
+ autocomplete?: string;
68
+ /**
69
+ * One of `InputTypes`' VALUES, not its keys. The field renderer compares this
70
+ * against `InputTypes.x` directly, and two members disagree between the two
71
+ * (`textfield` -> `text-field`, `datetime_local` -> `datetime-local`), so
72
+ * key-based typing let a caller write a `type` no branch could ever match.
73
+ */
74
+ type?: `${InputTypes}`;
75
+ id?: string;
76
+ /**
77
+ * Native form-control name. Consumers already passed this, but it was not a
78
+ * declared prop and the branches bind props one by one, so it landed on the
79
+ * wrapper div and never reached the input.
80
+ */
81
+ name?: string;
82
+ rows?: number;
83
+ options?: string[];
84
+ hideDetails?: boolean;
85
+ defaultValue?: string;
86
+ disabled?: boolean;
87
+ placeholder?: string;
88
+ rules?: any[];
89
+ color?: string;
90
+ density?: 'default' | 'comfortable' | 'compact';
91
+ hint?: string;
92
+ prefix?: string;
93
+ suffix?: string;
94
+ /** `null` clears it; normalised to `undefined` before Vuetify sees it. */
95
+ prependIcon?: null | string;
96
+ appendIcon?: string;
97
+ prependInnerIcon?: string;
98
+ appendInnerIcon?: string;
99
+ clearable?: boolean;
100
+ errorMessages?: string[];
101
+ persistentHint?: boolean;
102
+ items?: SelectItem[];
103
+ autofocus?: boolean;
104
+ }
105
+ /** Props the field renderer needs on top of the public ones. */
106
+ export interface BaseAntInputFieldProps extends BaseAntInputProps {
107
+ /** Resolved id — the `<label for>` in the parent points at this. */
108
+ inputId: string;
109
+ /** Resolved accessible name, or undefined when a visible label supplies it. */
110
+ fieldAriaLabel?: string;
111
+ }
@@ -1,82 +1,5 @@
1
- type __VLS_Props = Props;
2
- declare enum InputTypes {
3
- text = "text",
4
- autocomplete = "autocomplete",
5
- password = "password",
6
- email = "email",
7
- number = "number",
8
- url = "url",
9
- tel = "tel",
10
- date = "date",
11
- time = "time",
12
- datetime_local = "datetime-local",
13
- week = "week",
14
- month = "month",
15
- color = "color",
16
- checkbox = "checkbox",
17
- radio = "radio",
18
- file = "file",
19
- range = "range",
20
- search = "search",
21
- hidden = "hidden",
22
- image = "image",
23
- button = "button",
24
- submit = "submit",
25
- reset = "reset",
26
- select = "select",
27
- textarea = "textarea",
28
- textfield = "text-field",
29
- datepicker = "datepicker",
30
- timepicker = "timepicker",
31
- datetimepicker = "datetimepicker",
32
- switch = "switch",
33
- slider = "slider",
34
- rate = "rate",
35
- upload = "upload",
36
- cascader = "cascader",
37
- combobox = "combobox",
38
- custom = "custom"
39
- }
40
- interface Props {
41
- topMargin?: string;
42
- required?: boolean;
43
- /**
44
- * Text for the required marker's tooltip and screen-reader label. Pass this to
45
- * keep the component off the host's translation keys; when omitted it falls
46
- * back to `common.requiredField`, and to English if the host lacks that key.
47
- */
48
- requiredLabel?: string;
49
- readonly?: boolean;
50
- label?: string;
51
- type?: keyof typeof InputTypes;
52
- id?: string;
53
- rows?: number;
54
- options?: string[];
55
- hideDetails?: boolean;
56
- defaultValue?: string;
57
- disabled?: boolean;
58
- placeholder?: string;
59
- rules?: any[];
60
- color?: string;
61
- density?: 'default' | 'comfortable' | 'compact';
62
- hint?: string;
63
- prefix?: string;
64
- suffix?: string;
65
- prependIcon?: null | string;
66
- appendIcon?: string;
67
- prependInnerIcon?: string;
68
- appendInnerIcon?: string;
69
- clearable?: boolean;
70
- errorMessages?: string[];
71
- persistentHint?: boolean;
72
- items?: {
73
- id: string;
74
- title: string;
75
- value: string;
76
- }[];
77
- style?: CSSStyleDeclaration;
78
- autofocus?: boolean;
79
- }
1
+ import { BaseAntInputProps } from './BaseAntInput.types';
2
+ type __VLS_Props = BaseAntInputProps;
80
3
  type __VLS_PublicProps = {
81
4
  modelValue?: any;
82
5
  } & __VLS_Props;
@@ -110,7 +33,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
110
33
  color: string;
111
34
  topMargin: string;
112
35
  readonly: boolean;
113
- id: string;
114
36
  disabled: boolean;
115
37
  density: "default" | "comfortable" | "compact";
116
38
  clearable: boolean;
@@ -1,7 +1,13 @@
1
1
  type __VLS_Props = {
2
2
  small?: boolean;
3
+ /** Mirror BaseAppCard's `fluid`: fill the grid cell instead of the fixed 128px tile. */
4
+ fluid?: boolean;
5
+ /** Grid position — varies the title-bar width so a row doesn't read as identical bars. */
6
+ index?: number;
3
7
  };
4
8
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
5
9
  small: boolean;
10
+ fluid: boolean;
11
+ index: number;
6
12
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
7
13
  export default _default;
@@ -1,26 +1,28 @@
1
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
1
+ import { ResizePanelSide } from './useResizePanel';
2
+ type __VLS_Props = {
2
3
  minWidth?: number;
3
4
  maxWidth?: number | null;
4
- defaultWidth: number;
5
+ defaultWidth?: number;
5
6
  minHeight?: number;
6
7
  maxHeight?: number | null;
7
8
  defaultHeight?: number;
8
- side: string;
9
+ side?: ResizePanelSide;
9
10
  collapsible?: boolean;
10
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
+ };
12
+ declare function __VLS_template(): {
13
+ attrs: Partial<{}>;
14
+ slots: {
15
+ default?(_: {}): any;
16
+ };
17
+ refs: {};
18
+ rootEl: HTMLDivElement;
19
+ };
20
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
21
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
22
  resize: (...args: any[]) => void;
12
23
  "resize-end": (...args: any[]) => void;
13
24
  collapse: (...args: any[]) => void;
14
- }, string, import('vue').PublicProps, Readonly<{
15
- minWidth?: number;
16
- maxWidth?: number | null;
17
- defaultWidth: number;
18
- minHeight?: number;
19
- maxHeight?: number | null;
20
- defaultHeight?: number;
21
- side: string;
22
- collapsible?: boolean;
23
- }> & Readonly<{
25
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
26
  onResize?: ((...args: any[]) => any) | undefined;
25
27
  "onResize-end"?: ((...args: any[]) => any) | undefined;
26
28
  onCollapse?: ((...args: any[]) => any) | undefined;
@@ -31,11 +33,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
31
33
  defaultWidth: number;
32
34
  minHeight: number;
33
35
  defaultHeight: number;
34
- side: string;
36
+ side: ResizePanelSide;
35
37
  collapsible: boolean;
36
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
37
- default?(_: {}): any;
38
- }>;
38
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
39
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
39
40
  export default _default;
40
41
  type __VLS_WithTemplateSlots<T, S> = T & {
41
42
  new (): {
@@ -0,0 +1,18 @@
1
+ import { AntConnect } from '@antcde/connect-ts';
2
+ import { PreviewTabData } from './types';
3
+ type __VLS_Props = {
4
+ tab: PreviewTabData;
5
+ antConnect: AntConnect;
6
+ isDark: boolean;
7
+ displayTitle: string;
8
+ /** Drives the lazy fetch; the parent owns the open/closed transition. */
9
+ open: boolean;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ close: () => any;
13
+ navigate: (taskId: string) => any;
14
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onClose?: (() => any) | undefined;
16
+ onNavigate?: ((taskId: string) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { PreviewFileMeta } from './types';
2
+ type __VLS_Props = {
3
+ meta: Pick<PreviewFileMeta, 'fileSize' | 'fileExtension' | 'ownerName' | 'ownerAvatar' | 'createdAt' | 'updatedAt'>;
4
+ fileScope: 'project' | 'license';
5
+ breadcrumbs: {
6
+ name: string;
7
+ is_folder: boolean;
8
+ }[];
9
+ hasMeta: boolean;
10
+ isLoading: boolean;
11
+ };
12
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { DmsFileUsage } from '@antcde/connect-ts';
2
+ type __VLS_Props = {
3
+ taskUsages: DmsFileUsage[];
4
+ tableUsages: DmsFileUsage[];
5
+ hasUsages: boolean;
6
+ isLoading: boolean;
7
+ };
8
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ navigate: (taskId: string) => any;
10
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onNavigate?: ((taskId: string) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export declare function getMime(ext: string): string;
2
+ export declare function getExtension(name: string): string;
3
+ export declare function iconForExtension(ext: string | undefined): string;
4
+ export declare function colorForExtension(ext: string | undefined): string | undefined;
5
+ export declare function formatFileSize(bytes: number | null | undefined): string;
6
+ export declare function formatDate(dateStr: string | undefined): string;
7
+ export declare function getOwnerInitials(name: string): string;
@@ -1,17 +1,5 @@
1
1
  import { AntConnect } from '@antcde/connect-ts';
2
- export interface PreviewTabData {
3
- fileToken: string;
4
- fileName?: string;
5
- projectId?: string;
6
- licenseId?: string;
7
- contentUrl?: string;
8
- fileSize?: number;
9
- fileExtension?: string;
10
- ownerName?: string;
11
- ownerAvatar?: string;
12
- createdAt?: string;
13
- updatedAt?: string;
14
- }
2
+ import { PreviewTabData } from './types';
15
3
  type __VLS_Props = {
16
4
  tab: PreviewTabData;
17
5
  antConnect: AntConnect;
@@ -19,7 +7,19 @@ type __VLS_Props = {
19
7
  showDetails?: boolean;
20
8
  };
21
9
  declare function download(): Promise<void>;
22
- declare const _default: import('vue').DefineComponent<__VLS_Props, {
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ pdf?(_: {
14
+ src: string;
15
+ title: string;
16
+ }): any;
17
+ };
18
+ refs: {};
19
+ rootEl: HTMLDivElement;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
23
23
  download: typeof download;
24
24
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
25
25
  "update:showDetails": (value: boolean) => any;
@@ -28,4 +28,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
28
28
  "onUpdate:showDetails"?: ((value: boolean) => any) | undefined;
29
29
  "onNavigate:task"?: ((taskId: string) => any) | undefined;
30
30
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
31
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
32
  export default _default;
33
+ type __VLS_WithTemplateSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,27 @@
1
+ export interface PreviewTabData {
2
+ fileToken: string;
3
+ fileName?: string;
4
+ projectId?: string;
5
+ licenseId?: string;
6
+ contentUrl?: string;
7
+ fileSize?: number;
8
+ fileExtension?: string;
9
+ ownerName?: string;
10
+ ownerAvatar?: string;
11
+ createdAt?: string;
12
+ updatedAt?: string;
13
+ }
14
+ export interface PreviewFileMeta {
15
+ fileSize?: number;
16
+ fileExtension?: string;
17
+ ownerName?: string;
18
+ ownerAvatar?: string;
19
+ createdAt?: string;
20
+ updatedAt?: string;
21
+ breadcrumbs?: {
22
+ name: string;
23
+ is_folder: boolean;
24
+ }[];
25
+ projectId?: string | null;
26
+ licenseId?: string;
27
+ }
@@ -0,0 +1,49 @@
1
+ import { AntConnect } from '@antcde/connect-ts';
2
+ import { PreviewTabData } from './types';
3
+ /**
4
+ * Metadata and usage lists for the details sidebar. Both are fetched lazily —
5
+ * the sidebar is closed by default and neither is needed to show the file.
6
+ */
7
+ export declare function usePreviewDetails(tab: () => PreviewTabData, antConnect: () => AntConnect): {
8
+ meta: import('vue').ComputedRef<{
9
+ fileSize: number | undefined;
10
+ fileExtension: string;
11
+ ownerName: string | undefined;
12
+ ownerAvatar: string | undefined;
13
+ createdAt: string | undefined;
14
+ updatedAt: string | undefined;
15
+ }>;
16
+ fileScope: import('vue').ComputedRef<"project" | "license">;
17
+ breadcrumbs: import('vue').ComputedRef<{
18
+ name: string;
19
+ is_folder: boolean;
20
+ }[]>;
21
+ metaIcon: import('vue').ComputedRef<string>;
22
+ metaIconColor: import('vue').ComputedRef<string | undefined>;
23
+ hasMeta: import('vue').ComputedRef<boolean>;
24
+ isLoadingMeta: import('vue').Ref<boolean, boolean>;
25
+ taskUsages: import('vue').ComputedRef<{
26
+ id: string;
27
+ type: "task" | "record_cell";
28
+ linkable_id: string;
29
+ mode: "owned" | "referenced";
30
+ created_at: string | null;
31
+ task_title?: string | null | undefined;
32
+ task_number?: number | null | undefined;
33
+ table_name?: string | null | undefined;
34
+ }[]>;
35
+ tableUsages: import('vue').ComputedRef<{
36
+ id: string;
37
+ type: "task" | "record_cell";
38
+ linkable_id: string;
39
+ mode: "owned" | "referenced";
40
+ created_at: string | null;
41
+ task_title?: string | null | undefined;
42
+ task_number?: number | null | undefined;
43
+ table_name?: string | null | undefined;
44
+ }[]>;
45
+ hasUsages: import('vue').ComputedRef<boolean>;
46
+ isLoadingUsages: import('vue').Ref<boolean, boolean>;
47
+ fetchMeta: () => Promise<void>;
48
+ fetchUsages: () => Promise<void>;
49
+ };
@@ -0,0 +1,11 @@
1
+ import { WindowSizePreset } from './types';
2
+ type __VLS_Props = {
3
+ currentPreset?: WindowSizePreset | null;
4
+ isDark: boolean;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ pick: (preset: WindowSizePreset) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onPick?: ((preset: WindowSizePreset) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import { WindowTab } from './types';
2
+ type __VLS_Props = {
3
+ tabs: WindowTab[];
4
+ activeTab: number;
5
+ isDark: boolean;
6
+ };
7
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ selectTab: (index: number) => any;
9
+ closeTab: (index: number) => any;
10
+ detachTab: (index: number) => any;
11
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onSelectTab?: ((index: number) => any) | undefined;
13
+ onCloseTab?: ((index: number) => any) | undefined;
14
+ onDetachTab?: ((index: number) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ export default _default;
@@ -1,10 +1,4 @@
1
- export type WindowSizePreset = 'fit' | 'wide' | 'compact' | 'max';
2
- export interface WindowTab {
3
- id: string;
4
- type: 'flow' | 'preview';
5
- label: string;
6
- icon: string;
7
- }
1
+ import { WindowSizePreset, WindowTab } from './types';
8
2
  type __VLS_Props = {
9
3
  windowId: string;
10
4
  tabs: WindowTab[];
@@ -39,8 +33,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
39
33
  setGeometry: (nx: number, ny: number, nw: number, nh: number) => void;
40
34
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
35
  close: () => any;
42
- closeTab: (index: number) => any;
43
36
  selectTab: (index: number) => any;
37
+ closeTab: (index: number) => any;
44
38
  detachTab: (index: number) => any;
45
39
  merge: (targetWindowId: string) => any;
46
40
  minimize: () => any;
@@ -48,8 +42,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
48
42
  userGeometryChange: () => any;
49
43
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
50
44
  onClose?: (() => any) | undefined;
51
- onCloseTab?: ((index: number) => any) | undefined;
52
45
  onSelectTab?: ((index: number) => any) | undefined;
46
+ onCloseTab?: ((index: number) => any) | undefined;
53
47
  onDetachTab?: ((index: number) => any) | undefined;
54
48
  onMerge?: ((targetWindowId: string) => any) | undefined;
55
49
  onMinimize?: (() => any) | undefined;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Lives outside index.vue so the private sub-components can import it without a
3
+ * circular reference back through their own parent.
4
+ */
5
+ export type WindowSizePreset = 'fit' | 'wide' | 'compact' | 'max' | 'fullscreen';
6
+ export interface WindowTab {
7
+ id: string;
8
+ type: 'flow' | 'preview';
9
+ label: string;
10
+ icon: string;
11
+ }
@@ -0,0 +1,18 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * Drives the native Fullscreen API for one window element.
4
+ *
5
+ * Best-effort by design: iPadOS Safari exposes only the webkit-prefixed call and
6
+ * iPhone Safari exposes neither, so where it is unavailable this quietly does
7
+ * nothing and the caller's zero-inset geometry remains the result. A silent
8
+ * no-op degrades to the next best thing; a thrown error would degrade to a
9
+ * broken button.
10
+ *
11
+ * @param element the window root.
12
+ * @param onExit fired when the browser leaves fullscreen on its own — Escape,
13
+ * a gesture, or another element claiming the slot.
14
+ */
15
+ export declare function useNativeFullscreen(element: Ref<HTMLElement | null>, onExit: () => void): {
16
+ enter: () => void;
17
+ exit: () => void;
18
+ };
@@ -26,3 +26,11 @@ export declare function useWindowDrag(options: {
26
26
  onResizeCancel: () => void;
27
27
  };
28
28
  };
29
+ /**
30
+ * The window whose box contains this one's centre after a drag, if any — the
31
+ * drop target for merging two windows into one tabbed window.
32
+ *
33
+ * Looked up through the DOM rather than through geometry state because each
34
+ * window owns its own position; there is no shared layout model to consult.
35
+ */
36
+ export declare function findMergeTarget(self: HTMLElement | null, selfId: string, otherIds: string[]): string | null;
@@ -0,0 +1,36 @@
1
+ import { BaseAntInputFieldProps } from './BaseAntInput.types';
2
+ type __VLS_Props = BaseAntInputFieldProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: unknown;
5
+ } & __VLS_Props;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ input?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
+ "click:append-inner": (value: any) => any;
17
+ "click:prepend-inner": (value: any) => any;
18
+ "click:append": (value: any) => any;
19
+ "click:prepend": (value: any) => any;
20
+ "update:model-value": (value: any) => any;
21
+ "update:modelValue": (value: unknown) => any;
22
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ "onClick:append-inner"?: ((value: any) => any) | undefined;
24
+ "onClick:prepend-inner"?: ((value: any) => any) | undefined;
25
+ "onClick:append"?: ((value: any) => any) | undefined;
26
+ "onClick:prepend"?: ((value: any) => any) | undefined;
27
+ "onUpdate:model-value"?: ((value: any) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
30
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
+ export default _default;
32
+ type __VLS_WithTemplateSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -7,6 +7,12 @@ type __VLS_Props = {
7
7
  * back to `common.requiredField`, and to English if the host lacks that key.
8
8
  */
9
9
  requiredLabel?: string;
10
+ /**
11
+ * Id of the field this labels. Renders a real `<label for>`, which is what
12
+ * makes the visible text the field's accessible name — as a bare `<span>` it
13
+ * was decorative, and every field under it announced as unlabelled.
14
+ */
15
+ inputId?: string;
10
16
  };
11
17
  declare function __VLS_template(): {
12
18
  attrs: Partial<{}>;
@@ -0,0 +1,38 @@
1
+ import { StyleValue } from 'vue';
2
+ export declare const SIDE_TOP = "top";
3
+ export declare const SIDE_BOTTOM = "bottom";
4
+ export declare const SIDE_LEFT = "left";
5
+ export declare const SIDE_RIGHT = "right";
6
+ export type ResizePanelSide = typeof SIDE_TOP | typeof SIDE_BOTTOM | typeof SIDE_LEFT | typeof SIDE_RIGHT;
7
+ export interface ResizePanelSize {
8
+ width: number;
9
+ height: number;
10
+ }
11
+ export interface ResizePanelOptions {
12
+ minWidth: number;
13
+ maxWidth: number | null;
14
+ defaultWidth: number;
15
+ minHeight: number;
16
+ maxHeight: number | null;
17
+ defaultHeight: number;
18
+ side: ResizePanelSide;
19
+ collapsible: boolean;
20
+ }
21
+ /**
22
+ * Mirrors the three events `BaseResizePanel` declares, so a wrong payload is a
23
+ * type error here rather than a silently ignored listener argument.
24
+ */
25
+ export interface ResizePanelEmit {
26
+ (event: 'resize', size: ResizePanelSize): void;
27
+ (event: 'resize-end', size: ResizePanelSize): void;
28
+ (event: 'collapse'): void;
29
+ }
30
+ /** Reads `props` live, so it must be the reactive props object, not a snapshot. */
31
+ export declare function useResizePanel(props: ResizePanelOptions, emit: ResizePanelEmit): {
32
+ isBottom: import('vue').ComputedRef<boolean>;
33
+ isLeft: import('vue').ComputedRef<boolean>;
34
+ isVertical: import('vue').ComputedRef<boolean>;
35
+ isResizing: import('vue').ComputedRef<boolean>;
36
+ mergedStyles: import('vue').ComputedRef<StyleValue>;
37
+ startResize: (e: any) => void;
38
+ };