@turnipxenon/pineapple 5.3.4 → 5.3.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.
@@ -5,6 +5,7 @@
5
5
  import ParsnipWikilink from "./ParsnipWikilink.svelte";
6
6
  import { type PhrasingContent } from "mdast";
7
7
  import Self from "./ParsnipPhrasingChildren.svelte";
8
+ import { page } from "$app/state";
8
9
 
9
10
  const { phrasingChildren }: { phrasingChildren: PhrasingContent[] } = $props();
10
11
  </script>
@@ -26,10 +27,13 @@
26
27
  {#if child.url.includes('photo-gallery')}
27
28
  <ParsnipImageCollection url={child.url} />
28
29
  {:else }
29
- <a href={child.url}>
30
+ <a href={child.url} rel={child.url.startsWith('https://') && !child.url.startsWith(page.url.origin) ? 'external' : undefined}>
30
31
  <Self phrasingChildren={child.children} />
31
32
  </a>
32
33
  {/if}
34
+ {:else if child.type === 'html'}
35
+ <!-- todo: special logic here -->
36
+ <!-- for now, let's leave it empty -->
33
37
  {:else if child.type === 'image'}
34
38
  <ParsnipImage {...child} />
35
39
  {:else if child.type === 'embedWikilink'}
@@ -1 +1 @@
1
- {"version":3,"file":"ParsnipPhrasingChildren.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/parsnip/ParsnipPhrasingChildren.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,gBAAgB,GAAI;IAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;AA8ClE,QAAA,MAAM,uBAAuB,sDAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ParsnipPhrasingChildren.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modules/parsnip/ParsnipPhrasingChildren.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAI5C,KAAK,gBAAgB,GAAI;IAAE,gBAAgB,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;AAkDlE,QAAA,MAAM,uBAAuB,sDAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
@@ -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;;;EA2FhF,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;;;EA2GhF,CAAC"}
@@ -30,6 +30,19 @@ export const slugPageServerLoad = (_a) => __awaiter(void 0, [_a], void 0, functi
30
30
  let imageCollection = [];
31
31
  parsnipEntry.ast.ast.children.forEach(child => {
32
32
  if (child.type === "paragraph"
33
+ && child.children.length === 3
34
+ && child.children[0].type === "html"
35
+ && child.children[0].value.includes("data-obsidian-type")) {
36
+ // multiple rating special logic
37
+ // if we see a span with data-obsidian-type....
38
+ // todo: maybe in the future...
39
+ // const obsidianType = child.children[0].value.split("\"")[0];
40
+ // if (obsidianType === 'rating') {
41
+ //
42
+ // }
43
+ newChildren.push(child);
44
+ }
45
+ else if (child.type === "paragraph"
33
46
  && child.children.length === 1
34
47
  && (child.children[0].type === "image"
35
48
  || (child.children[0].type === "link" &&
@@ -46,19 +46,24 @@ a.dialog-choice {
46
46
 
47
47
  a.external-link {
48
48
  cursor: url("$pkg/assets/icons/cursor-open-in-new.svg"), auto;
49
+ }
49
50
 
50
- &:after {
51
- content: '';
52
- display: inline-block;
53
- width: 0.8em;
54
- height: 0.8em;
55
- mask: url("$pkg/assets/icons/icon-open-in-new.svg") no-repeat center;
56
- mask-size: contain;
57
- background-color: currentColor;
58
- vertical-align: middle;
59
- position: relative;
60
- top: -0.1lh;
61
- }
51
+ .external-link:after, a[rel="external"]:after {
52
+ content: '';
53
+ display: inline-block;
54
+ width: 0.8em;
55
+ height: 0.8em;
56
+ mask: url("$pkg/assets/icons/icon-open-in-new.svg") no-repeat center;
57
+ mask-size: contain;
58
+ background-color: currentColor;
59
+ vertical-align: middle;
60
+ position: relative;
61
+ top: -0.1lh;
62
+ }
63
+
64
+ span.external-link:after {
65
+ left: 0.2em;
66
+ top: -0.05lh;
62
67
  }
63
68
 
64
69
  #toast-progress {
@@ -2,6 +2,7 @@ export * from "./ColorScheme";
2
2
  export * from "./GeneralUIProps";
3
3
  export * from "./OnBackground";
4
4
  export * from "./PinyaButtonCommon";
5
+ export * from "./pinya-combobox";
5
6
  export { default as ImageIcon } from "./ImageIcon.svelte";
6
7
  export { default as TextLink } from "./TextLink.svelte";
7
8
  export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/elements/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE1F,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ui/elements/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAA;AAGhC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE1F,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
@@ -3,6 +3,7 @@ export * from "./ColorScheme";
3
3
  export * from "./GeneralUIProps";
4
4
  export * from "./OnBackground";
5
5
  export * from "./PinyaButtonCommon";
6
+ export * from "./pinya-combobox";
6
7
  // components
7
8
  export { default as ImageIcon } from "./ImageIcon.svelte";
8
9
  export { default as TextLink } from "./TextLink.svelte";
@@ -0,0 +1,3 @@
1
+ export { default as PinyaCombobox } from "./PinyaCombobox.svelte";
2
+ export * from "./PinyaComboboxProps";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ui/elements/pinya-combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as PinyaCombobox } from "./PinyaCombobox.svelte";
2
+ export * from "./PinyaComboboxProps";
@@ -24,8 +24,8 @@
24
24
  <div class="chum-bucket">
25
25
  <h2 class="text-start">More about me...</h2>
26
26
  <p>Check out the latest things I've been rambling about at
27
- <a href="https://turnipxenon.com" target="_blank">turnipxenon.com</a> or at
28
- <a href="https://turnipxenon.com/blogs/coding-chagrin" target="_blank">turnipxenon.com/blogs/coding-chagrin.</a>
27
+ <a href="https://turnipxenon.com" target="_blank" rel="external">turnipxenon.com</a> or at
28
+ <a href="https://turnipxenon.com/blogs/coding-chagrin" target="_blank" rel="external">turnipxenon.com/blogs/coding-chagrin.</a>
29
29
  </p>
30
30
 
31
31
  <div class="chum-bucket-grid">
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.4",
4
+ "version": "5.3.6",
5
5
  "devDependencies": {
6
6
  "@commitlint/cli": "^19.8.1",
7
7
  "@commitlint/config-conventional": "^19.8.1",
@@ -46,19 +46,24 @@ a.dialog-choice {
46
46
 
47
47
  a.external-link {
48
48
  cursor: url("$pkg/assets/icons/cursor-open-in-new.svg"), auto;
49
+ }
49
50
 
50
- &:after {
51
- content: '';
52
- display: inline-block;
53
- width: 0.8em;
54
- height: 0.8em;
55
- mask: url("$pkg/assets/icons/icon-open-in-new.svg") no-repeat center;
56
- mask-size: contain;
57
- background-color: currentColor;
58
- vertical-align: middle;
59
- position: relative;
60
- top: -0.1lh;
61
- }
51
+ .external-link:after, a[rel="external"]:after {
52
+ content: '';
53
+ display: inline-block;
54
+ width: 0.8em;
55
+ height: 0.8em;
56
+ mask: url("$pkg/assets/icons/icon-open-in-new.svg") no-repeat center;
57
+ mask-size: contain;
58
+ background-color: currentColor;
59
+ vertical-align: middle;
60
+ position: relative;
61
+ top: -0.1lh;
62
+ }
63
+
64
+ span.external-link:after {
65
+ left: 0.2em;
66
+ top: -0.05lh;
62
67
  }
63
68
 
64
69
  #toast-progress {