@turnipxenon/pineapple 2.4.47 → 2.4.48

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.
@@ -4,10 +4,9 @@
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="Remove unneeded script check in yarn build">
8
- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/svelte.config.js" beforeDir="false" afterPath="$PROJECT_DIR$/svelte.config.js" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/yarn.lock" beforeDir="false" afterPath="$PROJECT_DIR$/yarn.lock" afterDir="false" />
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Support swappable group for backwards compatibility">
8
+ <change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplateData.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplateData.ts" afterDir="false" />
11
10
  </list>
12
11
  <option name="SHOW_DIALOG" value="false" />
13
12
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -133,7 +132,7 @@
133
132
  &quot;npm.dev.executor&quot;: &quot;Run&quot;,
134
133
  &quot;npm.to-dev.executor&quot;: &quot;Run&quot;,
135
134
  &quot;settings.editor.selected.configurable&quot;: &quot;preferences.general&quot;,
136
- &quot;ts.external.directory.path&quot;: &quot;C:\\Users\\Pumpkin\\AppData\\Local\\Programs\\WebStorm\\plugins\\javascript-impl\\jsLanguageServicesImpl\\external&quot;,
135
+ &quot;ts.external.directory.path&quot;: &quot;C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib&quot;,
137
136
  &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
138
137
  }
139
138
  }</component>
@@ -323,22 +322,8 @@
323
322
  <workItem from="1712420658777" duration="5492000" />
324
323
  <workItem from="1712469166120" duration="5613000" />
325
324
  <workItem from="1712474982019" duration="1446000" />
326
- </task>
327
- <task id="LOCAL-00110" summary="Migrate from relying on json instead of comments for meta">
328
- <option name="closed" value="true" />
329
- <created>1711492747330</created>
330
- <option name="number" value="00110" />
331
- <option name="presentableId" value="LOCAL-00110" />
332
- <option name="project" value="LOCAL" />
333
- <updated>1711492747331</updated>
334
- </task>
335
- <task id="LOCAL-00111" summary="Add default sorter for NavigationComponent">
336
- <option name="closed" value="true" />
337
- <created>1711494655396</created>
338
- <option name="number" value="00111" />
339
- <option name="presentableId" value="LOCAL-00111" />
340
- <option name="project" value="LOCAL" />
341
- <updated>1711494655396</updated>
325
+ <workItem from="1712476456680" duration="329000" />
326
+ <workItem from="1712476890510" duration="801000" />
342
327
  </task>
343
328
  <task id="LOCAL-00112" summary="Fix NavigationComponent styling">
344
329
  <option name="closed" value="true" />
@@ -716,7 +701,23 @@
716
701
  <option name="project" value="LOCAL" />
717
702
  <updated>1712475823736</updated>
718
703
  </task>
719
- <option name="localTasksCounter" value="159" />
704
+ <task id="LOCAL-00159" summary="Fix yarn dependencies">
705
+ <option name="closed" value="true" />
706
+ <created>1712476485361</created>
707
+ <option name="number" value="00159" />
708
+ <option name="presentableId" value="LOCAL-00159" />
709
+ <option name="project" value="LOCAL" />
710
+ <updated>1712476485362</updated>
711
+ </task>
712
+ <task id="LOCAL-00160" summary="Support swappable group for backwards compatibility">
713
+ <option name="closed" value="true" />
714
+ <created>1712477348736</created>
715
+ <option name="number" value="00160" />
716
+ <option name="presentableId" value="LOCAL-00160" />
717
+ <option name="project" value="LOCAL" />
718
+ <updated>1712477348736</updated>
719
+ </task>
720
+ <option name="localTasksCounter" value="161" />
720
721
  <servers />
721
722
  </component>
722
723
  <component name="TypeScriptGeneratedFilesManager">
@@ -774,8 +775,6 @@
774
775
  </option>
775
776
  </component>
776
777
  <component name="VcsManagerConfiguration">
777
- <MESSAGE value="Convert npm to yarn" />
778
- <MESSAGE value="Change from auto to node adapter" />
779
778
  <MESSAGE value="Add kudos to 0gust1&#10;&#10;Add kudos to 0gust1 for documenting how to deploy sveltekit app on Azure App service" />
780
779
  <MESSAGE value="Correct app_build_command in Azure SWA GithubActions&#10;&#10;app_build_command by default runs npm install when it should be running yarn install" />
781
780
  <MESSAGE value="Add resolutions to use Node 20 in Azure SWA GithubActions" />
@@ -799,6 +798,8 @@
799
798
  <MESSAGE value="Add serverSideQueryParams and extraComponent in SeaweedTemplate" />
800
799
  <MESSAGE value="Fix removeProxyWrapperOnString" />
801
800
  <MESSAGE value="Remove unneeded script check in yarn build" />
802
- <option name="LAST_COMMIT_MESSAGE" value="Remove unneeded script check in yarn build" />
801
+ <MESSAGE value="Fix yarn dependencies" />
802
+ <MESSAGE value="Support swappable group for backwards compatibility" />
803
+ <option name="LAST_COMMIT_MESSAGE" value="Support swappable group for backwards compatibility" />
803
804
  </component>
804
805
  </project>
@@ -1,4 +1,5 @@
1
- <script>import EntryOrderConfig from "./entry_order_config/EntryOrderConfig.svelte";
1
+ <script>import { onMount } from "svelte";
2
+ import EntryOrderConfig from "./entry_order_config/EntryOrderConfig.svelte";
2
3
  import { runChaos } from "./RunChaos";
3
4
  import SocialSection from "../../components/SocialSection.svelte";
4
5
  import "./seaweed.postcss";
@@ -6,12 +7,13 @@ import SeaweedBaseLayout from "../../components/layouts/SeaweedBaseLayout.svelte
6
7
  import { Accordion, AccordionItem, CodeBlock, SlideToggle } from "@skeletonlabs/skeleton";
7
8
  import { page } from "$app/stores";
8
9
  import Card from "../../components/Card.svelte";
9
- import { onMount } from "svelte";
10
10
  import ElementVisbilityDetector from "../../components/ElementVisbilityDetector.svelte";
11
11
  import selfContent from "./SeaweedTemplate.svelte?raw";
12
12
  import {
13
+ AllGroupedEntriesProjectFirst,
13
14
  GetEntryFromGlobal,
14
- seaweedTemplateData
15
+ seaweedTemplateData,
16
+ TurnGroupEntriesMutable
15
17
  } from "./SeaweedTemplateData";
16
18
  export let letChaos = true;
17
19
  export let name = "Turnip";
@@ -71,9 +73,6 @@ const filterSearchParams = (searchParams) => {
71
73
  seaweedTemplateData.shouldAddFunNote = true;
72
74
  }
73
75
  const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
74
- if (gameSectionFirstParam === "false") {
75
- seaweedTemplateData.gameSectionFirst = false;
76
- }
77
76
  const orderParam = searchParams.get("order")?.trim();
78
77
  if (orderParam) {
79
78
  seaweedTemplateData.groupedEntries = [];
@@ -96,6 +95,8 @@ const filterSearchParams = (searchParams) => {
96
95
  }
97
96
  });
98
97
  seaweedTemplateData.groupedEntries = seaweedTemplateData.groupedEntries;
98
+ } else if (gameSectionFirstParam === "false") {
99
+ seaweedTemplateData.groupedEntries = TurnGroupEntriesMutable(AllGroupedEntriesProjectFirst);
99
100
  }
100
101
  const qtValue = searchParams.get("qt")?.trim();
101
102
  if (qtValue !== void 0) {
@@ -337,6 +338,7 @@ $:
337
338
  <SlideToggle name="game-section-slider" bind:checked={seaweedTemplateData.gameSectionFirst}>
338
339
  Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
339
340
  </SlideToggle>
341
+ <p>Note: the above configuration was made before the dynamic entry list and to support links sent with that params, we will act like it only swaps the two groups, and nothing more dynamic if order query param does not exist. The configuration only happens during page load with query param, and it does not apply when changed here.</p>
340
342
  <SlideToggle name="fun-note-slider" bind:checked={seaweedTemplateData.shouldAddFunNote}>
341
343
  Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
342
344
  </SlideToggle>
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import "./seaweed.postcss";
3
2
  import { type ComponentType } from "svelte";
3
+ import "./seaweed.postcss";
4
4
  declare const __propDef: {
5
5
  props: {
6
6
  letChaos?: boolean | undefined;
@@ -10,10 +10,13 @@ export interface EntryGroup {
10
10
  }
11
11
  export declare const GameEntries: Readonly<EntryGroup>;
12
12
  export declare const ProjectEntries: Readonly<EntryGroup>;
13
- export declare const AllGroupedEntries: ReadonlyArray<EntryGroup>;
13
+ export declare const EmptyRelevantProjects: Readonly<EntryGroup>;
14
+ export declare const AllGroupedEntriesGameFirst: ReadonlyArray<EntryGroup>;
15
+ export declare const AllGroupedEntriesProjectFirst: ReadonlyArray<EntryGroup>;
14
16
  export declare const lazyInitializeAllFlatEntries: () => void;
15
17
  export declare const GetAllEntryFromGlobal: () => Map<string, ComponentType>;
16
18
  export declare const GetEntryFromGlobal: (name: string) => ComponentType | undefined;
19
+ export declare const TurnGroupEntriesMutable: (allEntries: ReadonlyArray<EntryGroup>) => EntryGroup[];
17
20
  export interface SeaweedTemplateData {
18
21
  groupedEntries: EntryGroup[];
19
22
  shouldAddFunNote: boolean;
@@ -27,15 +27,21 @@ export const ProjectEntries = {
27
27
  items: [MigranteAlberta, DecentralizedSocialMedia, CustomizedYarnspinner, FullStackC, Workset, ThisWebpage, MockUberApp],
28
28
  gridClass: GroupGridClass.Projects.toString()
29
29
  };
30
- export const AllGroupedEntries = [
31
- {
32
- name: "Relevant projects",
33
- items: [],
34
- gridClass: GroupGridClass.Games.toString()
35
- },
30
+ export const EmptyRelevantProjects = {
31
+ name: "Relevant projects",
32
+ items: [],
33
+ gridClass: GroupGridClass.Games.toString()
34
+ };
35
+ export const AllGroupedEntriesGameFirst = [
36
+ EmptyRelevantProjects,
36
37
  GameEntries,
37
38
  ProjectEntries
38
39
  ];
40
+ export const AllGroupedEntriesProjectFirst = [
41
+ EmptyRelevantProjects,
42
+ ProjectEntries,
43
+ GameEntries
44
+ ];
39
45
  const allFlatEntries = new Map();
40
46
  export const lazyInitializeAllFlatEntries = () => {
41
47
  if (allFlatEntries.size === 0) {
@@ -52,17 +58,20 @@ export const GetEntryFromGlobal = (name) => {
52
58
  lazyInitializeAllFlatEntries();
53
59
  return allFlatEntries.get(name);
54
60
  };
55
- export const seaweedTemplateData = {
56
- shouldAddFunNote: false,
57
- queryTermMap: new Map(),
58
- // todo: gameSectionFirst currently has no functionality
59
- gameSectionFirst: false,
60
- // copy the readonly properties into mutable values
61
- groupedEntries: AllGroupedEntries.map(g => {
61
+ export const TurnGroupEntriesMutable = (allEntries) => {
62
+ return allEntries.map(g => {
62
63
  return {
63
64
  name: g.name,
64
65
  gridClass: g.gridClass,
65
66
  items: g.items.map(e => e)
66
67
  };
67
- })
68
+ });
69
+ };
70
+ export const seaweedTemplateData = {
71
+ shouldAddFunNote: false,
72
+ queryTermMap: new Map(),
73
+ // todo: gameSectionFirst currently has no functionality
74
+ gameSectionFirst: true,
75
+ // copy the readonly properties into mutable values
76
+ groupedEntries: TurnGroupEntriesMutable(AllGroupedEntriesGameFirst)
68
77
  };
@@ -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: "r9ndx3"
24
+ version_hash: "1hij5cm"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -1,4 +1,5 @@
1
- <script>import EntryOrderConfig from "./entry_order_config/EntryOrderConfig.svelte";
1
+ <script>import { onMount } from "svelte";
2
+ import EntryOrderConfig from "./entry_order_config/EntryOrderConfig.svelte";
2
3
  import { runChaos } from "./RunChaos";
3
4
  import SocialSection from "../../components/SocialSection.svelte";
4
5
  import "./seaweed.postcss";
@@ -6,12 +7,13 @@ import SeaweedBaseLayout from "../../components/layouts/SeaweedBaseLayout.svelte
6
7
  import { Accordion, AccordionItem, CodeBlock, SlideToggle } from "@skeletonlabs/skeleton";
7
8
  import { page } from "$app/stores";
8
9
  import Card from "../../components/Card.svelte";
9
- import { onMount } from "svelte";
10
10
  import ElementVisbilityDetector from "../../components/ElementVisbilityDetector.svelte";
11
11
  import selfContent from "./SeaweedTemplate.svelte?raw";
12
12
  import {
13
+ AllGroupedEntriesProjectFirst,
13
14
  GetEntryFromGlobal,
14
- seaweedTemplateData
15
+ seaweedTemplateData,
16
+ TurnGroupEntriesMutable
15
17
  } from "./SeaweedTemplateData";
16
18
  export let letChaos = true;
17
19
  export let name = "Turnip";
@@ -71,9 +73,6 @@ const filterSearchParams = (searchParams) => {
71
73
  seaweedTemplateData.shouldAddFunNote = true;
72
74
  }
73
75
  const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
74
- if (gameSectionFirstParam === "false") {
75
- seaweedTemplateData.gameSectionFirst = false;
76
- }
77
76
  const orderParam = searchParams.get("order")?.trim();
78
77
  if (orderParam) {
79
78
  seaweedTemplateData.groupedEntries = [];
@@ -96,6 +95,8 @@ const filterSearchParams = (searchParams) => {
96
95
  }
97
96
  });
98
97
  seaweedTemplateData.groupedEntries = seaweedTemplateData.groupedEntries;
98
+ } else if (gameSectionFirstParam === "false") {
99
+ seaweedTemplateData.groupedEntries = TurnGroupEntriesMutable(AllGroupedEntriesProjectFirst);
99
100
  }
100
101
  const qtValue = searchParams.get("qt")?.trim();
101
102
  if (qtValue !== void 0) {
@@ -337,6 +338,7 @@ $:
337
338
  <SlideToggle name="game-section-slider" bind:checked={seaweedTemplateData.gameSectionFirst}>
338
339
  Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
339
340
  </SlideToggle>
341
+ <p>Note: the above configuration was made before the dynamic entry list and to support links sent with that params, we will act like it only swaps the two groups, and nothing more dynamic if order query param does not exist. The configuration only happens during page load with query param, and it does not apply when changed here.</p>
340
342
  <SlideToggle name="fun-note-slider" bind:checked={seaweedTemplateData.shouldAddFunNote}>
341
343
  Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
342
344
  </SlideToggle>
@@ -1,6 +1,6 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import "./seaweed.postcss";
3
2
  import { type ComponentType } from "svelte";
3
+ import "./seaweed.postcss";
4
4
  declare const __propDef: {
5
5
  props: {
6
6
  letChaos?: boolean | undefined;
@@ -10,10 +10,13 @@ export interface EntryGroup {
10
10
  }
11
11
  export declare const GameEntries: Readonly<EntryGroup>;
12
12
  export declare const ProjectEntries: Readonly<EntryGroup>;
13
- export declare const AllGroupedEntries: ReadonlyArray<EntryGroup>;
13
+ export declare const EmptyRelevantProjects: Readonly<EntryGroup>;
14
+ export declare const AllGroupedEntriesGameFirst: ReadonlyArray<EntryGroup>;
15
+ export declare const AllGroupedEntriesProjectFirst: ReadonlyArray<EntryGroup>;
14
16
  export declare const lazyInitializeAllFlatEntries: () => void;
15
17
  export declare const GetAllEntryFromGlobal: () => Map<string, ComponentType>;
16
18
  export declare const GetEntryFromGlobal: (name: string) => ComponentType | undefined;
19
+ export declare const TurnGroupEntriesMutable: (allEntries: ReadonlyArray<EntryGroup>) => EntryGroup[];
17
20
  export interface SeaweedTemplateData {
18
21
  groupedEntries: EntryGroup[];
19
22
  shouldAddFunNote: boolean;
@@ -27,15 +27,21 @@ export const ProjectEntries = {
27
27
  items: [MigranteAlberta, DecentralizedSocialMedia, CustomizedYarnspinner, FullStackC, Workset, ThisWebpage, MockUberApp],
28
28
  gridClass: GroupGridClass.Projects.toString()
29
29
  };
30
- export const AllGroupedEntries = [
31
- {
32
- name: "Relevant projects",
33
- items: [],
34
- gridClass: GroupGridClass.Games.toString()
35
- },
30
+ export const EmptyRelevantProjects = {
31
+ name: "Relevant projects",
32
+ items: [],
33
+ gridClass: GroupGridClass.Games.toString()
34
+ };
35
+ export const AllGroupedEntriesGameFirst = [
36
+ EmptyRelevantProjects,
36
37
  GameEntries,
37
38
  ProjectEntries
38
39
  ];
40
+ export const AllGroupedEntriesProjectFirst = [
41
+ EmptyRelevantProjects,
42
+ ProjectEntries,
43
+ GameEntries
44
+ ];
39
45
  const allFlatEntries = new Map();
40
46
  export const lazyInitializeAllFlatEntries = () => {
41
47
  if (allFlatEntries.size === 0) {
@@ -52,17 +58,20 @@ export const GetEntryFromGlobal = (name) => {
52
58
  lazyInitializeAllFlatEntries();
53
59
  return allFlatEntries.get(name);
54
60
  };
55
- export const seaweedTemplateData = {
56
- shouldAddFunNote: false,
57
- queryTermMap: new Map(),
58
- // todo: gameSectionFirst currently has no functionality
59
- gameSectionFirst: false,
60
- // copy the readonly properties into mutable values
61
- groupedEntries: AllGroupedEntries.map(g => {
61
+ export const TurnGroupEntriesMutable = (allEntries) => {
62
+ return allEntries.map(g => {
62
63
  return {
63
64
  name: g.name,
64
65
  gridClass: g.gridClass,
65
66
  items: g.items.map(e => e)
66
67
  };
67
- })
68
+ });
69
+ };
70
+ export const seaweedTemplateData = {
71
+ shouldAddFunNote: false,
72
+ queryTermMap: new Map(),
73
+ // todo: gameSectionFirst currently has no functionality
74
+ gameSectionFirst: true,
75
+ // copy the readonly properties into mutable values
76
+ groupedEntries: TurnGroupEntriesMutable(AllGroupedEntriesGameFirst)
68
77
  };
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.47",
4
+ "version": "2.4.48",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { type ComponentType, onMount } from "svelte";
2
3
  import EntryOrderConfig from "$pkg/template/seaweed/entry_order_config/EntryOrderConfig.svelte";
3
4
  import { runChaos } from "$pkg/template/seaweed/RunChaos";
4
5
  import SocialSection from "$pkg/components/SocialSection.svelte";
@@ -7,14 +8,15 @@
7
8
  import { Accordion, AccordionItem, CodeBlock, SlideToggle } from "@skeletonlabs/skeleton";
8
9
  import { page } from "$app/stores";
9
10
  import Card from "$pkg/components/Card.svelte";
10
- import { type ComponentType, onMount } from "svelte";
11
11
  import ElementVisbilityDetector from "$pkg/components/ElementVisbilityDetector.svelte";
12
12
  import selfContent from "./SeaweedTemplate.svelte?raw";
13
13
  import {
14
+ AllGroupedEntriesProjectFirst,
14
15
  type EntryGroup,
15
16
  GetEntryFromGlobal,
16
17
  type SeaweedTemplateData,
17
- seaweedTemplateData
18
+ seaweedTemplateData,
19
+ TurnGroupEntriesMutable
18
20
  } from "./SeaweedTemplateData";
19
21
  import type { EntryProps } from "$pkg/template/seaweed/entries/EntryProps";
20
22
  import type { RawGlob } from "$pkg/util/util";
@@ -108,12 +110,8 @@
108
110
  seaweedTemplateData.shouldAddFunNote = true;
109
111
  }
110
112
 
111
- const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
112
- if (gameSectionFirstParam === "false") {
113
- seaweedTemplateData.gameSectionFirst = false;
114
- }
115
-
116
113
  // region Order
114
+ const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
117
115
  const orderParam = searchParams.get("order")?.trim();
118
116
  if (orderParam) {
119
117
  seaweedTemplateData.groupedEntries = [];
@@ -141,6 +139,8 @@
141
139
  });
142
140
 
143
141
  seaweedTemplateData.groupedEntries = seaweedTemplateData.groupedEntries;
142
+ } else if (gameSectionFirstParam === "false") {
143
+ seaweedTemplateData.groupedEntries = TurnGroupEntriesMutable(AllGroupedEntriesProjectFirst);
144
144
  }
145
145
  // endregion
146
146
 
@@ -410,6 +410,7 @@
410
410
  <SlideToggle name="game-section-slider" bind:checked={seaweedTemplateData.gameSectionFirst}>
411
411
  Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
412
412
  </SlideToggle>
413
+ <p>Note: the above configuration was made before the dynamic entry list and to support links sent with that params, we will act like it only swaps the two groups, and nothing more dynamic if order query param does not exist. The configuration only happens during page load with query param, and it does not apply when changed here.</p>
413
414
  <SlideToggle name="fun-note-slider" bind:checked={seaweedTemplateData.shouldAddFunNote}>
414
415
  Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
415
416
  </SlideToggle>
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType } from "svelte";
2
- import { DefaultHeader } from "$pkg/template/seaweed/entries/EntryProps";
2
+ import { DefaultHeader, type GroupedEntry } from "$pkg/template/seaweed/entries/EntryProps";
3
3
  import Pengi from "$pkg/template/seaweed/entries/Pengi.svelte";
4
4
  import Hepcat from "$pkg/template/seaweed/entries/Hepcat.svelte";
5
5
  import ChefWings from "$pkg/template/seaweed/entries/ChefWings.svelte";
@@ -37,16 +37,24 @@ export const ProjectEntries: Readonly<EntryGroup> = {
37
37
  gridClass: GroupGridClass.Projects.toString()
38
38
  };
39
39
 
40
- export const AllGroupedEntries: ReadonlyArray<EntryGroup> = [
41
- {
42
- name: "Relevant projects",
43
- items: [],
44
- gridClass: GroupGridClass.Games.toString()
45
- },
40
+ export const EmptyRelevantProjects: Readonly<EntryGroup> = {
41
+ name: "Relevant projects",
42
+ items: [],
43
+ gridClass: GroupGridClass.Games.toString()
44
+ };
45
+
46
+ export const AllGroupedEntriesGameFirst: ReadonlyArray<EntryGroup> = [
47
+ EmptyRelevantProjects,
46
48
  GameEntries,
47
49
  ProjectEntries
48
50
  ];
49
51
 
52
+ export const AllGroupedEntriesProjectFirst: ReadonlyArray<EntryGroup> = [
53
+ EmptyRelevantProjects,
54
+ ProjectEntries,
55
+ GameEntries
56
+ ];
57
+
50
58
  const allFlatEntries: Map<string, ComponentType> = new Map<string, ComponentType>();
51
59
 
52
60
  export const lazyInitializeAllFlatEntries = () => {
@@ -68,6 +76,16 @@ export const GetEntryFromGlobal = (name: string) => {
68
76
  return allFlatEntries.get(name);
69
77
  };
70
78
 
79
+ export const TurnGroupEntriesMutable = (allEntries: ReadonlyArray<EntryGroup>): EntryGroup[] => {
80
+ return allEntries.map(g => {
81
+ return {
82
+ name: g.name,
83
+ gridClass: g.gridClass,
84
+ items: g.items.map(e => e)
85
+ };
86
+ });
87
+ };
88
+
71
89
  export interface SeaweedTemplateData {
72
90
  groupedEntries: EntryGroup[];
73
91
  shouldAddFunNote: boolean;
@@ -79,15 +97,9 @@ export const seaweedTemplateData: SeaweedTemplateData = {
79
97
  shouldAddFunNote: false,
80
98
  queryTermMap: new Map<string, boolean>(),
81
99
  // todo: gameSectionFirst currently has no functionality
82
- gameSectionFirst: false,
100
+ gameSectionFirst: true,
83
101
  // copy the readonly properties into mutable values
84
- groupedEntries: AllGroupedEntries.map(g => {
85
- return {
86
- name: g.name,
87
- gridClass: g.gridClass,
88
- items: g.items.map(e => e)
89
- };
90
- })
102
+ groupedEntries: TurnGroupEntriesMutable(AllGroupedEntriesGameFirst)
91
103
  };
92
104
 
93
105