@turnipxenon/pineapple 5.3.0-alpha.5 → 5.3.0-alpha.6

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.
@@ -1,3 +1,9 @@
1
- export * from "./example_message.js";
2
- export * from "./settings.js";
1
+ export function example_message(inputs: {
2
+ username: NonNullable<unknown>;
3
+ }, options?: {
4
+ locale?: "en" | "fr" | "tl";
5
+ }): string;
6
+ export function settings(inputs?: {}, options?: {
7
+ locale?: "en" | "fr" | "tl";
8
+ }): string;
3
9
  //# sourceMappingURL=_index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_index.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/_index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"_index.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/_index.js"],"names":[],"mappings":"AAkBO,wCALG;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,YAClC;IAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,GAC7B,MAAM,CAYjB;AAcM,kCALG,EAAE,YACF;IAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,GAC7B,MAAM,CAYjB"}
@@ -1,3 +1,51 @@
1
1
  /* eslint-disable */
2
- export * from './example_message.js'
3
- export * from './settings.js'
2
+ import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from "../runtime.js"
3
+ import * as en from "./en.js"
4
+ import * as fr from "./fr.js"
5
+ import * as tl from "./tl.js"
6
+ /**
7
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
8
+ *
9
+ * - Changing this function will be over-written by the next build.
10
+ *
11
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
12
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
13
+ *
14
+ * @param {{ username: NonNullable<unknown> }} inputs
15
+ * @param {{ locale?: "en" | "fr" | "tl" }} options
16
+ * @returns {string}
17
+ */
18
+ /* @__NO_SIDE_EFFECTS__ */
19
+ export const example_message = (inputs, options = {}) => {
20
+ if (experimentalMiddlewareLocaleSplitting && isServer === false) {
21
+ return /** @type {any} */ (globalThis).__paraglide_ssr.example_message(inputs)
22
+ }
23
+ const locale = options.locale ?? getLocale()
24
+ trackMessageCall("example_message", locale)
25
+ if (locale === "en") return en.example_message(inputs)
26
+ if (locale === "fr") return fr.example_message(inputs)
27
+ return tl.example_message(inputs)
28
+ };
29
+ /**
30
+ * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
31
+ *
32
+ * - Changing this function will be over-written by the next build.
33
+ *
34
+ * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
35
+ * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
36
+ *
37
+ * @param {{}} inputs
38
+ * @param {{ locale?: "en" | "fr" | "tl" }} options
39
+ * @returns {string}
40
+ */
41
+ /* @__NO_SIDE_EFFECTS__ */
42
+ export const settings = (inputs = {}, options = {}) => {
43
+ if (experimentalMiddlewareLocaleSplitting && isServer === false) {
44
+ return /** @type {any} */ (globalThis).__paraglide_ssr.settings(inputs)
45
+ }
46
+ const locale = options.locale ?? getLocale()
47
+ trackMessageCall("settings", locale)
48
+ if (locale === "en") return en.settings(inputs)
49
+ if (locale === "fr") return fr.settings(inputs)
50
+ return tl.settings(inputs)
51
+ };
@@ -0,0 +1,5 @@
1
+ export const example_message: (inputs: {
2
+ username: NonNullable<unknown>;
3
+ }) => string;
4
+ export const settings: (inputs: {}) => string;
5
+ //# sourceMappingURL=en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/en.js"],"names":[],"mappings":"AAGA,8BAA0C,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,KAAK,MAAM,CAE9F;AAEF,uBAAmC,CAAC,MAAM,EAAE,EAAE,KAAK,MAAM,CAEvD"}
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+
3
+
4
+ export const example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
+ return `Hello world ${i.username}`
6
+ };
7
+
8
+ export const settings = /** @type {(inputs: {}) => string} */ () => {
9
+ return `Settings`
10
+ };
@@ -0,0 +1,5 @@
1
+ export const example_message: (inputs: {
2
+ username: NonNullable<unknown>;
3
+ }) => string;
4
+ export const settings: (inputs: {}) => string;
5
+ //# sourceMappingURL=fr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/fr.js"],"names":[],"mappings":"AAGA,8BAA0C,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,KAAK,MAAM,CAE9F;AAEF,uBAAmC,CAAC,MAAM,EAAE,EAAE,KAAK,MAAM,CAEvD"}
@@ -0,0 +1,10 @@
1
+ /* eslint-disable */
2
+
3
+
4
+ export const example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
+ return `Bonjour ${i.username}`
6
+ };
7
+
8
+ export const settings = /** @type {(inputs: {}) => string} */ () => {
9
+ return `Paramètres`
10
+ };
@@ -0,0 +1,5 @@
1
+ export const example_message: (inputs: {
2
+ username: NonNullable<unknown>;
3
+ }) => string;
4
+ export { settings } from "./en.js";
5
+ //# sourceMappingURL=tl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tl.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/tl.js"],"names":[],"mappings":"AAGA,8BAA0C,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,KAAK,MAAM,CAE9F"}
@@ -0,0 +1,7 @@
1
+ /* eslint-disable */
2
+
3
+
4
+ export const example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
+ return `Kamusta ${i.username}`
6
+ };
7
+ export { settings } from "./en.js"
@@ -1 +1 @@
1
- {"version":3,"file":"slugPageServerLoad.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/route-util/slugPageServerLoad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAKvF,eAAO,MAAM,kBAAkB,GAAU,YAAY;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE;;;EA4DhF,CAAC"}
1
+ {"version":3,"file":"slugPageServerLoad.d.ts","sourceRoot":"","sources":["../../../../src/lib/modules/parsnip/route-util/slugPageServerLoad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAKvF,eAAO,MAAM,kBAAkB,GAAU,YAAY;IAAE,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE;;;EA+EhF,CAAC"}
@@ -30,7 +30,10 @@ export const slugPageServerLoad = (_a) => __awaiter(void 0, [_a], void 0, functi
30
30
  parsnipEntry.ast.ast.children.forEach(child => {
31
31
  if (child.type === "paragraph"
32
32
  && child.children.length === 1
33
- && child.children[0].type === "image") {
33
+ && (child.children[0].type === "image"
34
+ || (child.children[0].type === "link" &&
35
+ (child.children[0].url.startsWith("https://photos.")
36
+ || child.children[0].url.startsWith("https://rabiole."))))) {
34
37
  imageCollection.push(child.children[0]);
35
38
  }
36
39
  else if (imageCollection.length > 0) {
@@ -45,12 +48,23 @@ export const slugPageServerLoad = (_a) => __awaiter(void 0, [_a], void 0, functi
45
48
  newChildren.push(child);
46
49
  }
47
50
  });
51
+ if (imageCollection.length > 0) {
52
+ newChildren.push({
53
+ "type": "imageCollection",
54
+ children: imageCollection
55
+ });
56
+ }
48
57
  parsnipEntry.ast.ast.children = newChildren;
58
+ let imageUrl = parsnipEntry.preview ? parsnipEntry.preview : undefined;
59
+ if (imageUrl && !imageUrl.includes("https://")) {
60
+ imageUrl = `${parsnipOverall.baseUrl}/${parsnipEntry.preview}`;
61
+ }
62
+ console.log(imageUrl);
49
63
  const meta = {
50
64
  title: parsnipEntry.basename,
51
65
  ogTitle: parsnipEntry.basename,
52
66
  ogDescription: parsnipEntry.tagline,
53
- ogImage: parsnipEntry.preview ? [`${baseUrl}/${parsnipEntry.preview}`] : undefined
67
+ ogImage: imageUrl ? [imageUrl] : undefined
54
68
  };
55
69
  return {
56
70
  parsnipEntry,
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": "5.3.0-alpha.5",
4
+ "version": "5.3.0-alpha.6",
5
5
  "devDependencies": {
6
6
  "@commitlint/cli": "^19.8.1",
7
7
  "@commitlint/config-conventional": "^19.8.1",
@@ -1,6 +0,0 @@
1
- export function example_message(inputs: {
2
- username: NonNullable<unknown>;
3
- }, options?: {
4
- locale?: "en" | "fr" | "tl";
5
- }): string;
6
- //# sourceMappingURL=example_message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"example_message.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/example_message.js"],"names":[],"mappings":"AA4BO,wCALG;IAAE,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAAE,YAClC;IAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,GAC7B,MAAM,CAYjB"}
@@ -1,38 +0,0 @@
1
- /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
-
4
- const en_example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
5
- return `Hello world ${i.username}`
6
- };
7
-
8
- const fr_example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
9
- return `Bonjour ${i.username}`
10
- };
11
-
12
- const tl_example_message = /** @type {(inputs: { username: NonNullable<unknown> }) => string} */ (i) => {
13
- return `Kamusta ${i.username}`
14
- };
15
-
16
- /**
17
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
18
- *
19
- * - Changing this function will be over-written by the next build.
20
- *
21
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
22
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
23
- *
24
- * @param {{ username: NonNullable<unknown> }} inputs
25
- * @param {{ locale?: "en" | "fr" | "tl" }} options
26
- * @returns {string}
27
- */
28
- /* @__NO_SIDE_EFFECTS__ */
29
- export const example_message = (inputs, options = {}) => {
30
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
31
- return /** @type {any} */ (globalThis).__paraglide_ssr.example_message(inputs)
32
- }
33
- const locale = options.locale ?? getLocale()
34
- trackMessageCall("example_message", locale)
35
- if (locale === "en") return en_example_message(inputs)
36
- if (locale === "fr") return fr_example_message(inputs)
37
- return tl_example_message(inputs)
38
- };
@@ -1,4 +0,0 @@
1
- export function settings(inputs?: {}, options?: {
2
- locale?: "en" | "fr" | "tl";
3
- }): string;
4
- //# sourceMappingURL=settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/lib/external/paraglide/messages/settings.js"],"names":[],"mappings":"AA2BO,kCALG,EAAE,YACF;IAAE,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,GAC7B,MAAM,CAYjB"}
@@ -1,37 +0,0 @@
1
- /* eslint-disable */
2
- import { getLocale, trackMessageCall, experimentalMiddlewareLocaleSplitting, isServer } from '../runtime.js';
3
-
4
- const en_settings = /** @type {(inputs: {}) => string} */ () => {
5
- return `Settings`
6
- };
7
-
8
- const fr_settings = /** @type {(inputs: {}) => string} */ () => {
9
- return `Paramètres`
10
- };
11
-
12
- /** @type {(inputs: {}) => string} */
13
- const tl_settings = en_settings;
14
-
15
- /**
16
- * This function has been compiled by [Paraglide JS](https://inlang.com/m/gerre34r).
17
- *
18
- * - Changing this function will be over-written by the next build.
19
- *
20
- * - If you want to change the translations, you can either edit the source files e.g. `en.json`, or
21
- * use another inlang app like [Fink](https://inlang.com/m/tdozzpar) or the [VSCode extension Sherlock](https://inlang.com/m/r7kp499g).
22
- *
23
- * @param {{}} inputs
24
- * @param {{ locale?: "en" | "fr" | "tl" }} options
25
- * @returns {string}
26
- */
27
- /* @__NO_SIDE_EFFECTS__ */
28
- export const settings = (inputs = {}, options = {}) => {
29
- if (experimentalMiddlewareLocaleSplitting && isServer === false) {
30
- return /** @type {any} */ (globalThis).__paraglide_ssr.settings(inputs)
31
- }
32
- const locale = options.locale ?? getLocale()
33
- trackMessageCall("settings", locale)
34
- if (locale === "en") return en_settings(inputs)
35
- if (locale === "fr") return fr_settings(inputs)
36
- return tl_settings(inputs)
37
- };