@turnipxenon/pineapple 2.4.35 → 2.4.36

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,8 +4,10 @@
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="Add default sorter for NavigationComponent">
8
- <change beforePath="$PROJECT_DIR$/src/lib/components/navigation_component/NavigationComponent.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/navigation_component/NavigationComponent.svelte" afterDir="false" />
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Fix NavigationComponent styling">
8
+ <change afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/meta.json" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/meta.json" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/src/lib/components/navigation_component/PageMeta.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/navigation_component/PageMeta.ts" afterDir="false" />
9
11
  <change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json" afterDir="false" />
10
12
  </list>
11
13
  <option name="SHOW_DIALOG" value="false" />
@@ -85,40 +87,40 @@
85
87
  <option name="hideEmptyMiddlePackages" value="true" />
86
88
  <option name="showLibraryContents" value="true" />
87
89
  </component>
88
- <component name="PropertiesComponent">{
89
- &quot;keyToString&quot;: {
90
- &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
91
- &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
92
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
93
- &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
94
- &quot;git-widget-placeholder&quot;: &quot;turnip/navigation&quot;,
95
- &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
96
- &quot;last_opened_file_path&quot;: &quot;C:/Users/Pumpkin/Projects/Web/pineapple/src/routes/(pineapple)/pineapple/(extra-pages)/page2&quot;,
97
- &quot;list.type.of.created.stylesheet&quot;: &quot;CSS&quot;,
98
- &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
99
- &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
100
- &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
101
- &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
102
- &quot;nodejs_interpreter_path&quot;: &quot;node&quot;,
103
- &quot;nodejs_package_manager_path&quot;: &quot;yarn&quot;,
104
- &quot;npm.build.executor&quot;: &quot;Run&quot;,
105
- &quot;npm.dev (1).executor&quot;: &quot;Run&quot;,
106
- &quot;npm.dev --open.executor&quot;: &quot;Run&quot;,
107
- &quot;npm.dev offline.executor&quot;: &quot;Run&quot;,
108
- &quot;npm.dev-offline.executor&quot;: &quot;Run&quot;,
109
- &quot;npm.dev.executor&quot;: &quot;Run&quot;,
110
- &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
111
- &quot;ts.external.directory.path&quot;: &quot;C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib&quot;,
112
- &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
90
+ <component name="PropertiesComponent"><![CDATA[{
91
+ "keyToString": {
92
+ "DefaultHtmlFileTemplate": "HTML File",
93
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
94
+ "RunOnceActivity.ShowReadmeOnStart": "true",
95
+ "WebServerToolWindowFactoryState": "false",
96
+ "git-widget-placeholder": "turnip/navigation",
97
+ "ignore.virus.scanning.warn.message": "true",
98
+ "last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8",
99
+ "list.type.of.created.stylesheet": "CSS",
100
+ "node.js.detected.package.eslint": "true",
101
+ "node.js.detected.package.tslint": "true",
102
+ "node.js.selected.package.eslint": "(autodetect)",
103
+ "node.js.selected.package.tslint": "(autodetect)",
104
+ "nodejs_interpreter_path": "node",
105
+ "nodejs_package_manager_path": "yarn",
106
+ "npm.build.executor": "Run",
107
+ "npm.dev (1).executor": "Run",
108
+ "npm.dev --open.executor": "Run",
109
+ "npm.dev offline.executor": "Run",
110
+ "npm.dev-offline.executor": "Run",
111
+ "npm.dev.executor": "Run",
112
+ "settings.editor.selected.configurable": "preferences.pluginManager",
113
+ "ts.external.directory.path": "C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib",
114
+ "vue.rearranger.settings.migration": "true"
113
115
  }
114
- }</component>
116
+ }]]></component>
115
117
  <component name="RecentsManager">
116
118
  <key name="CopyFile.RECENT_KEYS">
119
+ <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page7\(test_layout)\page8" />
120
+ <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
117
121
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page2" />
118
122
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\navigation_component" />
119
123
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\page3\page7\(test_layout)\page8" />
120
- <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\page3\page7" />
121
- <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\page3" />
122
124
  </key>
123
125
  <key name="MoveFile.RECENT_KEYS">
124
126
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page1" />
@@ -247,15 +249,8 @@
247
249
  <workItem from="1711492999560" duration="85000" />
248
250
  <workItem from="1711493260312" duration="1518000" />
249
251
  <workItem from="1711494820779" duration="11000" />
250
- <workItem from="1711495822479" duration="2498000" />
251
- </task>
252
- <task id="LOCAL-00063" summary="Add animation to dynamically added button in social section">
253
- <option name="closed" value="true" />
254
- <created>1710403640565</created>
255
- <option name="number" value="00063" />
256
- <option name="presentableId" value="LOCAL-00063" />
257
- <option name="project" value="LOCAL" />
258
- <updated>1710403640566</updated>
252
+ <workItem from="1711495822479" duration="2695000" />
253
+ <workItem from="1711499095557" duration="657000" />
259
254
  </task>
260
255
  <task id="LOCAL-00064" summary="Implement normal state for PineappleBaseLayout">
261
256
  <option name="closed" value="true" />
@@ -641,7 +636,15 @@
641
636
  <option name="project" value="LOCAL" />
642
637
  <updated>1711494655396</updated>
643
638
  </task>
644
- <option name="localTasksCounter" value="112" />
639
+ <task id="LOCAL-00112" summary="Fix NavigationComponent styling">
640
+ <option name="closed" value="true" />
641
+ <created>1711498416272</created>
642
+ <option name="number" value="00112" />
643
+ <option name="presentableId" value="LOCAL-00112" />
644
+ <option name="project" value="LOCAL" />
645
+ <updated>1711498416272</updated>
646
+ </task>
647
+ <option name="localTasksCounter" value="113" />
645
648
  <servers />
646
649
  </component>
647
650
  <component name="TypeScriptGeneratedFilesManager">
@@ -699,7 +702,6 @@
699
702
  </option>
700
703
  </component>
701
704
  <component name="VcsManagerConfiguration">
702
- <MESSAGE value="Refactor Game Section to separate component" />
703
705
  <MESSAGE value="Refactor GameSection out of SeaweedTemplate" />
704
706
  <MESSAGE value="Remove unnecessary imports and variables in SeaweedTemplate" />
705
707
  <MESSAGE value="Add page query param creator" />
@@ -724,6 +726,7 @@
724
726
  <MESSAGE value="Add a way to hide an entry in NavigationComponent" />
725
727
  <MESSAGE value="Migrate from relying on json instead of comments for meta" />
726
728
  <MESSAGE value="Add default sorter for NavigationComponent" />
727
- <option name="LAST_COMMIT_MESSAGE" value="Add default sorter for NavigationComponent" />
729
+ <MESSAGE value="Fix NavigationComponent styling" />
730
+ <option name="LAST_COMMIT_MESSAGE" value="Fix NavigationComponent styling" />
728
731
  </component>
729
732
  </project>
@@ -49,7 +49,7 @@ export declare const findPageMetaParent: (parentList: PageMeta[], child: PageMet
49
49
  export type ParsePageMetaCompareFn = ((a: PageMeta, b: PageMeta) => number);
50
50
  export declare const parsePageMeta: (fileList: Record<string, unknown>, jsonList: Record<string, unknown>, imageMap: Map<string, string>, compareFn?: ParsePageMetaCompareFn) => PageMeta[];
51
51
  /**
52
- * Prioritizes, in order, lastUpdated, datePublished, has description, then title
52
+ * Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
53
53
  *
54
54
  * @param a
55
55
  * @param b
@@ -100,30 +100,24 @@ export const parsePageMeta = (fileList, jsonList, imageMap, compareFn) => {
100
100
  const AWins = -1;
101
101
  const BWins = 1;
102
102
  /**
103
- * Prioritizes, in order, lastUpdated, datePublished, has description, then title
103
+ * Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
104
104
  *
105
105
  * @param a
106
106
  * @param b
107
107
  * @constructor
108
108
  */
109
109
  export const DefaultPageMetaSorter = (a, b) => {
110
- if (a.lastUpdated && !b.lastUpdated) {
110
+ const aDate = a.lastUpdated || a.datePublished;
111
+ const bDate = b.lastUpdated || b.datePublished;
112
+ if (aDate && !bDate) {
111
113
  return AWins;
112
114
  }
113
- else if (!a.lastUpdated && b.lastUpdated) {
115
+ else if (!aDate && bDate) {
114
116
  return BWins;
115
117
  }
116
- else if (a.lastUpdated && b.lastUpdated) {
117
- return a.lastUpdated.localeCompare(b.lastUpdated);
118
- }
119
- if (a.datePublished && !b.datePublished) {
120
- return AWins;
121
- }
122
- else if (!a.lastUpdated && b.datePublished) {
123
- return BWins;
124
- }
125
- else if (a.datePublished && b.datePublished) {
126
- return a.datePublished.localeCompare(b.datePublished);
118
+ else if (aDate && bDate) {
119
+ // we invert the value because we want the dates to be in descending order
120
+ return -aDate.localeCompare(bDate);
127
121
  }
128
122
  if (a.description && !b.description) {
129
123
  return AWins;
@@ -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: "73g83g"
24
+ version_hash: "p3htw9"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -49,7 +49,7 @@ export declare const findPageMetaParent: (parentList: PageMeta[], child: PageMet
49
49
  export type ParsePageMetaCompareFn = ((a: PageMeta, b: PageMeta) => number);
50
50
  export declare const parsePageMeta: (fileList: Record<string, unknown>, jsonList: Record<string, unknown>, imageMap: Map<string, string>, compareFn?: ParsePageMetaCompareFn) => PageMeta[];
51
51
  /**
52
- * Prioritizes, in order, lastUpdated, datePublished, has description, then title
52
+ * Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
53
53
  *
54
54
  * @param a
55
55
  * @param b
@@ -100,30 +100,24 @@ export const parsePageMeta = (fileList, jsonList, imageMap, compareFn) => {
100
100
  const AWins = -1;
101
101
  const BWins = 1;
102
102
  /**
103
- * Prioritizes, in order, lastUpdated, datePublished, has description, then title
103
+ * Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
104
104
  *
105
105
  * @param a
106
106
  * @param b
107
107
  * @constructor
108
108
  */
109
109
  export const DefaultPageMetaSorter = (a, b) => {
110
- if (a.lastUpdated && !b.lastUpdated) {
110
+ const aDate = a.lastUpdated || a.datePublished;
111
+ const bDate = b.lastUpdated || b.datePublished;
112
+ if (aDate && !bDate) {
111
113
  return AWins;
112
114
  }
113
- else if (!a.lastUpdated && b.lastUpdated) {
115
+ else if (!aDate && bDate) {
114
116
  return BWins;
115
117
  }
116
- else if (a.lastUpdated && b.lastUpdated) {
117
- return a.lastUpdated.localeCompare(b.lastUpdated);
118
- }
119
- if (a.datePublished && !b.datePublished) {
120
- return AWins;
121
- }
122
- else if (!a.lastUpdated && b.datePublished) {
123
- return BWins;
124
- }
125
- else if (a.datePublished && b.datePublished) {
126
- return a.datePublished.localeCompare(b.datePublished);
118
+ else if (aDate && bDate) {
119
+ // we invert the value because we want the dates to be in descending order
120
+ return -aDate.localeCompare(bDate);
127
121
  }
128
122
  if (a.description && !b.description) {
129
123
  return AWins;
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.35",
4
+ "version": "2.4.36",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "npm run check-requirements && vite build && yarn package",
@@ -178,27 +178,23 @@ const AWins = -1;
178
178
  const BWins = 1;
179
179
 
180
180
  /**
181
- * Prioritizes, in order, lastUpdated, datePublished, has description, then title
181
+ * Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
182
182
  *
183
183
  * @param a
184
184
  * @param b
185
185
  * @constructor
186
186
  */
187
187
  export const DefaultPageMetaSorter: ParsePageMetaCompareFn = (a, b) => {
188
- if (a.lastUpdated && !b.lastUpdated) {
189
- return AWins;
190
- } else if (!a.lastUpdated && b.lastUpdated) {
191
- return BWins;
192
- } else if (a.lastUpdated && b.lastUpdated) {
193
- return a.lastUpdated.localeCompare(b.lastUpdated);
194
- }
188
+ const aDate = a.lastUpdated || a.datePublished;
189
+ const bDate = b.lastUpdated || b.datePublished;
195
190
 
196
- if (a.datePublished && !b.datePublished) {
191
+ if (aDate && !bDate) {
197
192
  return AWins;
198
- } else if (!a.lastUpdated && b.datePublished) {
193
+ } else if (!aDate && bDate) {
199
194
  return BWins;
200
- } else if (a.datePublished && b.datePublished) {
201
- return a.datePublished.localeCompare(b.datePublished);
195
+ } else if (aDate && bDate) {
196
+ // we invert the value because we want the dates to be in descending order
197
+ return -aDate.localeCompare(bDate);
202
198
  }
203
199
 
204
200
  if (a.description && !b.description) {
@@ -1,10 +1,10 @@
1
1
  {
2
- "datePublished": "23-01-01",
2
+ "datePublished": "2023-01-01",
3
3
  "description": "random description but look at Ares! Let's try out a long-ish text to see how things would wrap and all that. I don't know what else to say. Please stream Umpah Umpah.",
4
4
  "imageAlt": "Image of Ares being excited",
5
5
  "imageID": "testImageID",
6
6
  "imageURL": "./favicon.png/?q=imageIDTakesPrecedence",
7
- "lastUpdated": "23-02-02",
7
+ "lastUpdated": "2023-02-02",
8
8
  "shouldGroup": false,
9
9
  "shouldHide": false,
10
10
  "tags": [
@@ -0,0 +1,7 @@
1
+ {
2
+ "datePublished": "2024-03-03",
3
+ "title": "555",
4
+ "tags": [
5
+ "random"
6
+ ]
7
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "title": "801 yay",
3
+ "description": "something",
4
+ "tags": [
5
+ "random"
6
+ ]
7
+ }