pagepilot-visual-editor 1.0.28 → 1.0.30
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/CHANGELOG.md +96 -0
- package/README.md +42 -28
- package/dist/PagePilotEditor.d.ts +12 -9
- package/dist/api/ApiClientContext.d.ts +1 -0
- package/dist/api/PagepilotApiClient.d.ts +7 -0
- package/dist/assets/aiChatbotIcon.d.ts +1 -0
- package/dist/blocks-internal/block-container/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-heading/src/index.d.ts +1 -1
- package/dist/blocks-internal/block-list/src/index.d.ts +11 -1
- package/dist/blocks-internal/block-mdx/src/index.d.ts +47 -0
- package/dist/blocks-internal/block-quill/src/index.d.ts +48 -0
- package/dist/editor/PagePreviewDialog.d.ts +14 -0
- package/dist/editor/Topbar.d.ts +3 -1
- package/dist/editor/pageUrls.d.ts +25 -0
- package/dist/editor/publish/PageLiveSuccessDialog.d.ts +9 -0
- package/dist/editor/publish/PagePublishDialog.d.ts +1 -0
- package/dist/editor/publish/PublishAccessibilityPanel.d.ts +8 -0
- package/dist/editor/publish/a11yLinter.d.ts +8 -0
- package/dist/editor/recordDirty.d.ts +16 -0
- package/dist/editor/renderSections.d.ts +2 -2
- package/dist/editor/savePipeline.d.ts +40 -0
- package/dist/editor/types.d.ts +35 -0
- package/dist/editor-sample/App/InspectorDrawer/BehaviourPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandColorPalette.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandEmptyLink.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandPanel.styled.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/BrandSection.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/EmptyText.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/FontDetailsList.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/index.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/BrandPanel/useBrandApply.d.ts +9 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveDeviceTabs.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/blockStyleClipboard.d.ts +2 -8
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/index.d.ts +1 -4
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/EmailLayoutSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FlexColumns/ColumnSection.d.ts +2 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/FormsPickerSidebarPanel.d.ts +2 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MdxSidebarPanel.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/MenuPickerSidebarPanel.d.ts +22 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/QuillSidebarPanel.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/TextSidebarPanel.d.ts +2 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/AnimationSection.d.ts +7 -5
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/HoverEffectSection.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/imageSizeUnit.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/ColorInput/Picker.d.ts +0 -2
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/inputs/VariableLinkHint.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/EditorBehavior.d.ts +8 -2
- package/dist/editor-sample/App/InspectorDrawer/LayersPanelStyles.d.ts +1 -1
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/AiSupportedBadge.d.ts +7 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/SectionsModal.d.ts +2 -10
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/icons/index.d.ts +3 -5
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/templateHelpers.d.ts +226 -0
- package/dist/editor-sample/App/InspectorDrawer/LayoutPanel/useDebouncedValue.d.ts +8 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiFillAllDialog.d.ts +21 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/AiGenerateButton.d.ts +14 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/ScalarFieldRow.d.ts +4 -1
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupDialog.d.ts +19 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/VariableGroupList.d.ts +5 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/aiFill.d.ts +36 -0
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/styles.d.ts +14 -11
- package/dist/editor-sample/App/InspectorDrawer/VariablesPanel/upgradeDialog.d.ts +8 -8
- package/dist/editor-sample/App/InspectorDrawer/behaviourFields.d.ts +30 -0
- package/dist/editor-sample/App/InspectorDrawer/index.d.ts +8 -1
- package/dist/editor-sample/App/InspectorDrawer/publish/BackgroundPanel.d.ts +6 -0
- package/dist/editor-sample/App/InspectorDrawer/renderBehaviourField.d.ts +7 -0
- package/dist/editor-sample/App/TemplatePanel/hooks/useMainBoxStyles.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/index.d.ts +2 -1
- package/dist/editor-sample/App/TemplatePanel/minimap/useMiniMapSync.d.ts +2 -2
- package/dist/editor-sample/App/hooks/page/saveMenuHrefEdits.d.ts +1 -1
- package/dist/editor-sample/App/hooks/page/useSaveHandler.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useAutosave.d.ts +8 -3
- package/dist/editor-sample/App/hooks/useIsTemplateEditorRoute.d.ts +1 -0
- package/dist/editor-sample/App/hooks/useStretch.d.ts +9 -0
- package/dist/editor-sample/App/shared/UploadImage.d.ts +4 -0
- package/dist/editor-sample/App/shared/editor.styles.d.ts +11 -1
- package/dist/editor-sample/documents/blocks/Container/ContainerPropsSchema.d.ts +6 -4
- package/dist/editor-sample/documents/blocks/FormsPicker/FormsPropsSchema.d.ts +33 -2
- package/dist/editor-sample/documents/blocks/List/ListEditor.d.ts +8 -0
- package/dist/editor-sample/documents/blocks/Marquee/MarqueePropsSchema.d.ts +4 -0
- package/dist/editor-sample/documents/blocks/MenuPicker/MenuPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Table/TableCellEditor.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/Table/TableImportDialog.styles.d.ts +11 -1
- package/dist/editor-sample/documents/blocks/Table/parseClipboardTable.d.ts +7 -0
- package/dist/editor-sample/documents/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/editor-sample/documents/blocks/Timer/TimerPropsSchema.d.ts +2 -0
- package/dist/editor-sample/documents/blocks/Timer/variants/CircularProgressView.d.ts +2 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/blockMenuStyles.d.ts +1 -1
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/brandButtonDefaults.d.ts +1 -4
- package/dist/editor-sample/documents/blocks/helpers/EditorChildrenIds/AddBlockMenu/buttons.d.ts +0 -6
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/dialogs/LinkDialog.d.ts +4 -1
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/hooks/useToolbarCommands.d.ts +16 -4
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/styles.d.ts +2 -2
- package/dist/editor-sample/documents/blocks/helpers/InlineTextToolbar/types.d.ts +2 -4
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/EditorBlockWrapper.d.ts +2 -3
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/TuneMenu.styles.d.ts +17 -0
- package/dist/editor-sample/documents/blocks/helpers/block-wrappers/saveAsTemplateUtils.d.ts +29 -1
- package/dist/editor-sample/documents/blocks/helpers/documentUtils.d.ts +33 -26
- package/dist/editor-sample/documents/blocks/helpers/variableBinding.d.ts +9 -0
- package/dist/editor-sample/documents/editor/EditorBlock.d.ts +2 -6
- package/dist/editor-sample/documents/editor/EditorContext.d.ts +77 -20
- package/dist/editor-sample/documents/editor/LazyEditorBlock.d.ts +1 -0
- package/dist/editor-sample/documents/editor/core.d.ts +492 -390
- package/dist/editor-sample/documents/editor/templateVariables.d.ts +151 -14
- package/dist/editor-sample/documents/editor/useRootFontFamily.d.ts +10 -0
- package/dist/editor-sample/utils/editorStorageKey.d.ts +2 -0
- package/dist/editor-sample/utils/localStoragePref.d.ts +2 -0
- package/dist/email-builder-core/blocks/Container/ContainerPropsSchema.d.ts +1 -1
- package/dist/email-builder-core/blocks/EmailLayout/EmailLayoutReader.d.ts +1 -1
- package/dist/email-builder-core/blocks/TabsBlock/TabsBlockPropsSchema.d.ts +6 -0
- package/dist/email-builder-core/blocks/Timer/variants/CircularProgressView.d.ts +5 -1
- package/dist/email-builder-core/blocks/Timer/variants/DigitalFlipView.d.ts +4 -1
- package/dist/email-builder-core/blocks/Timer/variants/TextInlineView.d.ts +3 -1
- package/dist/email-builder-core/blocks/helpers/blockStyleHelpers.d.ts +22 -0
- package/dist/email-builder-core/renderers/pageScripts.d.ts +0 -1
- package/dist/email-builder-core/renderers/themeTokens.d.ts +5 -126
- package/dist/host-stubs/history.d.ts +5 -0
- package/dist/host-stubs/hooks/useTenantFeatureCutoff.d.ts +8 -0
- package/dist/host-stubs/hooks/useTenantPlan.d.ts +18 -0
- package/dist/host-stubs/i18nAhdDefaults.d.ts +1 -0
- package/dist/host-stubs/modules/auth/authCurrentTenant.d.ts +6 -0
- package/dist/host-stubs/modules/forms/formsService.d.ts +3 -1
- package/dist/host-stubs/modules/forms/useFormsList.d.ts +4 -1
- package/dist/host-stubs/modules/menu/menuService.d.ts +4 -0
- package/dist/host-stubs/modules/page/pageService.d.ts +11 -0
- package/dist/host-stubs/modules/settings/settingsActions.d.ts +2 -0
- package/dist/host-stubs/modules/settings/settingsSelectors.d.ts +4 -0
- package/dist/host-stubs/modules/shared/axios/authAxios.d.ts +16 -0
- package/dist/host-stubs/modules/shared/constants.d.ts +14 -0
- package/dist/host-stubs/modules/store.d.ts +4 -0
- package/dist/host-stubs/modules/template/templateEnumerators.d.ts +19 -0
- package/dist/host-stubs/modules/tour/injectTourIntoPage.d.ts +20 -0
- package/dist/host-stubs/style/icons.d.ts +57 -0
- package/dist/host-stubs/utils/dateFormats.d.ts +1 -0
- package/dist/host-stubs/view/branding/brandDefaultFont.d.ts +3 -1
- package/dist/host-stubs/view/branding/styles/BrandIcons.d.ts +9 -0
- package/dist/host-stubs/view/branding/styles/types.d.ts +76 -0
- package/dist/host-stubs/view/configurations/ConfigurationIcons.d.ts +9 -0
- package/dist/host-stubs/view/demo/DemoIcons.d.ts +9 -0
- package/dist/host-stubs/view/images/Icons.d.ts +6 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/types.d.ts +47 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/fileUtils.d.ts +3 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog/utils/mediaTypes.d.ts +9 -0
- package/dist/host-stubs/view/media/MediaGalleryDialog.d.ts +12 -2
- package/dist/host-stubs/view/media/styles/MediaIcons.d.ts +13 -0
- package/dist/host-stubs/view/shared/Confetti.d.ts +5 -0
- package/dist/host-stubs/view/shared/PagePilotLoader.d.ts +2 -0
- package/dist/host-stubs/view/shared/UpgradeDialog/UpgradeDialogContext.d.ts +1 -0
- package/dist/host-stubs/view/shared/common/CopyToClipboard.d.ts +7 -0
- package/dist/host-stubs/view/shared/editors/MdxEditor.d.ts +8 -0
- package/dist/host-stubs/view/shared/editors/QuillEditor.d.ts +3 -0
- package/dist/host-stubs/view/shared/editors/sanitize.d.ts +4 -0
- package/dist/host-stubs/view/shared/editors/types.d.ts +7 -0
- package/dist/host-stubs/view/shared/media/TemplatePreviewMedia.d.ts +29 -0
- package/dist/host-stubs/view/shared/modals/ConfigureDialog.d.ts +7 -0
- package/dist/host-stubs/view/shared/modals/ManageTemplateModal.d.ts +5 -0
- package/dist/host-stubs/view/shared/speech/index.d.ts +17 -0
- package/dist/host-stubs/view/shared/styles/Table.styles.d.ts +3 -0
- package/dist/host-stubs/view/template/form/TemplateFormModal.d.ts +10 -0
- package/dist/host-stubs/view/template/form/fields/types.d.ts +7 -0
- package/dist/{index-DcN8zC8_.js → index-B8pdGALF.js} +86258 -73803
- package/dist/{index-SYmY8c1I.cjs → index-C-KL2oQP.cjs} +1 -1
- package/dist/{index-Cp5AeqH5.js → index-CStZQ7E0.js} +1 -1
- package/dist/index-DVx38kGU.cjs +1553 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/render-core/combineSections.d.ts +33 -3
- package/dist/render-core/dateFormats.d.ts +14 -3
- package/dist/render-core/stubs/pickerEmptyState.d.ts +2 -0
- package/dist/render-core/stubs/styleIcons.d.ts +1 -0
- package/dist/render.cjs +281 -219
- package/dist/render.js +9858 -8266
- package/dist/style.css +1 -1
- package/dist/{xlsx-vznvhtjT.cjs → xlsx-DUs4Mvqq.cjs} +1 -1
- package/dist/{xlsx-Bk2GErZO.js → xlsx-bYU68TCR.js} +1 -1
- package/package.json +1 -1
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/ResponsiveEditingBanner.d.ts +0 -13
- package/dist/editor-sample/App/InspectorDrawer/ConfigurationPanel/input-panels/helpers/BoxShadowControls.d.ts +0 -19
- package/dist/editor-sample/documents/blocks/AppBannerPicker/appBanner.styled.d.ts +0 -2
- package/dist/email-builder-core/blocks/boxShadowSchema.d.ts +0 -23
- package/dist/index-Br_dDd3Z.cjs +0 -1493
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DVx38kGU.cjs");exports.EditorContext=e.EditorContext;exports.PagePilotEditor=e.PagePilotEditor;exports.PagepilotApiClient=e.PagepilotApiClient;exports.Reader=e.Reader;exports.ReaderBlock=e.ReaderBlock;exports.ReaderBlockSchema=e.ReaderBlockSchema;exports.ReaderDocumentSchema=e.ReaderDocumentSchema;exports.extractApiRows=e.extractApiRows;exports.pagePilotEditorDarkTheme=e.pagePilotEditorDarkTheme;exports.pagePilotEditorLightTheme=e.pagePilotEditorLightTheme;exports.refreshApiDataSources=e.refreshApiDataSources;exports.refreshDocumentApiDataSources=e.refreshDocumentApiDataSources;exports.renderToStaticHtml=e.renderToStaticHtml;exports.renderToStaticMarkup=e.renderToStaticMarkup;exports.resetDocument=e.resetDocument;exports.resetPagePilotEditorTranslations=e.resetPagePilotEditorTranslations;exports.setDocument=e.setDocument;exports.setPagePilotEditorTranslations=e.setPagePilotEditorTranslations;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as t, P as s, b as r, R as o, d as i, e as c, f as d, h as l, p as n, i as m, r as p, j as P, k as h, l as g, m as u, n as D, s as E, o as R } from "./index-
|
|
1
|
+
import { E as t, P as s, b as r, R as o, d as i, e as c, f as d, h as l, p as n, i as m, r as p, j as P, k as h, l as g, m as u, n as D, s as E, o as R } from "./index-B8pdGALF.js";
|
|
2
2
|
export {
|
|
3
3
|
t as EditorContext,
|
|
4
4
|
s as PagePilotEditor,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface SectionForRender {
|
|
2
2
|
sectionType?: 'internal' | 'external' | string;
|
|
3
|
+
identifier?: string;
|
|
3
4
|
content?: string;
|
|
4
5
|
contentMetadata?: {
|
|
5
6
|
document?: any;
|
|
@@ -11,18 +12,37 @@ export interface RenderDocumentForSaveOptions {
|
|
|
11
12
|
rootBlockId?: string;
|
|
12
13
|
injectTabsScrollSyncScript?: boolean;
|
|
13
14
|
injectCarouselScript?: boolean;
|
|
15
|
+
injectPaginationScript?: boolean;
|
|
14
16
|
injectAnimationScript?: boolean;
|
|
15
17
|
injectFontAssets?: boolean;
|
|
16
18
|
headHtml?: string;
|
|
17
19
|
bodyBottomHtml?: string;
|
|
18
20
|
isBanner?: boolean;
|
|
19
21
|
seo?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Values that replace the document root's own `lang` / `skipLink` /
|
|
24
|
+
* `accessibilityTools`. ahd-fe's `useSaveHandler` reads these from the
|
|
25
|
+
* ACTIVE section's root and applies them to every section, so a page
|
|
26
|
+
* renders with one consistent language and skip-link config. Unset keys
|
|
27
|
+
* fall back to the document's own root data.
|
|
28
|
+
*/
|
|
29
|
+
rootOverrides?: {
|
|
30
|
+
lang?: string;
|
|
31
|
+
skipLink?: any;
|
|
32
|
+
accessibilityTools?: any;
|
|
33
|
+
};
|
|
20
34
|
}
|
|
21
35
|
export declare function isExternalSection(section: SectionForRender | undefined): boolean;
|
|
36
|
+
/** Stable DOM id of an external (client-side) section, or `''` when it has none. */
|
|
37
|
+
export declare function externalSectionIdentifier(section: SectionForRender | undefined): string;
|
|
38
|
+
/**
|
|
39
|
+
* Saved HTML for an external (client-side) section — an empty anchor div that
|
|
40
|
+
* developers mount their own component into via `getElementById`. Mirrors
|
|
41
|
+
* ahd-fe's `useSaveHandler`: no identifier, no anchor.
|
|
42
|
+
*/
|
|
43
|
+
export declare function externalSectionAnchorHtml(section: SectionForRender | undefined): string;
|
|
22
44
|
export declare function renderDocumentForSave(document: any, options?: RenderDocumentForSaveOptions): string;
|
|
23
|
-
export interface
|
|
24
|
-
includeExternalSections?: boolean;
|
|
25
|
-
wrapInDocumentShell?: boolean;
|
|
45
|
+
export interface DocumentShellOptions {
|
|
26
46
|
lang?: string;
|
|
27
47
|
canvasColor?: string;
|
|
28
48
|
fontFamily?: string;
|
|
@@ -31,6 +51,16 @@ export interface CombineSectionsOptions extends RenderDocumentForSaveOptions {
|
|
|
31
51
|
extraHead?: string;
|
|
32
52
|
extraBodyBottom?: string;
|
|
33
53
|
}
|
|
54
|
+
export interface CombineSectionsOptions extends RenderDocumentForSaveOptions, DocumentShellOptions {
|
|
55
|
+
includeExternalSections?: boolean;
|
|
56
|
+
wrapInDocumentShell?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Wrap already-rendered section fragments in the minimal `<!doctype html>`
|
|
60
|
+
* shell used for multi-section pages. Root-level defaults (lang, canvas
|
|
61
|
+
* colour, font) come from the first internal section's document.
|
|
62
|
+
*/
|
|
63
|
+
export declare function wrapSectionsInDocumentShell(bodyFragments: string, sections: SectionForRender[], options?: DocumentShellOptions): string;
|
|
34
64
|
export declare function combineSectionsToHtml(sections: SectionForRender[], options?: CombineSectionsOptions): {
|
|
35
65
|
html: string;
|
|
36
66
|
sectionHtml: string[];
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type DateFormatPreset = 'relative' | 'do-mmm-yyyy' | 'mmm-d-yyyy' | 'd-mmm-yyyy' | 'dd-mm-yyyy' | 'mm-dd-yyyy' | 'yyyy-mm-dd' | 'do-mmm' | 'full';
|
|
7
7
|
export declare const DEFAULT_DATE_FORMAT: DateFormatPreset;
|
|
8
|
+
/**
|
|
9
|
+
* dayjs format string for each absolute preset. Kept for API parity with
|
|
10
|
+
* upstream (`ABSOLUTE_PATTERN` is exported there); this port doesn't run the
|
|
11
|
+
* patterns through dayjs — `formatDateValue` assembles the same output from
|
|
12
|
+
* `Intl` parts — but the table documents what each preset must produce.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ABSOLUTE_PATTERN: Record<Exclude<DateFormatPreset, 'relative'>, string>;
|
|
8
15
|
export declare const DATE_FORMAT_PRESETS: {
|
|
9
16
|
value: DateFormatPreset;
|
|
10
17
|
label: string;
|
|
@@ -18,6 +25,8 @@ export declare const DATE_FORMAT_PRESETS: {
|
|
|
18
25
|
*/
|
|
19
26
|
export type TimeFormatPreset = '24h' | '12h';
|
|
20
27
|
export declare const DEFAULT_TIME_FORMAT: TimeFormatPreset;
|
|
28
|
+
/** dayjs format string for each time preset (API parity with upstream). */
|
|
29
|
+
export declare const TIME_PATTERN: Record<TimeFormatPreset, string>;
|
|
21
30
|
export declare const TIME_FORMAT_PRESETS: {
|
|
22
31
|
value: TimeFormatPreset;
|
|
23
32
|
label: string;
|
|
@@ -46,8 +55,9 @@ export declare function formatRelativeDate(value: string | number | Date | null
|
|
|
46
55
|
/**
|
|
47
56
|
* Format a date value with one of the presets.
|
|
48
57
|
* - `relative` → formatRelativeDate (host-local day math; `tz` is ignored)
|
|
49
|
-
* - any other → the value's
|
|
50
|
-
* zone),
|
|
58
|
+
* - any other → the value's wall-clock date in `tz` (defaults to the host's
|
|
59
|
+
* zone), rendered exactly as dayjs would render `ABSOLUTE_PATTERN[preset]`
|
|
60
|
+
* (English names; unknown presets fall back to `do-mmm-yyyy`).
|
|
51
61
|
*
|
|
52
62
|
* `tz` is an IANA name (e.g. "America/New_York"). Returns '' for a
|
|
53
63
|
* missing/invalid input.
|
|
@@ -59,7 +69,8 @@ export declare function formatDateValue(value: string | number | Date | null | u
|
|
|
59
69
|
}): string;
|
|
60
70
|
/**
|
|
61
71
|
* Format the time portion of a date value with one of the time presets, in the
|
|
62
|
-
* given IANA `tz` (defaults to the host's
|
|
72
|
+
* given IANA `tz` (defaults to the host's zone). Matches dayjs `HH:mm` (24h) and
|
|
73
|
+
* `h:mm A` (12h); unknown presets fall back to 24h. Returns '' for a
|
|
63
74
|
* missing/invalid input.
|
|
64
75
|
*/
|
|
65
76
|
export declare function formatTimeValue(value: string | number | Date | null | undefined, preset?: TimeFormatPreset, opts?: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BrowserIcon: (_props: Record<string, unknown>) => null;
|