@turnipxenon/pineapple 3.0.0-alpha.9 → 3.1.0-alpha.1
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/components/blog_template/BlogTemplate.svelte +2 -2
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
- package/dist/components/dialog_manager/DialogManager.d.ts +2 -1
- package/dist/components/dialog_manager/DialogMangerInit.d.ts +2 -15
- package/dist/components/dialog_manager/DialogMangerInit.js +8 -2
- package/dist/components/dialog_manager/IDialogManager.d.ts +39 -0
- package/dist/components/dialog_manager/IDialogManager.js +4 -0
- package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.d.ts +3 -0
- package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +15 -3
- package/dist/components/dialog_overlay/DialogOverlay.svelte +155 -36
- package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -6
- package/dist/components/pineapple/PineappleBaseLayout.svelte +2 -21
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -3
- package/dist/styles/app.css +9 -14
- package/dist/ui/components/ModalBase.svelte +74 -74
- package/dist/ui/components/SocialSection.svelte +6 -2
- package/dist/ui/components/accordion/PinyaAccordion.svelte +20 -20
- package/dist/ui/components/accordion/PinyaAccordionItem.svelte +28 -28
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte +64 -64
- package/dist/ui/elements/ImageIcon.svelte +53 -53
- package/dist/ui/elements/{pinya-button/component.svelte → PinyaButton/PinyaButton.svelte} +4 -3
- package/dist/ui/elements/PinyaButton/PinyaButton.svelte.d.ts +4 -0
- package/dist/ui/elements/{pinya-button/props.d.ts → PinyaButton/PinyaButtonProps.d.ts} +1 -0
- package/dist/ui/elements/PinyaButton/index.d.ts +2 -0
- package/dist/ui/elements/PinyaButton/index.js +2 -0
- package/dist/ui/elements/{pinya-card/component.svelte → PinyaCard/PinyaCard.svelte} +21 -20
- package/dist/ui/elements/PinyaCard/PinyaCard.svelte.d.ts +7 -0
- package/dist/ui/elements/PinyaCard/index.d.ts +2 -0
- package/dist/ui/elements/PinyaCard/index.js +2 -0
- package/dist/ui/elements/Placeholder.svelte +17 -17
- package/dist/ui/elements/TextLink.svelte +16 -16
- package/dist/ui/elements/index.d.ts +2 -2
- package/dist/ui/elements/index.js +2 -2
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +34 -34
- package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.d.ts +1 -0
- package/dist/ui/elements/text-chip/TextChip.svelte +14 -14
- package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte +24 -20
- package/dist/{components/navigation_component/NavigationComponent.svelte → ui/modules/NavigationMenu/NavigationMenu.svelte} +69 -43
- package/dist/{components/navigation_component/NavigationComponent.svelte.d.ts → ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts} +6 -6
- package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.d.ts +4 -4
- package/dist/ui/modules/NavigationMenu/index.d.ts +2 -0
- package/dist/ui/modules/NavigationMenu/index.js +2 -0
- package/dist/ui/modules/index.d.ts +1 -1
- package/dist/ui/modules/index.js +1 -1
- package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +109 -109
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +42 -37
- package/dist/ui/modules/projects/Hepcat.svelte +6 -4
- package/dist/ui/modules/projects/Hepcat.svelte.d.ts +1 -1
- package/dist/ui/modules/projects/Pengi.svelte +61 -59
- package/dist/ui/modules/projects/Pengi.svelte.d.ts +1 -1
- package/dist/ui/modules/projects/Soulwork.svelte +7 -5
- package/dist/ui/modules/projects/ThisWebpage.svelte +19 -16
- package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts +1 -1
- package/dist/ui/templates/{pinya-page-layout/component.svelte → PinyaPageLayout/PinyaPageLayout.svelte} +1 -1
- package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte.d.ts +9 -0
- package/dist/ui/templates/PinyaPageLayout/index.d.ts +2 -0
- package/dist/ui/templates/PinyaPageLayout/index.js +2 -0
- package/dist/ui/templates/{pinya-page-layout → PinyaPageLayout}/runes.svelte.d.ts +3 -0
- package/dist/ui/templates/PinyaPageLayout/runes.svelte.js +4 -0
- package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte +1 -1
- package/dist/{template/seaweed → ui/templates/SeaweedLayout}/CreateUrlForm.svelte +2 -2
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/EntryGroup.svelte +65 -88
- package/dist/ui/templates/SeaweedLayout/EntryOrderConfig.svelte.d.ts +9 -0
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectComponentProps.d.ts +1 -0
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectGroupConfig.svelte +316 -316
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectGroupConfig.svelte.d.ts +1 -1
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/SeaweedLayout.md +3 -3
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/SeaweedLayout.svelte +278 -276
- package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/props.d.ts +2 -2
- package/dist/ui/templates/confirmation-modal/component.svelte +46 -46
- package/dist/ui/templates/index.d.ts +2 -2
- package/dist/ui/templates/index.js +2 -2
- package/package.json +3 -2
- package/src/lib/styles/app.css +9 -14
- package/dist/components/navigation_component/index.d.ts +0 -2
- package/dist/components/navigation_component/index.js +0 -3
- package/dist/template/seaweed/ParseQueryTerms.d.ts +0 -1
- package/dist/template/seaweed/ParseQueryTerms.js +0 -23
- package/dist/template/seaweed/RunChaos.d.ts +0 -1
- package/dist/template/seaweed/RunChaos.js +0 -41
- package/dist/template/seaweed/SeaweedTemplate.svelte +0 -336
- package/dist/template/seaweed/SeaweedTemplate.svelte.d.ts +0 -32
- package/dist/template/seaweed/SeaweedTemplateData.d.ts +0 -30
- package/dist/template/seaweed/SeaweedTemplateData.js +0 -79
- package/dist/template/seaweed/entries/ChefWings.svelte +0 -45
- package/dist/template/seaweed/entries/ChefWings.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte +0 -40
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/EntryProps.d.ts +0 -16
- package/dist/template/seaweed/entries/EntryProps.js +0 -5
- package/dist/template/seaweed/entries/Hepcat.svelte +0 -64
- package/dist/template/seaweed/entries/Hepcat.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/Pengi.svelte +0 -57
- package/dist/template/seaweed/entries/Pengi.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/Soulwork.svelte +0 -54
- package/dist/template/seaweed/entries/Soulwork.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/ThisWebpage.svelte +0 -55
- package/dist/template/seaweed/entries/ThisWebpage.svelte.d.ts +0 -7
- package/dist/template/seaweed/entries/WorkExperience.svelte +0 -130
- package/dist/template/seaweed/entries/WorkExperience.svelte.d.ts +0 -8
- package/dist/template/seaweed/entries/Workset.svelte +0 -57
- package/dist/template/seaweed/entries/Workset.svelte.d.ts +0 -7
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.d.ts +0 -1
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.js +0 -8
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +0 -297
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +0 -12
- package/dist/template/seaweed/entry_order_config/entry-order-config.postcss +0 -35
- package/dist/template/seaweed/index.d.ts +0 -4
- package/dist/template/seaweed/index.js +0 -4
- package/dist/template/seaweed/seaweed.postcss +0 -125
- package/dist/ui/elements/pinya-button/component.svelte.d.ts +0 -4
- package/dist/ui/elements/pinya-button/index.d.ts +0 -2
- package/dist/ui/elements/pinya-button/index.js +0 -2
- package/dist/ui/elements/pinya-card/component.svelte.d.ts +0 -7
- package/dist/ui/elements/pinya-card/index.d.ts +0 -2
- package/dist/ui/elements/pinya-card/index.js +0 -2
- package/dist/ui/modules/seaweed/index.d.ts +0 -3
- package/dist/ui/modules/seaweed/index.js +0 -4
- package/dist/ui/templates/pinya-page-layout/component.svelte.d.ts +0 -9
- package/dist/ui/templates/pinya-page-layout/index.d.ts +0 -2
- package/dist/ui/templates/pinya-page-layout/index.js +0 -2
- package/dist/ui/templates/pinya-page-layout/runes.svelte.js +0 -3
- package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte.d.ts +0 -9
- /package/dist/ui/elements/{pinya-button/props.js → PinyaButton/PinyaButtonProps.js} +0 -0
- /package/dist/ui/elements/{pinya-card/props.d.ts → PinyaCard/PinyaCardProps.d.ts} +0 -0
- /package/dist/{template/seaweed/ToastSettings.js → ui/elements/PinyaCard/PinyaCardProps.js} +0 -0
- /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte.d.ts +0 -0
- /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.js +0 -0
- /package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte.d.ts +0 -0
- /package/dist/{template/seaweed → ui/templates/SeaweedLayout}/CreateUrlForm.svelte.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/EntryGroup.svelte.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout/EntryOrderConfig2.svelte → SeaweedLayout/EntryOrderConfig.svelte} +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/ProjectComponentProps.js +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/SeaweedLayout.svelte.d.ts +0 -0
- /package/dist/{template/seaweed → ui/templates/SeaweedLayout}/ToastSettings.d.ts +0 -0
- /package/dist/ui/{elements/pinya-card/props.js → templates/SeaweedLayout/ToastSettings.js} +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/index.d.ts +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/index.js +0 -0
- /package/dist/ui/templates/{seaweed-layout → SeaweedLayout}/props.js +0 -0
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { scale } from 'svelte/transition';
|
|
3
|
-
import { elasticOut } from 'svelte/easing';
|
|
4
|
-
|
|
5
|
-
import type { ModalProps } from 'svelte-modals';
|
|
6
|
-
|
|
7
|
-
import { onMount, type Snippet } from 'svelte';
|
|
8
|
-
import { PinyaCard } from '../elements';
|
|
9
|
-
|
|
10
|
-
// https://svelte-modals.mattjennin.gs/modal-components/props/#typescript
|
|
11
|
-
interface ModalBaseProps extends ModalProps {
|
|
12
|
-
children: Snippet,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
let {
|
|
16
|
-
children,
|
|
17
|
-
isOpen,
|
|
18
|
-
close
|
|
19
|
-
}: ModalBaseProps = $props();
|
|
20
|
-
|
|
21
|
-
let container: HTMLDivElement;
|
|
22
|
-
onMount(() => {
|
|
23
|
-
const focusableElement = container.querySelector('input, select, textarea, button, object, a, area[href], [tabindex]');
|
|
24
|
-
if (focusableElement) {
|
|
25
|
-
(focusableElement as HTMLElement).focus();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
document.addEventListener('keydown', (e) => {
|
|
29
|
-
if (e.code === 'Escape') {
|
|
30
|
-
close();
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
{#if isOpen}
|
|
37
|
-
<dialog aria-modal="true" in:scale|global={{
|
|
38
|
-
start: 0.95,
|
|
39
|
-
duration: 750,
|
|
40
|
-
easing: elasticOut,
|
|
41
|
-
opacity: 0.9
|
|
42
|
-
}}>
|
|
43
|
-
<div class="interactable" bind:this={container}>
|
|
44
|
-
<PinyaCard
|
|
45
|
-
widthClass="max-w-xl2"
|
|
46
|
-
paddingClass="pl-8 pr-8 pt-4 pb-8"
|
|
47
|
-
>
|
|
48
|
-
{@render children?.()}
|
|
49
|
-
</PinyaCard>
|
|
50
|
-
</div>
|
|
51
|
-
</dialog>
|
|
52
|
-
{/if}
|
|
53
|
-
|
|
54
|
-
<style>
|
|
55
|
-
dialog {
|
|
56
|
-
padding: 0;
|
|
57
|
-
background-color: transparent;
|
|
58
|
-
border-color: transparent;
|
|
59
|
-
z-index: 20;
|
|
60
|
-
position: fixed;
|
|
61
|
-
top: 0;
|
|
62
|
-
width: 100%;
|
|
63
|
-
height: 100%;
|
|
64
|
-
display: flex;
|
|
65
|
-
justify-content: center;
|
|
66
|
-
align-items: center;
|
|
67
|
-
|
|
68
|
-
/* allow click-through to backdrop */
|
|
69
|
-
pointer-events: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.interactable {
|
|
73
|
-
pointer-events: auto;
|
|
74
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { scale } from 'svelte/transition';
|
|
3
|
+
import { elasticOut } from 'svelte/easing';
|
|
4
|
+
|
|
5
|
+
import type { ModalProps } from 'svelte-modals';
|
|
6
|
+
|
|
7
|
+
import { onMount, type Snippet } from 'svelte';
|
|
8
|
+
import { PinyaCard } from '../elements';
|
|
9
|
+
|
|
10
|
+
// https://svelte-modals.mattjennin.gs/modal-components/props/#typescript
|
|
11
|
+
interface ModalBaseProps extends ModalProps {
|
|
12
|
+
children: Snippet,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
isOpen,
|
|
18
|
+
close
|
|
19
|
+
}: ModalBaseProps = $props();
|
|
20
|
+
|
|
21
|
+
let container: HTMLDivElement;
|
|
22
|
+
onMount(() => {
|
|
23
|
+
const focusableElement = container.querySelector('input, select, textarea, button, object, a, area[href], [tabindex]');
|
|
24
|
+
if (focusableElement) {
|
|
25
|
+
(focusableElement as HTMLElement).focus();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
document.addEventListener('keydown', (e) => {
|
|
29
|
+
if (e.code === 'Escape') {
|
|
30
|
+
close();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
{#if isOpen}
|
|
37
|
+
<dialog aria-modal="true" in:scale|global={{
|
|
38
|
+
start: 0.95,
|
|
39
|
+
duration: 750,
|
|
40
|
+
easing: elasticOut,
|
|
41
|
+
opacity: 0.9
|
|
42
|
+
}}>
|
|
43
|
+
<div class="interactable" bind:this={container}>
|
|
44
|
+
<PinyaCard
|
|
45
|
+
widthClass="max-w-xl2"
|
|
46
|
+
paddingClass="pl-8 pr-8 pt-4 pb-8"
|
|
47
|
+
>
|
|
48
|
+
{@render children?.()}
|
|
49
|
+
</PinyaCard>
|
|
50
|
+
</div>
|
|
51
|
+
</dialog>
|
|
52
|
+
{/if}
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
dialog {
|
|
56
|
+
padding: 0;
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
border-color: transparent;
|
|
59
|
+
z-index: 20;
|
|
60
|
+
position: fixed;
|
|
61
|
+
top: 0;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
align-items: center;
|
|
67
|
+
|
|
68
|
+
/* allow click-through to backdrop */
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.interactable {
|
|
73
|
+
pointer-events: auto;
|
|
74
|
+
}
|
|
75
75
|
</style>
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import MailIcon from "../../assets/icons/mail.svg";
|
|
6
6
|
import GithubIcon from "../../assets/icons/github-mark.svg";
|
|
7
7
|
import LinkedinIcon from "../../assets/icons/linkedin.svg";
|
|
8
|
-
import { ButtonVariant, ImageIcon, PinyaButton } from "../elements/index";
|
|
9
8
|
import { ItchLogoHotLink } from "../../consts";
|
|
9
|
+
import { ButtonVariant, PinyaButton } from "../elements/PinyaButton/index";
|
|
10
|
+
import ImageIcon from "../elements/ImageIcon.svelte";
|
|
10
11
|
|
|
11
12
|
/** @type {{isSmallVersion?: boolean, email?: string, linkedinSlug?: string, isSlot?: boolean, allowLinkedIn?: boolean}} */
|
|
12
13
|
let {
|
|
@@ -63,7 +64,9 @@
|
|
|
63
64
|
<PinyaButton
|
|
64
65
|
buttonVariant={ButtonVariant.SmallIcon}
|
|
65
66
|
title="https://turnipxenon.itch.io/"
|
|
66
|
-
onclick={() => window.open("https://turnipxenon.itch.io/")}
|
|
67
|
+
onclick={() => window.open("https://turnipxenon.itch.io/")}
|
|
68
|
+
classes="h-full"
|
|
69
|
+
>
|
|
67
70
|
<ImageIcon src={ItchLogoHotLink} alt="itch icon" />
|
|
68
71
|
{#if (!isSmallVersion)}
|
|
69
72
|
<span>TurnipXenon</span>
|
|
@@ -83,5 +86,6 @@
|
|
|
83
86
|
flex-wrap: wrap;
|
|
84
87
|
justify-content: var(--preferred-justify-content);
|
|
85
88
|
gap: 0.7rem;
|
|
89
|
+
align-items: stretch;
|
|
86
90
|
}
|
|
87
91
|
</style>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
-
import type { Snippet } from "svelte";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
value = $bindable(),
|
|
7
|
-
children,
|
|
8
|
-
}: {
|
|
9
|
-
value: string[],
|
|
10
|
-
children: Snippet,
|
|
11
|
-
} = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<Accordion
|
|
15
|
-
classes="bg-primary-100 dark:bg-tertiary-900 dark:saturate-75"
|
|
16
|
-
{value}
|
|
17
|
-
onValueChange={(e) => (value = e.value)}
|
|
18
|
-
collapsible
|
|
19
|
-
>
|
|
20
|
-
{@render children()}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
value = $bindable(),
|
|
7
|
+
children,
|
|
8
|
+
}: {
|
|
9
|
+
value: string[],
|
|
10
|
+
children: Snippet,
|
|
11
|
+
} = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Accordion
|
|
15
|
+
classes="bg-primary-100 dark:bg-tertiary-900 dark:saturate-75"
|
|
16
|
+
{value}
|
|
17
|
+
onValueChange={(e) => (value = e.value)}
|
|
18
|
+
collapsible
|
|
19
|
+
>
|
|
20
|
+
{@render children()}
|
|
21
21
|
</Accordion>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
// noinspection ES6UnusedImports
|
|
3
|
-
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
-
import type { Snippet } from "svelte";
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
value,
|
|
8
|
-
control: controlSnippet,
|
|
9
|
-
panel: panelSnippet,
|
|
10
|
-
}: {
|
|
11
|
-
value: string,
|
|
12
|
-
control: Snippet;
|
|
13
|
-
panel: Snippet;
|
|
14
|
-
} = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Accordion.Item
|
|
18
|
-
{value}
|
|
19
|
-
controlHover="hover:bg-primary-500 dark:hover:bg-secondary-600"
|
|
20
|
-
>
|
|
21
|
-
<!-- Control -->
|
|
22
|
-
{#snippet control()}
|
|
23
|
-
{@render controlSnippet()}
|
|
24
|
-
{/snippet}
|
|
25
|
-
<!-- Panel -->
|
|
26
|
-
{#snippet panel()}
|
|
27
|
-
{@render panelSnippet()}
|
|
28
|
-
{/snippet}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// noinspection ES6UnusedImports
|
|
3
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
value,
|
|
8
|
+
control: controlSnippet,
|
|
9
|
+
panel: panelSnippet,
|
|
10
|
+
}: {
|
|
11
|
+
value: string,
|
|
12
|
+
control: Snippet;
|
|
13
|
+
panel: Snippet;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Accordion.Item
|
|
18
|
+
{value}
|
|
19
|
+
controlHover="hover:bg-primary-500 dark:hover:bg-secondary-600"
|
|
20
|
+
>
|
|
21
|
+
<!-- Control -->
|
|
22
|
+
{#snippet control()}
|
|
23
|
+
{@render controlSnippet()}
|
|
24
|
+
{/snippet}
|
|
25
|
+
<!-- Panel -->
|
|
26
|
+
{#snippet panel()}
|
|
27
|
+
{@render panelSnippet()}
|
|
28
|
+
{/snippet}
|
|
29
29
|
</Accordion.Item>
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
<!-- @component Code Block based on: https://shiki.style/ and https://www.skeleton.dev/docs/integrations/code-block/svelte/ -->
|
|
2
|
-
|
|
3
|
-
<script module>
|
|
4
|
-
import { addCopyButton } from "shiki-transformer-copy-button";
|
|
5
|
-
import { createHighlighterCoreSync } from "shiki/core";
|
|
6
|
-
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
7
|
-
// Themes
|
|
8
|
-
// https://shiki.style/themes
|
|
9
|
-
import themeLight from "shiki/themes/catppuccin-latte.mjs";
|
|
10
|
-
import themeDark from "shiki/themes/catppuccin-frappe.mjs";
|
|
11
|
-
// Languages
|
|
12
|
-
// https://shiki.style/languages
|
|
13
|
-
import console from "shiki/langs/console.mjs";
|
|
14
|
-
import html from "shiki/langs/html.mjs";
|
|
15
|
-
import css from "shiki/langs/css.mjs";
|
|
16
|
-
import js from "shiki/langs/javascript.mjs";
|
|
17
|
-
import ts from "shiki/langs/typescript.mjs";
|
|
18
|
-
import markdown from "shiki/langs/markdown.mjs";
|
|
19
|
-
|
|
20
|
-
// https://shiki.style/guide/sync-usage
|
|
21
|
-
const shiki = createHighlighterCoreSync({
|
|
22
|
-
engine: createJavaScriptRegexEngine(),
|
|
23
|
-
// Implement your import theme.
|
|
24
|
-
themes: [themeLight, themeDark],
|
|
25
|
-
// Implement your imported and supported languages.
|
|
26
|
-
langs: [console, html, css, js, ts, markdown]
|
|
27
|
-
});
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<script lang="ts">
|
|
31
|
-
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
32
|
-
|
|
33
|
-
let {
|
|
34
|
-
code = "",
|
|
35
|
-
lang = "console",
|
|
36
|
-
// Base Style Props
|
|
37
|
-
base = " overflow-hidden",
|
|
38
|
-
rounded = "rounded-container",
|
|
39
|
-
shadow = "",
|
|
40
|
-
classes = "",
|
|
41
|
-
// Pre Style Props
|
|
42
|
-
preBase = "",
|
|
43
|
-
prePadding = "[&>pre]:p-4",
|
|
44
|
-
preClasses = ""
|
|
45
|
-
}: CodeBlockProps = $props();
|
|
46
|
-
|
|
47
|
-
// Shiki convert to HTML
|
|
48
|
-
const generatedHtml = $derived(shiki.codeToHtml(code, {
|
|
49
|
-
lang,
|
|
50
|
-
themes: {
|
|
51
|
-
light: "catppuccin-latte",
|
|
52
|
-
dark: "catppuccin-frappe"
|
|
53
|
-
},
|
|
54
|
-
transformers: [
|
|
55
|
-
addCopyButton({ toggle: 2000 })
|
|
56
|
-
]
|
|
57
|
-
}));
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<div
|
|
61
|
-
class="{base} {rounded} {shadow} {classes} {preBase} {prePadding} {preClasses}"
|
|
62
|
-
>
|
|
63
|
-
<!-- Output Shiki's Generated HTML -->
|
|
64
|
-
{@html generatedHtml}
|
|
1
|
+
<!-- @component Code Block based on: https://shiki.style/ and https://www.skeleton.dev/docs/integrations/code-block/svelte/ -->
|
|
2
|
+
|
|
3
|
+
<script module>
|
|
4
|
+
import { addCopyButton } from "shiki-transformer-copy-button";
|
|
5
|
+
import { createHighlighterCoreSync } from "shiki/core";
|
|
6
|
+
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
7
|
+
// Themes
|
|
8
|
+
// https://shiki.style/themes
|
|
9
|
+
import themeLight from "shiki/themes/catppuccin-latte.mjs";
|
|
10
|
+
import themeDark from "shiki/themes/catppuccin-frappe.mjs";
|
|
11
|
+
// Languages
|
|
12
|
+
// https://shiki.style/languages
|
|
13
|
+
import console from "shiki/langs/console.mjs";
|
|
14
|
+
import html from "shiki/langs/html.mjs";
|
|
15
|
+
import css from "shiki/langs/css.mjs";
|
|
16
|
+
import js from "shiki/langs/javascript.mjs";
|
|
17
|
+
import ts from "shiki/langs/typescript.mjs";
|
|
18
|
+
import markdown from "shiki/langs/markdown.mjs";
|
|
19
|
+
|
|
20
|
+
// https://shiki.style/guide/sync-usage
|
|
21
|
+
const shiki = createHighlighterCoreSync({
|
|
22
|
+
engine: createJavaScriptRegexEngine(),
|
|
23
|
+
// Implement your import theme.
|
|
24
|
+
themes: [themeLight, themeDark],
|
|
25
|
+
// Implement your imported and supported languages.
|
|
26
|
+
langs: [console, html, css, js, ts, markdown]
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
code = "",
|
|
35
|
+
lang = "console",
|
|
36
|
+
// Base Style Props
|
|
37
|
+
base = " overflow-hidden",
|
|
38
|
+
rounded = "rounded-container",
|
|
39
|
+
shadow = "",
|
|
40
|
+
classes = "",
|
|
41
|
+
// Pre Style Props
|
|
42
|
+
preBase = "",
|
|
43
|
+
prePadding = "[&>pre]:p-4",
|
|
44
|
+
preClasses = ""
|
|
45
|
+
}: CodeBlockProps = $props();
|
|
46
|
+
|
|
47
|
+
// Shiki convert to HTML
|
|
48
|
+
const generatedHtml = $derived(shiki.codeToHtml(code, {
|
|
49
|
+
lang,
|
|
50
|
+
themes: {
|
|
51
|
+
light: "catppuccin-latte",
|
|
52
|
+
dark: "catppuccin-frappe"
|
|
53
|
+
},
|
|
54
|
+
transformers: [
|
|
55
|
+
addCopyButton({ toggle: 2000 })
|
|
56
|
+
]
|
|
57
|
+
}));
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<div
|
|
61
|
+
class="{base} {rounded} {shadow} {classes} {preBase} {prePadding} {preClasses}"
|
|
62
|
+
>
|
|
63
|
+
<!-- Output Shiki's Generated HTML -->
|
|
64
|
+
{@html generatedHtml}
|
|
65
65
|
</div>
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
3
|
-
import type { GeneralUIProps } from './GeneralUIProps';
|
|
4
|
-
import { ColorScheme } from './ColorScheme';
|
|
5
|
-
|
|
6
|
-
type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
colorScheme = ColorScheme.Primary,
|
|
10
|
-
...props
|
|
11
|
-
}: PinyaButtonProps = $props();
|
|
12
|
-
|
|
13
|
-
const chooseTailwindClass = () => {
|
|
14
|
-
switch (colorScheme) {
|
|
15
|
-
case ColorScheme.Warning:
|
|
16
|
-
return 'btn preset-filled-warning-600-400 text-surface-100 hover:brightness-110';
|
|
17
|
-
case ColorScheme.Surface:
|
|
18
|
-
return 'btn preset-filled-surface-800-200 text-surface-100-900 hover:brightness-110';
|
|
19
|
-
default:
|
|
20
|
-
console.error('Unimplemented color scheme');
|
|
21
|
-
// eslint-disable-next-line no-fallthrough
|
|
22
|
-
case ColorScheme.Primary:
|
|
23
|
-
return 'icon-filter-on-primary-button';
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const tailwindClass = chooseTailwindClass();
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<img
|
|
31
|
-
{...props}
|
|
32
|
-
class={`image-icon ${tailwindClass}`}>
|
|
33
|
-
|
|
34
|
-
<style>
|
|
35
|
-
:global(.image-icon) {
|
|
36
|
-
height: calc(var(--spacing) * 8);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:global(.small-icon-button .image-icon) {
|
|
40
|
-
height: calc(var(--spacing) * 6);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:global(.icon-filter-on-primary-button) {
|
|
44
|
-
/* based on secondary-950 */
|
|
45
|
-
filter: brightness(0) saturate(100%) invert(18%) sepia(10%) saturate(4620%) hue-rotate(331deg) brightness(90%) contrast(88%);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (prefers-color-scheme: dark) {
|
|
49
|
-
:global(.icon-filter-on-primary-button) {
|
|
50
|
-
/* based on surface-0 */
|
|
51
|
-
filter: brightness(0) saturate(100%) invert(85%) sepia(3%) saturate(993%) hue-rotate(326deg) brightness(113%) contrast(105%);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
3
|
+
import type { GeneralUIProps } from './GeneralUIProps';
|
|
4
|
+
import { ColorScheme } from './ColorScheme';
|
|
5
|
+
|
|
6
|
+
type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
colorScheme = ColorScheme.Primary,
|
|
10
|
+
...props
|
|
11
|
+
}: PinyaButtonProps = $props();
|
|
12
|
+
|
|
13
|
+
const chooseTailwindClass = () => {
|
|
14
|
+
switch (colorScheme) {
|
|
15
|
+
case ColorScheme.Warning:
|
|
16
|
+
return 'btn preset-filled-warning-600-400 text-surface-100 hover:brightness-110';
|
|
17
|
+
case ColorScheme.Surface:
|
|
18
|
+
return 'btn preset-filled-surface-800-200 text-surface-100-900 hover:brightness-110';
|
|
19
|
+
default:
|
|
20
|
+
console.error('Unimplemented color scheme');
|
|
21
|
+
// eslint-disable-next-line no-fallthrough
|
|
22
|
+
case ColorScheme.Primary:
|
|
23
|
+
return 'icon-filter-on-primary-button';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const tailwindClass = chooseTailwindClass();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<img
|
|
31
|
+
{...props}
|
|
32
|
+
class={`image-icon ${tailwindClass}`}>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
:global(.image-icon) {
|
|
36
|
+
height: calc(var(--spacing) * 8);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:global(.small-icon-button .image-icon) {
|
|
40
|
+
height: calc(var(--spacing) * 6);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:global(.icon-filter-on-primary-button) {
|
|
44
|
+
/* based on secondary-950 */
|
|
45
|
+
filter: brightness(0) saturate(100%) invert(18%) sepia(10%) saturate(4620%) hue-rotate(331deg) brightness(90%) contrast(88%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:global(.icon-filter-on-primary-button) {
|
|
50
|
+
/* based on surface-0 */
|
|
51
|
+
filter: brightness(0) saturate(100%) invert(85%) sepia(3%) saturate(993%) hue-rotate(326deg) brightness(113%) contrast(105%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
54
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ButtonVariant, type PinyaButtonProps } from './PinyaButtonProps';
|
|
3
|
+
import { ColorScheme } from "../ColorScheme";
|
|
4
4
|
|
|
5
5
|
let {
|
|
6
6
|
children,
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
paddingClass = '',
|
|
9
9
|
buttonVariant = ButtonVariant.Default,
|
|
10
10
|
colorClass = '',
|
|
11
|
+
classes = '',
|
|
11
12
|
...props
|
|
12
13
|
}: PinyaButtonProps = $props();
|
|
13
14
|
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
<button
|
|
42
43
|
{...props}
|
|
43
44
|
class:small-icon-button={buttonVariant === ButtonVariant.SmallIcon}
|
|
44
|
-
class={`btn rounded-2xl text-xl font-bold ${tailwindClass} ${paddingClass}`}
|
|
45
|
+
class={`btn rounded-2xl text-xl font-bold ${tailwindClass} ${paddingClass} ${classes}`}
|
|
45
46
|
>
|
|
46
47
|
{@render children()}
|
|
47
48
|
</button>
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
<script lang="ts">/**
|
|
2
|
-
* When with texts, wrap the text content inside a div so flex wont apply
|
|
3
|
-
*/
|
|
4
|
-
import type { PinyaCardProps } from "./
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
paddingClass = "pt-[1lh] pb-[1lh] pl-16 pr-16",
|
|
8
|
-
flexClass = "flex flex-col",
|
|
9
|
-
widthClass = "max-w-md",
|
|
10
|
-
borderClass = "border-[2px] border-primary-500 dark:border-0",
|
|
11
|
-
marginClass = "",
|
|
12
|
-
className,
|
|
13
|
-
children
|
|
14
|
-
}: PinyaCardProps = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<div
|
|
18
|
-
class={`card bg-surface-200 dark:bg-surface-900
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
<script lang="ts">/**
|
|
2
|
+
* When with texts, wrap the text content inside a div so flex wont apply
|
|
3
|
+
*/
|
|
4
|
+
import type { PinyaCardProps } from "./PinyaCardProps";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
paddingClass = "pt-[1lh] pb-[1lh] pl-16 pr-16",
|
|
8
|
+
flexClass = "flex flex-col",
|
|
9
|
+
widthClass = "w-full max-w-md",
|
|
10
|
+
borderClass = "border-[2px] border-primary-500 dark:border-0",
|
|
11
|
+
marginClass = "",
|
|
12
|
+
className,
|
|
13
|
+
children
|
|
14
|
+
}: PinyaCardProps = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
class={`card bg-surface-200 dark:bg-surface-900 text-start rounded-xl
|
|
19
|
+
${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass}`}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
21
22
|
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When with texts, wrap the text content inside a div so flex wont apply
|
|
3
|
+
*/
|
|
4
|
+
import type { PinyaCardProps } from "./PinyaCardProps";
|
|
5
|
+
declare const PinyaCard: import("svelte").Component<PinyaCardProps, {}, "">;
|
|
6
|
+
type PinyaCard = ReturnType<typeof PinyaCard>;
|
|
7
|
+
export default PinyaCard;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let {
|
|
3
|
-
isCircle = false,
|
|
4
|
-
classes = '',
|
|
5
|
-
}: {
|
|
6
|
-
isCircle?: boolean;
|
|
7
|
-
classes?: string;
|
|
8
|
-
} = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
class="
|
|
13
|
-
{isCircle ?'placeholder-circle' : 'placeholder'}
|
|
14
|
-
animate-pulse bg-surface-600 dark:bg-surface-800
|
|
15
|
-
{classes}
|
|
16
|
-
"
|
|
17
|
-
></div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
isCircle = false,
|
|
4
|
+
classes = '',
|
|
5
|
+
}: {
|
|
6
|
+
isCircle?: boolean;
|
|
7
|
+
classes?: string;
|
|
8
|
+
} = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
class="
|
|
13
|
+
{isCircle ?'placeholder-circle' : 'placeholder'}
|
|
14
|
+
animate-pulse bg-surface-600 dark:bg-surface-800
|
|
15
|
+
{classes}
|
|
16
|
+
"
|
|
17
|
+
></div>
|