@glimstone/svelte 4.5.1 → 4.5.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/dist/AboutCard.svelte
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
paypalButton?: string;
|
|
12
12
|
report: string;
|
|
13
13
|
repoButton: string;
|
|
14
|
+
discordButton?: string;
|
|
14
15
|
mailButton: string;
|
|
15
16
|
mailSubject: string;
|
|
16
17
|
version: string;
|
|
@@ -29,6 +30,8 @@
|
|
|
29
30
|
paypalGlyph?: Snippet;
|
|
30
31
|
onPaypal?: () => void;
|
|
31
32
|
onCrypto?: () => void;
|
|
33
|
+
discordUrl?: string;
|
|
34
|
+
discordGlyph?: Snippet;
|
|
32
35
|
mailAddress?: string;
|
|
33
36
|
mailGlyph?: Snippet;
|
|
34
37
|
openUrl?: (url: string) => void;
|
|
@@ -58,6 +61,8 @@
|
|
|
58
61
|
paypalGlyph,
|
|
59
62
|
onPaypal,
|
|
60
63
|
onCrypto,
|
|
64
|
+
discordUrl,
|
|
65
|
+
discordGlyph,
|
|
61
66
|
mailAddress,
|
|
62
67
|
mailGlyph,
|
|
63
68
|
openUrl = openInBrowser,
|
|
@@ -77,9 +82,18 @@
|
|
|
77
82
|
about={{ text, onCoffee, coffeeArt, onPaypal, paypalGlyph, onCrypto, cryptoGlyph }}
|
|
78
83
|
version={{ text: { title: text.version, unreleased: text.unreleased }, rows, openUrl }}
|
|
79
84
|
help={{
|
|
80
|
-
text: {
|
|
85
|
+
text: {
|
|
86
|
+
title: text.helpTitle,
|
|
87
|
+
report: text.report,
|
|
88
|
+
repoButton: text.repoButton,
|
|
89
|
+
discordButton: text.discordButton,
|
|
90
|
+
mailButton: text.mailButton,
|
|
91
|
+
mailSubject: text.mailSubject,
|
|
92
|
+
},
|
|
81
93
|
repoUrl,
|
|
82
94
|
repoGlyph,
|
|
95
|
+
discordUrl,
|
|
96
|
+
discordGlyph,
|
|
83
97
|
mailAddress,
|
|
84
98
|
mailGlyph,
|
|
85
99
|
openUrl,
|
|
@@ -9,6 +9,7 @@ export interface AboutCardProps {
|
|
|
9
9
|
paypalButton?: string;
|
|
10
10
|
report: string;
|
|
11
11
|
repoButton: string;
|
|
12
|
+
discordButton?: string;
|
|
12
13
|
mailButton: string;
|
|
13
14
|
mailSubject: string;
|
|
14
15
|
version: string;
|
|
@@ -27,6 +28,8 @@ export interface AboutCardProps {
|
|
|
27
28
|
paypalGlyph?: Snippet;
|
|
28
29
|
onPaypal?: () => void;
|
|
29
30
|
onCrypto?: () => void;
|
|
31
|
+
discordUrl?: string;
|
|
32
|
+
discordGlyph?: Snippet;
|
|
30
33
|
mailAddress?: string;
|
|
31
34
|
mailGlyph?: Snippet;
|
|
32
35
|
openUrl?: (url: string) => void;
|
package/dist/InfoHelpCard.svelte
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
hint?: string;
|
|
10
10
|
report: string;
|
|
11
11
|
repoButton: string;
|
|
12
|
+
/** "Discord". Only drawn together with `discordUrl`. */
|
|
13
|
+
discordButton?: string;
|
|
12
14
|
mailButton: string;
|
|
13
15
|
mailSubject: string;
|
|
14
16
|
/** "Bug report". Only drawn together with `onBugReport`. */
|
|
@@ -24,6 +26,11 @@
|
|
|
24
26
|
/** The mark on the repository button, passed for the same reason as the
|
|
25
27
|
* give buttons' marks. */
|
|
26
28
|
repoGlyph?: Snippet;
|
|
29
|
+
/** An invite to the app's Discord server, for an app that takes its
|
|
30
|
+
* questions there rather than by mail. */
|
|
31
|
+
discordUrl?: string;
|
|
32
|
+
/** `IconDiscord`, Discord's own mark. */
|
|
33
|
+
discordGlyph?: Snippet;
|
|
27
34
|
/** The workshop's own mailbox. Omit it and the card offers no mail route. */
|
|
28
35
|
mailAddress?: string;
|
|
29
36
|
/** The envelope, `MAIL_SVG` from appMarks.ts, which opens under the pointer. */
|
|
@@ -44,16 +51,18 @@
|
|
|
44
51
|
</script>
|
|
45
52
|
|
|
46
53
|
<script lang="ts">
|
|
47
|
-
import { mailHref, offersMail, openInBrowser } from "@glimstone/core";
|
|
54
|
+
import { mailHref, offersDiscord, offersMail, openInBrowser } from "@glimstone/core";
|
|
48
55
|
import Card from "./Card.svelte";
|
|
49
56
|
import ReadmeButton from "./ReadmeButton.svelte";
|
|
50
57
|
|
|
51
58
|
// The second card of the Info tile: a sentence inviting a report, then
|
|
52
|
-
// GitHub, Email, the manual and the bug report.
|
|
59
|
+
// GitHub, Discord, Email, the manual and the bug report.
|
|
53
60
|
let {
|
|
54
61
|
text,
|
|
55
62
|
repoUrl,
|
|
56
63
|
repoGlyph,
|
|
64
|
+
discordUrl,
|
|
65
|
+
discordGlyph,
|
|
57
66
|
mailAddress,
|
|
58
67
|
mailGlyph,
|
|
59
68
|
manualUrl,
|
|
@@ -65,12 +74,16 @@
|
|
|
65
74
|
}: InfoHelpCardProps = $props();
|
|
66
75
|
|
|
67
76
|
const wantsMail = $derived(offersMail(text.report, mailAddress));
|
|
77
|
+
const wantsDiscord = $derived(offersDiscord(text.report, discordUrl) && Boolean(text.discordButton));
|
|
68
78
|
</script>
|
|
69
79
|
|
|
70
80
|
<Card data-glim="InfoHelpCard" title={text.title} hint={text.hint} {hueIndex}>
|
|
71
81
|
<p class="glim-info-text">{text.report}</p>
|
|
72
82
|
<div class="glim-readme-btn-rows">
|
|
73
83
|
<ReadmeButton brand="github" parts={[{ name: text.repoButton, onClick: () => openUrl(repoUrl) }]} mark={repoGlyph} markClass="glim-github-mark" />
|
|
84
|
+
{#if wantsDiscord}
|
|
85
|
+
<ReadmeButton brand="discord" parts={[{ name: text.discordButton!, onClick: () => openUrl(discordUrl!) }]} mark={discordGlyph} markClass="glim-discord-mark" />
|
|
86
|
+
{/if}
|
|
74
87
|
<!-- This button reaches the app's own authors rather than a third party,
|
|
75
88
|
so it follows the user's accent and rainbow. -->
|
|
76
89
|
{#if wantsMail}
|
|
@@ -7,6 +7,8 @@ export interface InfoHelpCardProps {
|
|
|
7
7
|
hint?: string;
|
|
8
8
|
report: string;
|
|
9
9
|
repoButton: string;
|
|
10
|
+
/** "Discord". Only drawn together with `discordUrl`. */
|
|
11
|
+
discordButton?: string;
|
|
10
12
|
mailButton: string;
|
|
11
13
|
mailSubject: string;
|
|
12
14
|
/** "Bug report". Only drawn together with `onBugReport`. */
|
|
@@ -22,6 +24,11 @@ export interface InfoHelpCardProps {
|
|
|
22
24
|
/** The mark on the repository button, passed for the same reason as the
|
|
23
25
|
* give buttons' marks. */
|
|
24
26
|
repoGlyph?: Snippet;
|
|
27
|
+
/** An invite to the app's Discord server, for an app that takes its
|
|
28
|
+
* questions there rather than by mail. */
|
|
29
|
+
discordUrl?: string;
|
|
30
|
+
/** `IconDiscord`, Discord's own mark. */
|
|
31
|
+
discordGlyph?: Snippet;
|
|
25
32
|
/** The workshop's own mailbox. Omit it and the card offers no mail route. */
|
|
26
33
|
mailAddress?: string;
|
|
27
34
|
/** The envelope, `MAIL_SVG` from appMarks.ts, which opens under the pointer. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glimstone/svelte",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "GlimStone's components for Svelte",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"build": "svelte-package -i src -o dist"
|
|
142
142
|
},
|
|
143
143
|
"dependencies": {
|
|
144
|
-
"@glimstone/core": "4.5.
|
|
144
|
+
"@glimstone/core": "4.5.3"
|
|
145
145
|
},
|
|
146
146
|
"peerDependencies": {
|
|
147
147
|
"@internationalized/date": "^3.12.4",
|