@functionalcms/svelte-components 5.5.3 → 5.5.4

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,9 +1,14 @@
1
- import { IconSize } from "./icons.js";
2
- interface Props {
3
- icon?: string;
4
- size?: IconSize;
5
- class?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type IconProps = typeof __propDef.props;
10
+ export type IconEvents = typeof __propDef.events;
11
+ export type IconSlots = typeof __propDef.slots;
12
+ export default class Icon extends SvelteComponentTyped<IconProps, IconEvents, IconSlots> {
6
13
  }
7
- declare const Icon: import("svelte").Component<Props, {}, "">;
8
- type Icon = ReturnType<typeof Icon>;
9
- export default Icon;
14
+ export {};
@@ -1,18 +1,14 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
11
6
  };
12
- z_$$bindings?: Bindings;
7
+ slots: {};
8
+ };
9
+ export type MarkdownProps = typeof __propDef.props;
10
+ export type MarkdownEvents = typeof __propDef.events;
11
+ export type MarkdownSlots = typeof __propDef.slots;
12
+ export default class Markdown extends SvelteComponentTyped<MarkdownProps, MarkdownEvents, MarkdownSlots> {
13
13
  }
14
- declare const Markdown: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type Markdown = InstanceType<typeof Markdown>;
18
- export default Markdown;
14
+ export {};
@@ -1,26 +1,23 @@
1
- export default AntiBot;
2
- type AntiBot = SvelteComponent<{
1
+ /** @typedef {typeof __propDef.props} AntiBotProps */
2
+ /** @typedef {typeof __propDef.events} AntiBotEvents */
3
+ /** @typedef {typeof __propDef.slots} AntiBotSlots */
4
+ export default class AntiBot extends SvelteComponentTyped<{
3
5
  [x: string]: never;
4
6
  }, {
5
7
  [evt: string]: CustomEvent<any>;
6
- }, {}> & {
7
- $$bindings?: string | undefined;
8
- };
9
- declare const AntiBot: $$__sveltets_2_IsomorphicComponent<{
10
- [x: string]: never;
11
- }, {
12
- [evt: string]: CustomEvent<any>;
13
- }, {}, {}, string>;
14
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
- new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
- $$bindings?: Bindings;
17
- } & Exports;
18
- (internal: unknown, props: {
19
- $$events?: Events;
20
- $$slots?: Slots;
21
- }): Exports & {
22
- $set?: any;
23
- $on?: any;
24
- };
25
- z_$$bindings?: Bindings;
8
+ }, {}> {
26
9
  }
10
+ export type AntiBotProps = typeof __propDef.props;
11
+ export type AntiBotEvents = typeof __propDef.events;
12
+ export type AntiBotSlots = typeof __propDef.slots;
13
+ import { SvelteComponentTyped } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -1,4 +1,14 @@
1
- import { type FileDropZoneProps } from './dropzone.js';
2
- declare const Dropzone: import("svelte").Component<FileDropZoneProps, {}, "">;
3
- type Dropzone = ReturnType<typeof Dropzone>;
4
- export default Dropzone;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type DropzoneProps = typeof __propDef.props;
10
+ export type DropzoneEvents = typeof __propDef.events;
11
+ export type DropzoneSlots = typeof __propDef.slots;
12
+ export default class Dropzone extends SvelteComponentTyped<DropzoneProps, DropzoneEvents, DropzoneSlots> {
13
+ }
14
+ export {};
@@ -1,12 +1,14 @@
1
- import { type Field, type ButtonConfig, SubmitResult } from './form.js';
2
- interface Props {
3
- action: string;
4
- class?: string;
5
- successMessage?: string;
6
- fields?: Array<Field>;
7
- onMessageSubmitted?: (result: SubmitResult) => void;
8
- buttons: Array<ButtonConfig>;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type SmartFormProps = typeof __propDef.props;
10
+ export type SmartFormEvents = typeof __propDef.events;
11
+ export type SmartFormSlots = typeof __propDef.slots;
12
+ export default class SmartForm extends SvelteComponentTyped<SmartFormProps, SmartFormEvents, SmartFormSlots> {
9
13
  }
10
- declare const SmartForm: import("svelte").Component<Props, {}, "">;
11
- type SmartForm = ReturnType<typeof SmartForm>;
12
- export default SmartForm;
14
+ export {};
@@ -1,8 +1,14 @@
1
- declare const Font: import("svelte").Component<Partial<{
2
- fonts: Array<{
3
- name: string;
4
- values: string;
5
- }>;
6
- }>, {}, "">;
7
- type Font = ReturnType<typeof Font>;
8
- export default Font;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type FontProps = typeof __propDef.props;
10
+ export type FontEvents = typeof __propDef.events;
11
+ export type FontSlots = typeof __propDef.slots;
12
+ export default class Font extends SvelteComponentTyped<FontProps, FontEvents, FontSlots> {
13
+ }
14
+ export {};
@@ -1,10 +1,14 @@
1
- declare const Meta: import("svelte").Component<Partial<{
2
- title: string;
3
- description: string;
4
- keywords: string;
5
- robots: string;
6
- charset: string;
7
- viewport: string;
8
- }>, {}, "">;
9
- type Meta = ReturnType<typeof Meta>;
10
- export default Meta;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ type MetaProps_ = typeof __propDef.props;
10
+ export { MetaProps_ as MetaProps };
11
+ export type MetaEvents = typeof __propDef.events;
12
+ export type MetaSlots = typeof __propDef.slots;
13
+ export default class Meta extends SvelteComponentTyped<MetaProps_, MetaEvents, MetaSlots> {
14
+ }
@@ -1,6 +1,14 @@
1
- type $$ComponentProps = {
2
- domain: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
3
8
  };
4
- declare const Tracker: import("svelte").Component<$$ComponentProps, {}, "">;
5
- type Tracker = ReturnType<typeof Tracker>;
6
- export default Tracker;
9
+ export type TrackerProps = typeof __propDef.props;
10
+ export type TrackerEvents = typeof __propDef.events;
11
+ export type TrackerSlots = typeof __propDef.slots;
12
+ export default class Tracker extends SvelteComponentTyped<TrackerProps, TrackerEvents, TrackerSlots> {
13
+ }
14
+ export {};
@@ -1,7 +1,14 @@
1
- interface Props {
2
- userId: number;
3
- title?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type EasyToolsProps = typeof __propDef.props;
10
+ export type EasyToolsEvents = typeof __propDef.events;
11
+ export type EasyToolsSlots = typeof __propDef.slots;
12
+ export default class EasyTools extends SvelteComponentTyped<EasyToolsProps, EasyToolsEvents, EasyToolsSlots> {
4
13
  }
5
- declare const EasyTools: import("svelte").Component<Props, {}, "">;
6
- type EasyTools = ReturnType<typeof EasyTools>;
7
- export default EasyTools;
14
+ export {};
@@ -1,22 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- import { type MenuOption } from './menuItems.js';
3
- declare const DefaultLayout: import("svelte").Component<Partial<{
4
- children: Snippet;
5
- canonicalUrl: string;
6
- logoUrl?: string;
7
- companyName?: string;
8
- renderCompanyName?: boolean;
9
- menuItems?: Array<MenuOption>;
10
- footerRender?: Snippet;
11
- classes?: {
12
- logo?: string;
13
- companyName?: string;
14
- navigation?: string;
15
- menuItem?: string;
16
- activeClass?: string;
17
- nonActiveClass?: string;
18
- main?: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
19
6
  };
20
- }>, {}, "">;
21
- type DefaultLayout = ReturnType<typeof DefaultLayout>;
22
- export default DefaultLayout;
7
+ slots: {};
8
+ };
9
+ export type DefaultLayoutProps = typeof __propDef.props;
10
+ export type DefaultLayoutEvents = typeof __propDef.events;
11
+ export type DefaultLayoutSlots = typeof __propDef.slots;
12
+ export default class DefaultLayout extends SvelteComponentTyped<DefaultLayoutProps, DefaultLayoutEvents, DefaultLayoutSlots> {
13
+ }
14
+ export {};
@@ -1,14 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- import type { MenuItem, MenuSection } from './menuItems.js';
3
- declare const MenuLayout: import("svelte").Component<Partial<{
4
- children: Snippet;
5
- menuItems: Array<MenuSection | MenuItem>;
6
- logo: {
7
- name: string;
8
- href: string;
9
- img: string;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
10
6
  };
11
- sidebarPosition?: "fixed" | "absolute" | "static";
12
- }>, {}, "">;
13
- type MenuLayout = ReturnType<typeof MenuLayout>;
14
- export default MenuLayout;
7
+ slots: {};
8
+ };
9
+ export type MenuLayoutProps = typeof __propDef.props;
10
+ export type MenuLayoutEvents = typeof __propDef.events;
11
+ export type MenuLayoutSlots = typeof __propDef.slots;
12
+ export default class MenuLayout extends SvelteComponentTyped<MenuLayoutProps, MenuLayoutEvents, MenuLayoutSlots> {
13
+ }
14
+ export {};
@@ -1,7 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- declare const SimpleLayout: import("svelte").Component<Partial<{
3
- children: Snippet;
4
- class: string;
5
- }>, {}, "">;
6
- type SimpleLayout = ReturnType<typeof SimpleLayout>;
7
- export default SimpleLayout;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type SimpleLayoutProps = typeof __propDef.props;
10
+ export type SimpleLayoutEvents = typeof __propDef.events;
11
+ export type SimpleLayoutSlots = typeof __propDef.slots;
12
+ export default class SimpleLayout extends SvelteComponentTyped<SimpleLayoutProps, SimpleLayoutEvents, SimpleLayoutSlots> {
13
+ }
14
+ export {};
@@ -1,17 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- declare const FlexBox: import("svelte").Component<Partial<{
3
- children: Snippet;
4
- width?: string;
5
- height?: string;
6
- direction: "row" | "column" | "row-reverse" | "column-reverse";
7
- justify?: "start" | "end" | "end-safe" | "center" | "center-safe" | "between" | "around" | "evenly" | "stretch" | "baseline" | "normal";
8
- align?: "start" | "end" | "end-safe" | "center" | "center-safe" | "baseline" | "baseline-last" | "stretch";
9
- wrap: "wrap" | "nowrap" | "wrap-reverse";
10
- grow?: string;
11
- shrink?: string;
12
- gap?: string;
13
- margin?: string;
14
- padding?: string;
15
- }>, {}, "">;
16
- type FlexBox = ReturnType<typeof FlexBox>;
17
- export default FlexBox;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type FlexBoxProps = typeof __propDef.props;
10
+ export type FlexBoxEvents = typeof __propDef.events;
11
+ export type FlexBoxSlots = typeof __propDef.slots;
12
+ export default class FlexBox extends SvelteComponentTyped<FlexBoxProps, FlexBoxEvents, FlexBoxSlots> {
13
+ }
14
+ export {};
@@ -1,10 +1,14 @@
1
- import { type Snippet } from "svelte";
2
- declare const ImageCompare: import("svelte").Component<Partial<{
3
- imageLeftSrc: string;
4
- imageLeftAlt: string;
5
- imageRightSrc: string;
6
- imageRightAlt: string;
7
- slidertLabel: Snippet;
8
- }>, {}, "">;
9
- type ImageCompare = ReturnType<typeof ImageCompare>;
10
- export default ImageCompare;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ImageCompareProps = typeof __propDef.props;
10
+ export type ImageCompareEvents = typeof __propDef.events;
11
+ export type ImageCompareSlots = typeof __propDef.slots;
12
+ export default class ImageCompare extends SvelteComponentTyped<ImageCompareProps, ImageCompareEvents, ImageCompareSlots> {
13
+ }
14
+ export {};
@@ -1,7 +1,14 @@
1
- declare const Logo: import("svelte").Component<Partial<{
2
- companyName: string;
3
- logoUrl: string;
4
- css: string;
5
- }>, {}, "">;
6
- type Logo = ReturnType<typeof Logo>;
7
- export default Logo;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type LogoProps = typeof __propDef.props;
10
+ export type LogoEvents = typeof __propDef.events;
11
+ export type LogoSlots = typeof __propDef.slots;
12
+ export default class Logo extends SvelteComponentTyped<LogoProps, LogoEvents, LogoSlots> {
13
+ }
14
+ export {};
@@ -1,7 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- declare const StyleBox: import("svelte").Component<Partial<{
3
- children: Snippet;
4
- class: string;
5
- }>, {}, "">;
6
- type StyleBox = ReturnType<typeof StyleBox>;
7
- export default StyleBox;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type StyleBoxProps = typeof __propDef.props;
10
+ export type StyleBoxEvents = typeof __propDef.events;
11
+ export type StyleBoxSlots = typeof __propDef.slots;
12
+ export default class StyleBox extends SvelteComponentTyped<StyleBoxProps, StyleBoxEvents, StyleBoxSlots> {
13
+ }
14
+ export {};
@@ -1,7 +1,14 @@
1
- import type { Snippet } from 'svelte';
2
- declare const Well: import("svelte").Component<Partial<{
3
- children: Snippet;
4
- class: string;
5
- }>, {}, "">;
6
- type Well = ReturnType<typeof Well>;
7
- export default Well;
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type WellProps = typeof __propDef.props;
10
+ export type WellEvents = typeof __propDef.events;
11
+ export type WellSlots = typeof __propDef.slots;
12
+ export default class Well extends SvelteComponentTyped<WellProps, WellEvents, WellSlots> {
13
+ }
14
+ export {};
@@ -6,5 +6,5 @@ import authorizationHandle from "./auth/authorizationHandle";
6
6
  import { userHandler } from "./handlers/userHandler";
7
7
  import { accessTokenHandler } from "./handlers/accessTokenHandler";
8
8
  export const hookSequence = (secret, paraglideMiddleware, getTextDirection, customHooks) => {
9
- return sequence(sessionStorageHandler(secret, "session"), userHandler(secret), accessTokenHandler(secret), errorHandler, paraglideHandler(paraglideMiddleware, getTextDirection), authorizationHandle(), ...customHooks);
9
+ return sequence(userHandler(secret), accessTokenHandler(secret), errorHandler, paraglideHandler(paraglideMiddleware, getTextDirection), authorizationHandle(), ...customHooks);
10
10
  };
@@ -1,3 +1,3 @@
1
1
  import { type Handle } from '@sveltejs/kit';
2
- export declare const sessionStorageHandler: (secret: string, contentName: string) => Handle;
2
+ export declare const sessionStorageHandler: (url: string, token: string, contentName: string) => Handle;
3
3
  export default sessionStorageHandler;
@@ -1,24 +1,20 @@
1
1
  import {} from '@sveltejs/kit';
2
- import { loadCookie, saveCookie } from '../cookies';
3
- import LZString from 'lz-string';
4
- const storage = new Map();
5
- export const sessionStorageHandler = (secret, contentName) => {
2
+ import { Redis } from '@upstash/redis';
3
+ export const sessionStorageHandler = (url, token, contentName) => {
4
+ const redis = new Redis({
5
+ url: url,
6
+ token: token
7
+ });
6
8
  return async ({ event, resolve }) => {
7
- // const item = event?.locals?.[contentName];
8
- // event.locals[contentName] = {};
9
- // if (!item) {
10
- const itemContent = await loadCookie(event.cookies, secret, contentName);
11
- if (itemContent && itemContent != '') {
12
- const decompressedContent = LZString.decompressFromEncodedURIComponent(itemContent);
13
- const parsedContent = JSON.parse(decompressedContent);
14
- event.locals[contentName] = parsedContent;
9
+ const itemContent = await redis.get(contentName);
10
+ if (itemContent != ''
11
+ && (Array.isArray(itemContent) != [] && itemContent.length > 0)
12
+ && itemContent != null) {
13
+ event.locals[contentName] = itemContent;
15
14
  }
16
- // }
17
15
  const result = await resolve(event);
18
16
  if (event.locals[contentName]) {
19
- const content = JSON.stringify(event.locals[contentName]);
20
- const serializedContent = LZString.compressToEncodedURIComponent(content);
21
- await saveCookie(result.headers, secret, contentName, serializedContent);
17
+ redis.set(contentName, JSON.stringify(event.locals[contentName]));
22
18
  }
23
19
  return result;
24
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "5.5.3",
3
+ "version": "5.5.4",
4
4
  "license": "MIT",
5
5
  "watch": {
6
6
  "build": {
@@ -57,18 +57,13 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@tailwindcss/vite": "^4.2.2",
60
+ "@upstash/redis": "^1.37.0",
60
61
  "flowbite": "^4.0.1",
61
62
  "flowbite-svelte": "^1.31.0",
62
63
  "flowbite-svelte-icons": "^3.1.0",
63
- "ioredis": "^5.10.0",
64
- "lz-string": "^1.5.0",
65
64
  "oauth4webapi": "^3.8.5",
66
65
  "tailwindcss": "^4.2.2"
67
66
  },
68
- "peerDependencies": {
69
- "@sveltejs/kit": "^2.55.0",
70
- "svelte": "^5.53.13"
71
- },
72
67
  "type": "module",
73
68
  "main": "./dist/index.js",
74
69
  "svelte": "./dist/index.js",