maverick-wave-astro 1.31.0 → 1.32.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/components/Alert.astro +3 -1
- package/components/Bio.astro +24 -4
- package/components/Feed.astro +3 -1
- package/components/Icon.astro +4 -2
- package/components/LanguageSwitch.astro +4 -1
- package/components/Modal.astro +3 -1
- package/components/Stories.astro +3 -1
- package/dist/icons.d.ts +1 -0
- package/dist/icons.js +1 -0
- package/package.json +3 -3
package/components/Alert.astro
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// links under the text as the `actions` slot. Dismissible, the MaverickWave
|
|
5
5
|
// script fades it out - only for what may go, since it is back on reload.
|
|
6
6
|
import { config } from '../dist/config.js';
|
|
7
|
+
import { PACKAGE_ICONS } from '../dist/icons.js';
|
|
8
|
+
import Icon from './Icon.astro';
|
|
7
9
|
|
|
8
10
|
interface Props {
|
|
9
11
|
type?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
@@ -57,7 +59,7 @@ const {
|
|
|
57
59
|
class="mw-btn-mini mw-btn-mini-danger mw-alert-close"
|
|
58
60
|
aria-label={title ? `${closeLabel}: ${title}` : closeLabel}
|
|
59
61
|
>
|
|
60
|
-
|
|
62
|
+
<Icon svg={PACKAGE_ICONS.close} size={10} strokeWidth={2.4} />
|
|
61
63
|
</button>
|
|
62
64
|
)
|
|
63
65
|
}
|
package/components/Bio.astro
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// The link page behind a profile: who this is, then one card per link with the
|
|
3
3
|
// imprint always last. The only section of its page, under the site's own
|
|
4
4
|
// header with the way back to the start.
|
|
5
|
+
import type { ImageMetadata } from 'astro';
|
|
6
|
+
import { Image } from 'astro:assets';
|
|
7
|
+
|
|
5
8
|
import { bioHref, type BioLink, isUpload } from '../dist/bio.js';
|
|
6
9
|
import { config } from '../dist/config.js';
|
|
7
10
|
import { withBase } from '../dist/path.js';
|
|
@@ -12,8 +15,11 @@ import type { SocialLink } from './SocialLinks.astro';
|
|
|
12
15
|
|
|
13
16
|
interface Props {
|
|
14
17
|
name: string;
|
|
15
|
-
// A werkbank upload without extension,
|
|
16
|
-
|
|
18
|
+
// A werkbank upload without extension, a file from public/ with one, or an
|
|
19
|
+
// imported image from src/
|
|
20
|
+
avatar?: string | ImageMetadata;
|
|
21
|
+
// Upright 4:5 for a photo that shows more than a face
|
|
22
|
+
avatarShape?: 'round' | 'portrait';
|
|
17
23
|
tagline?: string;
|
|
18
24
|
// What is true today - free places, back from holiday on the 3rd
|
|
19
25
|
status?: string;
|
|
@@ -29,6 +35,7 @@ const german = config.site.lang.startsWith('de');
|
|
|
29
35
|
const {
|
|
30
36
|
name,
|
|
31
37
|
avatar,
|
|
38
|
+
avatarShape = 'round',
|
|
32
39
|
tagline,
|
|
33
40
|
status,
|
|
34
41
|
links,
|
|
@@ -44,8 +51,21 @@ const {
|
|
|
44
51
|
<div class="mw-bio-head">
|
|
45
52
|
{
|
|
46
53
|
avatar && (
|
|
47
|
-
<div
|
|
48
|
-
{
|
|
54
|
+
<div
|
|
55
|
+
class:list={[
|
|
56
|
+
'mw-bio-avatar',
|
|
57
|
+
avatarShape === 'portrait' && 'mw-bio-avatar-portrait',
|
|
58
|
+
]}
|
|
59
|
+
>
|
|
60
|
+
{typeof avatar === 'object' ? (
|
|
61
|
+
<Image
|
|
62
|
+
src={avatar}
|
|
63
|
+
alt=""
|
|
64
|
+
width={260}
|
|
65
|
+
loading="eager"
|
|
66
|
+
fetchpriority="high"
|
|
67
|
+
/>
|
|
68
|
+
) : isUpload(avatar) ? (
|
|
49
69
|
<Picture src={avatar} alt="" sizes="104px" widths={[260]} eager />
|
|
50
70
|
) : (
|
|
51
71
|
<img src={withBase(avatar)} alt="" width="104" height="104" />
|
package/components/Feed.astro
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
// Each tile opens its post as a popover - the browser does that, no script.
|
|
4
4
|
import { config, siteLocale } from '../dist/config.js';
|
|
5
5
|
import { longDate, parseIsoDate } from '../dist/date.js';
|
|
6
|
+
import { PACKAGE_ICONS } from '../dist/icons.js';
|
|
6
7
|
import { publicImage } from '../dist/image-size.js';
|
|
8
|
+
import Icon from './Icon.astro';
|
|
7
9
|
|
|
8
10
|
interface Props {
|
|
9
11
|
posts: readonly {
|
|
@@ -64,7 +66,7 @@ const {
|
|
|
64
66
|
popovertargetaction="hide"
|
|
65
67
|
aria-label={closeLabel}
|
|
66
68
|
>
|
|
67
|
-
|
|
69
|
+
<Icon svg={PACKAGE_ICONS.close} />
|
|
68
70
|
</button>
|
|
69
71
|
<img {...image} alt={post.alt} loading="lazy" decoding="async" />
|
|
70
72
|
{(post.text || post.date) && (
|
package/components/Icon.astro
CHANGED
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
interface Props {
|
|
5
5
|
svg: string;
|
|
6
6
|
size?: number;
|
|
7
|
+
// Heavier for a small icon, or the line fades out
|
|
8
|
+
strokeWidth?: number;
|
|
7
9
|
class?: string;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
const { svg, size = 20, class: className } = Astro.props;
|
|
12
|
+
const { svg, size = 20, strokeWidth = 1.7, class: className } = Astro.props;
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
<svg
|
|
@@ -18,7 +20,7 @@ const { svg, size = 20, class: className } = Astro.props;
|
|
|
18
20
|
viewBox="0 0 24 24"
|
|
19
21
|
fill="none"
|
|
20
22
|
stroke="currentColor"
|
|
21
|
-
stroke-width=
|
|
23
|
+
stroke-width={strokeWidth}
|
|
22
24
|
stroke-linecap="round"
|
|
23
25
|
stroke-linejoin="round"
|
|
24
26
|
aria-hidden="true"
|
|
@@ -10,6 +10,7 @@ interface Props {
|
|
|
10
10
|
href: string;
|
|
11
11
|
active?: boolean;
|
|
12
12
|
}[];
|
|
13
|
+
// The word in front of the name: "Sprache" reads "Sprache: Deutsch (DE)"
|
|
13
14
|
label: string;
|
|
14
15
|
class?: string;
|
|
15
16
|
}
|
|
@@ -19,7 +20,9 @@ const current = languages.find(language => language.active) ?? languages[0];
|
|
|
19
20
|
---
|
|
20
21
|
|
|
21
22
|
<details class:list={['mw-dropdown mw-dropdown-end mw-lang-switch', className]}>
|
|
22
|
-
<summary
|
|
23
|
+
<summary
|
|
24
|
+
aria-label={`${label}: ${current.name} (${current.code.toUpperCase()})`}
|
|
25
|
+
>
|
|
23
26
|
<span class:list={['mw-flag', `mw-flag-${current.flag}`]}></span>
|
|
24
27
|
<span class="mw-lang-switch-code">{current.code}</span>
|
|
25
28
|
<Icon
|
package/components/Modal.astro
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// focus trap and the inert page come from the element itself. As a drawer it
|
|
5
5
|
// is a full-height panel at the right edge, or the left with "start".
|
|
6
6
|
import { config } from '../dist/config.js';
|
|
7
|
+
import { PACKAGE_ICONS } from '../dist/icons.js';
|
|
8
|
+
import Icon from './Icon.astro';
|
|
7
9
|
|
|
8
10
|
interface Props {
|
|
9
11
|
id: string;
|
|
@@ -41,7 +43,7 @@ const {
|
|
|
41
43
|
<div class="mw-modal-header">
|
|
42
44
|
<h4 id={`${id}-title`} class="mw-modal-title">{title}</h4>
|
|
43
45
|
<button type="button" class="mw-modal-close" aria-label={closeLabel}>
|
|
44
|
-
|
|
46
|
+
<Icon svg={PACKAGE_ICONS.close} size={16} />
|
|
45
47
|
</button>
|
|
46
48
|
</div>
|
|
47
49
|
<div class="mw-modal-body">
|
package/components/Stories.astro
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
// phone. The stylesheet plays the frames, the script adds tapping, video on
|
|
4
4
|
// its turn and closing at the end.
|
|
5
5
|
import { config } from '../dist/config.js';
|
|
6
|
+
import { PACKAGE_ICONS } from '../dist/icons.js';
|
|
6
7
|
import { publicImage } from '../dist/image-size.js';
|
|
7
8
|
import { withBase } from '../dist/path.js';
|
|
9
|
+
import Icon from './Icon.astro';
|
|
8
10
|
|
|
9
11
|
interface Props {
|
|
10
12
|
stories: readonly {
|
|
@@ -55,7 +57,7 @@ const {
|
|
|
55
57
|
popovertargetaction="hide"
|
|
56
58
|
aria-label={closeLabel}
|
|
57
59
|
>
|
|
58
|
-
|
|
60
|
+
<Icon svg={PACKAGE_ICONS.close} />
|
|
59
61
|
</button>
|
|
60
62
|
</div>
|
|
61
63
|
{story.frames.map(frame =>
|
package/dist/icons.d.ts
CHANGED
|
@@ -18,4 +18,5 @@ export declare const PACKAGE_ICONS: {
|
|
|
18
18
|
readonly sparkle: "<path d=\"M12 2.8 13.9 9l6.2 1.9-6.2 1.9L12 19l-1.9-6.2L3.9 10.9 10.1 9 12 2.8Z\"/><path d=\"M19 16.5l.7 2.2 2.2.7-2.2.7-.7 2.2-.7-2.2-2.2-.7 2.2-.7.7-2.2Z\"/>";
|
|
19
19
|
readonly star: "<path d=\"m12 3.8 2.5 5.1 5.6.8-4 4 .9 5.6L12 16.6l-5 2.7.9-5.6-4-4 5.6-.8Z\"/>";
|
|
20
20
|
readonly 'panel-right': "<rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2.4\"/><path d=\"M15 4v16\"/>";
|
|
21
|
+
readonly close: "<path d=\"M6 6l12 12M18 6 6 18\"/>";
|
|
21
22
|
};
|
package/dist/icons.js
CHANGED
|
@@ -20,4 +20,5 @@ export const PACKAGE_ICONS = {
|
|
|
20
20
|
sparkle: '<path d="M12 2.8 13.9 9l6.2 1.9-6.2 1.9L12 19l-1.9-6.2L3.9 10.9 10.1 9 12 2.8Z"/><path d="M19 16.5l.7 2.2 2.2.7-2.2.7-.7 2.2-.7-2.2-2.2-.7 2.2-.7.7-2.2Z"/>',
|
|
21
21
|
star: '<path d="m12 3.8 2.5 5.1 5.6.8-4 4 .9 5.6L12 16.6l-5 2.7.9-5.6-4-4 5.6-.8Z"/>',
|
|
22
22
|
'panel-right': '<rect x="3" y="4" width="18" height="16" rx="2.4"/><path d="M15 4v16"/>',
|
|
23
|
+
close: '<path d="M6 6l12 12M18 6 6 18"/>',
|
|
23
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maverick-wave-astro",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"description": "Shared frame for static Astro homepages built with MaverickWave: layout, SEO, design variants, schedule, building blocks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"astro": "^7.2.0",
|
|
56
|
-
"maverick-wave": "^6.
|
|
56
|
+
"maverick-wave": "^6.18.0",
|
|
57
57
|
"vite": "^8.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"eslint-plugin-astro": "^1.5.0",
|
|
70
70
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
71
71
|
"globals": "^16.5.0",
|
|
72
|
-
"maverick-wave": "^6.
|
|
72
|
+
"maverick-wave": "^6.18.0",
|
|
73
73
|
"playwright-core": "^1.64.0",
|
|
74
74
|
"prettier": "^3.6.2",
|
|
75
75
|
"prettier-plugin-astro": "^0.14.1",
|