@cntrl-site/components 1.0.19-alpha.5 → 1.0.19-alpha.6

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/package.json CHANGED
@@ -1,85 +1,85 @@
1
- {
2
- "name": "@cntrl-site/components",
3
- "version": "1.0.19-alpha.5",
4
- "description": "Custom components for control editor and public websites.",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "dist/index.d.ts",
8
- "style": "dist/components.css",
9
- "sideEffects": [
10
- "**/*.css"
11
- ],
12
- "exports": {
13
- ".": {
14
- "types": "./dist/index.d.ts",
15
- "import": "./dist/index.mjs",
16
- "require": "./dist/index.js"
17
- },
18
- "./utils": {
19
- "types": "./dist/Components/utils/index.d.ts",
20
- "import": "./dist/utils.mjs",
21
- "require": "./dist/utils.js"
22
- },
23
- "./style/components.css": {
24
- "default": "./dist/components.css"
25
- }
26
- },
27
- "typesVersions": {
28
- "*": {
29
- "utils": [
30
- "./dist/Components/utils/index.d.ts"
31
- ]
32
- }
33
- },
34
- "scripts": {
35
- "test": "jest",
36
- "dev": "vite development",
37
- "prebuild": "rimraf ./dist",
38
- "build": "vite build",
39
- "build:watch": "vite build --watch",
40
- "prepublishOnly": "cross-env NODE_ENV=production npm run build"
41
- },
42
- "files": [
43
- "dist",
44
- "resources"
45
- ],
46
- "repository": {
47
- "type": "git",
48
- "url": "git+https://github.com/cntrl-site/components.git"
49
- },
50
- "author": "arsen@momdesign.nyc",
51
- "license": "MIT",
52
- "bugs": {
53
- "url": "https://github.com/cntrl-site/components/issues"
54
- },
55
- "homepage": "https://github.com/cntrl-site/components#readme",
56
- "directories": {
57
- "lib": "dist"
58
- },
59
- "dependencies": {
60
- "classnames": "^2.5.1"
61
- },
62
- "peerDependencies": {
63
- "react": "^18.0.0",
64
- "react-dom": "^18.0.0"
65
- },
66
- "devDependencies": {
67
- "@antfu/eslint-config": "^3.16.0",
68
- "@splidejs/react-splide": "^0.7.12",
69
- "ts-node": "^10.9.1",
70
- "@tsconfig/node16": "^1.0.3",
71
- "@tsconfig/recommended": "^1.0.1",
72
- "@types/node": "^18.11.7",
73
- "@types/react": "^18.2.0",
74
- "@types/react-dom": "^18.2.0",
75
- "@vitejs/plugin-react": "^4.3.4",
76
- "cross-env": "^10.1.0",
77
- "react": "^18.2.0",
78
- "react-dom": "^18.2.0",
79
- "rimraf": "^6.0.1",
80
- "sass": "^1.86.3",
81
- "typescript": "^5.2.2",
82
- "vite": "^6.2.5",
83
- "vite-plugin-dts": "^4.5.3"
84
- }
85
- }
1
+ {
2
+ "name": "@cntrl-site/components",
3
+ "version": "1.0.19-alpha.6",
4
+ "description": "Custom components for control editor and public websites.",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "style": "dist/components.css",
9
+ "sideEffects": [
10
+ "**/*.css"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.mjs",
16
+ "require": "./dist/index.js"
17
+ },
18
+ "./utils": {
19
+ "types": "./dist/Components/utils/index.d.ts",
20
+ "import": "./dist/utils.mjs",
21
+ "require": "./dist/utils.js"
22
+ },
23
+ "./style/components.css": {
24
+ "default": "./dist/components.css"
25
+ }
26
+ },
27
+ "typesVersions": {
28
+ "*": {
29
+ "utils": [
30
+ "./dist/Components/utils/index.d.ts"
31
+ ]
32
+ }
33
+ },
34
+ "scripts": {
35
+ "test": "jest",
36
+ "dev": "vite development",
37
+ "prebuild": "rimraf ./dist",
38
+ "build": "vite build",
39
+ "build:watch": "vite build --watch",
40
+ "prepublishOnly": "cross-env NODE_ENV=production npm run build"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "resources"
45
+ ],
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/cntrl-site/components.git"
49
+ },
50
+ "author": "arsen@momdesign.nyc",
51
+ "license": "MIT",
52
+ "bugs": {
53
+ "url": "https://github.com/cntrl-site/components/issues"
54
+ },
55
+ "homepage": "https://github.com/cntrl-site/components#readme",
56
+ "directories": {
57
+ "lib": "dist"
58
+ },
59
+ "dependencies": {
60
+ "classnames": "^2.5.1"
61
+ },
62
+ "peerDependencies": {
63
+ "react": "^18.0.0",
64
+ "react-dom": "^18.0.0"
65
+ },
66
+ "devDependencies": {
67
+ "@antfu/eslint-config": "^3.16.0",
68
+ "@splidejs/react-splide": "^0.7.12",
69
+ "ts-node": "^10.9.1",
70
+ "@tsconfig/node16": "^1.0.3",
71
+ "@tsconfig/recommended": "^1.0.1",
72
+ "@types/node": "^18.11.7",
73
+ "@types/react": "^18.2.0",
74
+ "@types/react-dom": "^18.2.0",
75
+ "@vitejs/plugin-react": "^4.3.4",
76
+ "cross-env": "^10.1.0",
77
+ "react": "^18.2.0",
78
+ "react-dom": "^18.2.0",
79
+ "rimraf": "^6.0.1",
80
+ "sass": "^1.86.3",
81
+ "typescript": "^5.2.2",
82
+ "vite": "^6.2.5",
83
+ "vite-plugin-dts": "^4.5.3"
84
+ }
85
+ }
@@ -1,97 +0,0 @@
1
- import { CommonComponentProps } from '../props';
2
- import { TextStyles } from '../utils/textStylesToCss';
3
- import { ImageRatioFit } from '../utils/imageFitStyles';
4
- export type LightboxJournalImage = {
5
- url: string;
6
- name?: string;
7
- objectFit?: 'cover' | 'contain';
8
- };
9
- export type LightboxJournalItem = {
10
- title1: string;
11
- title2: string;
12
- title3: string;
13
- image: LightboxJournalImage[];
14
- };
15
- type LightboxJournalProps = {
16
- settings: LightboxJournalSettings;
17
- content?: LightboxJournalItem[];
18
- isEditor?: boolean;
19
- isEditMode?: boolean;
20
- isPreviewMode?: boolean;
21
- portalId?: string;
22
- } & CommonComponentProps;
23
- export declare const LightboxJournal: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId, metadata }: LightboxJournalProps) => import("react/jsx-runtime").JSX.Element;
24
- export type LightboxJournalSettings = {
25
- cover: string | null;
26
- coverFit: ImageRatioFit;
27
- type: 'A' | 'B';
28
- maxWidth: number;
29
- maxHeight: number;
30
- backgroundColor: string;
31
- imageGap?: number;
32
- textTransition: 'none' | 'fade';
33
- title1Width?: number;
34
- title2Width?: number;
35
- title3Width?: number;
36
- title1MarginLeft?: number;
37
- title2MarginLeft?: number;
38
- title3MarginLeft?: number;
39
- titleRowMarginBottom?: number;
40
- titleHeaderLayout?: 'desktop' | 'mobile';
41
- countCloseGap?: number;
42
- title1Color: string;
43
- title2Color: string;
44
- title3Color: string;
45
- countColor: string;
46
- title1FontFamily?: string;
47
- title1FontSettings?: {
48
- fontWeight: number;
49
- fontStyle: string;
50
- };
51
- title1FontSize?: number;
52
- title1LineHeight?: number;
53
- title1LetterSpacing?: number;
54
- title1WordSpacing?: number;
55
- title1TextAlign?: 'left' | 'center' | 'right' | 'justify';
56
- title1TextAppearance?: TextStyles['textAppearance'];
57
- title2FontFamily?: string;
58
- title2FontSettings?: {
59
- fontWeight: number;
60
- fontStyle: string;
61
- };
62
- title2FontSize?: number;
63
- title2LineHeight?: number;
64
- title2LetterSpacing?: number;
65
- title2WordSpacing?: number;
66
- title2TextAlign?: 'left' | 'center' | 'right' | 'justify';
67
- title2TextAppearance?: TextStyles['textAppearance'];
68
- title3FontFamily?: string;
69
- title3FontSettings?: {
70
- fontWeight: number;
71
- fontStyle: string;
72
- };
73
- title3FontSize?: number;
74
- title3LineHeight?: number;
75
- title3LetterSpacing?: number;
76
- title3WordSpacing?: number;
77
- title3TextAlign?: 'left' | 'center' | 'right' | 'justify';
78
- title3TextAppearance?: TextStyles['textAppearance'];
79
- countFontFamily?: string;
80
- countFontSettings?: {
81
- fontWeight: number;
82
- fontStyle: string;
83
- };
84
- countFontSize?: number;
85
- countLineHeight?: number;
86
- countLetterSpacing?: number;
87
- countWordSpacing?: number;
88
- countTextAlign?: 'left' | 'center' | 'right' | 'justify';
89
- countTextAppearance?: TextStyles['textAppearance'];
90
- contentMarginTop: number;
91
- iconMarginRight: number;
92
- closeIcon: string | null;
93
- closeIconMaxWidth: number;
94
- closeIconColor: string;
95
- closeIconHoverColor: string;
96
- };
97
- export {};
@@ -1,44 +0,0 @@
1
- import { ComponentSchemaV1 } from '../../types/SchemaV1';
2
- export declare const LightboxJournalComponent: {
3
- element: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId, metadata }: {
4
- settings: import('./LightboxJournal').LightboxJournalSettings;
5
- content?: import('./LightboxJournal').LightboxJournalItem[];
6
- isEditor?: boolean;
7
- isEditMode?: boolean;
8
- isPreviewMode?: boolean;
9
- portalId?: string;
10
- } & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
11
- id: string;
12
- name: string;
13
- category: string;
14
- version: number;
15
- defaultSize: {
16
- d: {
17
- width: number;
18
- height: number;
19
- };
20
- m: {
21
- width: number;
22
- height: number;
23
- };
24
- };
25
- preview: {
26
- type: "image";
27
- url: string;
28
- };
29
- schema: ComponentSchemaV1;
30
- sourceCode: string;
31
- assetsPaths: {
32
- content: {
33
- path: string;
34
- placeholderEnabled: boolean;
35
- }[];
36
- parameters: never[];
37
- };
38
- fontSettingsPaths: {
39
- content: never[];
40
- parameters: {
41
- path: string;
42
- }[];
43
- };
44
- };
@@ -1,16 +0,0 @@
1
- import { LightboxJournalItem, LightboxJournalSettings } from './LightboxJournal';
2
- type LightboxOverlayProps = {
3
- prefix: string;
4
- entries: LightboxJournalItem[];
5
- settings: LightboxJournalSettings;
6
- isEditor?: boolean;
7
- isEditMode?: boolean;
8
- isPreviewMode?: boolean;
9
- initialSlideIndex?: number;
10
- enableUrlSync?: boolean;
11
- journalItemId?: string | null;
12
- onBeforeClose?: () => void;
13
- onClose: () => void;
14
- };
15
- export declare const LightboxOverlay: ({ prefix: P, entries, settings, isEditor, isEditMode, isPreviewMode, initialSlideIndex, enableUrlSync, journalItemId, onBeforeClose, onClose, }: LightboxOverlayProps) => import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,85 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- import { TextStyles } from '../utils/textStylesToCss';
3
- import { LayoutItem, LayoutTab } from '../../types/SchemaV1';
4
- type JournalImage = {
5
- url: string;
6
- name?: string;
7
- objectFit?: 'cover' | 'contain';
8
- };
9
- type JournalEntry = {
10
- title1: string;
11
- title2: string;
12
- title3: string;
13
- image: JournalImage[];
14
- };
15
- type JournalSettings = {
16
- title1Color: string;
17
- title2Color: string;
18
- title3Color: string;
19
- countColor: string;
20
- } & Record<string, unknown>;
21
- export declare const STRIP_NAV_SWIPE_MIN_PX = 50;
22
- export declare const STRIP_NAV_TAP_MAX_PX = 10;
23
- export declare const findJournalUrlSlideNumber: (itemId?: string | null) => number | null;
24
- export declare const slideNumberToIndex: (slideNumber: number, slideCount: number) => number;
25
- export declare const setJournalUrlParam: (slideNumber: number, itemId?: string | null, replace?: boolean) => void;
26
- export declare const hasJournalUrlParam: (itemId?: string | null) => boolean;
27
- export declare const removeJournalUrlParam: (didPushHistory: boolean, itemId?: string | null) => void;
28
- type JournalSlide = {
29
- entry: JournalEntry;
30
- entryIndex: number;
31
- images: JournalImage[];
32
- };
33
- export declare const getGapControlSize: (gap: string) => string;
34
- export declare const getEntryImages: (entry: JournalEntry | undefined) => JournalImage[];
35
- export declare const buildJournalSlides: (entries: JournalEntry[], journalType: "A" | "B") => JournalSlide[];
36
- export declare const formatSlideCounter: (slides: JournalSlide[], activeSlideIndex: number, journalType: "A" | "B", entries: JournalEntry[]) => string;
37
- export declare const getEntryTitleKey: (entry: JournalEntry | undefined) => string;
38
- export declare const shouldShowCounter: (journalType: "A" | "B", slides: JournalSlide[], entries: JournalEntry[]) => boolean;
39
- type JournalTitleWidthKey = 'title1Width' | 'title2Width' | 'title3Width';
40
- export declare const TITLE_RESIZE_HANDLE_WIDTH = 0.004;
41
- export declare const TITLE_PADDING_HANDLE_WIDTH = 0.004;
42
- export declare const DEFAULT_JOURNAL_TITLE_WIDTHS: Record<JournalTitleWidthKey, number>;
43
- export type JournalTitleSlot = {
44
- prefix: 'title1' | 'title2' | 'title3';
45
- widthKey: JournalTitleWidthKey;
46
- marginLeftKey?: 'title2MarginLeft' | 'title3MarginLeft';
47
- className: string;
48
- style: CSSProperties;
49
- text: string;
50
- };
51
- export declare const buildJournalTitleSlots: (prefix: string, entry: JournalEntry, title1Style: CSSProperties, title2Style: CSSProperties, title3Style: CSSProperties) => JournalTitleSlot[];
52
- export declare const resolveJournalTitleWidths: (count: number, storedWidths: number[]) => number[];
53
- export declare const getEffectiveJournalTitleWidths: (count: number, storedWidths: number[]) => number[];
54
- export declare const getJournalTitleMaxWidth: (columnIndex: number, resolvedWidths: number[]) => number;
55
- export declare const getRowScopedJournalTitleWidths: (slots: JournalTitleSlot[], widthByKey: Record<JournalTitleWidthKey, number>) => {
56
- resolved: number[];
57
- effective: number[];
58
- };
59
- export declare const getJournalTitleOffsetBeforeSlot: (slots: JournalTitleSlot[], resolvedWidths: number[], marginByKey: Record<"title2MarginLeft" | "title3MarginLeft", number>, slotIndex: number) => number;
60
- export declare const getJournalTitleBoundaryOffset: (slots: JournalTitleSlot[], resolvedWidths: number[], marginByKey: Record<"title2MarginLeft" | "title3MarginLeft", number>, upToIndex: number) => number;
61
- export declare const JOURNAL_TEXT_STYLE_PREFIXES: readonly ["title1", "title2", "title3", "count"];
62
- export type JournalTextStylePrefix = typeof JOURNAL_TEXT_STYLE_PREFIXES[number];
63
- export declare const JOURNAL_GLOBAL_TEXT_STYLE_KEYS: readonly ["fontFamily", "fontSettings", "fontSize", "lineHeight", "letterSpacing", "wordSpacing", "textAlign", "textAppearance"];
64
- export type JournalGlobalTextStyleKey = typeof JOURNAL_GLOBAL_TEXT_STYLE_KEYS[number];
65
- export declare const getJournalTextStyleSettingKey: (prefix: JournalTextStylePrefix, globalKey: JournalGlobalTextStyleKey) => string;
66
- export declare const JOURNAL_TEXT_STYLE_TAB_LABELS: Record<JournalTextStylePrefix, string>;
67
- export declare const createJournalTextStyleTabContentItems: (prefix: JournalTextStylePrefix) => LayoutItem[];
68
- export declare const createJournalTextStylePanelTab: () => LayoutTab;
69
- type ResolvedJournalTextFields = {
70
- fontFamily: string;
71
- fontSettings: {
72
- fontWeight: number;
73
- fontStyle: string;
74
- };
75
- fontSize?: number;
76
- lineHeight?: number;
77
- letterSpacing: number;
78
- wordSpacing: number;
79
- textAlign: 'left' | 'center' | 'right' | 'justify';
80
- textAppearance?: TextStyles['textAppearance'];
81
- color?: string;
82
- };
83
- export declare const resolveJournalTextFields: (settings: JournalSettings, prefix: JournalTextStylePrefix) => ResolvedJournalTextFields;
84
- export declare const journalTextFieldsToCss: (prefix: JournalTextStylePrefix, fields: ResolvedJournalTextFields, isEditor?: boolean) => CSSProperties;
85
- export {};
@@ -1,12 +0,0 @@
1
- import { LightboxStripItem, LightboxStripSettings } from './LightboxStrip';
2
- type LightboxOverlayProps = {
3
- prefix: string;
4
- images: LightboxStripItem[];
5
- settings: LightboxStripSettings;
6
- isEditor?: boolean;
7
- isEditMode?: boolean;
8
- isPreviewMode?: boolean;
9
- onClose: () => void;
10
- };
11
- export declare const LightboxOverlay: ({ prefix: P, images, settings, isEditor, isEditMode, isPreviewMode, onClose, }: LightboxOverlayProps) => import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,92 +0,0 @@
1
- import { CommonComponentProps } from '../props';
2
- import { ImageRatioFit } from '../utils/imageFitStyles';
3
- import { TextStyles } from '../utils/textStylesToCss';
4
- export { createStripTextStylePanelTab, createStripTextStyleTabContentItems, extractTitlesFromLegacyText, getStripTextStyleSettingKey, resolveSharedStripTitles, STRIP_GLOBAL_TEXT_STYLE_KEYS, STRIP_TEXT_STYLE_PREFIXES, STRIP_TEXT_STYLE_TAB_LABELS, STRIP_TITLE_WIDTH_KEYS, } from './utils';
5
- export type { StripGlobalTextStyleKey, StripTextStylePrefix, StripTitleWidthKey, } from './utils';
6
- export type LightboxStripItem = {
7
- image: {
8
- url: string;
9
- name?: string;
10
- objectFit?: 'cover' | 'contain';
11
- };
12
- title1?: string;
13
- title2?: string;
14
- title3?: string;
15
- };
16
- export type SharedStripTitles = {
17
- title1: string;
18
- title2: string;
19
- title3: string;
20
- };
21
- export type LightboxStripSettings = {
22
- cover: string | null;
23
- coverFit: ImageRatioFit;
24
- backgroundColor: string;
25
- thumbnailVisibility: 'on' | 'off';
26
- thumbnailObjectFit: ImageRatioFit;
27
- thumbnailTrigger: 'click' | 'hover';
28
- thumbnailActive: 'outline' | 'color' | 'scale-up';
29
- thumbnailActiveColor: string;
30
- thumbnailGap: number;
31
- thumbnailMarginBottom?: number;
32
- imageGap?: number;
33
- title1Width: number;
34
- title2Width: number;
35
- title3Width: number;
36
- title1MarginLeft: number;
37
- title2MarginLeft: number;
38
- title3MarginLeft: number;
39
- titleRowMarginBottom?: number;
40
- titleHeaderLayout?: 'desktop' | 'mobile';
41
- title1Color: string;
42
- title2Color: string;
43
- title3Color: string;
44
- title1FontFamily?: string;
45
- title1FontSettings?: {
46
- fontWeight: number;
47
- fontStyle: string;
48
- };
49
- title1FontSize?: number;
50
- title1LineHeight?: number;
51
- title1LetterSpacing?: number;
52
- title1WordSpacing?: number;
53
- title1TextAlign?: 'left' | 'center' | 'right' | 'justify';
54
- title1TextAppearance?: TextStyles['textAppearance'];
55
- title2FontFamily?: string;
56
- title2FontSettings?: {
57
- fontWeight: number;
58
- fontStyle: string;
59
- };
60
- title2FontSize?: number;
61
- title2LineHeight?: number;
62
- title2LetterSpacing?: number;
63
- title2WordSpacing?: number;
64
- title2TextAlign?: 'left' | 'center' | 'right' | 'justify';
65
- title2TextAppearance?: TextStyles['textAppearance'];
66
- title3FontFamily?: string;
67
- title3FontSettings?: {
68
- fontWeight: number;
69
- fontStyle: string;
70
- };
71
- title3FontSize?: number;
72
- title3LineHeight?: number;
73
- title3LetterSpacing?: number;
74
- title3WordSpacing?: number;
75
- title3TextAlign?: 'left' | 'center' | 'right' | 'justify';
76
- title3TextAppearance?: TextStyles['textAppearance'];
77
- contentMarginTop: number;
78
- iconMarginLeft: number;
79
- closeIcon: string | null;
80
- closeIconMaxWidth: number;
81
- closeIconColor: string;
82
- closeIconHoverColor: string;
83
- };
84
- type LightboxStripProps = {
85
- settings: LightboxStripSettings;
86
- content?: LightboxStripItem[];
87
- isEditor?: boolean;
88
- isEditMode?: boolean;
89
- isPreviewMode?: boolean;
90
- portalId?: string;
91
- } & CommonComponentProps;
92
- export declare const LightboxStrip: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: LightboxStripProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,44 +0,0 @@
1
- import { ComponentSchemaV1 } from '../../types/SchemaV1';
2
- export declare const LightboxStripComponent: {
3
- element: ({ settings, content, isEditor, isEditMode, isPreviewMode, portalId }: {
4
- settings: import('./LightboxStrip').LightboxStripSettings;
5
- content?: import('./LightboxStrip').LightboxStripItem[];
6
- isEditor?: boolean;
7
- isEditMode?: boolean;
8
- isPreviewMode?: boolean;
9
- portalId?: string;
10
- } & import('../props').CommonComponentProps) => import("react/jsx-runtime").JSX.Element;
11
- id: string;
12
- name: string;
13
- category: string;
14
- version: number;
15
- defaultSize: {
16
- d: {
17
- width: number;
18
- height: number;
19
- };
20
- m: {
21
- width: number;
22
- height: number;
23
- };
24
- };
25
- preview: {
26
- type: "image";
27
- url: string;
28
- };
29
- schema: ComponentSchemaV1;
30
- sourceCode: string;
31
- assetsPaths: {
32
- content: {
33
- path: string;
34
- placeholderEnabled: boolean;
35
- }[];
36
- parameters: never[];
37
- };
38
- fontSettingsPaths: {
39
- content: never[];
40
- parameters: {
41
- path: string;
42
- }[];
43
- };
44
- };
@@ -1,72 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- import { TextStyles } from '../utils/textStylesToCss';
3
- import { LayoutItem, LayoutTab } from '../../types/SchemaV1';
4
- import { LightboxStripItem, LightboxStripSettings, SharedStripTitles } from './LightboxStrip';
5
- export declare const LIGHTBOX_ANIM_MS = 300;
6
- export declare const SNAP_SCROLL_MIN_MS = 900;
7
- export declare const SNAP_SCROLL_MAX_MS = 1500;
8
- export declare const SNAP_SCROLL_EASING = "cubic-bezier(0.16, 1, 0.3, 1)";
9
- export declare const CONTROLS_IDLE_MS = 3000;
10
- export declare const THUMB_MAX_SIZE_PX = 50;
11
- export declare const WHEEL_SPEED = 2;
12
- export declare const WHEEL_LINE_HEIGHT_PX = 16;
13
- export declare const WHEEL_LERP = 0.05;
14
- export declare const MOUSE_DRAG_THRESHOLD_PX = 1;
15
- export declare const DRAG_SNAP_RATIO = 0.5;
16
- export declare const GAP_LABEL_AREA_PX = 20;
17
- export declare const TITLE_RESIZE_HANDLE_WIDTH = 0.004;
18
- export declare const STRIP_TEXT_STYLE_PREFIXES: readonly ["title1", "title2", "title3"];
19
- export type StripTextStylePrefix = typeof STRIP_TEXT_STYLE_PREFIXES[number];
20
- export declare const STRIP_GLOBAL_TEXT_STYLE_KEYS: readonly ["fontFamily", "fontSettings", "fontSize", "lineHeight", "letterSpacing", "wordSpacing", "textAlign", "textAppearance"];
21
- export type StripGlobalTextStyleKey = typeof STRIP_GLOBAL_TEXT_STYLE_KEYS[number];
22
- export declare const STRIP_TEXT_STYLE_TAB_LABELS: Record<StripTextStylePrefix, string>;
23
- export declare const STRIP_TITLE_WIDTH_KEYS: readonly ["title1Width", "title2Width", "title3Width"];
24
- export type StripTitleWidthKey = typeof STRIP_TITLE_WIDTH_KEYS[number];
25
- type LightboxStripLegacyItem = LightboxStripItem & {
26
- text?: Array<{
27
- type?: string;
28
- children?: Array<{
29
- text?: string;
30
- }>;
31
- }>;
32
- };
33
- type ResolvedStripTextFields = {
34
- fontFamily: string;
35
- fontSettings: {
36
- fontWeight: number;
37
- fontStyle: string;
38
- };
39
- fontSize?: number;
40
- lineHeight?: number;
41
- letterSpacing: number;
42
- wordSpacing: number;
43
- textAlign: 'left' | 'center' | 'right' | 'justify';
44
- textAppearance?: TextStyles['textAppearance'];
45
- color?: string;
46
- };
47
- export type StripTitleSlot = {
48
- prefix: StripTextStylePrefix;
49
- widthKey: StripTitleWidthKey;
50
- marginLeftKey?: 'title1MarginLeft' | 'title2MarginLeft' | 'title3MarginLeft';
51
- className: string;
52
- style: CSSProperties;
53
- text: string;
54
- };
55
- export declare const getGapControlSize: (gap: string) => string;
56
- export declare const extractTitlesFromLegacyText: (text: LightboxStripLegacyItem["text"]) => Partial<SharedStripTitles>;
57
- export declare const resolveSharedStripTitles: (items: LightboxStripLegacyItem[]) => SharedStripTitles;
58
- export declare const getStripTextStyleSettingKey: (prefix: StripTextStylePrefix, globalKey: StripGlobalTextStyleKey) => string;
59
- export declare const createStripTextStyleTabContentItems: (prefix: StripTextStylePrefix) => LayoutItem[];
60
- export declare const createStripTextStylePanelTab: () => LayoutTab;
61
- export declare const resolveStripTitleWidths: (count: number, storedWidths: number[]) => number[];
62
- export declare const getEffectiveStripTitleWidths: (count: number, storedWidths: number[]) => number[];
63
- export declare const getStripTitleMaxWidth: (columnIndex: number, resolvedWidths: number[]) => number;
64
- export declare const getRowScopedStripTitleWidths: (slots: StripTitleSlot[], widthByKey: Record<StripTitleWidthKey, number>) => {
65
- resolved: number[];
66
- effective: number[];
67
- };
68
- export declare const buildStripTitleSlots: (prefix: string, title1: string, title2: string, title3: string, title1Style: CSSProperties, title2Style: CSSProperties, title3Style: CSSProperties) => StripTitleSlot[];
69
- export declare const resolveStripTextFields: (settings: LightboxStripSettings, prefix: StripTextStylePrefix) => ResolvedStripTextFields;
70
- export declare const getStripTitleOffsetBeforeSlot: (slots: StripTitleSlot[], resolvedWidths: number[], marginByKey: Record<"title1MarginLeft" | "title2MarginLeft" | "title3MarginLeft", number>, slotIndex: number) => number;
71
- export declare const stripTextFieldsToCss: (prefix: StripTextStylePrefix, fields: ReturnType<typeof resolveStripTextFields>, isEditor?: boolean) => CSSProperties;
72
- export {};
@@ -1,8 +0,0 @@
1
- type AnimateStripScrollOptions = {
2
- duration: number;
3
- easing: string;
4
- onComplete?: () => void;
5
- };
6
- export declare const getDistanceScaledDuration: (distance: number, minMs: number, maxMs: number, referenceDistance: number) => number;
7
- export declare const animateStripScroll: (strip: HTMLElement, track: HTMLElement, targetLeft: number, { duration, easing, onComplete }: AnimateStripScrollOptions) => (() => void);
8
- export {};
@@ -1,7 +0,0 @@
1
- export type ImageRatioFit = {
2
- display: 'fit' | 'cover';
3
- ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
4
- reversed: boolean;
5
- };
6
- export declare const isImageRatioCover: (fit: ImageRatioFit) => boolean;
7
- export declare const getAspectRatio: (fit: ImageRatioFit) => string;
@@ -1 +0,0 @@
1
- export declare const useLightboxScrollLock: () => void;