@epam/ai-dial-publish-panel 1.1.0-dev.55

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.
@@ -0,0 +1,63 @@
1
+ import { FC } from 'react';
2
+ import { PublishFolderNode } from '../../models/publish';
3
+ /** Props for {@link PublishFoldersTree}. */
4
+ export interface PublishFoldersTreeProps {
5
+ /** Root-level folder nodes. */
6
+ items: PublishFolderNode[];
7
+ /**
8
+ * Currently selected destination folder path, outermost first.
9
+ * `undefined` means nothing is selected; `[]` means the bucket root
10
+ * itself is selected (a distinct, valid destination).
11
+ */
12
+ selectedPath?: string[];
13
+ /** Called when the user selects a folder or the root; `undefined` when deselected. */
14
+ onSelectedPathChange: (path: string[] | undefined) => void;
15
+ /**
16
+ * Called when the user confirms a new folder name. The caller owns
17
+ * persisting the new node into `items`; the tree only reports intent.
18
+ */
19
+ onCreateFolder: (parentPath: string[], name: string) => Promise<void>;
20
+ /**
21
+ * Search query used to filter the tree; owned by the host so it can render
22
+ * the search input in its own layout (e.g. above other controls).
23
+ */
24
+ searchQuery: string;
25
+ /** Whether the whole tree is disabled, e.g. while a publish request is in flight. Default: `false`. */
26
+ disabled?: boolean;
27
+ /** Label for the trailing "create new folder" trigger. Default: `'Create new folder'`. */
28
+ createFolderLabel?: string;
29
+ /** Label for the per-row context menu action that creates a folder alongside the clicked folder. Default: `'Add sibling'`. */
30
+ addSiblingFolderLabel?: string;
31
+ /** Label for the per-row context menu action that creates a folder inside the clicked folder. Default: `'Add child'`. */
32
+ addChildFolderLabel?: string;
33
+ /** Default name pre-filled for a new folder before the user edits it. Default: `'New folder'`. */
34
+ newFolderDefaultName?: string;
35
+ /** Message shown when a search query matches no folders; `{query}` is replaced. Default: `'No folders match "{query}".'`. */
36
+ noResultsLabel?: string;
37
+ /** Inline error shown while creating a folder with an empty name. Default: `'Folder name cannot be empty.'`. */
38
+ emptyFolderNameError?: string;
39
+ /** Inline error shown while creating a folder whose name contains `..` or a forbidden character. Default: `'Folder name contains invalid characters.'`. */
40
+ invalidFolderNameError?: string;
41
+ /** Inline error shown while creating a folder whose name duplicates a sibling. Default: `'A folder with this name already exists.'`. */
42
+ duplicateFolderNameError?: string;
43
+ /**
44
+ * Label for the tree node representing the bucket root itself as a
45
+ * selectable publish destination (`selectedPath: []`); rendered as the
46
+ * top-level, always-expanded node that wraps `items`. Default: `'Organization'`.
47
+ */
48
+ rootLabel?: string;
49
+ /**
50
+ * Externally-controlled set of expanded folder path keys (`path.join('/')`).
51
+ * Pass this together with `onExpandedPathsChange` when the host needs to
52
+ * know which folders were expanded (e.g. to lazily fetch their children).
53
+ * When omitted, the tree manages expand state internally.
54
+ */
55
+ expandedPaths?: Set<string>;
56
+ /** Called when the set of expanded folders changes; required to control `expandedPaths`. */
57
+ onExpandedPathsChange?: (paths: Set<string>) => void;
58
+ /** Folder path keys currently being fetched by the host; shows a loading affordance on those rows. */
59
+ loadingPaths?: Set<string>;
60
+ }
61
+ /** Destination folder tree for the Publish flow with search, folder creation (trailing button and context menu), and a disabled state. */
62
+ export declare const PublishFoldersTree: FC<PublishFoldersTreeProps>;
63
+ //# sourceMappingURL=PublishFoldersTree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublishFoldersTree.d.ts","sourceRoot":"","sources":["../../../src/components/PublishFoldersTree/PublishFoldersTree.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAYzD,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,+BAA+B;IAC/B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sFAAsF;IACtF,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC3D;;;OAGG;IACH,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0FAA0F;IAC1F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8HAA8H;IAC9H,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,yHAAyH;IACzH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kGAAkG;IAClG,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,6HAA6H;IAC7H,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gHAAgH;IAChH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2JAA2J;IAC3J,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wIAAwI;IACxI,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,4FAA4F;IAC5F,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,sGAAsG;IACtG,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,0IAA0I;AAC1I,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAmN1D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { FC } from 'react';
2
+ import { PublishHistoryEntry } from '../../models/publish';
3
+ /** Props for {@link PublishHistoryList}. */
4
+ export interface PublishHistoryListProps {
5
+ /** Previously published versions for the selected destination folder, most recent first. Filtered by the host to just that folder. */
6
+ entries: PublishHistoryEntry[];
7
+ /**
8
+ * The entity's current version. The matching entry, if any, gets a
9
+ * "Current" badge instead of the row being highlighted.
10
+ */
11
+ currentVersion?: string;
12
+ /** When `true`, shows a loading message instead of `entries`/empty state. Default: `false`. */
13
+ isLoading?: boolean;
14
+ /** When `true` (and not `isLoading`), shows an error message instead of `entries`/empty state. Default: `false`. */
15
+ hasError?: boolean;
16
+ /** Prefix before each entry's version number. Default: `'Version'`. */
17
+ versionPrefix?: string;
18
+ /** Label for the badge on the entry matching `currentVersion`. Default: `'Current'`. */
19
+ currentBadgeLabel?: string;
20
+ /** Message shown when `entries` is empty. Default: see implementation. */
21
+ emptyStateLabel?: string;
22
+ /** Message shown while history is loading. Default: `'Loading history…'`. */
23
+ loadingLabel?: string;
24
+ /** Message shown when history failed to load. Default: `'Failed to load publish history.'`. */
25
+ errorLabel?: string;
26
+ /** Typography class for each entry's version line. Default: `'dial-small-text text-primary'`. */
27
+ versionClassName?: string;
28
+ /** Typography class for each entry's publish date. Default: `'dial-small-text text-secondary'`. */
29
+ dateClassName?: string;
30
+ /** Typography class for the empty-state message. Default: `'dial-small-text text-secondary'`. */
31
+ emptyStateClassName?: string;
32
+ }
33
+ /** Read-only list of previously published versions for the currently selected destination folder, with loading and empty states. */
34
+ export declare const PublishHistoryList: FC<PublishHistoryListProps>;
35
+ //# sourceMappingURL=PublishHistoryList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublishHistoryList.d.ts","sourceRoot":"","sources":["../../../src/components/PublishHistoryList/PublishHistoryList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,sIAAsI;IACtI,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+FAA+F;IAC/F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oHAAoH;IACpH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+FAA+F;IAC/F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mGAAmG;IACnG,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iGAAiG;IACjG,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,oIAAoI;AACpI,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA0D1D,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { FC } from 'react';
2
+ /** Text overrides for all user-visible strings in {@link PublishFooter}. */
3
+ export interface PublishFooterLabels {
4
+ /** Cancel button label. Default: `'Cancel'`. */
5
+ cancelLabel?: string;
6
+ /** Submit button label when publishing a new version. Default: `'Publish'`. */
7
+ publishDefaultLabel?: string;
8
+ /** Submit button label when replacing an existing version; `{version}` is replaced. */
9
+ updateLabel?: string;
10
+ /** Submit button label while the request is in flight. Default: `'Publishing…'`. */
11
+ publishingInProgressLabel?: string;
12
+ }
13
+ /** Props for {@link PublishFooter}. */
14
+ export interface PublishFooterProps {
15
+ /** The version being published, substituted into the submit label. `undefined` for unversioned resources (e.g. a conversation) — the submit label then always reads `publishDefaultLabel`. */
16
+ version?: string;
17
+ /** Whether this publication already exists at the selected destination folder. */
18
+ hasExistingPublicationInFolder: boolean;
19
+ /** Whether the submit button should be disabled. */
20
+ isSubmitDisabled: boolean;
21
+ /** Whether the submit button should show its loading/spinner state. */
22
+ isSubmitLoading: boolean;
23
+ /** Called when the user cancels the publish flow. */
24
+ onCancel: () => void;
25
+ /** Called when the user confirms the publish/update action. */
26
+ onSubmit: () => void;
27
+ /** Text overrides for all user-visible strings. */
28
+ labels?: PublishFooterLabels;
29
+ }
30
+ /** Action row for the Publish flow: pinned Cancel and Publish/Update buttons. */
31
+ export declare const PublishFooter: FC<PublishFooterProps>;
32
+ //# sourceMappingURL=PublishFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublishFooter.d.ts","sourceRoot":"","sources":["../../../src/components/PublishPanel/PublishFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,8LAA8L;IAC9L,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,8BAA8B,EAAE,OAAO,CAAC;IACxC,oDAAoD;IACpD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,uEAAuE;IACvE,eAAe,EAAE,OAAO,CAAC;IACzB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,mBAAmB,CAAC;CAC9B;AAED,iFAAiF;AACjF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4ChD,CAAC"}
@@ -0,0 +1,105 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { PublishFolderNode, PublishHistoryEntry, PublishResourceSummary } from '../../models/publish';
3
+ /** Text overrides for all user-visible strings in {@link PublishPanel}. */
4
+ export interface PublishPanelLabels {
5
+ /** Label above the destination folder picker. Default: `'Publish to folder'`. */
6
+ folderLabel?: string;
7
+ /** Placeholder for the folder search input. Default: `'Search folders'`. */
8
+ searchPlaceholder?: string;
9
+ /** Accessible label for the search input's clear button. Default: `'Clear search'`. */
10
+ clearSearchAriaLabel?: string;
11
+ /** Label above the publish history list. Default: `'Versions history'`. */
12
+ historyLabel?: string;
13
+ /** Warning callout body shown when the folder already has this version; `{version}` is replaced. */
14
+ replaceWarning?: string;
15
+ /** Error callout body shown when the user lacks write access. */
16
+ noAccessError?: string;
17
+ /** Error callout body shown when the most recent submit attempt failed. */
18
+ submitError?: string;
19
+ /** Message shown when a folder search query matches no folders; `{query}` is replaced. */
20
+ folderEmptyStateLabel?: string;
21
+ /** Label for the per-row context menu action that creates a folder alongside the clicked folder. */
22
+ addSiblingFolderLabel?: string;
23
+ /** Label for the per-row context menu action that creates a folder inside the clicked folder. */
24
+ addChildFolderLabel?: string;
25
+ /** Inline error shown while creating a folder with an empty name. */
26
+ createFolderEmptyNameError?: string;
27
+ /** Inline error shown while creating a folder whose name contains `..` or a forbidden character. */
28
+ createFolderInvalidNameError?: string;
29
+ /** Inline error shown while creating a folder whose name duplicates a sibling. */
30
+ createFolderDuplicateNameError?: string;
31
+ /** Message shown while publish history is loading. */
32
+ historyLoadingLabel?: string;
33
+ /** Message shown when publish history failed to load. */
34
+ historyErrorLabel?: string;
35
+ /** Label used for the bucket root as a destination and as `{folder}` in callouts when it is selected. Default: `'Organization'`. */
36
+ rootFolderLabel?: string;
37
+ }
38
+ /** Props for {@link PublishPanel}. */
39
+ export interface PublishPanelProps {
40
+ /**
41
+ * Display metadata for the summary row and for version-derived behavior:
42
+ * the replace-warning callout's version substitution, and whether the
43
+ * publish-history section is shown at all (only when `version` is set).
44
+ * Title-only rendering applies when `renderSummary` is absent.
45
+ */
46
+ resource?: PublishResourceSummary;
47
+ /**
48
+ * Renders a custom summary row (e.g. a full entity header with icon and
49
+ * type badge) in place of the default title-only row built from
50
+ * `resource.title`. Pass `resource` alongside this so version-derived
51
+ * behavior (callout, history section) keeps working.
52
+ */
53
+ renderSummary?: () => ReactNode;
54
+ /** Previously published entries for this item. */
55
+ history: PublishHistoryEntry[];
56
+ /** Whether `history` is currently being fetched. Default: `false`. */
57
+ isHistoryLoading?: boolean;
58
+ /** Whether the most recent history fetch failed. Default: `false`. */
59
+ hasHistoryError?: boolean;
60
+ /** Destination folders available for selection. */
61
+ folderItems: PublishFolderNode[];
62
+ /**
63
+ * Currently selected destination folder path. `undefined` means nothing
64
+ * is selected; `[]` means the bucket root itself is selected (a distinct,
65
+ * valid destination).
66
+ */
67
+ selectedFolderPath?: string[];
68
+ /** Called when the user selects a destination folder or the root; `undefined` when deselected. */
69
+ onSelectedFolderPathChange: (path: string[] | undefined) => void;
70
+ /** Called when the user confirms a new folder name. */
71
+ onCreateFolder: (parentPath: string[], name: string) => Promise<void>;
72
+ /**
73
+ * Externally-controlled set of expanded folder path keys. Pass this
74
+ * together with `onExpandedPathsChange` when the host lazily fetches a
75
+ * folder's children on expand.
76
+ */
77
+ expandedPaths?: Set<string>;
78
+ /** Called when the set of expanded folders changes; required to control `expandedPaths`. */
79
+ onExpandedPathsChange?: (paths: Set<string>) => void;
80
+ /** Folder path keys currently being fetched by the host. */
81
+ loadingPaths?: Set<string>;
82
+ /**
83
+ * Whether `selectedFolderPath` already has this publication — this exact
84
+ * version, for a versioned `resource`, or any prior entry at all, for an
85
+ * unversioned one.
86
+ */
87
+ hasExistingPublicationInFolder: boolean;
88
+ /** Whether the current user can publish to `selectedFolderPath`. */
89
+ hasWriteAccess: boolean;
90
+ /** Whether a publish request is currently in flight. */
91
+ isSubmitting: boolean;
92
+ /** Whether the most recent submit attempt failed. */
93
+ hasSubmitError?: boolean;
94
+ /**
95
+ * Whether resubmitting when `hasExistingPublicationInFolder` is true is
96
+ * allowed (catalog default) or blocked (conversations — see
97
+ * `PublishDerivationInput.allowReplace`). Default `true`.
98
+ */
99
+ allowReplace?: boolean;
100
+ /** Text overrides for all user-visible strings. */
101
+ labels?: PublishPanelLabels;
102
+ }
103
+ /** Scrollable body of the Publish flow: entity summary, destination folder picker with callout, and publish history. */
104
+ export declare const PublishPanel: FC<PublishPanelProps>;
105
+ //# sourceMappingURL=PublishPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublishPanel.d.ts","sourceRoot":"","sources":["../../../src/components/PublishPanel/PublishPanel.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AACzD,OAAO,EAEL,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAK9B,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,2EAA2E;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oGAAoG;IACpG,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0FAA0F;IAC1F,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oGAAoG;IACpG,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iGAAiG;IACjG,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,qEAAqE;IACrE,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,oGAAoG;IACpG,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,kFAAkF;IAClF,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,sDAAsD;IACtD,mBAAmB,CAAC,E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AC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,wHAAwH;AACxH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA2J9C,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { FC, ReactNode, RefObject } from 'react';
2
+ import { PublishFolderNode, PublishHistoryEntry, PublishResourceSummary } from '../../models/publish';
3
+ import { PublishFooterLabels } from './PublishFooter';
4
+ import { PublishPanelLabels } from './PublishPanel';
5
+ /** Text overrides for all user-visible strings in {@link StandalonePublishPanel} not already covered by `PublishPanelLabels`/`PublishFooterLabels`. */
6
+ export interface StandalonePublishPanelLabels {
7
+ /** Header title. Default: `'Publish'`. */
8
+ title?: string;
9
+ /** Accessible label for the panel's `role="dialog"`. Default: `'Publish'`. */
10
+ ariaLabel?: string;
11
+ /** Accessible label for the header's Close button. Default: `'Close'`. */
12
+ closeAriaLabel?: string;
13
+ }
14
+ /** Props for {@link StandalonePublishPanel}. */
15
+ export interface StandalonePublishPanelProps {
16
+ /** Whether the panel is open (controls the slide-in animation and backdrop). */
17
+ isOpen: boolean;
18
+ /**
19
+ * Display metadata for the summary row and for version-derived behavior.
20
+ * Title-only rendering applies when `renderSummary` is absent.
21
+ */
22
+ resource?: PublishResourceSummary;
23
+ /**
24
+ * Renders a custom summary row in place of the default title-only row.
25
+ * Pass `resource` alongside this so version-derived behavior keeps working.
26
+ * See `PublishPanel`'s `renderSummary` prop.
27
+ */
28
+ renderSummary?: () => ReactNode;
29
+ /** Previously published entries for this item. */
30
+ history: PublishHistoryEntry[];
31
+ /** Whether `history` is currently being fetched. Default: `false`. */
32
+ isHistoryLoading?: boolean;
33
+ /** Whether the most recent history fetch failed. Default: `false`. */
34
+ hasHistoryError?: boolean;
35
+ /** Destination folders available for selection. */
36
+ folderItems: PublishFolderNode[];
37
+ /** Currently selected destination folder path. `undefined` means nothing selected; `[]` means the bucket root. */
38
+ selectedFolderPath?: string[];
39
+ /** Called when the user selects a destination folder or the root; `undefined` when deselected. */
40
+ onSelectedFolderPathChange: (path: string[] | undefined) => void;
41
+ /** Called when the user confirms a new folder name. */
42
+ onCreateFolder: (parentPath: string[], name: string) => Promise<void>;
43
+ /** Externally-controlled set of expanded folder path keys. */
44
+ expandedPaths?: Set<string>;
45
+ /** Called when the set of expanded folders changes. */
46
+ onExpandedPathsChange?: (paths: Set<string>) => void;
47
+ /** Folder path keys currently being fetched by the host. */
48
+ loadingPaths?: Set<string>;
49
+ /** Whether `selectedFolderPath` already has this publication. */
50
+ hasExistingPublicationInFolder: boolean;
51
+ /** Whether the current user can publish to `selectedFolderPath`. */
52
+ hasWriteAccess: boolean;
53
+ /** Whether a publish request is currently in flight. */
54
+ isSubmitting: boolean;
55
+ /** Whether the most recent submit attempt failed. */
56
+ hasSubmitError?: boolean;
57
+ /**
58
+ * Whether resubmitting when `hasExistingPublicationInFolder` is true is
59
+ * allowed (catalog default) or blocked (conversations). Default `true`.
60
+ */
61
+ allowReplace?: boolean;
62
+ /** Called when the panel should be dismissed — Close button, Cancel button, backdrop click, or Escape. */
63
+ onClose: () => void;
64
+ /** Focus target restored when an open panel closes or unmounts. */
65
+ returnFocusRef?: RefObject<HTMLElement | null>;
66
+ /** Called when the user confirms the publish action. */
67
+ onSubmit: () => void;
68
+ /** Text overrides for the panel body. */
69
+ panelLabels?: PublishPanelLabels;
70
+ /** Text overrides for the pinned footer. */
71
+ footerLabels?: PublishFooterLabels;
72
+ /** Text overrides for the header/shell. */
73
+ labels?: StandalonePublishPanelLabels;
74
+ }
75
+ /** Standalone end-edge slide-in panel for the Publish flow: full-screen backdrop, entity summary, folder picker, history list, and pinned footer. */
76
+ export declare const StandalonePublishPanel: FC<StandalonePublishPanelProps>;
77
+ //# sourceMappingURL=StandalonePublishPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StandalonePublishPanel.d.ts","sourceRoot":"","sources":["../../../src/components/PublishPanel/StandalonePublishPanel.ts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AAC,CAAC;IAC5B,uDAAuD;IACvD,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD,4DAA4D;IAC5D,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,iEAAiE;IACjE,8BAA8B,EAAE,OAAO,CAAC;IACxC,oEAAoE;IACpE,cAAc,EAAE,OAAO,CAAC;IACxB,wDAAwD;IACxD,YAAY,EAAE,OAAO,CAAC;IACtB,qDAAqD;IACrD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0GAA0G;IAC1G,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mEAAmE;IACnE,cAAc,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC/C,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,4CAA4C;IAC5C,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,4BAA4B,CAAC;CACvC;AAED,qJAAqJ;AACrJ,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CAuKlE,CAAC"}
package/index.css ADDED
@@ -0,0 +1,2 @@
1
+ ._wrapper_1toho_1{background:var(--sb-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--sb-border,var(--stroke-tertiary,#e0e6f0))}._header_1toho_6{color:var(--sb-text,var(--text-primary,#161b2d))}._divider_1toho_10{border-color:var(--sb-border,var(--stroke-tertiary,#e0e6f0))}._panel_1toho_14{border-color:var(--sb-border,var(--stroke-tertiary,#e0e6f0));border-inline-end-color:var(--sb-border-inline-end,var(--sb-border,var(--stroke-tertiary,#e0e6f0)))}@keyframes _fadeIn_1toho_1{0%{opacity:0}to{opacity:1}}._appear_1toho_27{animation:.2s ease-out forwards _fadeIn_1toho_1}._resizeHandler_1toho_31{background:var(--sb-bg-resize-handler,var(--text-info,#2764d9));width:4px!important;color:var(--sb-resize-handler,var(--text-info,#2764d9))!important}._container_ozmd2_1{background-color:var(--search-bar-bg,#fff);border:1px solid #0000000d;transition:border-color .15s,box-shadow .15s}@media (hover:hover){._container_ozmd2_1:hover:not(:focus-within){border-color:#0000001f}}._container_ozmd2_1:focus-within{border-color:color-mix(in srgb, var(--stroke-accent-primary,#7da4ff) 50%, transparent);box-shadow:none}._icon_ozmd2_16{color:var(--text-tertiary,#98a2b3)}._input_ozmd2_20{color:var(--text-primary,#131a29);background-color:#0000}._input_ozmd2_20::placeholder{color:var(--text-tertiary,#98a2b3)}._tabContainer_rzv03_1{background-color:#0000;color:var(--text-tertiary,#808898)!important;border-color:#0000!important}._tabContainer_rzv03_1:hover{background-color:#5c8dea0f;color:var(--text-secondary,#64748b)!important}._tabContainer_rzv03_1>span{text-align:center}._tabContainer_rzv03_1._tabActive_rzv03_13{background-color:#2764d912;color:var(--text-secondary,#64748b)!important}._tabContainer_rzv03_1._tabActive_rzv03_13:hover{background-color:#5c8dea0f}.dial-primary-solid-button{background-image:linear-gradient(135deg, var(--bg-accent-secondary,#37babc) 0%, var(--bg-accent-primary,#5c8dea) 30%, var(--bg-accent-tertiary,#a972ff) 100%);border-style:none;border-radius:9999px;transition:box-shadow .2s,transform .15s;box-shadow:0 0 16px #37babc40,0 4px 12px #a972ff38;background-color:#0000!important;padding-inline:24px!important}@media (hover:hover){.dial-primary-solid-button:hover{background-color:#0000;background-image:linear-gradient(135deg, var(--bg-accent-secondary,#37babc) 0%, var(--bg-accent-primary,#5c8dea) 30%, var(--bg-accent-tertiary,#a972ff) 100%);transform:translateY(-1px);box-shadow:0 0 24px #37babc59,0 6px 18px #a972ff4d}}.dial-primary-solid-button:active{background-color:#0000;background-image:linear-gradient(135deg, var(--bg-accent-secondary,#37babc) 0%, var(--bg-accent-primary,#5c8dea) 30%, var(--bg-accent-tertiary,#a972ff) 100%);filter:brightness(.92);transform:translateY(0);box-shadow:0 0 10px #37babc33,0 2px 6px #a972ff29}.dial-primary-solid-button:disabled{box-shadow:none;cursor:not-allowed;background-image:none;transform:none;background-color:var(--controls-bg-disable,#d1dbea)!important;color:var(--text-white,#fff)!important}.dial-danger-solid-button{border-radius:9999px!important}.dial-primary-solid-button.dial-primary-solid-button{background-color:#0000;background-image:linear-gradient(135deg,#4b7be6 0%,#9355f4 100%);border:none;border-radius:9999px;transition:box-shadow .2s,transform .15s;box-shadow:0 4px 16px #5c8dea52}@media (hover:hover){.dial-primary-solid-button.dial-primary-solid-button:hover{background-color:#0000;background-image:linear-gradient(135deg,#4b7be6 0%,#9355f4 100%);transform:translateY(-1px);box-shadow:0 6px 20px #5c8dea6b}}.dial-primary-solid-button.dial-primary-solid-button:active{filter:brightness(.92);background-color:#0000;background-image:linear-gradient(135deg,#4b7be6 0%,#9355f4 100%);transform:translateY(0);box-shadow:0 2px 8px #5c8dea38}.dial-primary-solid-button.dial-primary-solid-button:disabled{box-shadow:none;background-image:none;transform:none}.dial-neutral-outlined-button{transition:background-color .15s,border-color .15s;color:var(--bg-accent-primary,#2764d9)!important;background-color:#2764d914!important;background-image:none!important;border:1px solid #2764d933!important;border-radius:9999px!important}@media (hover:hover){.dial-neutral-outlined-button:hover:enabled{background-color:#2764d921!important;border-color:#2764d959!important}}.dial-neutral-outlined-button:active:enabled{background-color:#2764d92e!important;border-color:#2764d973!important}.dial-neutral-outlined-button:disabled{border-color:var(--stroke-secondary,#d1dbea);color:var(--controls-text-neutral-disable,#575f73);background-color:#0000;background-image:none}.dial-primary-ghost-button:not(.dial-icon-button){border-style:none;border-radius:9999px;color:var(--bg-accent-primary,#2764d9)!important}@media (hover:hover){.dial-primary-ghost-button:not(.dial-icon-button):hover:enabled{background-color:#2764d90d!important}}.dial-primary-ghost-button:not(.dial-icon-button):active:enabled{background-color:#2764d914!important}.dial-icon-button{border-radius:6px!important}.dial-input:not(.dial-input-error){transition:border-color .15s,box-shadow .15s;border-color:var(--stroke-tertiary,#e0e6f0)!important;border-radius:.75rem!important}.dial-input:not(.dial-input-error):not(:disabled):hover{border-color:var(--stroke-accent-primary,#7da4ff)!important}.dial-input:not(.dial-input-error):not(:disabled):active,.dial-input:not(.dial-input-error):not(:disabled):focus,.dial-input:not(.dial-input-error):not(:disabled):focus-within{border-color:var(--stroke-accent-primary,#124ace)!important;box-shadow:0 0 0 4px var(--bg-accent-primary-alpha,#7da4ff2e)!important}.dial-input-error{border-radius:.75rem!important}._icon_1b1ye_1{color:var(--si-icon,var(--text-secondary,#575f73))}button._cancelButton_tjpsd_1.dial-primary-ghost-button{color:var(--text-secondary,#575f73)!important}@media (hover:hover){button._cancelButton_tjpsd_1.dial-primary-ghost-button:hover:enabled{background-color:var(--bg-layer-3,#0000000a)}}._backdrop_1t5dx_1{background:var(--bg-blackout,#0c101d4d)}._panel_1t5dx_5{background:var(--bg-layer-0,#fcfcfc);border-inline-start-color:var(--stroke-secondary,#242c42)}._divider_1t5dx_10{border-block-end:1px solid var(--stroke-tertiary,#e0e6f0)}._content_1t5dx_14{scrollbar-width:thin;scrollbar-color:var(--stroke-secondary,#242c42) transparent}
2
+ /*$vite$:1*/
package/index.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ export { PublishCalloutKind } from './models/publish';
2
+ export type { PublishDerivationInput, PublishDerivedState, PublishFolderNode, PublishHistoryEntry, PublishResourceSummary, } from './models/publish';
3
+ export { derivePublishState } from './utils/publish-state';
4
+ export { formatPublishedDate } from './utils/format-published-date';
5
+ export { usePublishFlow } from './utils/use-publish-flow';
6
+ export type { PublishFlowItem, UsePublishFlowOptions, UsePublishFlowResult, } from './utils/use-publish-flow';
7
+ export { collectFolderKeys, filterFolderTree, fromFolderPathKey, getSiblingFolderNames, getUniqueFolderName, toDialFileTree, toFolderPathKey, validateFolderName, } from './utils/publish-folder-tree';
8
+ export type { FolderNameValidationMessages } from './utils/publish-folder-tree';
9
+ export { PublishHistoryList } from './components/PublishHistoryList/PublishHistoryList';
10
+ export type { PublishHistoryListProps } from './components/PublishHistoryList/PublishHistoryList';
11
+ export { PublishFoldersTree } from './components/PublishFoldersTree/PublishFoldersTree';
12
+ export type { PublishFoldersTreeProps } from './components/PublishFoldersTree/PublishFoldersTree';
13
+ export { PublishPanel } from './components/PublishPanel/PublishPanel';
14
+ export type { PublishPanelProps, PublishPanelLabels, } from './components/PublishPanel/PublishPanel';
15
+ export { PublishFooter } from './components/PublishPanel/PublishFooter';
16
+ export type { PublishFooterProps, PublishFooterLabels, } from './components/PublishPanel/PublishFooter';
17
+ export { StandalonePublishPanel } from './components/PublishPanel/StandalonePublishPanel';
18
+ export type { StandalonePublishPanelProps, StandalonePublishPanelLabels, } from './components/PublishPanel/StandalonePublishPanel';
19
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,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