@turnipxenon/pineapple 2.4.17 → 2.4.19

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 (29) hide show
  1. package/.idea/workspace.xml +25 -27
  2. package/.svelte-kit/__package__/components/Card.svelte +3 -0
  3. package/.svelte-kit/__package__/components/RandomizedBackground.svelte +2 -2
  4. package/.svelte-kit/__package__/components/pineapple/PineappleBaseLayout.svelte +6 -39
  5. package/.svelte-kit/__package__/index.d.ts +3 -1
  6. package/.svelte-kit/__package__/index.js +3 -1
  7. package/{dist/util/stable_random.d.ts → .svelte-kit/__package__/util/util.d.ts} +1 -0
  8. package/{dist/util/stable_random.js → .svelte-kit/__package__/util/util.js} +5 -0
  9. package/.svelte-kit/generated/server/internal.js +1 -1
  10. package/dist/components/Card.svelte +3 -0
  11. package/dist/components/RandomizedBackground.svelte +2 -2
  12. package/dist/components/pineapple/PineappleBaseLayout.svelte +6 -39
  13. package/dist/index.d.ts +3 -1
  14. package/dist/index.js +3 -1
  15. package/{.svelte-kit/__package__/util/stable_random.d.ts → dist/util/util.d.ts} +1 -0
  16. package/{.svelte-kit/__package__/util/stable_random.js → dist/util/util.js} +5 -0
  17. package/package.json +1 -1
  18. package/src/lib/components/Card.svelte +4 -0
  19. package/src/lib/components/RandomizedBackground.svelte +1 -1
  20. package/src/lib/components/pineapple/PineappleBaseLayout.svelte +9 -17
  21. package/src/lib/index.ts +3 -1
  22. package/src/lib/util/{stable_random.ts → util.ts} +22 -16
  23. package/src/routes/(pineapple)/+page.svelte +22 -12
  24. package/src/routes/(pineapple)/pineapple/+page.svelte +13 -16
  25. package/.svelte-kit/__package__/util/create_go_to_function.d.ts +0 -1
  26. package/.svelte-kit/__package__/util/create_go_to_function.js +0 -5
  27. package/dist/util/create_go_to_function.d.ts +0 -1
  28. package/dist/util/create_go_to_function.js +0 -5
  29. package/src/lib/util/create_go_to_function.ts +0 -5
@@ -4,9 +4,15 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Export Card">
8
- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/+page.svelte" afterDir="false" />
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Replace all $lib to $pkg">
8
+ <change afterPath="$PROJECT_DIR$/src/lib/util/util.ts" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/src/lib/components/Card.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/Card.svelte" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/src/lib/components/RandomizedBackground.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/RandomizedBackground.svelte" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/src/lib/components/pineapple/PineappleBaseLayout.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/pineapple/PineappleBaseLayout.svelte" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/src/lib/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/index.ts" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/src/lib/util/create_go_to_function.ts" beforeDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/src/lib/util/stable_random.ts" beforeDir="false" />
15
+ <change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/+page.svelte" afterDir="false" />
10
16
  </list>
11
17
  <option name="SHOW_DIALOG" value="false" />
12
18
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -118,6 +124,9 @@
118
124
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)" />
119
125
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(seaweed)" />
120
126
  </key>
127
+ <key name="es6.move.members.recent.items">
128
+ <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\util\util.ts" />
129
+ </key>
121
130
  </component>
122
131
  <component name="RunManager" selected="npm.dev --open">
123
132
  <configuration name="dev --open" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
@@ -211,15 +220,7 @@
211
220
  <workItem from="1710914868232" duration="41000" />
212
221
  <workItem from="1711051949931" duration="144000" />
213
222
  <workItem from="1711052377810" duration="128000" />
214
- <workItem from="1711090540281" duration="1759000" />
215
- </task>
216
- <task id="LOCAL-00029" summary="Add game section">
217
- <option name="closed" value="true" />
218
- <created>1709926810058</created>
219
- <option name="number" value="00029" />
220
- <option name="presentableId" value="LOCAL-00029" />
221
- <option name="project" value="LOCAL" />
222
- <updated>1709926810058</updated>
223
+ <workItem from="1711090540281" duration="4426000" />
223
224
  </task>
224
225
  <task id="LOCAL-00030" summary="Migrate to skeleton 2.0">
225
226
  <option name="closed" value="true" />
@@ -605,7 +606,15 @@
605
606
  <option name="project" value="LOCAL" />
606
607
  <updated>1711093190088</updated>
607
608
  </task>
608
- <option name="localTasksCounter" value="78" />
609
+ <task id="LOCAL-00078" summary="Replace all $lib to $pkg">
610
+ <option name="closed" value="true" />
611
+ <created>1711093944293</created>
612
+ <option name="number" value="00078" />
613
+ <option name="presentableId" value="LOCAL-00078" />
614
+ <option name="project" value="LOCAL" />
615
+ <updated>1711093944293</updated>
616
+ </task>
617
+ <option name="localTasksCounter" value="79" />
609
618
  <servers />
610
619
  </component>
611
620
  <component name="TypeScriptGeneratedFilesManager">
@@ -643,7 +652,7 @@
643
652
  <entry key="branch">
644
653
  <value>
645
654
  <list>
646
- <option value="turnip/fix" />
655
+ <option value="turnip/dev" />
647
656
  </list>
648
657
  </value>
649
658
  </entry>
@@ -663,7 +672,6 @@
663
672
  </option>
664
673
  </component>
665
674
  <component name="VcsManagerConfiguration">
666
- <MESSAGE value="Fix accordion rounded border missing" />
667
675
  <MESSAGE value="v2.4.6" />
668
676
  <MESSAGE value="Extract styling out of Skeleton accordion" />
669
677
  <MESSAGE value="Attempt to make postcss exportable" />
@@ -688,17 +696,7 @@
688
696
  <MESSAGE value="Fix dialog layout to make it usable on hobby site" />
689
697
  <MESSAGE value="Add option to set default dialog behavior in Pineapple" />
690
698
  <MESSAGE value="Export Card" />
691
- <option name="LAST_COMMIT_MESSAGE" value="Export Card" />
692
- </component>
693
- <component name="XDebuggerManager">
694
- <breakpoint-manager>
695
- <breakpoints>
696
- <line-breakpoint enabled="true" type="javascript">
697
- <url>file://$PROJECT_DIR$/src/routes/(pineapple)/pineapple/+page.svelte</url>
698
- <line>31</line>
699
- <option name="timeStamp" value="1" />
700
- </line-breakpoint>
701
- </breakpoints>
702
- </breakpoint-manager>
699
+ <MESSAGE value="Replace all $lib to $pkg" />
700
+ <option name="LAST_COMMIT_MESSAGE" value="Replace all $lib to $pkg" />
703
701
  </component>
704
702
  </project>
@@ -7,6 +7,9 @@ const style = `
7
7
  --turnip-card-margin-bottom: ${marginBottom};
8
8
  ${overrideStyle};
9
9
  `;
10
+ if (!$$slots.content) {
11
+ console.error("Missing content slot in card. No content will be displayed.");
12
+ }
10
13
  </script>
11
14
 
12
15
  {#if (includeDataNoSnippet)}
@@ -1,11 +1,11 @@
1
- <script>import { generatedDailySeed, mulberry32Generator } from "../util/stable_random";
2
- import BgTiledAres from "../assets/bg_tiled/bg_tiled_ares.png";
1
+ <script>import BgTiledAres from "../assets/bg_tiled/bg_tiled_ares.png";
3
2
  import BgTiledCorn from "../assets/bg_tiled/bg_tiled_corn.png";
4
3
  import BgTiledPineapple from "../assets/bg_tiled/bg_tiled_pineapple.png";
5
4
  import BgTiledReinhard from "../assets/bg_tiled/bg_tiled_reinhard.png";
6
5
  import BgTiledTomato from "../assets/bg_tiled/bg_tiled_tomato.png";
7
6
  import BgTiledTurnip from "../assets/bg_tiled/bg_tiled_turnip.png";
8
7
  import RandomizedImage from "./RandomizedImage.svelte";
8
+ import { generatedDailySeed, mulberry32Generator } from "../util/util";
9
9
  export let enable;
10
10
  const imageList = [BgTiledAres, BgTiledCorn, BgTiledPineapple, BgTiledReinhard, BgTiledTomato, BgTiledTurnip];
11
11
  const seed = generatedDailySeed();
@@ -9,6 +9,7 @@ import CloseIcon from "../../assets/icons/close.svg";
9
9
  import { dialogManager, enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
10
10
  import Toast from "./toast/Toast.svelte";
11
11
  import DialogOverlay from "../DialogOverlay.svelte";
12
+ import { crossfade } from "svelte/transition";
12
13
  let pages = [];
13
14
  const updateBreadcrumb = (pathname) => {
14
15
  pages = [];
@@ -80,12 +81,12 @@ enableDialogueOverlay.set(showDialogByDefault);
80
81
  <ol class="breadcrumb">
81
82
  {#each pages as crumb, i}
82
83
  {#if i < pages.length - 1}
83
- <li class="crumb">
84
+ <li class="crumb" transition:crossfade>
84
85
  <a href={crumb.path}>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</a>
86
+ &nbsp;&rsaquo;
85
87
  </li>
86
- <li class="crumb-separator" aria-hidden="true">&rsaquo;</li>
87
88
  {:else}
88
- <li class="crumb">{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
89
+ <li class="crumb" transition:crossfade>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
89
90
  {/if}
90
91
  {/each}
91
92
  </ol>
@@ -106,17 +107,7 @@ enableDialogueOverlay.set(showDialogByDefault);
106
107
  <slot />
107
108
  <div class="footer-space" />
108
109
  </div>
109
- <!--{#if enableDialogueOverlayValue}-->
110
- <!-- &lt;!&ndash; Page Route Content &ndash;&gt;-->
111
- <!-- <div class="default-page-container">-->
112
- <!-- <slot />-->
113
- <!-- <div class="footer-space" />-->
114
- <!-- </div>-->
115
- <!-- <DialogOverlay />-->
116
- <!--{:else}-->
117
- <!-- <DialogOverlay />-->
118
- <!-- <slot />-->
119
- <!--{/if}-->
110
+
120
111
  </AppShell>
121
112
 
122
113
  <style>
@@ -166,15 +157,6 @@ enableDialogueOverlay.set(showDialogByDefault);
166
157
  display: flex;
167
158
  width: 100%;
168
159
  align-items: center;
169
- }
170
- .breadcrumb > :not([hidden]) ~ :not([hidden]),
171
- .breadcrumb-nonresponsive > :not([hidden]) ~ :not([hidden]) {
172
- --tw-space-x-reverse: 0;
173
- margin-right: calc(1rem * var(--tw-space-x-reverse));
174
- margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
175
- }
176
- .breadcrumb,
177
- .breadcrumb-nonresponsive {
178
160
  overflow-x: auto;
179
161
  /*@apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;*/
180
162
  }
@@ -185,24 +167,9 @@ enableDialogueOverlay.set(showDialogByDefault);
185
167
  justify-content: center;
186
168
  }
187
169
 
188
- .crumb > :not([hidden]) ~ :not([hidden]) {
189
- --tw-space-x-reverse: 0;
190
- margin-right: calc(0.5rem * var(--tw-space-x-reverse));
191
- margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
192
- }
193
-
194
- .dark .crumb-separator {
195
- color: rgb(var(--color-surface-200));
196
- }
197
-
198
170
  .crumb-separator {
199
171
  display: flex;
200
- opacity: 0.5;
201
- color: rgb(var(--color-surface-700));
202
- }
203
-
204
- .dark .crumb-separator {
205
- color: rgb(var(--color-surface-200));
172
+ color: var(--color-text-50);
206
173
  }
207
174
 
208
175
  /* === Auto-Responsive === */
@@ -7,4 +7,6 @@ export * from "./components/dialog_manager/DialogManager";
7
7
  export * from "./components/dialog_manager/DialogUtils";
8
8
  export * from "./types/pineapple_fiber/PortraitType";
9
9
  export * from "./types/pineapple_fiber/DialogDetail";
10
- export * from "./util/stable_random";
10
+ export * from "./util/util";
11
+ export { mulberry32Generator } from "./util/util";
12
+ export { generatedDailySeed } from "./util/util";
@@ -7,4 +7,6 @@ export * from "./components/dialog_manager/DialogManager";
7
7
  export * from "./components/dialog_manager/DialogUtils";
8
8
  export * from "./types/pineapple_fiber/PortraitType";
9
9
  export * from "./types/pineapple_fiber/DialogDetail";
10
- export * from "./util/stable_random";
10
+ export * from "./util/util";
11
+ export { mulberry32Generator } from "./util/util";
12
+ export { generatedDailySeed } from "./util/util";
@@ -1,2 +1,3 @@
1
1
  export declare const generatedDailySeed: () => number;
2
2
  export declare const mulberry32Generator: (a: number) => (() => number);
3
+ export declare const createGoToFunction: (path: string) => (() => void);
@@ -13,3 +13,8 @@ export const mulberry32Generator = (a) => {
13
13
  return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
14
14
  };
15
15
  };
16
+ export const createGoToFunction = (path) => {
17
+ return (() => {
18
+ location.href = path;
19
+ });
20
+ };
@@ -21,7 +21,7 @@ export const options = {
21
21
  app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t" + head + "\n\t</head>\n\n\t<body data-sveltekit-preload-data=\"hover\" data-theme=\"crimson\">\n\t\t<div style=\"display: contents\" class=\"h-full overflow-hidden\">" + body + "</div>\n\t</body>\n</html>\n",
22
22
  error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
23
23
  },
24
- version_hash: "1v14hx1"
24
+ version_hash: "1nuybzt"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -7,6 +7,9 @@ const style = `
7
7
  --turnip-card-margin-bottom: ${marginBottom};
8
8
  ${overrideStyle};
9
9
  `;
10
+ if (!$$slots.content) {
11
+ console.error("Missing content slot in card. No content will be displayed.");
12
+ }
10
13
  </script>
11
14
 
12
15
  {#if (includeDataNoSnippet)}
@@ -1,11 +1,11 @@
1
- <script>import { generatedDailySeed, mulberry32Generator } from "../util/stable_random";
2
- import BgTiledAres from "../assets/bg_tiled/bg_tiled_ares.png";
1
+ <script>import BgTiledAres from "../assets/bg_tiled/bg_tiled_ares.png";
3
2
  import BgTiledCorn from "../assets/bg_tiled/bg_tiled_corn.png";
4
3
  import BgTiledPineapple from "../assets/bg_tiled/bg_tiled_pineapple.png";
5
4
  import BgTiledReinhard from "../assets/bg_tiled/bg_tiled_reinhard.png";
6
5
  import BgTiledTomato from "../assets/bg_tiled/bg_tiled_tomato.png";
7
6
  import BgTiledTurnip from "../assets/bg_tiled/bg_tiled_turnip.png";
8
7
  import RandomizedImage from "./RandomizedImage.svelte";
8
+ import { generatedDailySeed, mulberry32Generator } from "../util/util";
9
9
  export let enable;
10
10
  const imageList = [BgTiledAres, BgTiledCorn, BgTiledPineapple, BgTiledReinhard, BgTiledTomato, BgTiledTurnip];
11
11
  const seed = generatedDailySeed();
@@ -9,6 +9,7 @@ import CloseIcon from "../../assets/icons/close.svg";
9
9
  import { dialogManager, enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
10
10
  import Toast from "./toast/Toast.svelte";
11
11
  import DialogOverlay from "../DialogOverlay.svelte";
12
+ import { crossfade } from "svelte/transition";
12
13
  let pages = [];
13
14
  const updateBreadcrumb = (pathname) => {
14
15
  pages = [];
@@ -80,12 +81,12 @@ enableDialogueOverlay.set(showDialogByDefault);
80
81
  <ol class="breadcrumb">
81
82
  {#each pages as crumb, i}
82
83
  {#if i < pages.length - 1}
83
- <li class="crumb">
84
+ <li class="crumb" transition:crossfade>
84
85
  <a href={crumb.path}>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</a>
86
+ &nbsp;&rsaquo;
85
87
  </li>
86
- <li class="crumb-separator" aria-hidden="true">&rsaquo;</li>
87
88
  {:else}
88
- <li class="crumb">{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
89
+ <li class="crumb" transition:crossfade>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
89
90
  {/if}
90
91
  {/each}
91
92
  </ol>
@@ -106,17 +107,7 @@ enableDialogueOverlay.set(showDialogByDefault);
106
107
  <slot />
107
108
  <div class="footer-space" />
108
109
  </div>
109
- <!--{#if enableDialogueOverlayValue}-->
110
- <!-- &lt;!&ndash; Page Route Content &ndash;&gt;-->
111
- <!-- <div class="default-page-container">-->
112
- <!-- <slot />-->
113
- <!-- <div class="footer-space" />-->
114
- <!-- </div>-->
115
- <!-- <DialogOverlay />-->
116
- <!--{:else}-->
117
- <!-- <DialogOverlay />-->
118
- <!-- <slot />-->
119
- <!--{/if}-->
110
+
120
111
  </AppShell>
121
112
 
122
113
  <style>
@@ -166,15 +157,6 @@ enableDialogueOverlay.set(showDialogByDefault);
166
157
  display: flex;
167
158
  width: 100%;
168
159
  align-items: center;
169
- }
170
- .breadcrumb > :not([hidden]) ~ :not([hidden]),
171
- .breadcrumb-nonresponsive > :not([hidden]) ~ :not([hidden]) {
172
- --tw-space-x-reverse: 0;
173
- margin-right: calc(1rem * var(--tw-space-x-reverse));
174
- margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
175
- }
176
- .breadcrumb,
177
- .breadcrumb-nonresponsive {
178
160
  overflow-x: auto;
179
161
  /*@apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;*/
180
162
  }
@@ -185,24 +167,9 @@ enableDialogueOverlay.set(showDialogByDefault);
185
167
  justify-content: center;
186
168
  }
187
169
 
188
- .crumb > :not([hidden]) ~ :not([hidden]) {
189
- --tw-space-x-reverse: 0;
190
- margin-right: calc(0.5rem * var(--tw-space-x-reverse));
191
- margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
192
- }
193
-
194
- .dark .crumb-separator {
195
- color: rgb(var(--color-surface-200));
196
- }
197
-
198
170
  .crumb-separator {
199
171
  display: flex;
200
- opacity: 0.5;
201
- color: rgb(var(--color-surface-700));
202
- }
203
-
204
- .dark .crumb-separator {
205
- color: rgb(var(--color-surface-200));
172
+ color: var(--color-text-50);
206
173
  }
207
174
 
208
175
  /* === Auto-Responsive === */
package/dist/index.d.ts CHANGED
@@ -7,4 +7,6 @@ export * from "./components/dialog_manager/DialogManager";
7
7
  export * from "./components/dialog_manager/DialogUtils";
8
8
  export * from "./types/pineapple_fiber/PortraitType";
9
9
  export * from "./types/pineapple_fiber/DialogDetail";
10
- export * from "./util/stable_random";
10
+ export * from "./util/util";
11
+ export { mulberry32Generator } from "./util/util";
12
+ export { generatedDailySeed } from "./util/util";
package/dist/index.js CHANGED
@@ -7,4 +7,6 @@ export * from "./components/dialog_manager/DialogManager";
7
7
  export * from "./components/dialog_manager/DialogUtils";
8
8
  export * from "./types/pineapple_fiber/PortraitType";
9
9
  export * from "./types/pineapple_fiber/DialogDetail";
10
- export * from "./util/stable_random";
10
+ export * from "./util/util";
11
+ export { mulberry32Generator } from "./util/util";
12
+ export { generatedDailySeed } from "./util/util";
@@ -1,2 +1,3 @@
1
1
  export declare const generatedDailySeed: () => number;
2
2
  export declare const mulberry32Generator: (a: number) => (() => number);
3
+ export declare const createGoToFunction: (path: string) => (() => void);
@@ -13,3 +13,8 @@ export const mulberry32Generator = (a) => {
13
13
  return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
14
14
  };
15
15
  };
16
+ export const createGoToFunction = (path) => {
17
+ return (() => {
18
+ location.href = path;
19
+ });
20
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "2.4.17",
4
+ "version": "2.4.19",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "npm run check-requirements && vite build && yarn package",
@@ -10,6 +10,10 @@
10
10
  --turnip-card-margin-bottom: ${marginBottom};
11
11
  ${overrideStyle};
12
12
  `;
13
+
14
+ if (!$$slots.content) {
15
+ console.error("Missing content slot in card. No content will be displayed.");
16
+ }
13
17
  </script>
14
18
 
15
19
  {#if (includeDataNoSnippet)}
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import { generatedDailySeed, mulberry32Generator } from "$lib/util/stable_random";
3
2
  import BgTiledAres from "$lib/assets/bg_tiled/bg_tiled_ares.png";
4
3
  import BgTiledCorn from "$lib/assets/bg_tiled/bg_tiled_corn.png";
5
4
  import BgTiledPineapple from "$lib/assets/bg_tiled/bg_tiled_pineapple.png";
@@ -7,6 +6,7 @@
7
6
  import BgTiledTomato from "$lib/assets/bg_tiled/bg_tiled_tomato.png";
8
7
  import BgTiledTurnip from "$lib/assets/bg_tiled/bg_tiled_turnip.png";
9
8
  import RandomizedImage from "$lib/components/RandomizedImage.svelte";
9
+ import { generatedDailySeed, mulberry32Generator } from "$pkg/util/util";
10
10
 
11
11
  export let enable;
12
12
 
@@ -18,6 +18,7 @@
18
18
  import { dialogManager, enableDialogueOverlay } from "$pkg/components/dialog_manager/DialogManagerStore";
19
19
  import Toast from "$pkg/components/pineapple/toast/Toast.svelte";
20
20
  import DialogOverlay from "$pkg/components/DialogOverlay.svelte";
21
+ import { crossfade } from "svelte/transition";
21
22
  // todo: clean up all these imports!
22
23
 
23
24
  let pages: BreadcrumbData[] = [];
@@ -97,12 +98,12 @@
97
98
  <ol class="breadcrumb">
98
99
  {#each pages as crumb, i}
99
100
  {#if i < pages.length - 1}
100
- <li class="crumb">
101
+ <li class="crumb" transition:crossfade>
101
102
  <a href={crumb.path}>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</a>
103
+ &nbsp;&rsaquo;
102
104
  </li>
103
- <li class="crumb-separator" aria-hidden="true">&rsaquo;</li>
104
105
  {:else}
105
- <li class="crumb">{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
106
+ <li class="crumb" transition:crossfade>{crumb.name.charAt(0).toUpperCase() + crumb.name.slice(1)}</li>
106
107
  {/if}
107
108
  {/each}
108
109
  </ol>
@@ -123,17 +124,7 @@
123
124
  <slot />
124
125
  <div class="footer-space" />
125
126
  </div>
126
- <!--{#if enableDialogueOverlayValue}-->
127
- <!-- &lt;!&ndash; Page Route Content &ndash;&gt;-->
128
- <!-- <div class="default-page-container">-->
129
- <!-- <slot />-->
130
- <!-- <div class="footer-space" />-->
131
- <!-- </div>-->
132
- <!-- <DialogOverlay />-->
133
- <!--{:else}-->
134
- <!-- <DialogOverlay />-->
135
- <!-- <slot />-->
136
- <!--{/if}-->
127
+
137
128
  </AppShell>
138
129
 
139
130
  <style lang="postcss">
@@ -177,16 +168,17 @@
177
168
  it likely disappeared due to code gen shenanigans and package magic */
178
169
  .breadcrumb,
179
170
  .breadcrumb-nonresponsive {
180
- @apply flex items-center space-x-4 w-full overflow-x-auto;
171
+ @apply flex items-center w-full overflow-x-auto;
181
172
  /*@apply flex items-center space-x-4 w-full hide-scrollbar overflow-x-auto;*/
182
173
  }
183
174
 
184
175
  .crumb {
185
- @apply flex justify-center items-center space-x-2;
176
+ @apply flex justify-center items-center;
186
177
  }
187
178
 
188
179
  .crumb-separator {
189
- @apply flex text-surface-700-200-token opacity-50;
180
+ @apply flex;
181
+ color: var(--color-text-50);
190
182
  }
191
183
 
192
184
  /* === Auto-Responsive === */
package/src/lib/index.ts CHANGED
@@ -8,4 +8,6 @@ export * from "./components/dialog_manager/DialogManager";
8
8
  export * from "./components/dialog_manager/DialogUtils";
9
9
  export * from "./types/pineapple_fiber/PortraitType";
10
10
  export * from "./types/pineapple_fiber/DialogDetail";
11
- export * from "./util/stable_random";
11
+ export * from "./util/util";
12
+ export { mulberry32Generator } from "$pkg/util/util";
13
+ export { generatedDailySeed } from "$pkg/util/util";
@@ -1,16 +1,22 @@
1
- export const generatedDailySeed = (): number => {
2
- const date = new Date();
3
- const time = date.getTime() + 86400000;
4
- return time - (time % 86400000);
5
- };
6
-
7
- // psuedo misc with seed
8
- // from https://stackoverflow.com/a/47593316
9
- export const mulberry32Generator = (a: number): (() => number) => {
10
- return function () {
11
- var t = (a += 0x6d2b79f5);
12
- t = Math.imul(t ^ (t >>> 15), t | 1);
13
- t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
14
- return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
15
- };
16
- };
1
+ export const generatedDailySeed = (): number => {
2
+ const date = new Date();
3
+ const time = date.getTime() + 86400000;
4
+ return time - (time % 86400000);
5
+ };
6
+
7
+ // psuedo misc with seed
8
+ // from https://stackoverflow.com/a/47593316
9
+ export const mulberry32Generator = (a: number): (() => number) => {
10
+ return function() {
11
+ var t = (a += 0x6d2b79f5);
12
+ t = Math.imul(t ^ (t >>> 15), t | 1);
13
+ t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
14
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
15
+ };
16
+ };
17
+
18
+ export const createGoToFunction = (path: string): (() => void) => {
19
+ return (() => {
20
+ location.href = path;
21
+ });
22
+ };
@@ -1,8 +1,9 @@
1
1
  <script>
2
2
  import { PUBLIC_CRINGE_USERNAME } from "$env/static/public";
3
3
 
4
- import { createGoToFunction } from "$pkg/util/create_go_to_function";
5
- import PineappleBaseLayout from "$pkg/components/pineapple/PineappleBaseLayout.svelte";
4
+
5
+ import { createGoToFunction } from "$pkg/util/util";
6
+ import { Card } from "$pkg";
6
7
  </script>
7
8
 
8
9
  <svelte:head>
@@ -14,23 +15,32 @@
14
15
  />
15
16
  </svelte:head>
16
17
 
17
- <div class="card default-card">
18
- <h1 class="mb-8">Directory</h1>
18
+ <Card>
19
+ <div slot="content" class="content">
20
+ <h1 class="mb-8" style="font-weight: bolder">Directory</h1>
19
21
 
20
- <div class="btn-group-vertical variant-filled-secondary">
21
- <button on:click={createGoToFunction("pineapple")}><h2>Pineapple playground</h2></button>
22
- <button on:click={createGoToFunction("portfolio")}><h2>Seaweed playrground</h2></button>
22
+ <div class="btn-group">
23
+ <button on:click={createGoToFunction("pineapple")}><h2>Pineapple playground</h2></button>
24
+ <button on:click={createGoToFunction("portfolio")}><h2>Seaweed playrground</h2></button>
25
+ </div>
23
26
  </div>
24
- </div>
27
+ </Card>
25
28
 
26
29
  <style lang="postcss">
27
- .btn-group-vertical button {
30
+ .btn-group {
28
31
  padding: 2em;
32
+ display: flex;
33
+ gap: 2em;
34
+ flex-direction: column;
35
+
29
36
  }
30
37
 
31
- .default-card {
38
+ button {
39
+ @apply btn variant-filled-secondary;
40
+ }
41
+
42
+ .content {
43
+ padding: 2em;
32
44
  text-align: center;
33
- padding-inline-end: 0;
34
- @apply p-16;
35
45
  }
36
46
  </style>
@@ -3,7 +3,7 @@
3
3
  import { showComponentInToast, showTextInToast } from "$pkg/components/pineapple/toast/Toast";
4
4
  import TestCard from "$pkg/components/pineapple/toast/custom-toast/TestCustomToast.svelte";
5
5
  import TestDialogYarn from "./TestDialog.yarn?raw";
6
- import { Card, dialogManager } from "$pkg";
6
+ import { dialogManager } from "$pkg";
7
7
 
8
8
 
9
9
  let testingQueueNumber = 1;
@@ -36,30 +36,27 @@
36
36
  />
37
37
  </svelte:head>
38
38
 
39
- <Card>
40
- <div slot="content" class="card-content">
41
- <button
42
- class="btn variant-filled-secondary"
43
- on:click={() => {
39
+ <div class="card default-card">
40
+ <button
41
+ class="btn variant-filled-secondary"
42
+ on:click={() => {
44
43
  showComponentInToast({componentAndProps: {component: TestCard, props: undefined}});
45
44
  }}><h3>Test custom toast</h3></button>
46
- <button
47
- class="btn variant-filled-secondary"
48
- on:click={() => {
45
+ <button
46
+ class="btn variant-filled-secondary"
47
+ on:click={() => {
49
48
  showTextInToast(`${testingQueueNumber} ${testingRandomPhrases[testingQueueNumber]}`);
50
49
  testingQueueNumber = (testingQueueNumber + 1) % testingRandomPhrases.length;
51
50
  }}><h3>Handy toast</h3></button>
52
- <button
53
- class="btn variant-filled-secondary"
54
- on:click={onTestDialogClick}><h3>Test dialog</h3></button>
55
- </div>
56
- </Card>
51
+ <button
52
+ class="btn variant-filled-secondary"
53
+ on:click={onTestDialogClick}><h3>Test dialog</h3></button>
54
+ </div>
57
55
 
58
56
  <style lang="postcss">
59
- .card-content {
57
+ .default-card {
60
58
  display: flex;
61
59
  flex-wrap: wrap;
62
60
  gap: 2em;
63
- padding: 2em;
64
61
  }
65
62
  </style>
@@ -1 +0,0 @@
1
- export declare const createGoToFunction: (path: string) => (() => void);
@@ -1,5 +0,0 @@
1
- export const createGoToFunction = (path) => {
2
- return (() => {
3
- location.href = path;
4
- });
5
- };
@@ -1 +0,0 @@
1
- export declare const createGoToFunction: (path: string) => (() => void);
@@ -1,5 +0,0 @@
1
- export const createGoToFunction = (path) => {
2
- return (() => {
3
- location.href = path;
4
- });
5
- };
@@ -1,5 +0,0 @@
1
- export const createGoToFunction = (path: string): (() => void) => {
2
- return (() => {
3
- location.href = path;
4
- });
5
- };