@turnipxenon/pineapple 3.0.0 → 3.1.0-alpha.2

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.
Files changed (67) hide show
  1. package/README.md +85 -0
  2. package/dist/components/blog_template/BlogTemplate.svelte +15 -18
  3. package/dist/components/blog_template/BlogTemplate.svelte.d.ts +3 -2
  4. package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
  5. package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
  6. package/dist/components/dialog_manager/DialogMangerInit.d.ts +1 -1
  7. package/dist/components/dialog_manager/IDialogManager.d.ts +1 -1
  8. package/dist/components/dialog_overlay/DialogOverlay.svelte +127 -17
  9. package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -6
  10. package/dist/components/pineapple/PineappleBaseLayout.svelte +0 -19
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/styles/app.css +9 -14
  14. package/dist/ui/components/ModalBase.svelte +74 -74
  15. package/dist/ui/components/accordion/PinyaAccordion.svelte +20 -20
  16. package/dist/ui/components/accordion/PinyaAccordionItem.svelte +28 -28
  17. package/dist/ui/components/randomized-background/RandomizedBackground.svelte +9 -1
  18. package/dist/ui/elements/CodeBlock/CodeBlock.svelte +64 -64
  19. package/dist/ui/elements/ImageIcon.svelte +53 -53
  20. package/dist/ui/elements/PinyaCard/PinyaCard.svelte +29 -0
  21. package/dist/ui/elements/PinyaCard/PinyaCard.svelte.d.ts +7 -0
  22. package/dist/ui/elements/PinyaCard/index.d.ts +2 -0
  23. package/dist/ui/elements/PinyaCard/index.js +2 -0
  24. package/dist/ui/elements/Placeholder.svelte +17 -17
  25. package/dist/ui/elements/TextLink.svelte +16 -16
  26. package/dist/ui/elements/index.d.ts +1 -1
  27. package/dist/ui/elements/index.js +1 -1
  28. package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +34 -34
  29. package/dist/ui/elements/text-chip/TextChip.svelte +14 -14
  30. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte +24 -20
  31. package/dist/{components/navigation_component/NavigationComponent.svelte → ui/modules/NavigationMenu/NavigationMenu.svelte} +69 -43
  32. package/dist/{components/navigation_component/NavigationComponent.svelte.d.ts → ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts} +6 -6
  33. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.d.ts +4 -4
  34. package/dist/ui/modules/NavigationMenu/index.d.ts +2 -0
  35. package/dist/ui/modules/NavigationMenu/index.js +2 -0
  36. package/dist/ui/modules/index.d.ts +1 -1
  37. package/dist/ui/modules/index.js +1 -1
  38. package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +109 -109
  39. package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +42 -42
  40. package/dist/ui/modules/projects/Pengi.svelte +61 -61
  41. package/dist/ui/modules/projects/ThisWebpage.svelte +10 -8
  42. package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte +2 -1
  43. package/dist/ui/templates/PinyaPageLayout/runes.svelte.d.ts +3 -0
  44. package/dist/ui/templates/PinyaPageLayout/runes.svelte.js +1 -0
  45. package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte +1 -1
  46. package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +65 -88
  47. package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts +1 -0
  48. package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte +316 -316
  49. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.md +3 -3
  50. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte +278 -276
  51. package/dist/ui/templates/SeaweedLayout/props.d.ts +2 -2
  52. package/dist/ui/templates/confirmation-modal/component.svelte +46 -46
  53. package/package.json +1 -1
  54. package/src/lib/styles/app.css +9 -14
  55. package/dist/components/navigation_component/index.d.ts +0 -2
  56. package/dist/components/navigation_component/index.js +0 -3
  57. package/dist/ui/elements/pinya-card/component.svelte +0 -21
  58. package/dist/ui/elements/pinya-card/component.svelte.d.ts +0 -7
  59. package/dist/ui/elements/pinya-card/index.d.ts +0 -2
  60. package/dist/ui/elements/pinya-card/index.js +0 -2
  61. package/dist/ui/modules/seaweed/index.d.ts +0 -3
  62. package/dist/ui/modules/seaweed/index.js +0 -4
  63. /package/dist/ui/elements/{pinya-card/props.d.ts → PinyaCard/PinyaCardProps.d.ts} +0 -0
  64. /package/dist/ui/elements/{pinya-card/props.js → PinyaCard/PinyaCardProps.js} +0 -0
  65. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte.d.ts +0 -0
  66. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.js +0 -0
  67. /package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte.d.ts +0 -0
@@ -1,62 +1,62 @@
1
- <script module lang="ts">
2
- import HeaderPengi from "../../../assets/temp/header-pengi.mp4";
3
- import GithubIcon from "../../../assets/icons/github-mark.svg";
4
- import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
5
- import { default as FourPartCard } from "../../components/FourPartCard.svelte";
6
- import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
7
- import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
8
- import { ButtonVariant } from "../../elements/PinyaButton/PinyaButtonProps";
9
- import { ItchLogoHotLink } from "../../../consts";
10
-
11
- const key = "Pengi";
12
- export { component, key };
13
- </script>
14
-
15
- {#snippet component(props: ProjectComponentProps)}
16
- <FourPartCard>
17
- {#snippet headerCover()}
18
- <video class="rounded-t-xl max-h-64 not-prose object-cover w-full" playsinline autoplay muted loop preload="none">
19
- video unavailable. original video contains pengi gameplay showing the dynamic dialog
20
- layout and character animation.
21
- <source src={HeaderPengi} type="video/mp4">
22
- </video>
23
- {/snippet}
24
-
25
- {#snippet header()}
26
- <h3>Pengi</h3>
27
-
28
- <blockquote>
29
- Well well, quite the dreamer, aren’t you? Might be hard to get in... costs a lot of
30
- money...
31
- </blockquote>
32
- {/snippet}
33
-
34
- <p>
35
- Pengi is a text-based adventure made in <span class='qt-unity'>Unity</span> (<span class='qt-cs'>C#</span>). I
36
- acted as the sole
37
- programmer for the team. Most of the work revolves around UI and creating <a
38
- href="https://yarnspinner.dev/" target="_blank">YarnSpinner</a> commands for writers
39
- to use to create expressive stage directions in the script.
40
- </p>
41
-
42
- <section class="game-link-section">
43
- <PinyaButton
44
- buttonVariant={ButtonVariant.Image}
45
- aria-label="Click to go to Project Pengi in Github"
46
- title="https://github.com/GreenTea-M/ProjectPengi"
47
- onclick={() => window.open("https://github.com/GreenTea-M/ProjectPengi")}
48
- >
49
- <ImageIcon alt="" aria-hidden="true" src={GithubIcon} />
50
- </PinyaButton>
51
- <PinyaButton
52
- buttonVariant={ButtonVariant.Image}
53
- aria-label="Click to go to Project Pengi in Itch.io"
54
- title="https://turnipxenon.itch.io/pengi"
55
- onclick={() => window.open("https://turnipxenon.itch.io/pengi")}
56
- >
57
- <ImageIcon alt="" aria-hidden="true" src={ItchLogoHotLink} />
58
- </PinyaButton>
59
- </section>
60
-
61
- </FourPartCard>
1
+ <script module lang="ts">
2
+ import HeaderPengi from "../../../assets/temp/header-pengi.mp4";
3
+ import GithubIcon from "../../../assets/icons/github-mark.svg";
4
+ import type { ProjectComponentProps } from "../../templates/SeaweedLayout/ProjectComponentProps";
5
+ import { default as FourPartCard } from "../../components/FourPartCard.svelte";
6
+ import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
7
+ import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
8
+ import { ButtonVariant } from "../../elements/PinyaButton/PinyaButtonProps";
9
+ import { ItchLogoHotLink } from "../../../consts";
10
+
11
+ const key = "Pengi";
12
+ export { component, key };
13
+ </script>
14
+
15
+ {#snippet component(props: ProjectComponentProps)}
16
+ <FourPartCard>
17
+ {#snippet headerCover()}
18
+ <video class="rounded-t-xl max-h-64 not-prose object-cover w-full" playsinline autoplay muted loop preload="none">
19
+ video unavailable. original video contains pengi gameplay showing the dynamic dialog
20
+ layout and character animation.
21
+ <source src={HeaderPengi} type="video/mp4">
22
+ </video>
23
+ {/snippet}
24
+
25
+ {#snippet header()}
26
+ <h3>Pengi</h3>
27
+
28
+ <blockquote>
29
+ Well well, quite the dreamer, aren’t you? Might be hard to get in... costs a lot of
30
+ money...
31
+ </blockquote>
32
+ {/snippet}
33
+
34
+ <p>
35
+ Pengi is a text-based adventure made in <span class='qt-unity'>Unity</span> (<span class='qt-cs'>C#</span>). I
36
+ acted as the sole
37
+ programmer for the team. Most of the work revolves around UI and creating <a
38
+ href="https://yarnspinner.dev/" target="_blank">YarnSpinner</a> commands for writers
39
+ to use to create expressive stage directions in the script.
40
+ </p>
41
+
42
+ <section class="game-link-section">
43
+ <PinyaButton
44
+ buttonVariant={ButtonVariant.Image}
45
+ aria-label="Click to go to Project Pengi in Github"
46
+ title="https://github.com/GreenTea-M/ProjectPengi"
47
+ onclick={() => window.open("https://github.com/GreenTea-M/ProjectPengi")}
48
+ >
49
+ <ImageIcon alt="" aria-hidden="true" src={GithubIcon} />
50
+ </PinyaButton>
51
+ <PinyaButton
52
+ buttonVariant={ButtonVariant.Image}
53
+ aria-label="Click to go to Project Pengi in Itch.io"
54
+ title="https://turnipxenon.itch.io/pengi"
55
+ onclick={() => window.open("https://turnipxenon.itch.io/pengi")}
56
+ >
57
+ <ImageIcon alt="" aria-hidden="true" src={ItchLogoHotLink} />
58
+ </PinyaButton>
59
+ </section>
60
+
61
+ </FourPartCard>
62
62
  {/snippet}
@@ -16,14 +16,16 @@
16
16
  <FourPartCard>
17
17
 
18
18
  {#snippet headerCover()}
19
- <video
20
- playsinline autoplay muted loop preload="none"
21
- class="game-video-cover"
22
- >
23
- <source src={ThisWebsiteFootage} type="video/mp4">
24
- video unavailable. original video contains clips of this website being resized and light-dark mode being
25
- toggled.
26
- </video>
19
+ {#if !props.isPineapple}
20
+ <video
21
+ playsinline autoplay muted loop preload="none"
22
+ class="game-video-cover"
23
+ >
24
+ <source src={ThisWebsiteFootage} type="video/mp4">
25
+ video unavailable. original video contains clips of this website being resized and light-dark mode being
26
+ toggled.
27
+ </video>
28
+ {/if}
27
29
  {/snippet}
28
30
 
29
31
  {#snippet header()}
@@ -9,6 +9,7 @@
9
9
  import GeneralSettingsModal from "../../modules/modals/general-settings/GeneralSettingsModal.svelte";
10
10
  import { localizeHref } from "../../../paraglide/runtime";
11
11
  import { appState } from "./runes.svelte";
12
+ import { enableBackground } from "../../../store";
12
13
 
13
14
  let {
14
15
  children,
@@ -68,7 +69,7 @@
68
69
  {@render header('hidden shadow-none w-full')}
69
70
  {@render header('fixed z-15 w-[105vw]')}
70
71
 
71
- <RandomizedBackground enabled={true} />
72
+ <RandomizedBackground enabled={$enableBackground} />
72
73
 
73
74
  <div class="default-page-container">
74
75
  {@render children?.()}
@@ -3,6 +3,9 @@ interface AppStore {
3
3
  title: string;
4
4
  lead?: Snippet;
5
5
  isLanguagePickerAvailable: boolean;
6
+ allowDialog?: boolean;
7
+ enableDialogOnByDefault?: boolean;
8
+ bgOpacity: number;
6
9
  }
7
10
  export declare const appState: AppStore;
8
11
  export {};
@@ -1,4 +1,5 @@
1
1
  export const appState = $state({
2
2
  title: '',
3
3
  isLanguagePickerAvailable: true,
4
+ bgOpacity: 1,
4
5
  });
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { type PageMeta } from "../../../components/navigation_component/index";
2
+ import { type PageMeta } from "../../modules/NavigationMenu/index";
3
3
  import { onMount } from "svelte";
4
4
  import Placeholder from "../../elements/Placeholder.svelte";
5
5
 
@@ -1,89 +1,66 @@
1
- <script lang="ts">
2
- import type { ProjectGroup, SnippetMeta } from "../index";
3
- import { PinyaCard } from "../../elements/index";
4
-
5
- let {
6
- title,
7
- entryList
8
- }: ProjectGroup = $props();
9
-
10
- const isSpecial = $derived(entryList.length % 3 === 1);
11
-
12
- let normalUiList: SnippetMeta[] = $derived(isSpecial
13
- ? [...entryList.slice(0, -4)]
14
- : [...entryList]);
15
- let overflowUiList: SnippetMeta[] = $derived(isSpecial
16
- ? [...entryList.slice(-4)]
17
- : []);
18
-
19
-
20
- // <!--todo: implement in seaweedlayout #migration-->
21
- let inputValue = $state("");
22
- let styleStr = $state("");
23
- $effect(() => {
24
- const termList = inputValue.split(",");
25
-
26
- const chipList: string[] = [];
27
- termList.forEach((_, idx) => {
28
- termList[idx] = `.qt-${termList[idx]}`;
29
- chipList.push(`.text-chip${termList[idx]}`);
30
- });
31
- styleStr = `<style>
32
- ${termList.join(", ")} {
33
- font-weight: bold
34
- }
35
-
36
- ${chipList.join(", ")} {
37
- background-color: var(--color-secondary-500) /* oklch(55.6% 0 0deg) = #737373 */;
38
- color: var(--color-secondary-contrast-500) /* var(--color-secondary-contrast-light) */;
39
- }
40
- </style>`;
41
- });
42
- </script>
43
-
44
- <div class="mt-8 flex flex-col items-center">
45
- <PinyaCard widthClass="w-full" className="mb-8">
46
- <h2>{title}</h2>
47
- </PinyaCard>
48
- <div class="normal-project-container">
49
- {#each normalUiList as ui (ui.key)}
50
- {@render ui.component({})}
51
- {/each}
52
- </div>
53
- <div class="overflow-project-container">
54
- {#each overflowUiList as ui (ui.key)}
55
- {@render ui.component({})}
56
- {/each}
57
- </div>
58
- </div>
59
-
60
- <!--todo: implement in seaweedlayout #migration-->
61
- <!--{@html styleStr}-->
62
-
63
- <!-- Force tailwind to pickup some classes -->
64
- <div class="hidden rounded-2xl hover:brightness-110"></div>
65
-
66
- <style>
67
- .normal-project-container {
68
- display: flex;
69
- flex-wrap: wrap;
70
- gap: 2rem;
71
- margin: auto;
72
- /* 3 containers + 2 gaps + extra rem */
73
- max-width: calc((28rem * 3) + 5rem);
74
- justify-content: center;
75
- margin-bottom: 2rem;
76
- align-items: start;
77
- }
78
-
79
- .overflow-project-container {
80
- display: flex;
81
- flex-wrap: wrap;
82
- gap: 2rem;
83
- margin: auto;
84
- /* 2 containers + 1 gap + extra rem */
85
- max-width: calc((28rem * 2) + 3rem);
86
- justify-content: center;
87
- align-items: start;
88
- }
1
+ <script lang="ts">
2
+ import type { ProjectGroup, SnippetMeta } from "../index";
3
+ import { PinyaCard } from "../../elements/index";
4
+
5
+ let {
6
+ title,
7
+ entryList,
8
+ projectComponentProps,
9
+ }: ProjectGroup = $props();
10
+
11
+ const isSpecial = $derived(entryList.length % 3 === 1);
12
+
13
+ let normalUiList: SnippetMeta[] = $derived(isSpecial
14
+ ? [...entryList.slice(0, -4)]
15
+ : [...entryList]);
16
+ let overflowUiList: SnippetMeta[] = $derived(isSpecial
17
+ ? [...entryList.slice(-4)]
18
+ : []);
19
+ </script>
20
+
21
+ <div class="mt-8 flex flex-col items-center">
22
+ <PinyaCard widthClass="w-full" className="mb-8">
23
+ <h2>{title}</h2>
24
+ </PinyaCard>
25
+ <div class="normal-project-container">
26
+ {#each normalUiList as ui (ui.key)}
27
+ {@render ui.component(projectComponentProps ?? {})}
28
+ {/each}
29
+ </div>
30
+ <div class="overflow-project-container">
31
+ {#each overflowUiList as ui (ui.key)}
32
+ {@render ui.component(projectComponentProps ?? {})}
33
+ {/each}
34
+ </div>
35
+ </div>
36
+
37
+ <!--todo: implement in seaweedlayout #migration-->
38
+ <!--{@html styleStr}-->
39
+
40
+ <!-- Force tailwind to pickup some classes -->
41
+ <div class="hidden rounded-2xl hover:brightness-110"></div>
42
+
43
+ <style>
44
+ .normal-project-container {
45
+ display: flex;
46
+ flex-wrap: wrap;
47
+ gap: 2rem;
48
+ margin: auto;
49
+ /* 3 containers + 2 gaps + extra rem */
50
+ max-width: calc((28rem * 3) + 5rem);
51
+ justify-content: center;
52
+ margin-bottom: 2rem;
53
+ align-items: start;
54
+ }
55
+
56
+ .overflow-project-container {
57
+ display: flex;
58
+ flex-wrap: wrap;
59
+ gap: 2rem;
60
+ margin: auto;
61
+ /* 2 containers + 1 gap + extra rem */
62
+ max-width: calc((28rem * 2) + 3rem);
63
+ justify-content: center;
64
+ align-items: start;
65
+ }
89
66
  </style>
@@ -1,4 +1,5 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  export interface ProjectComponentProps {
3
+ isPineapple?: boolean;
3
4
  }
4
5
  export type ComponentSnippet = Snippet<[ProjectComponentProps]>;