storyloco 1.4.3 → 1.4.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.
- package/package.json +3 -3
- package/packages/link/types.ts +48 -0
- package/packages/plans/index.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storyloco",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "A collection of slick Storyblok field plugins built with Svelte 5, TypeScript, and Tailwind CSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storyblok",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"src",
|
|
23
23
|
"packages/mux/types.ts",
|
|
24
24
|
"packages/heading/types.ts",
|
|
25
|
-
"packages/plans/index.ts",
|
|
26
25
|
"packages/plans/types.ts",
|
|
26
|
+
"packages/link/types.ts",
|
|
27
27
|
"packages/theme/src/app.svelte",
|
|
28
28
|
"packages/shared/dist",
|
|
29
29
|
"packages/vite/dist"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"types": "./packages/heading/types.ts"
|
|
41
41
|
},
|
|
42
42
|
"./plans": {
|
|
43
|
-
"types": "./packages/plans/
|
|
43
|
+
"types": "./packages/plans/types.ts"
|
|
44
44
|
},
|
|
45
45
|
"./shared": {
|
|
46
46
|
"types": "./packages/shared/dist/index.d.ts",
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Asset } from '@storyblok/field-plugin'
|
|
2
|
+
|
|
3
|
+
interface BaseLink {
|
|
4
|
+
url?: string
|
|
5
|
+
text?: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const link_types = ["asset", "external", "email", "internal"] as const
|
|
9
|
+
export const target_options = ["_self", "_blank", "_parent", "_top", "_new"] as const
|
|
10
|
+
export const rel_options = ["noopener", "noreferrer", "nofollow", "noopener noreferrer", "noopener noreferrer nofollow"] as const
|
|
11
|
+
|
|
12
|
+
export type LinkType = typeof link_types[number]
|
|
13
|
+
export type Target = typeof target_options[number]
|
|
14
|
+
export type Rel = typeof rel_options[number]
|
|
15
|
+
|
|
16
|
+
export interface AssetLink extends BaseLink {
|
|
17
|
+
type: "asset"
|
|
18
|
+
asset?: Asset
|
|
19
|
+
target?: Target
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ExternalLink extends BaseLink {
|
|
23
|
+
type: "external"
|
|
24
|
+
target?: Target
|
|
25
|
+
rel?: Rel
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface EmailLink extends BaseLink {
|
|
29
|
+
type: "email"
|
|
30
|
+
target?: Target
|
|
31
|
+
email?: string
|
|
32
|
+
subject?: string
|
|
33
|
+
body?: string
|
|
34
|
+
cc?: string
|
|
35
|
+
bcc?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface StoryLink extends BaseLink {
|
|
39
|
+
type: "internal"
|
|
40
|
+
target?: Target
|
|
41
|
+
suffix?: string
|
|
42
|
+
story?: {
|
|
43
|
+
name: string
|
|
44
|
+
published_at: string | null
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type Link = AssetLink | ExternalLink | EmailLink | StoryLink
|
package/packages/plans/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Types, Type, Floor, PlotDimension, Room, UUID } from './types.js'
|