@inizioevoke/astro-core 2.2.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/CssBackgroundImage.astro +1 -1
- package/src/components/CssVariables.astro +7 -7
- package/src/components/FlipCard/FlipCard.astro +2 -1
- package/src/components/ISI/Right/RightISI.astro +1 -1
- package/src/components/Modal/Modal.astro +1 -1
- package/src/components/Modal/ModalOverlay.astro +1 -1
- package/src/components/Modal/ModalTrigger.astro +1 -1
- package/src/components/PdfViewer/PdfViewer.astro +1 -1
- package/src/components/Tabs/TabItem.astro +2 -1
- package/src/components/Tabs/Tabs.astro +1 -1
- package/src/components/Zoom/Zoom.astro +1 -1
- package/src/components/index.ts +62 -12
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ async function getImageSrc({image, format, quality, width, height, optimize}: Im
|
|
|
50
50
|
if (optimize !== false) {
|
|
51
51
|
const img = await getImage({
|
|
52
52
|
src: image,
|
|
53
|
-
format: format ??
|
|
53
|
+
format: format ?? 'webp',
|
|
54
54
|
quality: quality,
|
|
55
55
|
width,
|
|
56
56
|
height
|
|
@@ -5,7 +5,7 @@ import { getImage } from "astro:assets";
|
|
|
5
5
|
|
|
6
6
|
export type CssVariableType = 'image' | 'url';
|
|
7
7
|
|
|
8
|
-
export interface
|
|
8
|
+
export interface CssBreakpoint {
|
|
9
9
|
minWidth?: string | number;
|
|
10
10
|
maxWidth?: string | number;
|
|
11
11
|
value: string | number | ImageMetadata;
|
|
@@ -15,10 +15,10 @@ export interface CssVariable {
|
|
|
15
15
|
name: string;
|
|
16
16
|
type?: CssVariableType;
|
|
17
17
|
value: string | number | ImageMetadata;
|
|
18
|
-
breakpoints?:
|
|
18
|
+
breakpoints?: CssBreakpoint[];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export interface
|
|
21
|
+
export interface CssImageVariable extends CssVariable {
|
|
22
22
|
type: 'image';
|
|
23
23
|
value: ImageMetadata;
|
|
24
24
|
optimize?: boolean;
|
|
@@ -30,7 +30,7 @@ export interface ImageCssVariable extends CssVariable {
|
|
|
30
30
|
|
|
31
31
|
export interface Props {
|
|
32
32
|
selector?: string;
|
|
33
|
-
variables: (CssVariable |
|
|
33
|
+
variables: (CssVariable | CssImageVariable)[];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const { selector, variables } = Astro.props;
|
|
@@ -73,14 +73,14 @@ for (const v of variables) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
async function createVariable(v:
|
|
76
|
+
async function createVariable(v: CssImageVariable | CssVariable) {
|
|
77
77
|
switch (v.type) {
|
|
78
78
|
case 'image': {
|
|
79
|
-
const iv = v as
|
|
79
|
+
const iv = v as CssImageVariable;
|
|
80
80
|
if (iv.optimize !== false) {
|
|
81
81
|
const img = await getImage({
|
|
82
82
|
src: iv.value,
|
|
83
|
-
format: iv.format ??
|
|
83
|
+
format: iv.format ?? 'webp',
|
|
84
84
|
quality: iv.quality,
|
|
85
85
|
width: iv.width,
|
|
86
86
|
height: iv.height
|
|
@@ -3,7 +3,7 @@ import type { HTMLAttributes } from 'astro/types';
|
|
|
3
3
|
import ScrollContainer, { type Props as ScrollContainerProps } from '../../ScrollContainer/ScrollContainer.astro';
|
|
4
4
|
import './RightISI.css';
|
|
5
5
|
|
|
6
|
-
interface Props extends HTMLAttributes<'div'> {
|
|
6
|
+
export interface Props extends HTMLAttributes<'div'> {
|
|
7
7
|
scrollContainer?: ScrollContainerProps;
|
|
8
8
|
headerButton?: boolean;
|
|
9
9
|
transitionDuration?: number
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { HTMLAttributes } from 'astro/types';
|
|
3
3
|
import './Modal.css';
|
|
4
4
|
|
|
5
|
-
interface Props extends HTMLAttributes<'div'> {
|
|
5
|
+
export interface Props extends HTMLAttributes<'div'> {
|
|
6
6
|
id: string;
|
|
7
7
|
closeButton?: 'default' | 'minimal' | 'none' | 'false' | false;
|
|
8
8
|
closeButtonAtts?: Record<string, string>;
|
|
@@ -5,7 +5,7 @@ import Modal from '../Modal/Modal.astro';
|
|
|
5
5
|
import ModalTrigger from '../Modal/ModalTrigger.astro';
|
|
6
6
|
import type { ModalAnimation } from '../Modal/Modal';
|
|
7
7
|
|
|
8
|
-
interface Props extends HTMLAttributes<'div'> {
|
|
8
|
+
export interface Props extends HTMLAttributes<'div'> {
|
|
9
9
|
animation?: ModalAnimation;
|
|
10
10
|
modalIncludeTitle?: boolean;
|
|
11
11
|
modalIncludeFooter?: boolean;
|
package/src/components/index.ts
CHANGED
|
@@ -1,12 +1,62 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
export {
|
|
2
|
+
default as CssBackgroundImage,
|
|
3
|
+
type Props as CssBackgroundImageProps,
|
|
4
|
+
} from "./CssBackgroundImage.astro";
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
default as CssVariables,
|
|
8
|
+
type Props as CssVariablesProps,
|
|
9
|
+
type CssBreakpoint,
|
|
10
|
+
type CssVariable,
|
|
11
|
+
type CssImageVariable
|
|
12
|
+
} from "./CssVariables.astro";
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
default as FlipCard,
|
|
16
|
+
type Props as FlipCardProps,
|
|
17
|
+
} from "./FlipCard/FlipCard.astro";
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
default as RightISI,
|
|
21
|
+
type Props as RightISIProps,
|
|
22
|
+
} from "./ISI/Right/RightISI.astro";
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
default as Modal,
|
|
26
|
+
type Props as ModalProps,
|
|
27
|
+
} from "./Modal/Modal.astro";
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
default as ModalOverlay,
|
|
31
|
+
type Props as ModalOverlayProps,
|
|
32
|
+
} from "./Modal/ModalOverlay.astro";
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
default as ModalTrigger,
|
|
36
|
+
type Props as ModalTriggerProps,
|
|
37
|
+
} from "./Modal/ModalTrigger.astro";
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
default as PdfViewer,
|
|
41
|
+
type Props as PdfViewerProps,
|
|
42
|
+
} from "./PdfViewer/PdfViewer.astro";
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
default as ScrollContainer,
|
|
46
|
+
type Props as ScrollContainerProps,
|
|
47
|
+
} from "./ScrollContainer/ScrollContainer.astro";
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
default as Tabs,
|
|
51
|
+
type Props as TabsProps
|
|
52
|
+
} from "./Tabs/Tabs.astro";
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
default as TabItem,
|
|
56
|
+
type Props as TabItemProps,
|
|
57
|
+
} from "./Tabs/TabItem.astro";
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
default as Zoom,
|
|
61
|
+
type Props as ZoomProps
|
|
62
|
+
} from "./Zoom/Zoom.astro";
|