@joyautomation/salt 0.0.22 → 0.0.29

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/dist/actions.js CHANGED
@@ -3,13 +3,13 @@ export const setTheme = async ({ request, cookies }) => {
3
3
  const theme = data.get('theme');
4
4
  cookies.set(`theme`, theme, {
5
5
  path: '/',
6
- secure: false,
6
+ secure: false
7
7
  });
8
8
  const themeName = theme === 'themeDark' ? 'dark mode' : 'light mode';
9
9
  return {
10
10
  context: 'setTheme',
11
11
  type: 'success',
12
12
  message: `You are now in ${themeName}.`,
13
- theme,
13
+ theme
14
14
  };
15
15
  };
package/dist/client.js CHANGED
@@ -1,12 +1,12 @@
1
1
  export function setTheme(form) {
2
- if (form?.context === "setTheme") {
3
- if (form?.theme === "themeDark") {
4
- document.body.classList.add("themeDark");
5
- document.body.classList.remove("themeLight");
2
+ if (form?.context === 'setTheme') {
3
+ if (form?.theme === 'themeDark') {
4
+ document.body.classList.add('themeDark');
5
+ document.body.classList.remove('themeLight');
6
6
  }
7
7
  else {
8
- document.body.classList.remove("themeDark");
9
- document.body.classList.add("themeLight");
8
+ document.body.classList.remove('themeDark');
9
+ document.body.classList.add('themeLight');
10
10
  }
11
11
  }
12
12
  }
@@ -1,6 +1,4 @@
1
1
  <script lang="ts">
2
- import { enhance } from '$app/forms';
3
-
4
2
  export let id: string;
5
3
  export let checked = false;
6
4
  export let name: string;
@@ -2,7 +2,7 @@ export type InputProps = {
2
2
  id: string;
3
3
  name: string;
4
4
  label: string;
5
- type: HTMLInputElement["type"];
5
+ type: HTMLInputElement['type'];
6
6
  value: string;
7
7
  validation: (value: string) => string | null;
8
8
  };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export * as actions from "./actions.js";
2
- export * as client from "./client.js";
3
- export { default as Toggle } from "./components/Toggle.svelte";
4
- export { default as ThemeButton } from "./components/ThemeButton.svelte";
5
- export { default as Toast } from "./components/Toast.svelte";
6
- export { default as Icon } from "./components/Icon.svelte";
7
- export * as icons from "./components/icons/index.js";
8
- export * as state from "./state/notifications.svelte";
9
- export { default as ThemeSwitch } from "./components/ThemeSwitch.svelte";
10
- export { themeState, getEffectiveTheme, type Theme } from "./theme.svelte";
1
+ export * as actions from './actions.js';
2
+ export * as client from './client.js';
3
+ export { default as Toggle } from './components/Toggle.svelte';
4
+ export { default as ThemeButton } from './components/ThemeButton.svelte';
5
+ export { default as Toast } from './components/Toast.svelte';
6
+ export { default as Icon } from './components/Icon.svelte';
7
+ export * as icons from './components/icons/index.js';
8
+ export * as state from './state/notifications.svelte';
9
+ export { default as ThemeSwitch } from './components/ThemeSwitch.svelte';
10
+ export { themeState, getEffectiveTheme, type Theme } from './theme.svelte';
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- export * as actions from "./actions.js";
2
- export * as client from "./client.js";
3
- export { default as Toggle } from "./components/Toggle.svelte";
4
- export { default as ThemeButton } from "./components/ThemeButton.svelte";
5
- export { default as Toast } from "./components/Toast.svelte";
6
- export { default as Icon } from "./components/Icon.svelte";
7
- export * as icons from "./components/icons/index.js";
8
- export * as state from "./state/notifications.svelte";
9
- export { default as ThemeSwitch } from "./components/ThemeSwitch.svelte";
10
- export { themeState, getEffectiveTheme } from "./theme.svelte";
1
+ export * as actions from './actions.js';
2
+ export * as client from './client.js';
3
+ export { default as Toggle } from './components/Toggle.svelte';
4
+ export { default as ThemeButton } from './components/ThemeButton.svelte';
5
+ export { default as Toast } from './components/Toast.svelte';
6
+ export { default as Icon } from './components/Icon.svelte';
7
+ export * as icons from './components/icons/index.js';
8
+ export * as state from './state/notifications.svelte';
9
+ export { default as ThemeSwitch } from './components/ThemeSwitch.svelte';
10
+ export { themeState, getEffectiveTheme } from './theme.svelte';
@@ -2,7 +2,7 @@ import { writable } from 'svelte/store';
2
2
  import { nanoid } from 'nanoid';
3
3
  const initializer = [];
4
4
  export const notifications = $state({
5
- current: initializer,
5
+ current: initializer
6
6
  });
7
7
  export function addNotification(notification) {
8
8
  const id = nanoid();
@@ -10,8 +10,8 @@ export function addNotification(notification) {
10
10
  ...notifications.current,
11
11
  {
12
12
  id,
13
- ...notification,
14
- },
13
+ ...notification
14
+ }
15
15
  ];
16
16
  setTimeout(() => {
17
17
  notifications.current = notifications.current.filter((n) => n.id !== id);
@@ -1,5 +1,5 @@
1
- import { writable } from "svelte/store";
2
- import { nanoid } from "nanoid";
1
+ import { writable } from 'svelte/store';
2
+ import { nanoid } from 'nanoid';
3
3
  const initializer = [];
4
4
  export const notifications = writable(initializer);
5
5
  export function addNotification(notification) {
@@ -8,8 +8,8 @@ export function addNotification(notification) {
8
8
  ...notifications,
9
9
  {
10
10
  id,
11
- ...notification,
12
- },
11
+ ...notification
12
+ }
13
13
  ]);
14
14
  setTimeout(() => {
15
15
  notifications.update((notifications) => notifications.filter((n) => n.id !== id));
@@ -33,7 +33,7 @@ a.button {
33
33
 
34
34
  .button--secondary:hover {
35
35
  color: var(--white);
36
- background-color: var(--primary-hover);
36
+ background-color: var(--theme-primary-hover);
37
37
  }
38
38
 
39
39
  .button--icon {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joyautomation/salt",
3
- "version": "0.0.22",
3
+ "version": "0.0.29",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",
@@ -34,6 +34,7 @@
34
34
  "svelte": "5.0.0-next.244"
35
35
  },
36
36
  "devDependencies": {
37
+ "@eslint/js": "^9.25.1",
37
38
  "@playwright/test": "^1.52.0",
38
39
  "@sveltejs/adapter-auto": "^6.0.0",
39
40
  "@sveltejs/kit": "^2.20.7",
@@ -61,6 +62,11 @@
61
62
  "svelte": "./dist/index.js",
62
63
  "types": "./dist/index.d.ts",
63
64
  "type": "module",
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "https://github.com/joyautomation/salt"
68
+ },
69
+ "packageManager": "pnpm@10.13.1",
64
70
  "dependencies": {
65
71
  "@sveltejs/adapter-node": "^5.2.12",
66
72
  "nanoid": "^5.1.5",