@turnipxenon/pineapple 3.1.0-alpha.1 → 3.1.0-alpha.11

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.
Files changed (59) hide show
  1. package/README.md +103 -0
  2. package/dist/components/RandomizedBackground.svelte +4 -0
  3. package/dist/components/RandomizedBackground.svelte.d.ts +1 -0
  4. package/dist/components/blog_template/BlogTemplate.svelte +14 -17
  5. package/dist/components/blog_template/BlogTemplate.svelte.d.ts +2 -1
  6. package/dist/components/dialog_manager/DialogManager.d.ts +3 -2
  7. package/dist/components/dialog_manager/DialogManager.js +6 -4
  8. package/dist/components/dialog_manager/DialogProcessor.d.ts +4 -2
  9. package/dist/components/dialog_manager/DialogProcessor.js +23 -18
  10. package/dist/components/dialog_manager/IDialogManager.d.ts +0 -1
  11. package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.d.ts +2 -2
  12. package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +4 -5
  13. package/dist/components/dialog_overlay/DialogOverlay.svelte +47 -59
  14. package/dist/components/pineapple/PineappleBaseLayout.svelte +3 -4
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/scripts/pineapple_fiber/PineappleWeaver.js +1 -2
  18. package/dist/styles/app.css +4 -2
  19. package/dist/styles/turnip-theme.css +17 -7
  20. package/dist/ui/components/SocialSection.svelte +2 -1
  21. package/dist/ui/components/randomized-background/RandomizedBackground.svelte +9 -1
  22. package/dist/ui/elements/CodeBlock/CodeBlock.svelte +2 -1
  23. package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +1 -1
  24. package/dist/ui/elements/ImageIcon.svelte +2 -2
  25. package/dist/ui/elements/ImageIcon.svelte.d.ts +1 -1
  26. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButton.svelte +25 -0
  27. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButton.svelte.d.ts +4 -0
  28. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButtonProps.d.ts +4 -0
  29. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButtonProps.js +1 -0
  30. package/dist/ui/elements/PinyaAnchorButton/index.d.ts +2 -0
  31. package/dist/ui/elements/PinyaAnchorButton/index.js +2 -0
  32. package/dist/ui/elements/PinyaButton/PinyaButton.svelte +8 -31
  33. package/dist/ui/elements/PinyaButton/PinyaButton.svelte.d.ts +1 -1
  34. package/dist/ui/elements/PinyaButton/PinyaButtonProps.d.ts +4 -14
  35. package/dist/ui/elements/PinyaButton/PinyaButtonProps.js +1 -6
  36. package/dist/ui/elements/PinyaButtonCommon/ButtonVariant.d.ts +5 -0
  37. package/dist/ui/elements/PinyaButtonCommon/ButtonVariant.js +6 -0
  38. package/dist/ui/elements/PinyaButtonCommon/PinyaButtonCommonProps.d.ts +8 -0
  39. package/dist/ui/elements/PinyaButtonCommon/PinyaButtonCommonProps.js +2 -0
  40. package/dist/ui/elements/PinyaButtonCommon/createButtonClass.d.ts +2 -0
  41. package/dist/ui/elements/PinyaButtonCommon/createButtonClass.js +31 -0
  42. package/dist/ui/elements/PinyaButtonCommon/index.d.ts +3 -0
  43. package/dist/ui/elements/PinyaButtonCommon/index.js +3 -0
  44. package/dist/ui/elements/PinyaCard/PinyaCard.svelte +14 -6
  45. package/dist/ui/elements/PinyaCard/PinyaCardProps.d.ts +1 -0
  46. package/dist/ui/elements/index.d.ts +6 -4
  47. package/dist/ui/elements/index.js +8 -4
  48. package/dist/ui/modules/NavigationMenu/NavigationMenu.svelte +1 -1
  49. package/dist/ui/modules/projects/Hepcat.svelte +1 -1
  50. package/dist/ui/modules/projects/Pengi.svelte +1 -1
  51. package/dist/ui/modules/projects/Soulwork.svelte +1 -1
  52. package/dist/ui/modules/projects/ThisWebpage.svelte +1 -1
  53. package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte +7 -3
  54. package/dist/ui/templates/PinyaPageLayout/runes.svelte.d.ts +1 -0
  55. package/dist/ui/templates/PinyaPageLayout/runes.svelte.js +1 -0
  56. package/package.json +1 -1
  57. package/src/lib/styles/app.css +4 -2
  58. package/dist/components/dialog_manager/DialogMangerInit.d.ts +0 -2
  59. package/dist/components/dialog_manager/DialogMangerInit.js +0 -21
@@ -250,7 +250,7 @@ blockquote {
250
250
  filter: brightness(140%);
251
251
  }
252
252
 
253
- h1, h2, h3, h4, h5, h6, .fake-h2, .fake-h3, .fake-h4 {
253
+ h1, h2, h3, h4, h5, h6, .fake-h1, .fake-h2, .fake-h3, .fake-h4 {
254
254
  text-align: center;
255
255
  margin-top: 0;
256
256
  font-weight: bolder;
@@ -265,7 +265,7 @@ h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p, .fake-h2 + p, .fake-h3 + p, .fak
265
265
  margin-top: 0.5lh;
266
266
  }
267
267
 
268
- h1 {
268
+ h1, .fake-h1 {
269
269
  @apply text-4xl;
270
270
  }
271
271
 
@@ -289,7 +289,11 @@ h6 {
289
289
  text-decoration: underline;
290
290
  }
291
291
 
292
- a {
292
+ a.a-as-btn {
293
+ text-decoration: none;
294
+ }
295
+
296
+ a:not(.a-as-btn) {
293
297
  text-decoration: underline;
294
298
  color: var(--color-secondary-500);
295
299
 
@@ -298,11 +302,16 @@ a {
298
302
  }
299
303
  }
300
304
 
301
- a:hover, a:focus {
305
+ a:not(.a-as-btn):hover, a:not(.a-as-btn):focus {
302
306
  filter: brightness(150%);
303
307
  }
304
308
 
305
- a:visited {
309
+ /* we're fighting a specificity war with skeleton components */
310
+ a.a-as-btn:hover {
311
+ filter: brightness(110%);
312
+ }
313
+
314
+ a:not(.a-as-btn):visited {
306
315
  color: var(--color-secondary-950);
307
316
 
308
317
  @variant dark {
@@ -310,6 +319,7 @@ a:visited {
310
319
  }
311
320
  }
312
321
 
322
+
313
323
  ul {
314
324
  list-style: inside;
315
325
  }
@@ -318,10 +328,10 @@ ol {
318
328
  list-style: decimal inside;
319
329
  }
320
330
 
321
- p{
331
+ p {
322
332
  @apply mb-3;
323
333
  }
324
334
 
325
335
  @theme {
326
336
  --color-secondary-0: oklch(99% 0.02 38.38deg);
327
- }
337
+ }
@@ -6,8 +6,9 @@
6
6
  import GithubIcon from "../../assets/icons/github-mark.svg";
7
7
  import LinkedinIcon from "../../assets/icons/linkedin.svg";
8
8
  import { ItchLogoHotLink } from "../../consts";
9
- import { ButtonVariant, PinyaButton } from "../elements/PinyaButton/index";
9
+ import { PinyaButton } from "../elements/PinyaButton/index";
10
10
  import ImageIcon from "../elements/ImageIcon.svelte";
11
+ import { ButtonVariant } from "../elements/PinyaButtonCommon/ButtonVariant";
11
12
 
12
13
  /** @type {{isSmallVersion?: boolean, email?: string, linkedinSlug?: string, isSlot?: boolean, allowLinkedIn?: boolean}} */
13
14
  let {
@@ -9,6 +9,7 @@
9
9
  import BgTiledTurnip from '../../../assets/bg_tiled/bg_tiled_turnip.png';
10
10
  import RandomizedImage from './RandomizedImage.svelte';
11
11
  import { generatedDailySeed, mulberry32Generator } from '../../../util/util';
12
+ import { appState } from "../../templates/PinyaPageLayout/runes.svelte";
12
13
 
13
14
  let { enabled }: {
14
15
  enabled: boolean
@@ -47,6 +48,8 @@
47
48
  }
48
49
  generatedImageList = gi;
49
50
  });
51
+
52
+ let bgStyle = $derived(`opacity: ${appState.bgOpacity}`);
50
53
  </script>
51
54
 
52
55
  <svelte:head>
@@ -63,7 +66,12 @@
63
66
 
64
67
  <!--todo: add a letterbox beyond 1960px + 16 rem-->
65
68
  {#if enabled && generatedImageList.length > 0}
66
- <div class="default-background" aria-hidden="true" transition:fade>
69
+ <div
70
+ class="default-background"
71
+ aria-hidden="true"
72
+ style={bgStyle}
73
+ transition:fade
74
+ >
67
75
  {#each generatedImageList as imageItem, idx (idx)}
68
76
  <RandomizedImage src={imageItem} {rng} />
69
77
  {/each}
@@ -16,6 +16,7 @@
16
16
  import js from "shiki/langs/javascript.mjs";
17
17
  import ts from "shiki/langs/typescript.mjs";
18
18
  import markdown from "shiki/langs/markdown.mjs";
19
+ import xml from "shiki/langs/xml.mjs";
19
20
 
20
21
  // https://shiki.style/guide/sync-usage
21
22
  const shiki = createHighlighterCoreSync({
@@ -23,7 +24,7 @@
23
24
  // Implement your import theme.
24
25
  themes: [themeLight, themeDark],
25
26
  // Implement your imported and supported languages.
26
- langs: [console, html, css, js, ts, markdown]
27
+ langs: [console, html, css, js, ts, markdown, xml]
27
28
  });
28
29
  </script>
29
30
 
@@ -1,6 +1,6 @@
1
1
  export interface CodeBlockProps {
2
2
  code?: string;
3
- lang?: 'console' | 'html' | 'css' | 'js' | 'ts' | 'markdown';
3
+ lang?: 'console' | 'html' | 'css' | 'js' | 'ts' | 'markdown' | 'xml';
4
4
  base?: string;
5
5
  rounded?: string;
6
6
  shadow?: string;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { HTMLImgAttributes } from 'svelte/elements';
3
- import type { GeneralUIProps } from './GeneralUIProps';
4
- import { ColorScheme } from './ColorScheme';
3
+ import type { GeneralUIProps } from "./GeneralUIProps";
4
+ import { ColorScheme } from "./ColorScheme";
5
5
 
6
6
  type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
7
7
 
@@ -1,5 +1,5 @@
1
1
  import type { HTMLImgAttributes } from 'svelte/elements';
2
- import type { GeneralUIProps } from './GeneralUIProps';
2
+ import type { GeneralUIProps } from "./GeneralUIProps";
3
3
  type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
4
4
  declare const ImageIcon: import("svelte").Component<PinyaButtonProps, {}, "">;
5
5
  type ImageIcon = ReturnType<typeof ImageIcon>;
@@ -0,0 +1,25 @@
1
+ <script lang="ts">
2
+ import { ColorScheme } from "../ColorScheme";
3
+ import { ButtonVariant } from "../PinyaButtonCommon/ButtonVariant";
4
+ import { createButtonClass } from "../PinyaButtonCommon/createButtonClass";
5
+ import type { PinyaAnchorButtonProps } from "./PinyaAnchorButtonProps";
6
+
7
+ let {
8
+ children,
9
+ colorScheme = ColorScheme.Primary,
10
+ paddingClass = "",
11
+ buttonVariant = ButtonVariant.Default,
12
+ colorClass = "",
13
+ classes = "",
14
+ ...props
15
+ }: PinyaAnchorButtonProps = $props();
16
+
17
+ let tailwindClass = $derived(createButtonClass({ colorScheme, paddingClass, buttonVariant, colorClass, classes }));
18
+ </script>
19
+
20
+ <a
21
+ {...props}
22
+ class={`a-as-btn ${tailwindClass}}`}
23
+ >
24
+ {@render children()}
25
+ </a>
@@ -0,0 +1,4 @@
1
+ import type { PinyaAnchorButtonProps } from "./PinyaAnchorButtonProps";
2
+ declare const PinyaAnchorButton: import("svelte").Component<PinyaAnchorButtonProps, {}, "">;
3
+ type PinyaAnchorButton = ReturnType<typeof PinyaAnchorButton>;
4
+ export default PinyaAnchorButton;
@@ -0,0 +1,4 @@
1
+ import type { HTMLAnchorAttributes } from "svelte/elements";
2
+ import type { PinyaButtonCommonProps } from "../PinyaButtonCommon/PinyaButtonCommonProps";
3
+ import type { WrapperProps } from "../index";
4
+ export type PinyaAnchorButtonProps = WrapperProps & HTMLAnchorAttributes & PinyaButtonCommonProps;
@@ -0,0 +1,2 @@
1
+ export { default as PinyaAnchorButton } from "./PinyaAnchorButton.svelte";
2
+ export * from "./PinyaAnchorButtonProps";
@@ -0,0 +1,2 @@
1
+ export { default as PinyaAnchorButton } from "./PinyaAnchorButton.svelte";
2
+ export * from "./PinyaAnchorButtonProps";
@@ -1,48 +1,25 @@
1
1
  <script lang="ts">
2
- import { ButtonVariant, type PinyaButtonProps } from './PinyaButtonProps';
2
+ import { type PinyaButtonProps } from "./PinyaButtonProps";
3
3
  import { ColorScheme } from "../ColorScheme";
4
+ import { ButtonVariant } from "../PinyaButtonCommon/ButtonVariant";
5
+ import { createButtonClass } from "../PinyaButtonCommon/createButtonClass";
4
6
 
5
7
  let {
6
8
  children,
7
9
  colorScheme = ColorScheme.Primary,
8
- paddingClass = '',
10
+ paddingClass = "",
9
11
  buttonVariant = ButtonVariant.Default,
10
- colorClass = '',
11
- classes = '',
12
+ colorClass = "",
13
+ classes = "",
12
14
  ...props
13
15
  }: PinyaButtonProps = $props();
14
16
 
15
- paddingClass = paddingClass
16
- ? paddingClass
17
- : (
18
- buttonVariant === ButtonVariant.Image
19
- ? 'pl-3 pr-3 pt-2 pb-2'
20
- : 'pl-3 pr-3'
21
- );
22
-
23
- const chooseTailwindClass = () => {
24
- switch (colorScheme) {
25
- case ColorScheme.Custom:
26
- return colorClass;
27
- case ColorScheme.Warning:
28
- return 'bg-warning-700 dark:bg-warning-400 text-secondary-0 dark:text-secondary-950 hover:brightness-110';
29
- case ColorScheme.Surface:
30
- return 'bg-surface-700 dark:bg-surface-600 text-surface-50-950 hover:brightness-110';
31
- default:
32
- console.error(`Unimplemented color scheme: ${colorScheme.toString()}`);
33
- // eslint-disable-next-line no-fallthrough
34
- case ColorScheme.Primary:
35
- return 'bg-primary-400-600 text-secondary-950 dark:text-secondary-0 hover:brightness-110';
36
- }
37
- };
38
-
39
- const tailwindClass = chooseTailwindClass();
17
+ let tailwindClass = $derived(createButtonClass({ colorScheme, paddingClass, buttonVariant, colorClass, classes }));
40
18
  </script>
41
19
 
42
20
  <button
43
21
  {...props}
44
- class:small-icon-button={buttonVariant === ButtonVariant.SmallIcon}
45
- class={`btn rounded-2xl text-xl font-bold ${tailwindClass} ${paddingClass} ${classes}`}
22
+ class={tailwindClass}
46
23
  >
47
24
  {@render children()}
48
25
  </button>
@@ -1,4 +1,4 @@
1
- import { type PinyaButtonProps } from './PinyaButtonProps';
1
+ import { type PinyaButtonProps } from "./PinyaButtonProps";
2
2
  declare const PinyaButton: import("svelte").Component<PinyaButtonProps, {}, "">;
3
3
  type PinyaButton = ReturnType<typeof PinyaButton>;
4
4
  export default PinyaButton;
@@ -1,14 +1,4 @@
1
- import type { HTMLButtonAttributes } from 'svelte/elements';
2
- import type { GeneralUIProps } from '../GeneralUIProps';
3
- import type { WrapperProps } from '../WrapperProps';
4
- export declare enum ButtonVariant {
5
- Default = 0,
6
- Image = 1,
7
- SmallIcon = 2
8
- }
9
- export type PinyaButtonProps = WrapperProps & HTMLButtonAttributes & GeneralUIProps & {
10
- paddingClass?: string;
11
- buttonVariant?: ButtonVariant;
12
- colorClass?: string;
13
- classes?: string;
14
- };
1
+ import type { HTMLButtonAttributes } from "svelte/elements";
2
+ import type { PinyaButtonCommonProps } from "../PinyaButtonCommon/PinyaButtonCommonProps";
3
+ import type { WrapperProps } from "../index";
4
+ export type PinyaButtonProps = WrapperProps & HTMLButtonAttributes & PinyaButtonCommonProps;
@@ -1,6 +1 @@
1
- export var ButtonVariant;
2
- (function (ButtonVariant) {
3
- ButtonVariant[ButtonVariant["Default"] = 0] = "Default";
4
- ButtonVariant[ButtonVariant["Image"] = 1] = "Image";
5
- ButtonVariant[ButtonVariant["SmallIcon"] = 2] = "SmallIcon";
6
- })(ButtonVariant || (ButtonVariant = {}));
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare enum ButtonVariant {
2
+ Default = 0,
3
+ Image = 1,
4
+ SmallIcon = 2
5
+ }
@@ -0,0 +1,6 @@
1
+ export var ButtonVariant;
2
+ (function (ButtonVariant) {
3
+ ButtonVariant[ButtonVariant["Default"] = 0] = "Default";
4
+ ButtonVariant[ButtonVariant["Image"] = 1] = "Image";
5
+ ButtonVariant[ButtonVariant["SmallIcon"] = 2] = "SmallIcon";
6
+ })(ButtonVariant || (ButtonVariant = {}));
@@ -0,0 +1,8 @@
1
+ import { type GeneralUIProps } from "../index";
2
+ import { ButtonVariant } from "./ButtonVariant";
3
+ export type PinyaButtonCommonProps = GeneralUIProps & {
4
+ paddingClass?: string;
5
+ buttonVariant?: ButtonVariant;
6
+ colorClass?: string;
7
+ classes?: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ import {} from "../index";
2
+ import { ButtonVariant } from "./ButtonVariant";
@@ -0,0 +1,2 @@
1
+ import type { PinyaButtonCommonProps } from "./PinyaButtonCommonProps";
2
+ export declare const createButtonClass: (props: PinyaButtonCommonProps) => string;
@@ -0,0 +1,31 @@
1
+ import { ColorScheme } from "../ColorScheme";
2
+ import { ButtonVariant } from "./ButtonVariant";
3
+ export const createButtonClass = (props) => {
4
+ let { colorScheme, paddingClass, buttonVariant, colorClass, classes } = props;
5
+ colorScheme ??= ColorScheme.Primary;
6
+ buttonVariant ??= ButtonVariant.Default;
7
+ paddingClass ??= buttonVariant === ButtonVariant.Image
8
+ ? "pl-3 pr-3 pt-2 pb-2"
9
+ : "pl-3 pr-3";
10
+ colorClass ??= "";
11
+ classes ??= "";
12
+ const chooseTailwindClass = () => {
13
+ switch (colorScheme) {
14
+ case ColorScheme.Custom:
15
+ return colorClass;
16
+ case ColorScheme.Warning:
17
+ return "bg-warning-700 dark:bg-warning-400 text-secondary-0 dark:text-secondary-950 hover:brightness-110";
18
+ case ColorScheme.Surface:
19
+ return "bg-surface-700 dark:bg-surface-600 text-surface-50-950 hover:brightness-110";
20
+ default:
21
+ console.error(`Unimplemented color scheme: ${colorScheme.toString()}`);
22
+ // eslint-disable-next-line no-fallthrough
23
+ case ColorScheme.Primary:
24
+ return "bg-primary-400-600 text-secondary-950 dark:text-secondary-0 hover:brightness-110";
25
+ }
26
+ };
27
+ const tailwindClass = chooseTailwindClass();
28
+ return `btn rounded-2xl text-xl font-bold
29
+ ${buttonVariant === ButtonVariant.SmallIcon ? 'small-icon-button' : ''}
30
+ ${tailwindClass} ${paddingClass} ${classes}`;
31
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./ButtonVariant";
2
+ export * from "./createButtonClass";
3
+ export * from "./PinyaButtonCommonProps";
@@ -0,0 +1,3 @@
1
+ export * from "./ButtonVariant";
2
+ export * from "./createButtonClass";
3
+ export * from "./PinyaButtonCommonProps";
@@ -8,15 +8,23 @@ let {
8
8
  flexClass = "flex flex-col",
9
9
  widthClass = "w-full max-w-md",
10
10
  borderClass = "border-[2px] border-primary-500 dark:border-0",
11
+ colorClass = "bg-surface-200 dark:bg-surface-900",
11
12
  marginClass = "",
12
13
  className,
14
+ includeDataNoSnippet = false,
13
15
  children
14
16
  }: PinyaCardProps = $props();
17
+
18
+ let cardClass = $derived(`card text-start rounded-xl
19
+ ${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass} ${colorClass}`);
15
20
  </script>
16
21
 
17
- <div
18
- class={`card bg-surface-200 dark:bg-surface-900 text-start rounded-xl
19
- ${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass}`}
20
- >
21
- {@render children?.()}
22
- </div>
22
+ {#if includeDataNoSnippet}
23
+ <div data-nosnippet class={cardClass}>
24
+ {@render children?.()}
25
+ </div>
26
+ {:else }
27
+ <div class={cardClass}>
28
+ {@render children?.()}
29
+ </div>
30
+ {/if}
@@ -6,5 +6,6 @@ export interface PinyaCardProps extends WrapperProps {
6
6
  widthClass?: string;
7
7
  borderClass?: string;
8
8
  marginClass?: string;
9
+ colorClass?: string;
9
10
  includeDataNoSnippet?: boolean;
10
11
  }
@@ -1,11 +1,13 @@
1
- export { default as ImageIcon } from "./ImageIcon.svelte";
2
- export { default as TextLink } from "./TextLink.svelte";
3
- export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
4
1
  export * from "./ColorScheme";
5
2
  export * from "./GeneralUIProps";
6
3
  export * from "./OnBackground";
4
+ export * from "./PinyaButtonCommon";
5
+ export { default as ImageIcon } from "./ImageIcon.svelte";
6
+ export { default as TextLink } from "./TextLink.svelte";
7
+ export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
7
8
  export * from "./PinyaCard/index";
8
9
  export * from "./WrapperProps";
9
- export * from "./PinyaButton/index";
10
+ export * from "./PinyaButton";
11
+ export * from "./PinyaAnchorButton";
10
12
  export * from "./text-chip";
11
13
  export * from "./CodeBlock";
@@ -1,11 +1,15 @@
1
- export { default as ImageIcon } from "./ImageIcon.svelte";
2
- export { default as TextLink } from "./TextLink.svelte";
3
- export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
1
+ // types
4
2
  export * from "./ColorScheme";
5
3
  export * from "./GeneralUIProps";
6
4
  export * from "./OnBackground";
5
+ export * from "./PinyaButtonCommon";
6
+ // components
7
+ export { default as ImageIcon } from "./ImageIcon.svelte";
8
+ export { default as TextLink } from "./TextLink.svelte";
9
+ export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
7
10
  export * from "./PinyaCard/index";
8
11
  export * from "./WrapperProps";
9
- export * from "./PinyaButton/index";
12
+ export * from "./PinyaButton";
13
+ export * from "./PinyaAnchorButton";
10
14
  export * from "./text-chip";
11
15
  export * from "./CodeBlock";
@@ -62,7 +62,7 @@
62
62
  <!-- all the misc routes-->
63
63
  {#each visiblePages as pageMeta (pageMeta.title)}
64
64
  {@const fullPath=`${parentSubpath}${pageMeta.relativeLink}`}
65
- <a href={localizeHref(fullPath)} class="card-anchor">
65
+ <a href={localizeHref(fullPath)} class="card-anchor a-as-btn">
66
66
  <PinyaCard
67
67
  widthClass="w-full"
68
68
  className="navigation-element"
@@ -5,8 +5,8 @@
5
5
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
6
6
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
7
7
  import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
8
- import { ButtonVariant } from "../../elements/PinyaButton/PinyaButtonProps";
9
8
  import { ItchLogoHotLink } from "../../../consts";
9
+ import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
10
10
 
11
11
  const key = "Hepcat";
12
12
  export { component, key };
@@ -5,8 +5,8 @@
5
5
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
6
6
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
7
7
  import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
8
- import { ButtonVariant } from "../../elements/PinyaButton/PinyaButtonProps";
9
8
  import { ItchLogoHotLink } from "../../../consts";
9
+ import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
10
10
 
11
11
  const key = "Pengi";
12
12
  export { component, key };
@@ -5,8 +5,8 @@
5
5
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
6
6
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
7
7
  import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
8
- import { ButtonVariant } from "../../elements/PinyaButton/PinyaButtonProps";
9
8
  import { ItchLogoHotLink } from "../../../consts";
9
+ import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
10
10
 
11
11
  const key = "Soulwork";
12
12
  export { component, key };
@@ -5,8 +5,8 @@
5
5
  import { default as FourPartCard } from "../../components/FourPartCard.svelte";
6
6
  import { default as ImageIcon } from "../../elements/ImageIcon.svelte";
7
7
  import { default as PinyaButton } from "../../elements/PinyaButton/PinyaButton.svelte";
8
- import { ButtonVariant } from "../../elements/PinyaButton/PinyaButtonProps";
9
8
  import { default as TextChip } from "../../elements/text-chip/TextChip.svelte";
9
+ import { ButtonVariant } from "../../elements/PinyaButtonCommon/ButtonVariant";
10
10
 
11
11
  const key = "This Webpage";
12
12
  export { component, key };
@@ -1,14 +1,16 @@
1
1
  <script lang="ts">
2
2
  import type { Snippet } from "svelte";
3
+ import { modals } from "svelte-modals";
3
4
  import { m } from "../../../paraglide/messages";
5
+ import { localizeHref } from "../../../paraglide/runtime";
4
6
 
5
7
  import AresLogo from "../../../assets/characters/ares/ares_logo.webp";
6
8
  import SettingsLogo from "../../../assets/icons/icon-settings.svg";
7
9
  import RandomizedBackground from "../../components/randomized-background/RandomizedBackground.svelte";
8
- import { modals } from "svelte-modals";
9
10
  import GeneralSettingsModal from "../../modules/modals/general-settings/GeneralSettingsModal.svelte";
10
- import { localizeHref } from "../../../paraglide/runtime";
11
11
  import { appState } from "./runes.svelte";
12
+ import { enableBackground } from "../../../store";
13
+ import DialogOverlay from "../../../components/dialog_overlay/DialogOverlay.svelte";
12
14
 
13
15
  let {
14
16
  children,
@@ -68,12 +70,14 @@
68
70
  {@render header('hidden shadow-none w-full')}
69
71
  {@render header('fixed z-15 w-[105vw]')}
70
72
 
71
- <RandomizedBackground enabled={true} />
73
+ <RandomizedBackground enabled={$enableBackground} />
72
74
 
73
75
  <div class="default-page-container">
74
76
  {@render children?.()}
75
77
  </div>
76
78
 
79
+ <DialogOverlay></DialogOverlay>
80
+
77
81
  {#if footer}
78
82
  {@render footer()}
79
83
  {:else }
@@ -5,6 +5,7 @@ interface AppStore {
5
5
  isLanguagePickerAvailable: boolean;
6
6
  allowDialog?: boolean;
7
7
  enableDialogOnByDefault?: boolean;
8
+ bgOpacity: number;
8
9
  }
9
10
  export declare const appState: AppStore;
10
11
  export {};
@@ -1,4 +1,5 @@
1
1
  export const appState = $state({
2
2
  title: '',
3
3
  isLanguagePickerAvailable: true,
4
+ bgOpacity: 1,
4
5
  });
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": "3.1.0-alpha.1",
4
+ "version": "3.1.0-alpha.11",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -22,13 +22,15 @@ html {
22
22
  height: calc(var(--dialog-box-height) + 4em);
23
23
  }
24
24
 
25
- a.dialog-choice {
25
+ .dialog-box a, .dialog-box b, .dialog-box i {
26
26
  font-size: inherit;
27
+ }
28
+
29
+ a.dialog-choice {
27
30
  cursor: url("$pkg/assets/icons/chat-cursor.svg"), auto;
28
31
  }
29
32
 
30
33
  a.external-link {
31
- font-size: inherit;
32
34
  cursor: url("$pkg/assets/icons/external-link.svg"), auto;
33
35
  }
34
36
 
@@ -1,2 +0,0 @@
1
- import type { IDialogManager } from "./IDialogManager";
2
- export declare const getDialogManager: () => Promise<IDialogManager | undefined>;
@@ -1,21 +0,0 @@
1
- /**
2
- * strictly must be declared last! or you might receive a weird error that looks like:
3
- *
4
- * 2:04:21 AM [vite] Error when evaluating SSR module /src/lib/components/dialog_manager/DialogManagerStore.ts:
5
- * |- TypeError: Cannot read properties of undefined (reading '0')
6
- * at <instance_members_initializer> (/src/lib/components/dialog_manager/DialogManager.ts:38:67)
7
- * at new DialogManager (/src/lib/components/dialog_manager/DialogManager.ts:53:14)
8
- * at eval (/src/lib/components/dialog_manager/DialogManagerStore.ts:15:23)
9
- * at async instantiateModule (file:///C:/Users/Pumpkin/Projects/Web/pineapple/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:54360:9)
10
- *
11
- * what this means is that one member of dialogManager cannot be initialized. in our case, it was the
12
- * defaultDialogMessage not yet being initialized
13
- */
14
- let _dialogManager = undefined;
15
- export const getDialogManager = async () => {
16
- if (_dialogManager === undefined) {
17
- const dm = await import('./DialogManager');
18
- _dialogManager = new dm.DialogManager();
19
- }
20
- return _dialogManager;
21
- };