@turnipxenon/pineapple 2.4.47 → 2.4.49

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,8 @@
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="Add back gameSectionFirst behaviour">
8
+ <change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" afterDir="false" />
11
9
  </list>
12
10
  <option name="SHOW_DIALOG" value="false" />
13
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -133,7 +131,7 @@
133
131
  &quot;npm.dev.executor&quot;: &quot;Run&quot;,
134
132
  &quot;npm.to-dev.executor&quot;: &quot;Run&quot;,
135
133
  &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;,
134
+ &quot;ts.external.directory.path&quot;: &quot;C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib&quot;,
137
135
  &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
138
136
  }
139
137
  }</component>
@@ -323,30 +321,10 @@
323
321
  <workItem from="1712420658777" duration="5492000" />
324
322
  <workItem from="1712469166120" duration="5613000" />
325
323
  <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>
342
- </task>
343
- <task id="LOCAL-00112" summary="Fix NavigationComponent styling">
344
- <option name="closed" value="true" />
345
- <created>1711498416272</created>
346
- <option name="number" value="00112" />
347
- <option name="presentableId" value="LOCAL-00112" />
348
- <option name="project" value="LOCAL" />
349
- <updated>1711498416272</updated>
324
+ <workItem from="1712476456680" duration="329000" />
325
+ <workItem from="1712476890510" duration="1084000" />
326
+ <workItem from="1712532951966" duration="51000" />
327
+ <workItem from="1712533167568" duration="73000" />
350
328
  </task>
351
329
  <task id="LOCAL-00113" summary="Fix default page sorting">
352
330
  <option name="closed" value="true" />
@@ -716,7 +694,31 @@
716
694
  <option name="project" value="LOCAL" />
717
695
  <updated>1712475823736</updated>
718
696
  </task>
719
- <option name="localTasksCounter" value="159" />
697
+ <task id="LOCAL-00159" summary="Fix yarn dependencies">
698
+ <option name="closed" value="true" />
699
+ <created>1712476485361</created>
700
+ <option name="number" value="00159" />
701
+ <option name="presentableId" value="LOCAL-00159" />
702
+ <option name="project" value="LOCAL" />
703
+ <updated>1712476485362</updated>
704
+ </task>
705
+ <task id="LOCAL-00160" summary="Support swappable group for backwards compatibility">
706
+ <option name="closed" value="true" />
707
+ <created>1712477348736</created>
708
+ <option name="number" value="00160" />
709
+ <option name="presentableId" value="LOCAL-00160" />
710
+ <option name="project" value="LOCAL" />
711
+ <updated>1712477348736</updated>
712
+ </task>
713
+ <task id="LOCAL-00161" summary="Add back gameSectionFirst behaviour">
714
+ <option name="closed" value="true" />
715
+ <created>1712477820038</created>
716
+ <option name="number" value="00161" />
717
+ <option name="presentableId" value="LOCAL-00161" />
718
+ <option name="project" value="LOCAL" />
719
+ <updated>1712477820038</updated>
720
+ </task>
721
+ <option name="localTasksCounter" value="162" />
720
722
  <servers />
721
723
  </component>
722
724
  <component name="TypeScriptGeneratedFilesManager">
@@ -774,9 +776,6 @@
774
776
  </option>
775
777
  </component>
776
778
  <component name="VcsManagerConfiguration">
777
- <MESSAGE value="Convert npm to yarn" />
778
- <MESSAGE value="Change from auto to node adapter" />
779
- <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" />
782
781
  <MESSAGE value="Add resolutions to use Node 20 in Azure SWA GithubActions&#10;&#10;Reference: https://github.com/Azure/static-web-apps-cli/issues/756#issuecomment-1775748572" />
@@ -799,6 +798,9 @@
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
+ <MESSAGE value="Add back gameSectionFirst behaviour" />
804
+ <option name="LAST_COMMIT_MESSAGE" value="Add back gameSectionFirst behaviour" />
803
805
  </component>
804
806
  </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";
@@ -64,16 +66,12 @@ const parseQTTerms = async () => {
64
66
  qtSet.forEach((t) => seaweedTemplateData.queryTermMap.set(t, true));
65
67
  syncQT();
66
68
  };
67
- parseQTTerms();
68
69
  const filterSearchParams = (searchParams) => {
69
70
  const isFunOn = searchParams.get("fun")?.trim();
70
71
  if (isFunOn === "true") {
71
72
  seaweedTemplateData.shouldAddFunNote = true;
72
73
  }
73
74
  const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
74
- if (gameSectionFirstParam === "false") {
75
- seaweedTemplateData.gameSectionFirst = false;
76
- }
77
75
  const orderParam = searchParams.get("order")?.trim();
78
76
  if (orderParam) {
79
77
  seaweedTemplateData.groupedEntries = [];
@@ -96,6 +94,8 @@ const filterSearchParams = (searchParams) => {
96
94
  }
97
95
  });
98
96
  seaweedTemplateData.groupedEntries = seaweedTemplateData.groupedEntries;
97
+ } else if (gameSectionFirstParam === "false") {
98
+ seaweedTemplateData.groupedEntries = TurnGroupEntriesMutable(AllGroupedEntriesProjectFirst);
99
99
  }
100
100
  const qtValue = searchParams.get("qt")?.trim();
101
101
  if (qtValue !== void 0) {
@@ -123,6 +123,8 @@ onMount(async () => {
123
123
  if (letChaos) {
124
124
  runChaos(document.body);
125
125
  chaosDone = true;
126
+ } else {
127
+ await parseQTTerms();
126
128
  }
127
129
  });
128
130
  const toggleTerm = (term) => {
@@ -337,6 +339,7 @@ $:
337
339
  <SlideToggle name="game-section-slider" bind:checked={seaweedTemplateData.gameSectionFirst}>
338
340
  Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
339
341
  </SlideToggle>
342
+ <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
343
  <SlideToggle name="fun-note-slider" bind:checked={seaweedTemplateData.shouldAddFunNote}>
341
344
  Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
342
345
  </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
  };
@@ -165,7 +165,6 @@ declare module '$env/static/private' {
165
165
  export const PUBLIC: string;
166
166
  export const PWD: string;
167
167
  export const PyCharm: string;
168
- export const SESSIONNAME: string;
169
168
  export const SHLVL: string;
170
169
  export const SYSTEMDRIVE: string;
171
170
  export const SYSTEMROOT: string;
@@ -358,7 +357,6 @@ declare module '$env/dynamic/private' {
358
357
  PUBLIC: string;
359
358
  PWD: string;
360
359
  PyCharm: string;
361
- SESSIONNAME: string;
362
360
  SHLVL: string;
363
361
  SYSTEMDRIVE: string;
364
362
  SYSTEMROOT: string;
@@ -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: "193d8c0"
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";
@@ -64,16 +66,12 @@ const parseQTTerms = async () => {
64
66
  qtSet.forEach((t) => seaweedTemplateData.queryTermMap.set(t, true));
65
67
  syncQT();
66
68
  };
67
- parseQTTerms();
68
69
  const filterSearchParams = (searchParams) => {
69
70
  const isFunOn = searchParams.get("fun")?.trim();
70
71
  if (isFunOn === "true") {
71
72
  seaweedTemplateData.shouldAddFunNote = true;
72
73
  }
73
74
  const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
74
- if (gameSectionFirstParam === "false") {
75
- seaweedTemplateData.gameSectionFirst = false;
76
- }
77
75
  const orderParam = searchParams.get("order")?.trim();
78
76
  if (orderParam) {
79
77
  seaweedTemplateData.groupedEntries = [];
@@ -96,6 +94,8 @@ const filterSearchParams = (searchParams) => {
96
94
  }
97
95
  });
98
96
  seaweedTemplateData.groupedEntries = seaweedTemplateData.groupedEntries;
97
+ } else if (gameSectionFirstParam === "false") {
98
+ seaweedTemplateData.groupedEntries = TurnGroupEntriesMutable(AllGroupedEntriesProjectFirst);
99
99
  }
100
100
  const qtValue = searchParams.get("qt")?.trim();
101
101
  if (qtValue !== void 0) {
@@ -123,6 +123,8 @@ onMount(async () => {
123
123
  if (letChaos) {
124
124
  runChaos(document.body);
125
125
  chaosDone = true;
126
+ } else {
127
+ await parseQTTerms();
126
128
  }
127
129
  });
128
130
  const toggleTerm = (term) => {
@@ -337,6 +339,7 @@ $:
337
339
  <SlideToggle name="game-section-slider" bind:checked={seaweedTemplateData.gameSectionFirst}>
338
340
  Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
339
341
  </SlideToggle>
342
+ <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
343
  <SlideToggle name="fun-note-slider" bind:checked={seaweedTemplateData.shouldAddFunNote}>
341
344
  Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
342
345
  </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.49",
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";
@@ -91,7 +93,6 @@
91
93
  qtSet.forEach(t => seaweedTemplateData.queryTermMap.set(t, true));
92
94
  syncQT();
93
95
  };
94
- parseQTTerms();
95
96
 
96
97
  /** qt values and what they mean:
97
98
  * undefined: set all qt terms to font-weight: bold
@@ -108,12 +109,8 @@
108
109
  seaweedTemplateData.shouldAddFunNote = true;
109
110
  }
110
111
 
111
- const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
112
- if (gameSectionFirstParam === "false") {
113
- seaweedTemplateData.gameSectionFirst = false;
114
- }
115
-
116
112
  // region Order
113
+ const gameSectionFirstParam = searchParams.get("game-section-first")?.trim();
117
114
  const orderParam = searchParams.get("order")?.trim();
118
115
  if (orderParam) {
119
116
  seaweedTemplateData.groupedEntries = [];
@@ -141,6 +138,8 @@
141
138
  });
142
139
 
143
140
  seaweedTemplateData.groupedEntries = seaweedTemplateData.groupedEntries;
141
+ } else if (gameSectionFirstParam === "false") {
142
+ seaweedTemplateData.groupedEntries = TurnGroupEntriesMutable(AllGroupedEntriesProjectFirst);
144
143
  }
145
144
  // endregion
146
145
 
@@ -185,6 +184,8 @@
185
184
  if (letChaos) {
186
185
  runChaos(document.body);
187
186
  chaosDone = true;
187
+ } else {
188
+ await parseQTTerms();
188
189
  }
189
190
  });
190
191
 
@@ -410,6 +411,7 @@
410
411
  <SlideToggle name="game-section-slider" bind:checked={seaweedTemplateData.gameSectionFirst}>
411
412
  Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
412
413
  </SlideToggle>
414
+ <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
415
  <SlideToggle name="fun-note-slider" bind:checked={seaweedTemplateData.shouldAddFunNote}>
414
416
  Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
415
417
  </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