@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.
- package/.idea/workspace.xml +45 -42
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +1 -1
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.js +8 -14
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/navigation_component/PageMeta.d.ts +1 -1
- package/dist/components/navigation_component/PageMeta.js +8 -14
- package/package.json +1 -1
- package/src/lib/components/navigation_component/PageMeta.ts +8 -12
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json +2 -2
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/meta.json +7 -0
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/meta.json +7 -0
package/.idea/workspace.xml
CHANGED
|
@@ -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="
|
|
8
|
-
<change
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
}
|
|
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="
|
|
251
|
-
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
|
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
|
|
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
|
-
|
|
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 (!
|
|
115
|
+
else if (!aDate && bDate) {
|
|
114
116
|
return BWins;
|
|
115
117
|
}
|
|
116
|
-
else if (
|
|
117
|
-
|
|
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: "
|
|
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
|
|
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
|
|
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
|
-
|
|
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 (!
|
|
115
|
+
else if (!aDate && bDate) {
|
|
114
116
|
return BWins;
|
|
115
117
|
}
|
|
116
|
-
else if (
|
|
117
|
-
|
|
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.
|
|
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
|
|
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
|
-
|
|
189
|
-
|
|
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 (
|
|
191
|
+
if (aDate && !bDate) {
|
|
197
192
|
return AWins;
|
|
198
|
-
} else if (!
|
|
193
|
+
} else if (!aDate && bDate) {
|
|
199
194
|
return BWins;
|
|
200
|
-
} else if (
|
|
201
|
-
|
|
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": "
|
|
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": "
|
|
7
|
+
"lastUpdated": "2023-02-02",
|
|
8
8
|
"shouldGroup": false,
|
|
9
9
|
"shouldHide": false,
|
|
10
10
|
"tags": [
|