@lls/vivi 24.37.0-e4928d15 → 24.37.0-e9eac8f6
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/lib/assets/vivi.css +222 -222
- package/lib/index.js +237 -237
- package/package.json +6 -6
- package/lib/builttypes/vivi/src/components/Alert.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/Audio.d.ts +0 -5
- package/lib/builttypes/vivi/src/components/HighlightedArea.d.ts +0 -8
- package/lib/builttypes/vivi/src/components/Rive.d.ts +0 -11
- package/lib/builttypes/vivi/src/components/Video.d.ts +0 -5
- package/lib/builttypes/vivi/src/components/ViewImage.d.ts +0 -9
- package/lib/builttypes/vivi/src/components/core/Document.d.ts +0 -10
- package/lib/builttypes/vivi/src/components/core/DocumentHtml.d.ts +0 -11
- package/lib/builttypes/vivi/src/components/core/DocumentToolbar.d.ts +0 -10
- package/lib/builttypes/vivi/src/components/core/ErrorBoundary.d.ts +0 -24
- package/lib/builttypes/vivi/src/components/core/editor/CodemirrorEditor.d.ts +0 -3
- package/lib/builttypes/vivi/src/components/core/editor/EditViewerMd.d.ts +0 -20
- package/lib/builttypes/vivi/src/components/core/editor/Editor.d.ts +0 -14
- package/lib/builttypes/vivi/src/components/core/editor/EditorHeaderModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorListModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorMathsModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorOrderedListModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorQuestionModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorSsr.d.ts +0 -2
- package/lib/builttypes/vivi/src/components/core/editor/EditorStampModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorTableModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorTitleModal.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorToolbar.d.ts +0 -4
- package/lib/builttypes/vivi/src/components/core/editor/EditorView.d.ts +0 -19
- package/lib/builttypes/vivi/src/components/core/editor/MetadataEditor.d.ts +0 -13
- package/lib/builttypes/vivi/src/components/core/viewer/ViewerMd.d.ts +0 -37
- package/lib/builttypes/vivi/src/components/lazy/CodemirrorEditor.browser.d.ts +0 -12
- package/lib/builttypes/vivi/src/components/lazy/index.editor.d.ts +0 -16
- package/lib/builttypes/vivi/src/components/primarygrid/AudioWord.d.ts +0 -8
- package/lib/builttypes/vivi/src/components/primarygrid/Correction.d.ts +0 -9
- package/lib/builttypes/vivi/src/components/primarygrid/DefinitionWord.d.ts +0 -10
- package/lib/builttypes/vivi/src/components/primarygrid/EditGrid.d.ts +0 -6
- package/lib/builttypes/vivi/src/components/primarygrid/EditZoneModal.d.ts +0 -19
- package/lib/builttypes/vivi/src/components/primarygrid/FullscreenDocument.d.ts +0 -8
- package/lib/builttypes/vivi/src/components/primarygrid/Grid.d.ts +0 -6
- package/lib/builttypes/vivi/src/components/primarygrid/PicWord.d.ts +0 -10
- package/lib/builttypes/vivi/src/components/primarygrid/SubZone.d.ts +0 -10
- package/lib/builttypes/vivi/src/components/primarygrid/ViewGrid.d.ts +0 -6
- package/lib/builttypes/vivi/src/components/primarygrid/ZoneCoordinates.d.ts +0 -8
- package/lib/builttypes/vivi/src/components/primarygrid/ZoneMaker.d.ts +0 -16
- package/lib/builttypes/vivi/src/components/primarygrid/ZoomedPicture.d.ts +0 -12
- package/lib/builttypes/vivi/src/components/primarygrid/sortable/SortableGrid.d.ts +0 -10
- package/lib/builttypes/vivi/src/components/primarygrid/sortable/SortableItem.d.ts +0 -7
- package/lib/builttypes/vivi/src/config/development.d.ts +0 -6
- package/lib/builttypes/vivi/src/config/index.d.ts +0 -6
- package/lib/builttypes/vivi/src/config/preproduction.d.ts +0 -6
- package/lib/builttypes/vivi/src/config/production.d.ts +0 -6
- package/lib/builttypes/vivi/src/config/test.d.ts +0 -6
- package/lib/builttypes/vivi/src/constants/config.d.ts +0 -1
- package/lib/builttypes/vivi/src/constants/grid.d.ts +0 -3
- package/lib/builttypes/vivi/src/constants/index.d.ts +0 -5
- package/lib/builttypes/vivi/src/constants/template.d.ts +0 -4
- package/lib/builttypes/vivi/src/constants/zoneElements.d.ts +0 -8
- package/lib/builttypes/vivi/src/constants/zoneMaker.d.ts +0 -35
- package/lib/builttypes/vivi/src/hooks/useClientMounted.d.ts +0 -2
- package/lib/builttypes/vivi/src/hooks/useDragAndResize.d.ts +0 -21
- package/lib/builttypes/vivi/src/hooks/useEditor.d.ts +0 -13
- package/lib/builttypes/vivi/src/hooks/usePictureSource.d.ts +0 -13
- package/lib/builttypes/vivi/src/hooks/useScroll.d.ts +0 -7
- package/lib/builttypes/vivi/src/index.d.ts +0 -2
- package/lib/builttypes/vivi/src/index.editor.d.ts +0 -3
- package/lib/builttypes/vivi/src/index.viewer.d.ts +0 -4
- package/lib/builttypes/vivi/src/store/documentPropsSlice.d.ts +0 -16
- package/lib/builttypes/vivi/src/store/index.d.ts +0 -15
- package/lib/builttypes/vivi/src/store/mdRendererPropsSlice.d.ts +0 -48
- package/lib/builttypes/vivi/src/utils/css-bare.d.mts +0 -2
- package/lib/builttypes/vivi/src/utils/dom.d.ts +0 -6
- package/lib/builttypes/vivi/src/utils/layoutTemplate.d.ts +0 -2
- package/lib/builttypes/vivi/src/utils/lazy.d.ts +0 -9
- package/lib/builttypes/vivi/src/utils/memo.d.ts +0 -14
- package/lib/builttypes/vivi/src/utils/mode.d.ts +0 -3
- package/lib/builttypes/vivi/src/utils/string.d.ts +0 -5
- package/lib/builttypes/vivi/src/utils/table.d.ts +0 -4
- package/lib/builttypes/vivi/src/utils/template.d.ts +0 -61
- package/lib/builttypes/vivi/src/utils/url.d.ts +0 -1
- package/lib/builttypes/vivi/src/utils/zoneMaker.d.ts +0 -45
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const HANDLES: readonly [{
|
|
2
|
-
readonly id: "NW";
|
|
3
|
-
readonly left: 0;
|
|
4
|
-
readonly top: 0;
|
|
5
|
-
}, {
|
|
6
|
-
readonly id: "N";
|
|
7
|
-
readonly left: 50;
|
|
8
|
-
readonly top: 0;
|
|
9
|
-
}, {
|
|
10
|
-
readonly id: "NE";
|
|
11
|
-
readonly left: 100;
|
|
12
|
-
readonly top: 0;
|
|
13
|
-
}, {
|
|
14
|
-
readonly id: "E";
|
|
15
|
-
readonly left: 100;
|
|
16
|
-
readonly top: 50;
|
|
17
|
-
}, {
|
|
18
|
-
readonly id: "SE";
|
|
19
|
-
readonly left: 100;
|
|
20
|
-
readonly top: 100;
|
|
21
|
-
}, {
|
|
22
|
-
readonly id: "S";
|
|
23
|
-
readonly left: 50;
|
|
24
|
-
readonly top: 100;
|
|
25
|
-
}, {
|
|
26
|
-
readonly id: "SW";
|
|
27
|
-
readonly left: 0;
|
|
28
|
-
readonly top: 100;
|
|
29
|
-
}, {
|
|
30
|
-
readonly id: "W";
|
|
31
|
-
readonly left: 0;
|
|
32
|
-
readonly top: 50;
|
|
33
|
-
}];
|
|
34
|
-
export declare const MAGNET_ATTRACTION_ZONE = 5;
|
|
35
|
-
export type HandleID = (typeof HANDLES)[number]['id'];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
type UseDragAndResizeProps = {
|
|
2
|
-
defaultPositions: {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
};
|
|
6
|
-
defaultSize?: {
|
|
7
|
-
width?: number;
|
|
8
|
-
height?: number;
|
|
9
|
-
};
|
|
10
|
-
onResize?: (size: {
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
}) => void;
|
|
14
|
-
canResize?: boolean;
|
|
15
|
-
};
|
|
16
|
-
declare const useDragAndResize: ({ defaultPositions, defaultSize, onResize, canResize }: UseDragAndResizeProps) => {
|
|
17
|
-
launchTranslate: () => void;
|
|
18
|
-
handlersElement: import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
rndRef: React.RefObject<HTMLDivElement>;
|
|
20
|
-
};
|
|
21
|
-
export default useDragAndResize;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PrimaryPage } from '@lls/store';
|
|
2
|
-
declare const useEditor: ({ id }: {
|
|
3
|
-
id: PrimaryPage["id"] | undefined;
|
|
4
|
-
}) => {
|
|
5
|
-
positions: {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
};
|
|
9
|
-
path: string | undefined;
|
|
10
|
-
open: (editPath: string, e?: React.MouseEvent | React.TouchEvent) => void;
|
|
11
|
-
close: () => void;
|
|
12
|
-
};
|
|
13
|
-
export default useEditor;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PrimaryPage } from '@lls/store';
|
|
2
|
-
import type { ReactSetState } from '@lls/typings/react';
|
|
3
|
-
import type { Mode } from '#vivi/types/common';
|
|
4
|
-
type usePictureSourceProps = {
|
|
5
|
-
template: PrimaryPage | undefined;
|
|
6
|
-
mode?: Mode;
|
|
7
|
-
};
|
|
8
|
-
declare const usePictureSource: ({ template }: usePictureSourceProps) => {
|
|
9
|
-
pictureSource: string | undefined;
|
|
10
|
-
pictureRatio: number;
|
|
11
|
-
setPictureRatio: ReactSetState<number>;
|
|
12
|
-
};
|
|
13
|
-
export default usePictureSource;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import ViewerMd from '#vivi/components/core/viewer/ViewerMd';
|
|
2
|
-
type ViewerProps = Omit<Parameters<typeof ViewerMd>[0], 'pictureSource' | 'pictureRatio' | 'setPictureRatio' | 'showZonesCoordinates' | 'onChange' | 'addDocument' | 'updateLayouts' | 'updateChildren' | 'deleteDocument' | 'openEditor' | 'openMetadataEditor'>;
|
|
3
|
-
declare const Viewer: (props: ViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export default Viewer;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { PrimaryDoc, PrimaryPage } from '@lls/store';
|
|
2
|
-
import type { TODO } from '@lls/typings/utils';
|
|
3
|
-
import { type SpecificPropsType } from '#vivi/utils/memo';
|
|
4
|
-
export type DocumentPropsSliceType = {
|
|
5
|
-
data: {
|
|
6
|
-
[x: string]: SpecificPropsType;
|
|
7
|
-
};
|
|
8
|
-
read: <T extends keyof SpecificPropsType>(iState: DocumentPropsSliceType, docJson: PrimaryDoc, pickProps: Array<T>) => Pick<SpecificPropsType, T>;
|
|
9
|
-
reduce: (state: DocumentPropsSliceType, input?: {
|
|
10
|
-
template?: PrimaryPage;
|
|
11
|
-
mdRendererProps?: TODO;
|
|
12
|
-
toBecomeSpecificProps?: TODO;
|
|
13
|
-
}) => DocumentPropsSliceType;
|
|
14
|
-
};
|
|
15
|
-
declare const documentPropsSlice: DocumentPropsSliceType;
|
|
16
|
-
export default documentPropsSlice;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PrimaryDoc } from '@lls/store';
|
|
2
|
-
import { type DocumentPropsSliceType } from './documentPropsSlice';
|
|
3
|
-
import { type MdRendererPropsSliceType } from './mdRendererPropsSlice';
|
|
4
|
-
interface Store {
|
|
5
|
-
mdRendererProps: MdRendererPropsSliceType;
|
|
6
|
-
documentProps: DocumentPropsSliceType;
|
|
7
|
-
update: ({ mdRendererProps, documentProps }: {
|
|
8
|
-
mdRendererProps: Parameters<MdRendererPropsSliceType['reduce']>[1];
|
|
9
|
-
documentProps: Parameters<DocumentPropsSliceType['reduce']>[1];
|
|
10
|
-
}) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const useWriteStore: ({ mdRendererProps, documentProps }: Parameters<Store["update"]>[0]) => void;
|
|
13
|
-
export declare const useReadDocumentProps: (docJson: PrimaryDoc, props: Parameters<DocumentPropsSliceType["read"]>[2]) => Pick<import("#vivi/utils/memo").SpecificPropsType, keyof import("#vivi/utils/memo").SpecificPropsType>;
|
|
14
|
-
export declare const useReadMdRendererProps: (pickProps: Parameters<MdRendererPropsSliceType["read"]>[1]) => Pick<import("./mdRendererPropsSlice").MdRendererDataType, keyof import("./mdRendererPropsSlice").MdRendererDataType>;
|
|
15
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { Book, PrimaryDoc, PrimaryPage, Word } from '@lls/store';
|
|
2
|
-
import type { ReactSetState } from '@lls/typings/react';
|
|
3
|
-
import type { Mode, UiState } from '#vivi/types/common';
|
|
4
|
-
export type MdRendererDataType = {
|
|
5
|
-
isOffline?: boolean;
|
|
6
|
-
isTouchable?: boolean;
|
|
7
|
-
zoneVisibilityCounter?: number;
|
|
8
|
-
uiState?: UiState;
|
|
9
|
-
wasSsrRendered?: boolean;
|
|
10
|
-
showZonesCoordinates?: boolean;
|
|
11
|
-
words?: Word[];
|
|
12
|
-
onDocChange: (nextDocJson: PrimaryDoc) => void;
|
|
13
|
-
layouts?: PrimaryPage['layouts'];
|
|
14
|
-
template?: PrimaryPage;
|
|
15
|
-
mode: Mode;
|
|
16
|
-
pageId?: PrimaryPage['id'];
|
|
17
|
-
numPage: PrimaryPage['page'];
|
|
18
|
-
nbPages: PrimaryPage['nbPages'];
|
|
19
|
-
bookDisplayTitle: Book['displayTitle'];
|
|
20
|
-
fullscreenDocUuid: string | null;
|
|
21
|
-
addDocument: (coord: {
|
|
22
|
-
x: number;
|
|
23
|
-
y: number;
|
|
24
|
-
w: number;
|
|
25
|
-
h: number;
|
|
26
|
-
}) => void;
|
|
27
|
-
addClipboardDocuments: () => void;
|
|
28
|
-
updateLayouts: (layouts: PrimaryPage['layouts']) => void;
|
|
29
|
-
updateChildren: (children: PrimaryPage['children']) => void;
|
|
30
|
-
onChange: ReactSetState<PrimaryPage>;
|
|
31
|
-
deleteDocument: (uuid: string) => void;
|
|
32
|
-
setFullscreenDocUuid: (uuid: string | null) => void;
|
|
33
|
-
setUiState: ReactSetState<UiState>;
|
|
34
|
-
setPictureRatio: ReactSetState<number>;
|
|
35
|
-
pictureSource: string | undefined;
|
|
36
|
-
pictureRatio: number;
|
|
37
|
-
};
|
|
38
|
-
export type MdRendererPropsSliceType = {
|
|
39
|
-
data: MdRendererDataType;
|
|
40
|
-
read: <T extends keyof MdRendererDataType>(iState: MdRendererPropsSliceType, pickProps: Array<T>) => Pick<MdRendererDataType, T>;
|
|
41
|
-
reduce: (state: MdRendererPropsSliceType, input: MdRendererDataType) => MdRendererPropsSliceType;
|
|
42
|
-
};
|
|
43
|
-
declare const _default: {
|
|
44
|
-
data: MdRendererDataType;
|
|
45
|
-
reduce: (state: MdRendererPropsSliceType, input: MdRendererDataType) => MdRendererPropsSliceType;
|
|
46
|
-
read: <T extends keyof MdRendererDataType>(iState: MdRendererPropsSliceType, pickProps: Array<T>) => Pick<MdRendererDataType, T>;
|
|
47
|
-
};
|
|
48
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { PrimaryDoc, PrimaryPage } from '@lls/store';
|
|
2
|
-
import type { TODO } from '@lls/typings/utils';
|
|
3
|
-
export declare const shallowExcept: <SliceDataType extends {}>(deepEqualProperties: [keyof SliceDataType]) => (old: SliceDataType, next: SliceDataType) => boolean;
|
|
4
|
-
export type SpecificPropsType = {
|
|
5
|
-
docTitle: string | undefined;
|
|
6
|
-
path: [] | Array<string>;
|
|
7
|
-
};
|
|
8
|
-
export declare const makeGetSpecificProps: ({ docJson: rootDocJson, toBecomeSpecificProps: { keepMountedUuids } }: {
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
docJson: PrimaryPage;
|
|
11
|
-
}) => (docJson: PrimaryDoc) => SpecificPropsType;
|
|
12
|
-
export declare const shouldReturnCurrent: (old: TODO, next: TODO) => boolean;
|
|
13
|
-
export declare const areDocumentHtmlPropsEqual: (old?: {}, next?: {}) => boolean;
|
|
14
|
-
export declare const areToolbarPropsEqual: (old?: {}, next?: {}) => boolean;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash/fp';
|
|
2
|
-
export declare const escapeRegexChars: (pattern: string) => string;
|
|
3
|
-
export declare const removeTrailingNewLines: _.LodashReplace1x3;
|
|
4
|
-
export declare const escapeTags: (content: string) => string;
|
|
5
|
-
export declare const escapeTagContent: (tagName: string, str: string) => string;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { PrimaryDoc, PrimaryLayoutItem, PrimaryPage, PrimaryZoneElement, PrimaryZoneElementTypeCategory, Rect } from '@lls/store';
|
|
2
|
-
export declare const getDocumentByUuid: (uuid: PrimaryDoc["uuid"], template: PrimaryPage) => PrimaryPage;
|
|
3
|
-
export declare const getDepth: (path: string[]) => number;
|
|
4
|
-
export declare const parseErrorsInContentMd: (contentMd: string | undefined, sanitizeErrorFn?: (e: HTMLCollectionOf<Element>) => string | undefined) => string | undefined;
|
|
5
|
-
export declare const getDocumentUniqueId: (doc?: PrimaryPage | PrimaryDoc) => string | number;
|
|
6
|
-
export declare const getMissingUuid: (template?: PrimaryPage) => PrimaryDoc | undefined;
|
|
7
|
-
export declare const getMissingId: (template?: PrimaryPage) => PrimaryDoc | undefined;
|
|
8
|
-
export declare const updateTemplate: (template: PrimaryPage, doc?: PrimaryDoc) => PrimaryPage;
|
|
9
|
-
export declare const addDocumentToTemplate: (template: PrimaryPage, partialDoc: Omit<PrimaryLayoutItem, "id">) => PrimaryPage;
|
|
10
|
-
export declare const deleteDocumentFromTemplate: (template: PrimaryPage, docUuid: string) => PrimaryPage;
|
|
11
|
-
export declare const updateLayoutItemFromTemplate: ({ template, newLayoutItem }: {
|
|
12
|
-
template: PrimaryPage;
|
|
13
|
-
newLayoutItem: PrimaryLayoutItem;
|
|
14
|
-
}) => PrimaryPage;
|
|
15
|
-
export declare const addZoneElementToTemplate: ({ template, uuid, type, newZoneElement }: {
|
|
16
|
-
template: PrimaryPage;
|
|
17
|
-
uuid: string;
|
|
18
|
-
type: PrimaryZoneElementTypeCategory;
|
|
19
|
-
newZoneElement: PrimaryZoneElement;
|
|
20
|
-
}) => PrimaryPage;
|
|
21
|
-
export declare const updateZoneElementFromTemplate: ({ template, uuid, type, newZoneElement }: {
|
|
22
|
-
template: PrimaryPage;
|
|
23
|
-
uuid: string;
|
|
24
|
-
type: PrimaryZoneElementTypeCategory;
|
|
25
|
-
newZoneElement: PrimaryZoneElement;
|
|
26
|
-
}) => PrimaryPage;
|
|
27
|
-
export declare const rotateDocFromTemplate: ({ template, uuid, rotation }: {
|
|
28
|
-
template: PrimaryPage;
|
|
29
|
-
uuid: string;
|
|
30
|
-
rotation: number;
|
|
31
|
-
}) => PrimaryPage;
|
|
32
|
-
export declare const deleteZoneElementFromTemplate: ({ template, uuid, type, zoneElementId }: {
|
|
33
|
-
template: PrimaryPage;
|
|
34
|
-
uuid: string;
|
|
35
|
-
type: PrimaryZoneElementTypeCategory;
|
|
36
|
-
zoneElementId: string;
|
|
37
|
-
}) => PrimaryPage;
|
|
38
|
-
export declare const addPictureToTemplate: (template: PrimaryPage, picture: string) => PrimaryPage;
|
|
39
|
-
export type GridItemElement<T extends PrimaryZoneElement = PrimaryZoneElement> = {
|
|
40
|
-
zoneElement: T;
|
|
41
|
-
pictureSize: string;
|
|
42
|
-
pictureRatio: number;
|
|
43
|
-
pictureAbsolutePosition: Rect;
|
|
44
|
-
rotation: number;
|
|
45
|
-
elementRect: Rect;
|
|
46
|
-
};
|
|
47
|
-
export type GridItem = {
|
|
48
|
-
pictureSize: string;
|
|
49
|
-
pictureRatio: number;
|
|
50
|
-
pictureAbsolutePosition: Rect;
|
|
51
|
-
rotation: number;
|
|
52
|
-
elements: GridItemElement[];
|
|
53
|
-
};
|
|
54
|
-
export declare const getGridItem: (template: PrimaryPage | undefined, originalPictureRratio: number) => Map<string, GridItem>;
|
|
55
|
-
export declare const validatePrimaryLayoutItemFormat: (doc: Omit<PrimaryLayoutItem, "id">) => boolean;
|
|
56
|
-
export declare const getGridElementStyle: (gridItemElement: GridItemElement, gridItem: GridItem) => {
|
|
57
|
-
'--v-grid-zone-element-picture-ratio': number;
|
|
58
|
-
'--v-grid-zone-element-picture-size': string;
|
|
59
|
-
'--v-grid-zone-element-picture-left': string;
|
|
60
|
-
'--v-grid-zone-element-picture-top': string;
|
|
61
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const replaceByPlaceholder: (url: string) => string;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { PrimaryLayoutItem, PrimaryZone, PrimaryZoneElement, Word } from '@lls/store';
|
|
2
|
-
import { type HandleID } from '#vivi/constants/zoneMaker';
|
|
3
|
-
type MagnetsType = {
|
|
4
|
-
x: number[];
|
|
5
|
-
y: number[];
|
|
6
|
-
};
|
|
7
|
-
type Point = {
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
export declare const roundAndBound: (val: number, min?: number, max?: number) => number;
|
|
12
|
-
export declare const getMagnets: ({ containerRect, zones, currentZoneId, rotation }: {
|
|
13
|
-
containerRect: DOMRect;
|
|
14
|
-
zones: PrimaryZone[];
|
|
15
|
-
currentZoneId: string;
|
|
16
|
-
rotation?: number;
|
|
17
|
-
}) => MagnetsType;
|
|
18
|
-
export declare const dragZone: <T extends PrimaryZone>({ zone, magnets, startPosition, cursorPosition: iCursorPosition, containerRect: iContainerRect, rotation }: {
|
|
19
|
-
zone: T;
|
|
20
|
-
magnets: MagnetsType;
|
|
21
|
-
startPosition: Point;
|
|
22
|
-
cursorPosition: Point;
|
|
23
|
-
containerRect: Pick<DOMRect, "width" | "height" | "x" | "y">;
|
|
24
|
-
rotation?: number;
|
|
25
|
-
}) => T;
|
|
26
|
-
export declare const resizeZone: <T extends PrimaryZone>({ zone, handleId: iHandleId, magnets, rotation, cursorPosition: iCursorPosition, containerRect: iContainerRect }: {
|
|
27
|
-
zone: T;
|
|
28
|
-
handleId?: HandleID;
|
|
29
|
-
magnets: MagnetsType;
|
|
30
|
-
cursorPosition: Point;
|
|
31
|
-
containerRect: Pick<DOMRect, "width" | "height" | "x" | "y">;
|
|
32
|
-
rotation?: number;
|
|
33
|
-
}) => T;
|
|
34
|
-
export declare const getZoneElementColor: (zone: PrimaryZoneElement) => "black" | "lightgray" | "var(--primary-40-color)" | "var(--secondary-40-color)" | "var(--turquoise-40-color)" | "var(--purple-40-color)" | "var(--pk-pink-30-color)";
|
|
35
|
-
export declare const addPixelToPercent: ({ itemSize, zonePosition, pixelToAdd }: {
|
|
36
|
-
itemSize: number;
|
|
37
|
-
zonePosition: number;
|
|
38
|
-
pixelToAdd: number;
|
|
39
|
-
}) => number;
|
|
40
|
-
export declare const duplicateZone: (zone: PrimaryZoneElement, layoutItem: PrimaryLayoutItem) => PrimaryZoneElement;
|
|
41
|
-
export declare const setWordsList: (words?: Word[]) => {
|
|
42
|
-
value: number;
|
|
43
|
-
label: string;
|
|
44
|
-
}[];
|
|
45
|
-
export {};
|