@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inizioevoke/astro-core",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -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 ?? image.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 Breakpoint {
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?: Breakpoint[];
18
+ breakpoints?: CssBreakpoint[];
19
19
  }
20
20
 
21
- export interface ImageCssVariable extends CssVariable {
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 | ImageCssVariable)[];
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: ImageCssVariable | CssVariable) {
76
+ async function createVariable(v: CssImageVariable | CssVariable) {
77
77
  switch (v.type) {
78
78
  case 'image': {
79
- const iv = v as ImageCssVariable;
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 ?? iv.value.format,
83
+ format: iv.format ?? 'webp',
84
84
  quality: iv.quality,
85
85
  width: iv.width,
86
86
  height: iv.height
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from 'astro/types';
3
3
  import './FlipCard.css';
4
- interface Props extends HTMLAttributes<'div'> {
4
+
5
+ export interface Props extends HTMLAttributes<'div'> {
5
6
  width?: number;
6
7
  height?: number;
7
8
  }
@@ -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>;
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from "astro/types";
3
3
 
4
- interface Props extends HTMLAttributes<'div'> {
4
+ export interface Props extends HTMLAttributes<'div'> {
5
5
  class?: string;
6
6
  }
7
7
 
@@ -2,7 +2,7 @@
2
2
  import type { HTMLAttributes } from "astro/types";
3
3
  import type { ModalAnimation } from './Modal';
4
4
 
5
- interface Props extends HTMLAttributes<'button'> {
5
+ export interface Props extends HTMLAttributes<'button'> {
6
6
  modal: string;
7
7
  animation?: ModalAnimation;
8
8
  }
@@ -4,7 +4,7 @@ import type { Layout } from './PdfViewer';
4
4
  import type { Scrolling } from '../ScrollContainer/ScrollContainer';
5
5
  import './PdfViewer.css';
6
6
 
7
- interface Props {
7
+ export interface Props {
8
8
  id: string;
9
9
  class?: string;
10
10
  height?: number | string;
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from 'astro/types';
3
- interface Props {
3
+
4
+ export interface Props {
4
5
  active?: true;
5
6
  tabAttrs?: HTMLAttributes<'div'>
6
7
  panelAttrs?: HTMLAttributes<'div'>;
@@ -2,7 +2,7 @@
2
2
  import type { HTMLAttributes } from 'astro/types';
3
3
  import './Tabs.css';
4
4
 
5
- interface Props {
5
+ export interface Props {
6
6
  listType?: 'ul' | 'none'
7
7
  }
8
8
 
@@ -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;
@@ -1,12 +1,62 @@
1
- export { default as CssBackgroundImage } from './CssBackgroundImage.astro';
2
- export { default as CssVariables } from './CssVariables.astro';
3
- export { default as FlipCard } from './FlipCard/FlipCard.astro';
4
- export { default as RightISI } from './ISI/Right/RightISI.astro';
5
- export { default as Modal } from './Modal/Modal.astro';
6
- export { default as ModalOverlay } from './Modal/ModalOverlay.astro';
7
- export { default as ModalTrigger } from './Modal/ModalTrigger.astro';
8
- export { default as PdfViewer } from './PdfViewer/PdfViewer.astro';
9
- export { default as ScrollContainer } from './ScrollContainer/ScrollContainer.astro';
10
- export { default as Tabs } from './Tabs/Tabs.astro';
11
- export { default as TabItem } from './Tabs/TabItem.astro';
12
- export { default as Zoom } from './Zoom/Zoom.astro';
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";