storyloco 1.0.0 → 1.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storyloco",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A collection of slick Storyblok field plugins built with Svelte 5, TypeScript, and Tailwind CSS",
5
5
  "keywords": [
6
6
  "storyblok",
@@ -21,7 +21,9 @@
21
21
  "files": [
22
22
  "src",
23
23
  "packages/mux/src/app.svelte",
24
+ "packages/mux/types.ts",
24
25
  "packages/heading/src/app.svelte",
26
+ "packages/heading/types.ts",
25
27
  "packages/theme/src/app.svelte",
26
28
  "packages/shared/dist"
27
29
  ],
@@ -31,17 +33,13 @@
31
33
  "import": "./src/index.ts"
32
34
  },
33
35
  "./mux": {
34
- "types": "./packages/mux/src/app.svelte",
36
+ "types": "./packages/mux/types.ts",
35
37
  "import": "./packages/mux/src/app.svelte"
36
38
  },
37
39
  "./heading": {
38
- "types": "./packages/heading/src/app.svelte",
40
+ "types": "./packages/heading/types.ts",
39
41
  "import": "./packages/heading/src/app.svelte"
40
42
  },
41
- "./theme": {
42
- "types": "./packages/theme/src/app.svelte",
43
- "import": "./packages/theme/src/app.svelte"
44
- },
45
43
  "./shared": {
46
44
  "types": "./packages/shared/dist/index.d.ts",
47
45
  "svelte": "./packages/shared/dist/index.js"
@@ -1,14 +1,8 @@
1
- <script module lang="ts">
2
- export interface Heading {
3
- text: string
4
- level: 1 | 2 | 3 | 4 | 5 | 6
5
- }
6
- </script>
7
-
8
1
  <script lang="ts">
9
2
  import { createFieldPlugin, type FieldPluginResponse } from '@storyblok/field-plugin'
10
3
  import { onMount } from 'svelte'
11
4
  import { Input } from 'shared'
5
+ import type { Heading } from '../types.js'
12
6
 
13
7
  type Plugin = FieldPluginResponse<Heading | null>
14
8
 
@@ -0,0 +1,4 @@
1
+ export interface Heading {
2
+ text: string
3
+ level: 1 | 2 | 3 | 4 | 5 | 6
4
+ }
@@ -18,20 +18,7 @@
18
18
  import '@mux/mux-uploader'
19
19
  import { cn } from 'shared/utils'
20
20
  import { Input, Label, Skeleton, Switch } from 'shared'
21
-
22
- export interface Video {
23
- mux_video?: Mux.Video.Assets.Asset
24
- playback_id?: string
25
- m3u8_url?: string
26
- title?: string
27
- autoplay?: boolean
28
- muted?: boolean
29
- loop?: boolean
30
- playsinline?: boolean
31
- controls?: boolean
32
- preload?: 'auto' | 'metadata' | 'none'
33
- poster?: string
34
- }
21
+ import type { Video } from '../types.js'
35
22
 
36
23
  type MuxAsset = Mux.Video.Assets.Asset
37
24
  type Plugin = FieldPluginResponse<Video | null>
@@ -0,0 +1,16 @@
1
+ import type Mux from '@mux/mux-node'
2
+
3
+ export interface Video {
4
+ mux_video?: Mux.Video.Assets.Asset
5
+ playback_id?: string
6
+ m3u8_url?: string
7
+ title?: string
8
+ autoplay?: boolean
9
+ muted?: boolean
10
+ loop?: boolean
11
+ playsinline?: boolean
12
+ controls?: boolean
13
+ preload?: 'auto' | 'metadata' | 'none'
14
+ poster?: string
15
+ }
16
+
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
- export type { Video } from '../packages/mux/src/app.svelte'
2
- export type { Heading } from '../packages/heading/src/app.svelte'
1
+ // Re-export types from all packages
2
+ export type { Video } from '../packages/mux/types'
3
+ export type { Heading } from '../packages/heading/types'
3
4
  // Add more exports as you create more packages