polotno 3.5.2 → 3.7.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 +22 -7
- package/README.md +1 -1
- package/blueprint/toolbar/image-toolbar.d.ts +2 -2
- package/blueprint/toolbar/sketch.js +1 -1
- package/blueprint.polotno.css +116 -116
- package/canvas/apply-filters.d.ts +1 -1
- package/canvas/audio.js +1 -1
- package/canvas/context-menu/context-menu.d.ts +2 -2
- package/canvas/figure-element.js +1 -1
- package/canvas/gif-element.js +1 -1
- package/canvas/html-element.js +1 -1
- package/canvas/image-element.d.ts +11 -0
- package/canvas/image-element.js +1 -1
- package/canvas/page-controls.d.ts +1 -1
- package/canvas/page.js +1 -1
- package/canvas/render-tag-element.js +1 -1
- package/canvas/rich-editor.d.ts +0 -4
- package/canvas/rich-editor.js +2 -2
- package/canvas/rules.d.ts +1 -1
- package/canvas/text-element.js +1 -1
- package/canvas/tooltip.d.ts +2 -2
- package/canvas/use-mediabunny-video.js +1 -1
- package/canvas/video-element.js +1 -1
- package/hooks/use-event.js +1 -1
- package/icons/meronex.js +1 -1
- package/icons/registry.d.ts +1 -0
- package/icons/registry.js +1 -1
- package/model/audio-model.d.ts +2 -0
- package/model/audio-model.js +1 -1
- package/model/image-model.js +1 -1
- package/model/store.d.ts +3 -0
- package/model/store.js +1 -1
- package/package.json +30 -30
- package/pages-timeline/audio-track.d.ts +3 -2
- package/pages-timeline/audio-track.js +1 -1
- package/pages-timeline/audios.js +1 -1
- package/pages-timeline/current-time.js +1 -1
- package/pages-timeline/element-track.js +1 -1
- package/pages-timeline/index.d.ts +1 -1
- package/pages-timeline/index.js +1 -1
- package/pages-timeline/page-preview.js +1 -1
- package/pages-timeline/pages-timeline.js +1 -1
- package/pages-timeline/pages.js +1 -1
- package/pages-timeline/play-button.d.ts +1 -1
- package/pages-timeline/play-button.js +1 -1
- package/pages-timeline/time-ruler.js +1 -1
- package/pages-timeline/track-styles.d.ts +9 -0
- package/pages-timeline/track-styles.js +1 -1
- package/polotno.bundle.js +200 -201
- package/primitives/button-group.d.ts +2 -2
- package/primitives/button.d.ts +2 -2
- package/primitives/dialog.d.ts +2 -2
- package/primitives/dropdown-menu.d.ts +2 -2
- package/primitives/field-group.d.ts +1 -1
- package/primitives/field-row.d.ts +1 -1
- package/primitives/floating-control.js +2 -2
- package/primitives/index.d.ts +27 -27
- package/primitives/input-group.d.ts +2 -2
- package/primitives/input.d.ts +1 -1
- package/primitives/navbar.d.ts +5 -5
- package/primitives/numeric-input.d.ts +1 -1
- package/primitives/overflow-list.d.ts +1 -1
- package/primitives/panel-header.d.ts +1 -1
- package/primitives/popover.d.ts +2 -2
- package/primitives/portal-scope.d.ts +3 -3
- package/primitives/search-input.d.ts +1 -1
- package/primitives/select.d.ts +3 -3
- package/primitives/separator.d.ts +1 -1
- package/primitives/slider-field.d.ts +1 -1
- package/primitives/slider.d.ts +2 -2
- package/primitives/spinner.d.ts +1 -1
- package/primitives/switch.d.ts +1 -1
- package/primitives/tabs.d.ts +2 -2
- package/primitives/textarea.d.ts +1 -1
- package/primitives/toggle-group.d.ts +4 -4
- package/primitives/toggle.d.ts +3 -3
- package/primitives/tooltip-icon-button.d.ts +4 -4
- package/primitives/tooltip.d.ts +2 -2
- package/side-panel/background-panel.d.ts +2 -2
- package/side-panel/draw-panel.d.ts +2 -2
- package/side-panel/elements-panel.d.ts +2 -2
- package/side-panel/images-grid.js +1 -1
- package/side-panel/index.d.ts +35 -35
- package/side-panel/photos-panel.d.ts +1 -1
- package/side-panel/select-gif.d.ts +1 -1
- package/side-panel/side-panel.d.ts +5 -5
- package/side-panel/size-panel.d.ts +3 -3
- package/side-panel/tab-button.d.ts +1 -1
- package/side-panel/tab-button.js +2 -2
- package/side-panel/templates-panel.d.ts +2 -2
- package/side-panel/unsplash-credit.d.ts +1 -1
- package/side-panel/upload-panel.d.ts +3 -3
- package/side-panel/upload-panel.js +1 -1
- package/side-panel/videos-grid.js +1 -1
- package/themes/blueprint.css +1 -1
- package/themes/carbon.css +127 -128
- package/toolbar/download-button.d.ts +2 -2
- package/toolbar/element-container.d.ts +1 -1
- package/toolbar/filters-picker.d.ts +1 -1
- package/toolbar/group-toolbar.d.ts +2 -2
- package/toolbar/history-buttons.d.ts +1 -1
- package/toolbar/image-remove-background-button.d.ts +1 -1
- package/toolbar/image-toolbar.d.ts +1 -1
- package/toolbar/index.d.ts +34 -34
- package/toolbar/many-toolbar.d.ts +2 -2
- package/toolbar/opacity-picker.d.ts +1 -1
- package/toolbar/page-toolbar.d.ts +3 -3
- package/toolbar/toolbar.d.ts +3 -3
- package/toolbar/video-toolbar.js +1 -1
- package/toolbar/zoom-buttons.d.ts +1 -1
- package/ui-types.d.ts +8 -8
- package/ui.css +2 -2
- package/utils/array.js +1 -1
- package/utils/file.d.ts +3 -0
- package/utils/file.js +1 -1
- package/utils/html-to-svg/svg-builder.d.ts +1 -1
- package/utils/insert-file.d.ts +3 -2
- package/utils/insert-file.js +1 -1
- package/utils/l10n.d.ts +4 -0
- package/utils/l10n.js +1 -1
- package/utils/media.d.ts +6 -0
- package/utils/media.js +1 -0
- package/utils/pointer-drag.d.ts +13 -0
- package/utils/pointer-drag.js +1 -0
- package/utils/px.d.ts +2 -0
- package/utils/px.js +1 -1
- package/utils/text-format-state.js +1 -1
- package/utils/validate-key.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const ButtonGroup: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
4
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
package/primitives/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | null | undefined;
|
package/primitives/dialog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Dialog as DialogPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
3
3
|
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
5
|
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Menu as MenuPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
3
3
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof MenuPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof MenuPrimitive.Portal>): React.JSX.Element;
|
|
5
5
|
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof MenuPrimitive.Trigger>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
declare const FieldRow: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
label: React.ReactNode;
|
|
4
4
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { cva } from
|
|
2
|
-
export const floatingControl = cva(
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
export const floatingControl = cva('pn:h-[35px] pn:rounded-md pn:bg-background pn:shadow-md');
|
package/primitives/index.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export { Button, buttonVariants } from
|
|
2
|
-
export { Input } from
|
|
3
|
-
export { Textarea } from
|
|
4
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from
|
|
5
|
-
export { Popover, PopoverContent, PopoverTrigger } from
|
|
6
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from
|
|
7
|
-
export { Slider } from
|
|
8
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger } from
|
|
9
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from
|
|
10
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from
|
|
11
|
-
export { Switch } from
|
|
12
|
-
export { Separator } from
|
|
13
|
-
export { Toggle, toggleVariants } from
|
|
14
|
-
export { ToggleGroup, ToggleGroupItem } from
|
|
15
|
-
export { InputGroup, InputGroupAddon, InputGroupInput } from
|
|
16
|
-
export { SearchInput } from
|
|
17
|
-
export { Navbar, NavbarGroup, NavbarDivider } from
|
|
18
|
-
export { NumericInput, NumberInput } from
|
|
19
|
-
export { SliderField } from
|
|
20
|
-
export { FieldGroup } from
|
|
21
|
-
export { FieldRow } from
|
|
22
|
-
export { TooltipIconButton } from
|
|
23
|
-
export { ButtonGroup } from
|
|
24
|
-
export { Spinner } from
|
|
25
|
-
export { OverflowList } from
|
|
26
|
-
export { PanelHeader } from
|
|
27
|
-
export { cn } from
|
|
1
|
+
export { Button, buttonVariants } from './button.js';
|
|
2
|
+
export { Input } from './input.js';
|
|
3
|
+
export { Textarea } from './textarea.js';
|
|
4
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from './select.js';
|
|
5
|
+
export { Popover, PopoverContent, PopoverTrigger } from './popover.js';
|
|
6
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './tooltip.js';
|
|
7
|
+
export { Slider } from './slider.js';
|
|
8
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger } from './tabs.js';
|
|
9
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from './dialog.js';
|
|
10
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './dropdown-menu.js';
|
|
11
|
+
export { Switch } from './switch.js';
|
|
12
|
+
export { Separator } from './separator.js';
|
|
13
|
+
export { Toggle, toggleVariants } from './toggle.js';
|
|
14
|
+
export { ToggleGroup, ToggleGroupItem } from './toggle-group.js';
|
|
15
|
+
export { InputGroup, InputGroupAddon, InputGroupInput } from './input-group.js';
|
|
16
|
+
export { SearchInput } from './search-input.js';
|
|
17
|
+
export { Navbar, NavbarGroup, NavbarDivider } from './navbar.js';
|
|
18
|
+
export { NumericInput, NumberInput } from './numeric-input.js';
|
|
19
|
+
export { SliderField } from './slider-field.js';
|
|
20
|
+
export { FieldGroup } from './field-group.js';
|
|
21
|
+
export { FieldRow } from './field-row.js';
|
|
22
|
+
export { TooltipIconButton } from './tooltip-icon-button.js';
|
|
23
|
+
export { ButtonGroup } from './button-group.js';
|
|
24
|
+
export { Spinner } from './spinner.js';
|
|
25
|
+
export { OverflowList } from './overflow-list.js';
|
|
26
|
+
export { PanelHeader } from './panel-header.js';
|
|
27
|
+
export { cn } from '../lib/utils.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const InputGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
declare const InputGroupAddon: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
5
5
|
align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
|
package/primitives/input.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
3
|
export { Input };
|
package/primitives/navbar.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
type NavbarProps = React.ComponentProps<
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type NavbarProps = React.ComponentProps<'div'> & {
|
|
3
3
|
height?: number;
|
|
4
4
|
elevated?: boolean;
|
|
5
5
|
floating?: boolean;
|
|
6
|
-
attached?:
|
|
6
|
+
attached?: 'top' | 'bottom';
|
|
7
7
|
};
|
|
8
|
-
type NavbarGroupProps = React.ComponentProps<
|
|
9
|
-
align?:
|
|
8
|
+
type NavbarGroupProps = React.ComponentProps<'div'> & {
|
|
9
|
+
align?: 'left' | 'right';
|
|
10
10
|
};
|
|
11
11
|
declare const NavbarGroup: React.ForwardRefExoticComponent<Omit<NavbarGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const NavbarDivider: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("@base-ui/react").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "orientation">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/primitives/popover.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Popover as PopoverPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
5
|
type PositionerProps = React.ComponentProps<typeof PopoverPrimitive.Positioner>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
type Scheme =
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type Scheme = 'dark' | 'light';
|
|
3
3
|
export declare function PolotnoScope({ elementRef, children, }: {
|
|
4
4
|
elementRef: React.RefObject<HTMLElement | null>;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -7,7 +7,7 @@ export declare function PolotnoScope({ elementRef, children, }: {
|
|
|
7
7
|
type PortalScopeProps = {
|
|
8
8
|
container?: HTMLElement;
|
|
9
9
|
className: string;
|
|
10
|
-
|
|
10
|
+
'data-polotno-theme'?: Scheme;
|
|
11
11
|
};
|
|
12
12
|
export declare function usePortalScope(): PortalScopeProps;
|
|
13
13
|
export {};
|
package/primitives/select.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Select as SelectPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
3
3
|
declare const Select: typeof SelectPrimitive.Root;
|
|
4
4
|
declare const SelectGroup: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
@@ -15,7 +15,7 @@ declare const SelectContent: React.ForwardRefExoticComponent<Omit<Omit<import("@
|
|
|
15
15
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
declare const SelectItem: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectItemProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
18
|
-
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<
|
|
18
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectScrollUpArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SelectScrollDownArrowProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
declare const Separator: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { Separator };
|
package/primitives/slider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Slider as SliderPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Slider as SliderPrimitive } from '@base-ui/react/slider';
|
|
3
3
|
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.Root.Props<number | readonly number[]> & {
|
|
4
4
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
5
5
|
}, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/primitives/spinner.d.ts
CHANGED
package/primitives/switch.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
declare const Switch: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").SwitchRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
3
3
|
export { Switch };
|
package/primitives/tabs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const Tabs: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").TabsRootProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").TabsListProps, "ref"> & React.RefAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
5
5
|
variant?: "default" | "line" | null | undefined;
|
package/primitives/textarea.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
3
3
|
export { Textarea };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
3
|
-
import { ToggleGroup as ToggleGroupPrimitive } from
|
|
4
|
-
import { Toggle as TogglePrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ToggleGroup as ToggleGroupPrimitive } from '@base-ui/react/toggle-group';
|
|
4
|
+
import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
|
|
5
5
|
declare const ToggleGroup: React.ForwardRefExoticComponent<Omit<ToggleGroupPrimitive.Props<string> & React.RefAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
6
|
variant?: "default" | "outline" | null | undefined;
|
|
7
7
|
size?: "default" | null | undefined;
|
package/primitives/toggle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { type VariantProps } from
|
|
3
|
-
import { Toggle as TogglePrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "outline" | null | undefined;
|
|
6
6
|
size?: "default" | null | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Button } from
|
|
3
|
-
import { TooltipContent } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from './button.js';
|
|
3
|
+
import { TooltipContent } from './tooltip.js';
|
|
4
4
|
type TooltipIconButtonProps = React.ComponentProps<typeof Button> & {
|
|
5
5
|
label: string;
|
|
6
6
|
active?: boolean;
|
|
7
|
-
side?: React.ComponentProps<typeof TooltipContent>[
|
|
7
|
+
side?: React.ComponentProps<typeof TooltipContent>['side'];
|
|
8
8
|
hideTooltipWhenDisabled?: boolean;
|
|
9
9
|
};
|
|
10
10
|
declare const TooltipIconButton: React.ForwardRefExoticComponent<Omit<TooltipIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
package/primitives/tooltip.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Tooltip as TooltipPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
|
|
3
3
|
declare function TooltipProvider({ delay, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
4
4
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
5
5
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { StoreType } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StoreType } from '../ui-types.js';
|
|
3
3
|
export declare const setDefaultQuery: (query: string) => void;
|
|
4
4
|
export declare const setBackgroundColorsPreset: (newColors: string[]) => void;
|
|
5
5
|
export declare const BackgroundPanel: (({ store }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t from"react";import{registerNextDomDrop as r}from"../canvas/page.js";import{t as l}from"../utils/l10n.js";import{cn as o}from"../lib/utils.js";import{Spinner as a}from"../primitives/spinner.js";const
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t from"react";import{registerNextDomDrop as r}from"../canvas/page.js";import{t as l}from"../utils/l10n.js";import{cn as o}from"../lib/utils.js";import{Spinner as a}from"../primitives/spinner.js";const s=({url:t,credit:l,onSelect:a,crossOrigin:s,shadowEnabled:p,itemHeight:i,className:c,onLoad:d,alt:m})=>{const u=null==p||p;return e("div",{role:"button",onClick:()=>{a()},className:"polotno-close-panel pn:group/img-wrap pn:p-[5px] pn:w-full pn:md:[&_.credit]:opacity-0 pn:md:hover:[&_.credit]:opacity-100 pn:[&_.credit]:opacity-100",children:n("div",{"data-shadowenabled":u,className:o("pn:relative pn:overflow-hidden pn:rounded-[5px]",u?"pn:shadow-[0_0_5px_rgba(16,22,26,0.3),0_0_0_1px_rgba(16,22,26,0.12)] pn:dark:shadow-[0_0_0_1px_rgba(255,255,255,0.16)]":""),children:[e("img",{className:o("pn:block pn:max-h-[300px] pn:min-h-[50px] pn:w-full pn:cursor-pointer pn:object-contain",c),style:{height:null!=i?i:"auto"},src:t,draggable:!0,loading:"lazy",crossOrigin:s,alt:m,onDragStart:()=>{r(({x:e,y:n},t,r)=>{a({x:e,y:n},t,r)})},onDragEnd:()=>{r(null)},onLoad:d}),l&&e("div",{className:"credit pn:absolute pn:bottom-0 pn:left-0 pn:w-full pn:bg-gradient-to-b pn:from-transparent pn:via-black/40 pn:to-black/60 pn:p-[3px] pn:pt-[10px] pn:text-center pn:text-[10px] pn:text-white pn:[&_a]:text-white pn:[&_a]:underline",children:l})]})})};export const ImagesGrid=({images:r,onSelect:o,isLoading:p,getPreview:i,loadMore:c,getCredit:d,getAlt:m,getImageClassName:u,rowsNumber:g,crossOrigin:h="anonymous",shadowEnabled:f,itemHeight:x,error:b,hideNoResults:w=!1})=>{const v=g||2,_=t.useRef(null),N=[];for(var y=0;y<v;y++){N.push((r||[]).filter((e,n)=>n%v===y))}const j=t.useRef(null),H=()=>{var e;const n=_.current,t=!!n&&n.scrollHeight>n.offsetHeight+5,l=r&&r.length,o=Array.from(null!==(e=null==n?void 0:n.querySelectorAll("img"))&&void 0!==e?e:[]).every(e=>e.complete);!t&&c&&!p&&l&&o&&(j.current||(j.current=window.setTimeout(()=>{j.current=null,c&&c()},100)))},S=()=>{H()};return t.useEffect(()=>(H(),()=>{null!==j.current&&window.clearTimeout(j.current),j.current=null}),[r&&r.length,p]),n("div",{onScroll:e=>{const n=e.target.scrollHeight-e.target.scrollTop-e.target.offsetHeight;c&&!p&&n<200&&c()},ref:_,className:"pn:h-full pn:overflow-auto",children:[N.map((n,t)=>e("div",{className:"pn:float-left",style:{width:100/v+"%"},children:n.map((n,t)=>e(s,{url:i(n),onSelect:(e,t,r)=>o(n,e,t,r),credit:d&&d(n),crossOrigin:h,shadowEnabled:f,itemHeight:x,className:u&&u(n),onLoad:S,alt:m&&m(n)||""},t))},t)),p&&e("div",{className:"pn:clear-both pn:flex pn:justify-center pn:p-[30px]",children:e(a,{className:"pn:size-5 pn:text-muted-foreground"})}),!p&&(!r||!r.length)&&!b&&!w&&e("p",{className:"pn:p-[30px] pn:text-center",children:l("sidePanel.noResults")}),b&&e("p",{className:"pn:clear-both pn:p-[30px] pn:text-center",children:l("sidePanel.error")})]})};
|
package/side-panel/index.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export { SidePanel, DEFAULT_SECTIONS, INTERNAL_SECTIONS, TemplatesSection, TextSection, PhotosSection, ElementsSection, UploadSection, BackgroundSection, PagesSection, LayersSection, SizeSection, DrawSection, VideosSection, } from
|
|
2
|
-
export type { SidePanelProps } from
|
|
3
|
-
export type { Section } from
|
|
4
|
-
export { SectionTab } from
|
|
5
|
-
export { TextPanel, setFontUploadFunc } from
|
|
6
|
-
export type { TextPanelProps } from
|
|
7
|
-
export { PhotosPanel } from
|
|
8
|
-
export type { PhotosPanelProps } from
|
|
9
|
-
export { ElementsPanel } from
|
|
10
|
-
export type { ElementsPanelProps } from
|
|
11
|
-
export { UploadPanel } from
|
|
12
|
-
export type { UploadPanelProps } from
|
|
13
|
-
export { setUploadFunc } from
|
|
14
|
-
export { BackgroundPanel } from
|
|
15
|
-
export type { BackgroundPanelProps } from
|
|
16
|
-
export { SizePanel } from
|
|
17
|
-
export type { SizePanelProps } from
|
|
18
|
-
export { PagesPanel } from
|
|
19
|
-
export { LayersPanel } from
|
|
20
|
-
export { DrawPanel } from
|
|
21
|
-
export type { DrawPanelProps } from
|
|
22
|
-
export { TemplatesPanel } from
|
|
23
|
-
export type { TemplatesPanelProps } from
|
|
24
|
-
export { ImagesGrid } from
|
|
25
|
-
export { VideosPanel } from
|
|
26
|
-
export { VideosGrid } from
|
|
27
|
-
export { AiImagesPanel } from
|
|
28
|
-
export { AnimationsPanel } from
|
|
29
|
-
export { EffectsPanel } from
|
|
30
|
-
export { EffectCard } from
|
|
31
|
-
export { ImageClipPanel } from
|
|
32
|
-
export { selectImage } from
|
|
33
|
-
export { selectGif } from
|
|
34
|
-
export { selectSvg } from
|
|
35
|
-
export { selectVideo } from
|
|
1
|
+
export { SidePanel, DEFAULT_SECTIONS, INTERNAL_SECTIONS, TemplatesSection, TextSection, PhotosSection, ElementsSection, UploadSection, BackgroundSection, PagesSection, LayersSection, SizeSection, DrawSection, VideosSection, } from './side-panel.js';
|
|
2
|
+
export type { SidePanelProps } from './side-panel.js';
|
|
3
|
+
export type { Section } from './side-panel.js';
|
|
4
|
+
export { SectionTab } from './tab-button.js';
|
|
5
|
+
export { TextPanel, setFontUploadFunc } from './text-panel.js';
|
|
6
|
+
export type { TextPanelProps } from './text-panel.js';
|
|
7
|
+
export { PhotosPanel } from './photos-panel.js';
|
|
8
|
+
export type { PhotosPanelProps } from './photos-panel.js';
|
|
9
|
+
export { ElementsPanel } from './elements-panel.js';
|
|
10
|
+
export type { ElementsPanelProps } from './elements-panel.js';
|
|
11
|
+
export { UploadPanel } from './upload-panel.js';
|
|
12
|
+
export type { UploadPanelProps } from './upload-panel.js';
|
|
13
|
+
export { setUploadFunc } from './upload-panel.js';
|
|
14
|
+
export { BackgroundPanel } from './background-panel.js';
|
|
15
|
+
export type { BackgroundPanelProps } from './background-panel.js';
|
|
16
|
+
export { SizePanel } from './size-panel.js';
|
|
17
|
+
export type { SizePanelProps } from './size-panel.js';
|
|
18
|
+
export { PagesPanel } from './pages-panel.js';
|
|
19
|
+
export { LayersPanel } from './layers-panel.js';
|
|
20
|
+
export { DrawPanel } from './draw-panel.js';
|
|
21
|
+
export type { DrawPanelProps } from './draw-panel.js';
|
|
22
|
+
export { TemplatesPanel } from './templates-panel.js';
|
|
23
|
+
export type { TemplatesPanelProps } from './templates-panel.js';
|
|
24
|
+
export { ImagesGrid } from './images-grid.js';
|
|
25
|
+
export { VideosPanel } from './videos-panel.js';
|
|
26
|
+
export { VideosGrid } from './videos-grid.js';
|
|
27
|
+
export { AiImagesPanel } from './ai-images-panel.js';
|
|
28
|
+
export { AnimationsPanel } from './animations-panel.js';
|
|
29
|
+
export { EffectsPanel } from './effects-panel.js';
|
|
30
|
+
export { EffectCard } from './effect-card.js';
|
|
31
|
+
export { ImageClipPanel } from './image-clip-panel.js';
|
|
32
|
+
export { selectImage } from './select-image.js';
|
|
33
|
+
export { selectGif } from './select-gif.js';
|
|
34
|
+
export { selectSvg } from './select-svg.js';
|
|
35
|
+
export { selectVideo } from './select-video.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { StoreType, Section } from
|
|
3
|
-
export type { Section } from
|
|
4
|
-
export { SectionTab } from
|
|
5
|
-
export { ImagesGrid } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StoreType, Section } from '../ui-types.js';
|
|
3
|
+
export type { Section } from '../ui-types.js';
|
|
4
|
+
export { SectionTab } from './tab-button.js';
|
|
5
|
+
export { ImagesGrid } from './images-grid.js';
|
|
6
6
|
export declare const TemplatesSection: Section;
|
|
7
7
|
export declare const TextSection: Section;
|
|
8
8
|
export declare const PhotosSection: Section;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { StoreType } from
|
|
3
|
-
import { type UnitType } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StoreType } from '../ui-types.js';
|
|
3
|
+
import { type UnitType } from '../utils/unit.js';
|
|
4
4
|
export declare const SIZE_CATEGORIES: Array<{
|
|
5
5
|
name: string;
|
|
6
6
|
icon?: React.JSX.Element;
|
package/side-panel/tab-button.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from
|
|
3
|
-
export const SectionTab = ({ children, name, onClick, active, iconSize, }) => (_jsxs("div", { role: "button", onClick: onClick, className: cn(
|
|
2
|
+
import { cn } from '../lib/utils.js';
|
|
3
|
+
export const SectionTab = ({ children, name, onClick, active, iconSize, }) => (_jsxs("div", { role: "button", onClick: onClick, className: cn('polotno-side-panel-tab pn-section-tab pn:w-full pn:cursor-pointer pn:whitespace-pre pn:text-center pn:text-[12px]', 'pn:pt-[15px] pn:pl-[5px] pn:pr-[5px] pn:h-[72px]', 'pn:max-md:h-[54px] pn:max-md:pt-[9px] pn:max-md:min-w-[72px] pn:max-md:w-min', 'pn:pn-mobile:h-[54px] pn:pn-mobile:pt-[9px] pn:pn-mobile:min-w-[72px] pn:pn-mobile:w-min', 'pn:hover:bg-sidebar-accent pn:hover:text-sidebar-accent-foreground', active && 'active pn:bg-sidebar-accent pn:text-sidebar-accent-foreground'), children: [_jsx("div", { style: { fontSize: (iconSize || 14) + 'px' }, children: children }), _jsx("div", { style: { paddingTop: '5px' }, children: name })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { StoreType } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StoreType } from '../ui-types.js';
|
|
3
3
|
export declare const TemplatesPanel: (({ store }: {
|
|
4
4
|
store: StoreType;
|
|
5
5
|
}) => React.JSX.Element) & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export declare function unsplashCredit(image: any): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { StoreType } from
|
|
3
|
-
export { setUploadFunc } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StoreType } from '../ui-types.js';
|
|
3
|
+
export { setUploadFunc } from '../utils/file.js';
|
|
4
4
|
export declare const UploadPanel: ({ store }: {
|
|
5
5
|
store: StoreType;
|
|
6
6
|
}) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as i from"react";import{PolotnoIcon as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as i from"react";import{PolotnoIcon as n}from"../icons/registry.js";import{getVideoPreview as r}from"../utils/video.js";import{getMediaType as o,getUploadFunc as l,MEDIA_ACCEPT as s}from"../utils/file.js";import{insertMediaIntoPage as a}from"../utils/insert-file.js";import{ImagesGrid as p}from"./images-grid.js";import{t as c}from"../utils/l10n.js";import{cn as d}from"../lib/utils.js";import{Button as u}from"../primitives/button.js";export{setUploadFunc}from"../utils/file.js";let m=[],f=0;function g(){const e=new Blob(['\n <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">\n <circle cx="50" cy="50" r="45" fill="#f0f0f0" stroke="#ccc" stroke-width="2"/>\n <path d="M40,35 L40,65 L55,50 L70,50 M70,35 Q80,50 70,65" fill="none" stroke="#666" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '],{type:"image/svg+xml"});return URL.createObjectURL(e)}async function v(e,t){if("audio"===t){return g()}const i=URL.createObjectURL(e);if("video"!==t){return i}try{return await r(i)}finally{URL.revokeObjectURL(i)}}const h=e=>{e.startsWith("blob:")&&URL.revokeObjectURL(e)};export const UploadPanel=({store:y})=>{const[w,x]=i.useState(m),[j,L]=i.useState([]),[b,U]=i.useState(null),k=i.useRef(null);i.useEffect(()=>{m=w},[w]);const R=[...j,...w];return t("div",{className:"pn:flex pn:h-full pn:flex-col",children:[e("div",{style:{height:"45px",paddingTop:"5px"},children:c("sidePanel.uploadTip")}),e("div",{style:{marginBottom:"20px"},children:t("label",{htmlFor:"input-file",children:[t(u,{variant:"outline",style:{width:"100%"},onClick:()=>{var e;null===(e=k.current)||void 0===e||e.click()},children:[e(n,{name:"action.add"}),c("sidePanel.uploadImage")]}),e("input",{type:"file",ref:k,style:{display:"none"},accept:s,onChange:async e=>{var t;const{target:i}=e,n=Array.from(null!==(t=i.files)&&void 0!==t?t:[]);i.value="",U(null);const s=[];for(const r of n){const e=o(r);e&&s.push({file:r,type:e})}s.length<n.length&&U(c("sidePanel.uploadUnsupported"));const a=await Promise.all(s.map(async({file:e,type:t})=>({id:f++,preview:await v(e,t),pending:!0})));L(e=>[...a,...e]);for(const[o,{file:p,type:d}]of s.entries()){const t=a[o];try{const e=await l()(p);let t=e;"video"===d?t=await r(e):"audio"===d&&(t=g()),x(i=>[{url:e,type:d,preview:t,name:p.name},...i])}catch(e){console.error(e),U(c("sidePanel.uploadFailed"))}finally{L(e=>e.filter(e=>e.id!==t.id)),h(t.preview)}}},multiple:!0})]})}),b&&e("div",{className:"pn:pb-[10px] pn:text-center pn:text-xs pn:text-muted-foreground",children:b}),e(p,{images:R,isLoading:!1,getPreview:e=>e.preview,getImageClassName:e=>"pending"in e?d("pn:animate-pulse pn:opacity-50"):"",hideNoResults:!0,onSelect:async(e,t,i)=>{"pending"in e||a({url:e.url,type:e.type,store:y,droppedPos:t,targetElement:i,name:e.name})}})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useCallback as r,useRef as t}from"react";import{registerNextDomDrop as i}from"../canvas/page.js";import{Spinner as p}from"../primitives/spinner.js";export const VideosGrid=({items:l,onSelect:a,loadMore:s,isLoading:c,error:d,getCredit:u})=>{const m=t(null),v=r(e=>{c||(m.current&&m.current.disconnect(),m.current=new IntersectionObserver(e=>{e[0].isIntersecting&&s()}),e&&m.current.observe(e))},[c]);if(d){return e("div",{children:d.message})}if(!l||0===l.length){return null}const g=l.filter((e,n)=>n%2==1),x=l.filter((e,n)=>n%2==0);return n("div",{className:"pn:h-full pn:overflow-auto",children:[[g,x].map((n,r)=>e("div",{className:"pn:float-left pn:w-1/2",children:n.map(n=>e(o,{item:n,onClick:()=>a(n),onDragStart:()=>{i((e,r)=>{a(n,e,r)})},onDragEnd:()=>i(null),getCredit:u},n.id))},r)),e("div",{ref:v,className:"pn:clear-both pn:flex pn:justify-center pn:p-12",children:c&&e(p,{className:"pn:size-5 pn:text-muted-foreground"})})]})};const o=({item:r,onClick:i,onDragEnd:p,onDragStart:o,getCredit:l})=>{var a;const s=t(null),c=(null===(a=r.video_files.find(e=>"sd"===e.quality))||void 0===a?void 0:a.link)||"";if(!c){return null}const d=new Date(1e3*r.duration).toISOString();let u;return u=r.duration>3600?d.substring(11,19):d.substring(14,19),e("div",{className:"pn:group/video pn:w-full pn:p-[5px] pn:hover:[&_.video-grid__item-credit]:opacity-100",children:n("div",{className:"pn:relative",draggable:!0,onClick:i,onDragEnd:p,onDragStart:o,onMouseEnter:()=>{var e,n;null===(n=null===(e=s.current)||void 0===e?void 0:e.play())||void 0===n||n.catch(()=>{})},onMouseLeave:()=>{var e;null===(e=s.current)||void 0===e||e.pause(),s.current&&(s.current.currentTime=0)},children:[e("video",{poster:r.video_pictures[0].picture,controls:!1,ref:s,muted:!0,preload:"none",playsInline:!0,className:"pn:block pn:max-h-[300px] pn:min-h-[50px] pn:w-full pn:cursor-pointer pn:rounded-[5px] pn:object-cover pn:shadow-[0_0_5px_rgba(16,22,26,0.3)]",children:e("source",{src:c})}),e("div",{className:"pn:absolute pn:right-2 pn:top-2 pn:flex pn:items-center pn:justify-center pn:rounded-full pn:bg-black/50 pn:px-[7px] pn:py-[2px] pn:text-center pn:text-white",children:e("span",{className:"pn:text-xs",children:u})}),l&&e("div",{className:"video-grid__item-credit pn:absolute pn:inset-x-0 pn:bottom-0 pn:bg-gradient-to-b pn:from-transparent pn:via-black/40 pn:to-black/60 pn:p-[3px] pn:text-center pn:text-[10px] pn:text-white pn:opacity-0 pn:[&_a]:text-white pn:[&_a]:underline",children:l(r)})]})})};
|
package/themes/blueprint.css
CHANGED