polotno 3.19.0 → 3.20.0
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/LICENSE.md +8 -2
- package/THIRD_PARTY_NOTICES.md +2871 -0
- package/blueprint/canvas/context-menu/context-menu.js +1 -1
- package/blueprint/canvas/page-controls.d.ts +3 -3
- package/blueprint/pages-timeline/pages-timeline.js +2 -2
- package/blueprint/pages-timeline/play-button.js +2 -2
- package/blueprint/side-panel/animations-panel.d.ts +1 -1
- package/blueprint/side-panel/draw-panel.js +2 -2
- package/blueprint/side-panel/effect-card.js +3 -3
- package/blueprint/side-panel/effects-panel.d.ts +1 -1
- package/blueprint/side-panel/effects-panel.js +1 -1
- package/blueprint/side-panel/elements-panel.d.ts +1 -1
- package/blueprint/side-panel/select-video.d.ts +19 -19
- package/blueprint/side-panel/videos-grid.d.ts +4 -4
- package/blueprint/toolbar/animations-picker.d.ts +1 -1
- package/blueprint/toolbar/element-container.d.ts +1 -1
- package/blueprint/toolbar/figure-toolbar.js +1 -1
- package/blueprint/toolbar/filters-picker.d.ts +1 -1
- package/blueprint/toolbar/filters-picker.js +1 -1
- package/blueprint/toolbar/group-button.js +1 -1
- package/blueprint/toolbar/image-remove-background-button.js +1 -1
- package/blueprint/toolbar/image-toolbar.js +1 -1
- package/blueprint/toolbar/line-toolbar.js +1 -1
- package/blueprint/toolbar/page-toolbar.d.ts +1 -1
- package/blueprint/toolbar/position-picker.js +1 -1
- package/blueprint/toolbar/sketch.d.ts +5 -5
- package/blueprint/toolbar/svg-toolbar.js +1 -1
- package/blueprint/toolbar/table-toolbar.js +1 -1
- package/blueprint/toolbar/text-ai-write.js +1 -1
- package/blueprint/toolbar/text-toolbar.d.ts +1 -1
- package/blueprint.polotno.css +164 -153
- package/canvas/apply-filters.d.ts +2 -6
- package/canvas/apply-filters.js +1 -1
- package/canvas/context-menu/context-menu.js +1 -1
- package/canvas/crop-overlay.d.ts +1 -1
- package/canvas/crop-overlay.js +1 -1
- package/canvas/downscale.d.ts +1 -24
- package/canvas/downscale.js +1 -1
- package/canvas/element.d.ts +3 -1
- package/canvas/element.js +1 -1
- package/canvas/fade-overlay.js +1 -1
- package/canvas/figure-element.js +1 -1
- package/canvas/gif-element.d.ts +32 -0
- package/canvas/gif-element.js +1 -1
- package/canvas/hotkeys.d.ts +1 -1
- package/canvas/hotkeys.js +1 -1
- package/canvas/html-element.js +1 -1
- package/canvas/image-element.d.ts +4 -48
- package/canvas/image-element.js +1 -1
- package/canvas/image-tool-controls.js +1 -1
- package/canvas/line-element.js +1 -1
- package/canvas/lottie-element.d.ts +11 -0
- package/canvas/lottie-element.js +1 -0
- package/canvas/lottie-player.d.ts +2 -0
- package/canvas/lottie-player.js +1 -0
- package/canvas/lottie-player.wasm.d.ts +1 -0
- package/canvas/lottie-player.wasm.js +1 -0
- package/canvas/media-placeholders.d.ts +23 -0
- package/canvas/media-placeholders.js +1 -0
- package/canvas/page-controls.d.ts +3 -3
- package/canvas/page.js +1 -1
- package/canvas/quill-font-formats.d.ts +2 -2
- package/canvas/rect-control.js +1 -1
- package/canvas/render-tag-element.js +1 -1
- package/canvas/rich-editor.d.ts +7 -4
- package/canvas/rich-editor.js +5 -5
- package/canvas/rules.js +2 -2
- package/canvas/table-cell-text.d.ts +18 -0
- package/canvas/table-cell-text.js +1 -0
- package/canvas/table-element.js +1 -1
- package/canvas/text-element/caret-color.d.ts +3 -1
- package/canvas/text-element/render-tag-source.d.ts +33 -0
- package/canvas/text-element/render-tag-source.js +1 -0
- package/canvas/text-element.d.ts +1 -1
- package/canvas/text-element.js +1 -1
- package/canvas/use-color.d.ts +5 -5
- package/canvas/use-filtered-source.js +1 -1
- package/canvas/use-mediabunny-video.js +1 -1
- package/canvas/use-transformer-snap.d.ts +2 -2
- package/canvas/video-element.d.ts +4 -2
- package/canvas/video-element.js +1 -1
- package/icons/animation-icons.d.ts +1 -0
- package/icons/animation-icons.js +1 -1
- package/icons/registry.d.ts +35 -32
- package/icons/registry.js +1 -1
- package/image-tools/geometry.d.ts +2 -2
- package/image-tools/target.d.ts +6 -6
- package/image-tools/target.js +1 -1
- package/lib/utils.d.ts +1 -1
- package/model/figure-model.d.ts +10 -10
- package/model/gif-model.d.ts +10 -10
- package/model/group-model.d.ts +393 -84
- package/model/group-model.js +1 -1
- package/model/image-model.d.ts +10 -10
- package/model/image-tools.d.ts +1 -1
- package/model/line-model.d.ts +10 -10
- package/model/lottie-model.d.ts +242 -0
- package/model/lottie-model.js +5 -0
- package/model/node-model.d.ts +8 -8
- package/model/page-model.d.ts +1186 -297
- package/model/page-model.js +1 -1
- package/model/shape-model.d.ts +11 -11
- package/model/shape-model.js +1 -1
- package/model/store.d.ts +30 -26
- package/model/store.js +1 -1
- package/model/svg-model.d.ts +9 -9
- package/model/table-model.d.ts +127 -20
- package/model/table-model.js +1 -1
- package/model/text-model.d.ts +9 -9
- package/model/video-model.d.ts +10 -10
- package/package.json +36 -55
- package/pages-timeline/pages-timeline.js +1 -1
- package/pages-timeline/track-styles.d.ts +12 -12
- package/polotno-app.d.ts +1 -1
- package/polotno.bundle.js +183 -179
- package/primitives/button.d.ts +4 -4
- package/primitives/dialog.d.ts +4 -4
- package/primitives/dropdown-menu.d.ts +18 -18
- package/primitives/input-group.d.ts +1 -1
- package/primitives/popover.d.ts +4 -4
- package/primitives/select.d.ts +5 -5
- package/primitives/tooltip.d.ts +3 -3
- package/side-panel/animations-panel.js +1 -1
- package/side-panel/background-panel.js +1 -1
- package/side-panel/draw-panel.js +1 -1
- package/side-panel/effect-card.js +1 -1
- package/side-panel/effects-panel.js +1 -1
- package/side-panel/photos-panel.js +1 -1
- package/side-panel/select-lottie.d.ts +11 -0
- package/side-panel/select-lottie.js +1 -0
- package/side-panel/select-video.d.ts +19 -19
- package/side-panel/size-panel.js +1 -1
- package/side-panel/unsplash-credit.d.ts +4 -1
- package/side-panel/unsplash-credit.js +1 -1
- package/side-panel/upload-panel.js +1 -1
- package/themes/carbon.css +1 -1
- package/toolbar/gif-toolbar.d.ts +3 -0
- package/toolbar/gif-toolbar.js +1 -1
- package/toolbar/group-button.js +1 -1
- package/toolbar/html-toolbar.d.ts +1 -0
- package/toolbar/html-toolbar.js +3 -3
- package/toolbar/image-remove-background-button.js +1 -1
- package/toolbar/index.d.ts +1 -1
- package/toolbar/index.js +1 -1
- package/toolbar/line-toolbar.js +1 -1
- package/toolbar/position-picker.js +1 -1
- package/toolbar/table-toolbar.js +1 -1
- package/toolbar/text-ai-write.js +1 -1
- package/toolbar/text-toolbar.js +1 -1
- package/toolbar/toolbar-shared.d.ts +15 -4
- package/toolbar/toolbar-shared.js +1 -1
- package/toolbar/toolbar.js +1 -1
- package/ui.css +2 -2
- package/utils/animations.d.ts +47 -44
- package/utils/animations.js +1 -1
- package/utils/base64.d.ts +1 -2
- package/utils/base64.js +1 -1
- package/utils/clipboard.d.ts +19 -18
- package/utils/clipboard.js +1 -1
- package/utils/fade-gradient.d.ts +1 -1
- package/utils/file.d.ts +4 -3
- package/utils/file.js +1 -1
- package/utils/font-metric.d.ts +29 -28
- package/utils/fonts.js +1 -1
- package/utils/gif-lib.d.ts +1 -1
- package/utils/html2canvas.js +1 -1
- package/utils/image-dpi.d.ts +1 -1
- package/utils/image-dpi.js +1 -1
- package/utils/insert-file.js +1 -1
- package/utils/l10n.d.ts +1 -0
- package/utils/l10n.js +1 -1
- package/utils/lottie.d.ts +12 -0
- package/utils/lottie.js +1 -0
- package/utils/math.d.ts +4 -4
- package/utils/px.d.ts +3 -0
- package/utils/px.js +1 -1
- package/utils/react-color/components/common/Checkboard.d.ts +12 -12
- package/utils/react-color/components/common/Swatch.d.ts +6 -6
- package/utils/react-color/helpers/interaction.d.ts +6 -6
- package/utils/reactcss/components/active.d.ts +6 -6
- package/utils/reactcss/components/hover.d.ts +6 -6
- package/utils/rich-text-html.js +1 -1
- package/utils/selection-colors.js +1 -1
- package/utils/selection-transform.d.ts +4 -4
- package/utils/selection-transform.js +1 -1
- package/utils/split-element.js +1 -1
- package/utils/text-format-state.d.ts +1 -0
- package/utils/text-format-state.js +1 -1
- package/utils/text-format.d.ts +2 -2
- package/utils/text-sizing.d.ts +1 -1
- package/utils/timeline.d.ts +30 -2
- package/utils/timeline.js +1 -1
- package/utils/to-html.js +1 -1
- package/utils/to-svg.js +1 -1
- package/utils/validate-key.js +1 -1
- package/canvas/downscale-bands.d.ts +0 -10
- package/canvas/downscale-bands.js +0 -1
- package/canvas/downscale-kernel.d.ts +0 -7
- package/canvas/downscale-kernel.js +0 -1
- package/canvas/downscale-kernel.wasm.d.ts +0 -1
- package/canvas/downscale-kernel.wasm.js +0 -1
- package/canvas/downscale-passes.d.ts +0 -7
- package/canvas/downscale-passes.js +0 -1
package/model/text-model.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
4
4
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
5
5
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
6
6
|
opacity: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
7
|
-
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"
|
|
7
|
+
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light">, [undefined]>;
|
|
8
8
|
custom: import("mobx-state-tree").IType<any, any, any>;
|
|
9
9
|
visible: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
10
10
|
selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -22,7 +22,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
22
22
|
delay: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
23
23
|
duration: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
24
24
|
enabled: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
25
|
-
type: import("mobx-state-tree").ISimpleType<"
|
|
25
|
+
type: import("mobx-state-tree").ISimpleType<"enter" | "exit" | "loop">;
|
|
26
26
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
27
27
|
data: import("mobx-state-tree").IType<{} | null | undefined, {}, {}>;
|
|
28
28
|
easing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -93,7 +93,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
93
93
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
94
94
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
95
95
|
opacity: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
96
|
-
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"
|
|
96
|
+
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light">, [undefined]>;
|
|
97
97
|
custom: import("mobx-state-tree").IType<any, any, any>;
|
|
98
98
|
visible: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
99
99
|
selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -105,7 +105,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
105
105
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
106
106
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
107
107
|
opacity: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
108
|
-
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"
|
|
108
|
+
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light">, [undefined]>;
|
|
109
109
|
custom: import("mobx-state-tree").IType<any, any, any>;
|
|
110
110
|
visible: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
111
111
|
selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -117,7 +117,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
117
117
|
type: string | undefined;
|
|
118
118
|
name: string | undefined;
|
|
119
119
|
opacity: number | undefined;
|
|
120
|
-
blendMode: "
|
|
120
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light" | undefined;
|
|
121
121
|
custom: any;
|
|
122
122
|
visible: boolean | undefined;
|
|
123
123
|
selectable: boolean | undefined;
|
|
@@ -136,7 +136,6 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
136
136
|
alwaysOnTop: boolean;
|
|
137
137
|
showInExport: boolean;
|
|
138
138
|
} | {
|
|
139
|
-
blendMode: "normal" | "color" | "overlay" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "saturation" | "screen" | "soft-light";
|
|
140
139
|
id: string;
|
|
141
140
|
type: string;
|
|
142
141
|
name: string;
|
|
@@ -147,6 +146,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
147
146
|
removable: boolean;
|
|
148
147
|
alwaysOnTop: boolean;
|
|
149
148
|
showInExport: boolean;
|
|
149
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light";
|
|
150
150
|
}>>;
|
|
151
151
|
readonly parent: any;
|
|
152
152
|
readonly isHighlighted: boolean;
|
|
@@ -164,7 +164,6 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
164
164
|
alwaysOnTop: boolean;
|
|
165
165
|
showInExport: boolean;
|
|
166
166
|
} | {
|
|
167
|
-
blendMode: "normal" | "color" | "overlay" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "saturation" | "screen" | "soft-light";
|
|
168
167
|
id: string;
|
|
169
168
|
type: string;
|
|
170
169
|
name: string;
|
|
@@ -175,6 +174,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
175
174
|
removable: boolean;
|
|
176
175
|
alwaysOnTop: boolean;
|
|
177
176
|
showInExport: boolean;
|
|
177
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light";
|
|
178
178
|
};
|
|
179
179
|
} & {
|
|
180
180
|
clone(attrs?: any, { skipSelect }?: {
|
|
@@ -199,7 +199,7 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
199
199
|
readonly isSelected: boolean;
|
|
200
200
|
readonly isSelectedDirectly: boolean;
|
|
201
201
|
} & {
|
|
202
|
-
setAnimation(type:
|
|
202
|
+
setAnimation(type: 'enter' | 'exit' | 'loop', attrs: import("../utils/animations.js").AnimationAttrs): void;
|
|
203
203
|
setFilter(type: any, value: any): void;
|
|
204
204
|
} & {
|
|
205
205
|
set(attrs: any): void;
|
|
@@ -217,7 +217,6 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
217
217
|
alwaysOnTop: boolean;
|
|
218
218
|
showInExport: boolean;
|
|
219
219
|
} | {
|
|
220
|
-
blendMode: "normal" | "color" | "overlay" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "saturation" | "screen" | "soft-light";
|
|
221
220
|
id: string;
|
|
222
221
|
type: string;
|
|
223
222
|
name: string;
|
|
@@ -228,5 +227,6 @@ export declare const TextElement: import("mobx-state-tree").IModelType<{
|
|
|
228
227
|
removable: boolean;
|
|
229
228
|
alwaysOnTop: boolean;
|
|
230
229
|
showInExport: boolean;
|
|
230
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light";
|
|
231
231
|
}>;
|
|
232
232
|
export type TextElementType = Instance<typeof TextElement>;
|
package/model/video-model.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
4
4
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
5
5
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
6
6
|
opacity: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
7
|
-
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"
|
|
7
|
+
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light">, [undefined]>;
|
|
8
8
|
custom: import("mobx-state-tree").IType<any, any, any>;
|
|
9
9
|
visible: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
10
10
|
selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -22,7 +22,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
22
22
|
delay: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
23
23
|
duration: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
24
24
|
enabled: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
25
|
-
type: import("mobx-state-tree").ISimpleType<"
|
|
25
|
+
type: import("mobx-state-tree").ISimpleType<"enter" | "exit" | "loop">;
|
|
26
26
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
27
27
|
data: import("mobx-state-tree").IType<{} | null | undefined, {}, {}>;
|
|
28
28
|
easing: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -82,7 +82,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
82
82
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
83
83
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
84
84
|
opacity: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
85
|
-
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"
|
|
85
|
+
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light">, [undefined]>;
|
|
86
86
|
custom: import("mobx-state-tree").IType<any, any, any>;
|
|
87
87
|
visible: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
88
88
|
selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -94,7 +94,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
94
94
|
type: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
95
95
|
name: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
96
96
|
opacity: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
97
|
-
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"
|
|
97
|
+
blendMode: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light">, [undefined]>;
|
|
98
98
|
custom: import("mobx-state-tree").IType<any, any, any>;
|
|
99
99
|
visible: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
100
100
|
selectable: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
@@ -106,7 +106,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
106
106
|
type: string | undefined;
|
|
107
107
|
name: string | undefined;
|
|
108
108
|
opacity: number | undefined;
|
|
109
|
-
blendMode: "
|
|
109
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light" | undefined;
|
|
110
110
|
custom: any;
|
|
111
111
|
visible: boolean | undefined;
|
|
112
112
|
selectable: boolean | undefined;
|
|
@@ -125,7 +125,6 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
125
125
|
alwaysOnTop: boolean;
|
|
126
126
|
showInExport: boolean;
|
|
127
127
|
} | {
|
|
128
|
-
blendMode: "normal" | "color" | "overlay" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "saturation" | "screen" | "soft-light";
|
|
129
128
|
id: string;
|
|
130
129
|
type: string;
|
|
131
130
|
name: string;
|
|
@@ -136,6 +135,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
136
135
|
removable: boolean;
|
|
137
136
|
alwaysOnTop: boolean;
|
|
138
137
|
showInExport: boolean;
|
|
138
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light";
|
|
139
139
|
}>>;
|
|
140
140
|
readonly parent: any;
|
|
141
141
|
readonly isHighlighted: boolean;
|
|
@@ -153,7 +153,6 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
153
153
|
alwaysOnTop: boolean;
|
|
154
154
|
showInExport: boolean;
|
|
155
155
|
} | {
|
|
156
|
-
blendMode: "normal" | "color" | "overlay" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "saturation" | "screen" | "soft-light";
|
|
157
156
|
id: string;
|
|
158
157
|
type: string;
|
|
159
158
|
name: string;
|
|
@@ -164,6 +163,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
164
163
|
removable: boolean;
|
|
165
164
|
alwaysOnTop: boolean;
|
|
166
165
|
showInExport: boolean;
|
|
166
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light";
|
|
167
167
|
};
|
|
168
168
|
} & {
|
|
169
169
|
clone(attrs?: any, { skipSelect }?: {
|
|
@@ -188,7 +188,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
188
188
|
readonly isSelected: boolean;
|
|
189
189
|
readonly isSelectedDirectly: boolean;
|
|
190
190
|
} & {
|
|
191
|
-
setAnimation(type:
|
|
191
|
+
setAnimation(type: 'enter' | 'exit' | 'loop', attrs: import("../utils/animations.js").AnimationAttrs): void;
|
|
192
192
|
setFilter(type: any, value: any): void;
|
|
193
193
|
} & {
|
|
194
194
|
_setSourceSize(size: import("../image-tools/types.js").Size, src: string): void;
|
|
@@ -212,7 +212,7 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
212
212
|
type: string | undefined;
|
|
213
213
|
name: string | undefined;
|
|
214
214
|
opacity: number | undefined;
|
|
215
|
-
blendMode: "
|
|
215
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light" | undefined;
|
|
216
216
|
custom: any;
|
|
217
217
|
visible: boolean | undefined;
|
|
218
218
|
selectable: boolean | undefined;
|
|
@@ -231,7 +231,6 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
231
231
|
alwaysOnTop: boolean;
|
|
232
232
|
showInExport: boolean;
|
|
233
233
|
} | {
|
|
234
|
-
blendMode: "normal" | "color" | "overlay" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "saturation" | "screen" | "soft-light";
|
|
235
234
|
id: string;
|
|
236
235
|
type: string;
|
|
237
236
|
name: string;
|
|
@@ -242,5 +241,6 @@ export declare const VideoElement: import("mobx-state-tree").IModelType<{
|
|
|
242
241
|
removable: boolean;
|
|
243
242
|
alwaysOnTop: boolean;
|
|
244
243
|
showInExport: boolean;
|
|
244
|
+
blendMode: "color" | "color-burn" | "color-dodge" | "darken" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "luminosity" | "multiply" | "normal" | "overlay" | "saturation" | "screen" | "soft-light";
|
|
245
245
|
}>;
|
|
246
246
|
export type VideoElementType = Instance<typeof VideoElement>;
|
package/package.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polotno",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.20.0",
|
|
4
4
|
"description": "Design editor SDK: embed a Canva-like editor, generate designs from templates and data, export PNG, PDF, and video in the browser or on a server.",
|
|
5
5
|
"author": "Anton Lavrenov",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/polotno-project/polotno.git",
|
|
9
|
-
"directory": "packages/polotno"
|
|
10
|
-
},
|
|
11
6
|
"keywords": [
|
|
12
7
|
"polotno",
|
|
13
8
|
"design editor sdk",
|
|
@@ -113,43 +108,34 @@
|
|
|
113
108
|
},
|
|
114
109
|
"dependencies": {
|
|
115
110
|
"@base-ui/react": "^1.9.0",
|
|
116
|
-
"@
|
|
117
|
-
"@polotno/
|
|
118
|
-
"@polotno/
|
|
119
|
-
"@polotno/
|
|
111
|
+
"@lottiefiles/dotlottie-web": "0.82.1",
|
|
112
|
+
"@polotno/core": "0.21.0",
|
|
113
|
+
"@polotno/html-export": "0.11.0",
|
|
114
|
+
"@polotno/schema": "0.12.0",
|
|
115
|
+
"@polotno/svg-export": "0.12.0",
|
|
120
116
|
"class-variance-authority": "^0.7.1",
|
|
121
117
|
"clsx": "^2.1.1",
|
|
122
118
|
"gifuct-js": "^2.1.2",
|
|
123
119
|
"konva": "^10.9.1",
|
|
124
120
|
"lodash-es": "^4.18.1",
|
|
125
|
-
"lucide-react": "^1.
|
|
126
|
-
"mediabunny": "^1.65.
|
|
127
|
-
"mobx": "7.1.
|
|
121
|
+
"lucide-react": "^1.70.0",
|
|
122
|
+
"mediabunny": "^1.65.2",
|
|
123
|
+
"mobx": "7.1.5",
|
|
128
124
|
"mobx-react-lite": "^5.1.2",
|
|
129
|
-
"mobx-state-tree": "9.0.
|
|
125
|
+
"mobx-state-tree": "9.0.1",
|
|
130
126
|
"nanoid": "^6.0.2",
|
|
131
127
|
"quill": "^2.0.3",
|
|
132
128
|
"react-konva": "18.2.16",
|
|
133
129
|
"react-konva-utils": "^2.1.0",
|
|
134
130
|
"react-sortablejs": "6.1.4",
|
|
135
|
-
"react-window": "^2.5.
|
|
136
|
-
"render-tag": "0.4.
|
|
131
|
+
"react-window": "^2.5.3",
|
|
132
|
+
"render-tag": "0.4.4",
|
|
137
133
|
"sortablejs": "^1.15.7",
|
|
138
134
|
"svg-round-corners": "^0.4.3",
|
|
139
135
|
"swr": "^2.5.1",
|
|
140
136
|
"tailwind-merge": "^3.7.0",
|
|
141
137
|
"tinycolor2": "^1.6.0"
|
|
142
138
|
},
|
|
143
|
-
"targets": {
|
|
144
|
-
"bundle": {
|
|
145
|
-
"source": "src/polotno.bundle.tsx",
|
|
146
|
-
"distDir": "lib",
|
|
147
|
-
"optimize": true
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
"@parcel/resolver-default": {
|
|
151
|
-
"packageExports": true
|
|
152
|
-
},
|
|
153
139
|
"main": "./polotno-app.js",
|
|
154
140
|
"peerDependencies": {
|
|
155
141
|
"@blueprintjs/core": "^6.x",
|
|
@@ -170,41 +156,36 @@
|
|
|
170
156
|
}
|
|
171
157
|
},
|
|
172
158
|
"devDependencies": {
|
|
173
|
-
"@babel/parser": "^8.0
|
|
174
|
-
"@babel/traverse": "^8.0
|
|
175
|
-
"@blueprintjs/core": "6.
|
|
176
|
-
"@blueprintjs/icons": "^6.
|
|
177
|
-
"@blueprintjs/select": "6.4.
|
|
178
|
-
"@
|
|
179
|
-
"@
|
|
159
|
+
"@babel/parser": "^8.1.0",
|
|
160
|
+
"@babel/traverse": "^8.1.0",
|
|
161
|
+
"@blueprintjs/core": "6.22.0",
|
|
162
|
+
"@blueprintjs/icons": "^6.15.0",
|
|
163
|
+
"@blueprintjs/select": "6.4.1",
|
|
164
|
+
"@napi-rs/canvas": "1.1.0",
|
|
165
|
+
"@polotno/design-fixtures": "0.0.0",
|
|
166
|
+
"@polotno/visual-testing": "0.0.0",
|
|
167
|
+
"@tailwindcss/cli": "^4.3.5",
|
|
168
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
180
169
|
"@testing-library/dom": "^10.4.2",
|
|
181
170
|
"@testing-library/react": "^16.3.3",
|
|
182
171
|
"@types/react": "^19.3.0",
|
|
183
|
-
"@vitejs/plugin-react": "^6.
|
|
184
|
-
"@vitest/browser": "^5.0
|
|
185
|
-
"@vitest/browser-playwright": "^5.0.5",
|
|
172
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
173
|
+
"@vitest/browser-playwright": "^5.1.0",
|
|
186
174
|
"assemblyscript": "^0.28.20",
|
|
187
|
-
"assert": "^2.1.0",
|
|
188
175
|
"bippy": "^0.7.3",
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"glob": "^14.0.3",
|
|
193
|
-
"jest-file-snapshot": "^0.7.0",
|
|
194
|
-
"jsdom": "^30.1.3",
|
|
195
|
-
"playwright": "^1.64.1",
|
|
176
|
+
"glob": "^14.0.4",
|
|
177
|
+
"linkedom": "^0.18.15",
|
|
178
|
+
"playwright": "^1.65.0",
|
|
196
179
|
"postcss": "^8.5.32",
|
|
197
|
-
"postcss-selector-parser": "^7.
|
|
198
|
-
"pptxgenjs": "^4.0.1",
|
|
199
|
-
"process": "^0.11.10",
|
|
180
|
+
"postcss-selector-parser": "^7.2.0",
|
|
200
181
|
"react": "^19.3.1",
|
|
201
182
|
"react-dom": "^19.3.1",
|
|
202
|
-
"tailwindcss": "^4.3.
|
|
183
|
+
"tailwindcss": "^4.3.5",
|
|
203
184
|
"terser": "^5.51.2",
|
|
204
185
|
"tw-animate-css": "^1.4.0",
|
|
205
|
-
"typescript": "~
|
|
206
|
-
"vite": "^8.3.
|
|
207
|
-
"vitest": "^5.0
|
|
186
|
+
"typescript": "~7.0.2",
|
|
187
|
+
"vite": "^8.3.7",
|
|
188
|
+
"vitest": "^5.1.0"
|
|
208
189
|
},
|
|
209
190
|
"homepage": "https://polotno.com/",
|
|
210
191
|
"scripts": {
|
|
@@ -212,16 +193,16 @@
|
|
|
212
193
|
"clean": "rm -rf ./lib && rm -rf ./.pn-build",
|
|
213
194
|
"prefix-build": "node build/prefix-build.cjs",
|
|
214
195
|
"tsc": "tsc --project tsconfig.lib.json --removeComments --sourceMap false",
|
|
215
|
-
"typecheck": "
|
|
196
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && tsc -p test/tsconfig.json",
|
|
216
197
|
"build:css": "tailwindcss -i ./.pn-build/ui.css -o ./lib/ui.css --minify && node build/rename-keyframes.cjs ./lib/ui.css",
|
|
217
198
|
"check:css": "node build/check-css-hygiene.cjs ./lib/ui.css",
|
|
218
199
|
"check:agreement": "node build/check-agreement.cjs ./lib/ui.css ./lib/toolbar ./lib/side-panel ./lib/pages-timeline ./lib/primitives ./lib/canvas",
|
|
219
|
-
"check:
|
|
220
|
-
"
|
|
200
|
+
"check:class-hooks": "node build/check-class-hooks.cjs ./src ./lib",
|
|
201
|
+
"check:no-blueprint": "node build/check-no-blueprint.cjs ./lib",
|
|
221
202
|
"minify": "node minify.cjs",
|
|
222
203
|
"build": "node build/build.mjs",
|
|
223
204
|
"remove-test-from-lib": "find ./lib -type d -name \"__tests__\" -exec rm -rf {} + && find ./lib \\( -name \"*.test.js\" -o -name \"*.test.d.ts\" \\) -type f -delete",
|
|
224
|
-
"add_version": "
|
|
205
|
+
"add_version": "node ../../scripts/stamp-version.mjs",
|
|
225
206
|
"build:bundle": "vite build && find ./lib -name '*.js.map' -type f -delete",
|
|
226
207
|
"test": "node scripts/run-tests-parallel.mjs",
|
|
227
208
|
"test:artifact": "POLOTNO_TEST_SCOPE=artifact node scripts/run-browser.mts",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as e,jsx as i,jsxs as t}from"react/jsx-runtime";import n from"react";import{observer as o}from"mobx-react-lite";import{PolotnoIcon as r}from"../icons/registry.js";import{flags as a}from"../utils/flags.js";import{t as s}from"../utils/l10n.js";import{clamp as l,cn as p}from"../lib/utils.js";import{Button as m}from"../primitives/button.js";import{floatingControl as d}from"../primitives/floating-control.js";import{Navbar as c}from"../primitives/navbar.js";import{Pages as h}from"./pages.js";import{CurrentTime as u}from"./current-time.js";import{Audios as g}from"./audios.js";import{ElementsTimeline as f}from"./elements.js";import{PlayButton as v}from"./play-button.js";import{TimeRuler as b}from"./time-ruler.js";import{isPrimaryDrag as x,usePointerDrag as j}from"../utils/pointer-drag.js";export const PagesTimeline=o(({store:o,defaultOpened:y=!1})=>{const E=n.useRef(null),[w,z]=n.useState(y),[N,k]=n.useState(.02),[S,C]=n.useState(()=>(e=>{if(!a.animationsEnabled){return 65}const i=e.pages.reduce((e,i)=>e+i.children.length,0),t=25*e.audios.length+20*i+140;return l(t,140,420)})(o)),[P,T]=n.useState(!1),W=j(),D=o.duration*N;return t(e,{children:[i("div",{style:{position:"relative",height:"0px"},children:t(m,{variant:"ghost",size:"sm",onClick:()=>{z(!w)},className:p(d(),"pn:absolute pn:bottom-[5px] pn:left-[5px] pn:z-[1] pn:dark:hover:bg-accent"),children:[a.animationsEnabled&&!w?i(r,{name:"pagesTimeline.play",className:"pn:size-4"}):null,s("pagesTimeline.pages")]})}),t(c,{attached:"top",style:{padding:"5px",height:"auto",zIndex:1,position:"relative",overflow:"visible",display:w?"block":"none"},className:"polotno-pages-timeline pn:whitespace-normal pn:bg-background",children:[a.animationsEnabled&&i("div",{onPointerDown:e=>{if(!x(e)){return}const i=e.clientY,t=S;T(!0),W(e,{onMove:e=>{const n=t-(e.clientY-i);C(l(n,140,420))},onEnd:()=>T(!1)})},className:"pn:group/pn-resize-handle pn:absolute pn:top-0 pn:left-0 pn:right-0 pn:flex pn:h-[14px] pn:-translate-y-1/2 pn:cursor-ns-resize pn:touch-none pn:items-center pn:justify-center"+(P?" active":""),title:"Drag to adjust timeline height",children:i("div",{className:"pn:h-1 pn:w-full pn:rounded-[2px] pn:transition-colors pn:group-hover/pn-resize-handle:bg-primary"+(P?" pn:bg-primary":" pn:bg-transparent")})}),a.animationsEnabled&&i("div",{style:{display:"flex",justifyContent:"center"},children:i(v,{store:o,scale:N,onScaleChange:k})}),i("div",{dir:"ltr",style:{width:"100%",position:"relative",height:S},children:i("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflowX:"auto",padding:"0 24px"},ref:E,children:t("div",{style:{position:"relative",minWidth:a.animationsEnabled?D+"px":void 0},children:[a.animationsEnabled&&i(b,{store:o,scale:N,minWidth:D}),t("div",{style:{position:"relative",display:"flex"},children:[i("div",{style:{position:"relative",minWidth:a.animationsEnabled?D+"px":void 0,height:"60px"},children:i(h,{store:o,scale:N})}),i(m,{variant:"ghost",size:"icon",style:{width:"60px",height:"60px",marginLeft:"12px"},onClick:()=>{var e;o.addPage({bleed:(null===(e=o.activePage)||void 0===e?void 0:e.bleed)||0})},children:i(r,{name:"action.add",className:"pn:size-4"})})]}),a.animationsEnabled&&t(e,{children:[i(f,{store:o,scale:N,width:D}),i(g,{store:o,scale:N,width:D})]}),a.animationsEnabled&&i(u,{store:o,scale:N,dragAreaRef:E,variant:"timeline"})]})})})]})]})});
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const TrackLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export declare const TrackInlineLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
displayName: string;
|
|
11
|
-
}
|
|
4
|
+
export declare function TrackNameInput({ value, onCommit, onCancel, className, ...props }: {
|
|
5
|
+
value: string;
|
|
6
|
+
onCommit: (value: string) => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onCommit'>): React.JSX.Element;
|
|
9
|
+
export declare namespace TrackNameInput {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
12
|
export declare const WaveformSvg: React.ForwardRefExoticComponent<React.SVGAttributes<SVGSVGElement> & React.RefAttributes<SVGSVGElement>>;
|
|
13
13
|
export declare const TrackWrapper: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
export declare const TrackContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
15
|
export declare const TrackMenu: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export declare
|
|
17
|
-
|
|
18
|
-
displayName: string;
|
|
19
|
-
}
|
|
16
|
+
export declare function TrackMenuButton(): React.JSX.Element;
|
|
17
|
+
export declare namespace TrackMenuButton {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
20
|
export declare const TrackHandleLeft: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
export declare const TrackHandleRight: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
package/polotno-app.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare const PolotnoApp: ({ store, style, sections, }: {
|
|
|
12
12
|
export declare function createPolotnoApp({ container, key, showCredit, sections }: {
|
|
13
13
|
container: any;
|
|
14
14
|
key: any;
|
|
15
|
-
showCredit: any;
|
|
16
15
|
sections: any;
|
|
16
|
+
showCredit: any;
|
|
17
17
|
}): {
|
|
18
18
|
store: StoreType;
|
|
19
19
|
root: ReactDOM.Root;
|