@turnipxenon/pineapple 2.4.50 → 2.4.52

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.
@@ -8,6 +8,7 @@
8
8
  <excludeFolder url="file://$MODULE_DIR$/.svelte-kit" />
9
9
  <excludeFolder url="file://$MODULE_DIR$/.vercel" />
10
10
  <excludeFolder url="file://$MODULE_DIR$/dist" />
11
+ <excludeFolder url="file://$MODULE_DIR$/build" />
11
12
  </content>
12
13
  <orderEntry type="inheritedJdk" />
13
14
  <orderEntry type="sourceFolder" forTests="false" />
@@ -4,7 +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="Put parseQTTerms in afterUpdate instead of onMount" />
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Add logs to observe parseQtTerms in downstream package">
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
+ </list>
8
10
  <option name="SHOW_DIALOG" value="false" />
9
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
12
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -323,23 +325,9 @@
323
325
  <workItem from="1712476890510" duration="1084000" />
324
326
  <workItem from="1712532951966" duration="51000" />
325
327
  <workItem from="1712533167568" duration="339000" />
326
- <workItem from="1712533592123" duration="650000" />
327
- </task>
328
- <task id="LOCAL-00115" summary="Layout adjustments to PineappleBaseLayout">
329
- <option name="closed" value="true" />
330
- <created>1711680166876</created>
331
- <option name="number" value="00115" />
332
- <option name="presentableId" value="LOCAL-00115" />
333
- <option name="project" value="LOCAL" />
334
- <updated>1711680166877</updated>
335
- </task>
336
- <task id="LOCAL-00116" summary="Allow preventing NavigationComponent pagination">
337
- <option name="closed" value="true" />
338
- <created>1711681303815</created>
339
- <option name="number" value="00116" />
340
- <option name="presentableId" value="LOCAL-00116" />
341
- <option name="project" value="LOCAL" />
342
- <updated>1711681303815</updated>
328
+ <workItem from="1712533592123" duration="803000" />
329
+ <workItem from="1712534451700" duration="490000" />
330
+ <workItem from="1712535021202" duration="97000" />
343
331
  </task>
344
332
  <task id="LOCAL-00117" summary="Export SocialSection">
345
333
  <option name="closed" value="true" />
@@ -717,7 +705,23 @@
717
705
  <option name="project" value="LOCAL" />
718
706
  <updated>1712533946790</updated>
719
707
  </task>
720
- <option name="localTasksCounter" value="164" />
708
+ <task id="LOCAL-00164" summary="Add logs to observe queryTermMap in downstream package">
709
+ <option name="closed" value="true" />
710
+ <created>1712534850791</created>
711
+ <option name="number" value="00164" />
712
+ <option name="presentableId" value="LOCAL-00164" />
713
+ <option name="project" value="LOCAL" />
714
+ <updated>1712534850791</updated>
715
+ </task>
716
+ <task id="LOCAL-00165" summary="Add logs to observe parseQtTerms in downstream package">
717
+ <option name="closed" value="true" />
718
+ <created>1712535101486</created>
719
+ <option name="number" value="00165" />
720
+ <option name="presentableId" value="LOCAL-00165" />
721
+ <option name="project" value="LOCAL" />
722
+ <updated>1712535101486</updated>
723
+ </task>
724
+ <option name="localTasksCounter" value="166" />
721
725
  <servers />
722
726
  </component>
723
727
  <component name="TypeScriptGeneratedFilesManager">
@@ -775,8 +779,6 @@
775
779
  </option>
776
780
  </component>
777
781
  <component name="VcsManagerConfiguration">
778
- <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" />
779
- <MESSAGE value="Migrate from azure swa adapter to node adapter" />
780
782
  <MESSAGE value="Add cdktf" />
781
783
  <MESSAGE value="Implement cdktf for empty AppService" />
782
784
  <MESSAGE value="WIP: cdktf" />
@@ -800,6 +802,8 @@
800
802
  <MESSAGE value="Add back gameSectionFirst behaviour" />
801
803
  <MESSAGE value="Delay parsing for query terms after page transformation" />
802
804
  <MESSAGE value="Put parseQTTerms in afterUpdate instead of onMount" />
803
- <option name="LAST_COMMIT_MESSAGE" value="Put parseQTTerms in afterUpdate instead of onMount" />
805
+ <MESSAGE value="Add logs to observe queryTermMap in downstream package" />
806
+ <MESSAGE value="Add logs to observe parseQtTerms in downstream package" />
807
+ <option name="LAST_COMMIT_MESSAGE" value="Add logs to observe parseQtTerms in downstream package" />
804
808
  </component>
805
809
  </project>
@@ -47,9 +47,11 @@ const syncQT = () => {
47
47
  seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
48
48
  };
49
49
  const parseQTTerms = async () => {
50
+ console.log("parsing", seaweedTemplateData.queryTermMap.size);
50
51
  const qtSet = /* @__PURE__ */ new Set();
51
52
  const rawTermList = [];
52
53
  [...Object.values(entryList).map((e) => e.default), selfContent].forEach((body) => {
54
+ console.log("parsing", body);
53
55
  rawTermList.push(
54
56
  ...body.split('"').filter((s) => s.startsWith("qt-"))
55
57
  // step 2: filter out texts that does not begin with "qt-"
@@ -64,6 +66,7 @@ const parseQTTerms = async () => {
64
66
  });
65
67
  });
66
68
  qtSet.forEach((t) => seaweedTemplateData.queryTermMap.set(t, true));
69
+ seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
67
70
  syncQT();
68
71
  };
69
72
  const filterSearchParams = (searchParams) => {
@@ -123,12 +126,7 @@ onMount(async () => {
123
126
  if (letChaos) {
124
127
  runChaos(document.body);
125
128
  chaosDone = true;
126
- }
127
- });
128
- let isParsed = false;
129
- afterUpdate(async () => {
130
- if (!letChaos && !isParsed) {
131
- isParsed = true;
129
+ } else {
132
130
  await parseQTTerms();
133
131
  }
134
132
  });
@@ -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: "193d8c0"
24
+ version_hash: "sdezcj"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -47,9 +47,11 @@ const syncQT = () => {
47
47
  seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
48
48
  };
49
49
  const parseQTTerms = async () => {
50
+ console.log("parsing", seaweedTemplateData.queryTermMap.size);
50
51
  const qtSet = /* @__PURE__ */ new Set();
51
52
  const rawTermList = [];
52
53
  [...Object.values(entryList).map((e) => e.default), selfContent].forEach((body) => {
54
+ console.log("parsing", body);
53
55
  rawTermList.push(
54
56
  ...body.split('"').filter((s) => s.startsWith("qt-"))
55
57
  // step 2: filter out texts that does not begin with "qt-"
@@ -64,6 +66,7 @@ const parseQTTerms = async () => {
64
66
  });
65
67
  });
66
68
  qtSet.forEach((t) => seaweedTemplateData.queryTermMap.set(t, true));
69
+ seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
67
70
  syncQT();
68
71
  };
69
72
  const filterSearchParams = (searchParams) => {
@@ -123,12 +126,7 @@ onMount(async () => {
123
126
  if (letChaos) {
124
127
  runChaos(document.body);
125
128
  chaosDone = true;
126
- }
127
- });
128
- let isParsed = false;
129
- afterUpdate(async () => {
130
- if (!letChaos && !isParsed) {
131
- isParsed = true;
129
+ } else {
132
130
  await parseQTTerms();
133
131
  }
134
132
  });
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.50",
4
+ "version": "2.4.52",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -62,11 +62,13 @@
62
62
  };
63
63
 
64
64
  const parseQTTerms = async () => {
65
+ console.log("parsing", seaweedTemplateData.queryTermMap.size);
65
66
  const qtSet = new Set<string>();
66
67
  const rawTermList: string[] = [];
67
68
  [...Object.values(entryList).map(e => (e as RawGlob).default), selfContent].forEach(body => {
68
69
  // parse the qt-* term which exists within elements like:
69
70
  // <span class="qt-*">TERM</span>
71
+ console.log("parsing", body);
70
72
  rawTermList.push(
71
73
  ...body // step 3: destructure the array
72
74
  .split("\"") // step 1: split the text as double quotations (") as the delimiter
@@ -89,8 +91,9 @@
89
91
  });
90
92
  });
91
93
 
92
- // activate svelte reactivity
93
94
  qtSet.forEach(t => seaweedTemplateData.queryTermMap.set(t, true));
95
+ // force svelte update
96
+ seaweedTemplateData.queryTermMap = seaweedTemplateData.queryTermMap;
94
97
  syncQT();
95
98
  };
96
99
 
@@ -184,15 +187,7 @@
184
187
  if (letChaos) {
185
188
  runChaos(document.body);
186
189
  chaosDone = true;
187
- }
188
- });
189
-
190
- // the page may not yet be updated in onMount, so let's wait for the page to render according to what we
191
- // want before proceeding the parsing the page
192
- let isParsed = false;
193
- afterUpdate(async () => {
194
- if (!letChaos && !isParsed) {
195
- isParsed = true;
190
+ } else {
196
191
  await parseQTTerms();
197
192
  }
198
193
  });