@fiction/types 1.0.48 → 1.0.50
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/accounts.d.ts +0 -69
- package/dist/accounts.d.ts.map +1 -1
- package/dist/accounts.js +3 -69
- package/dist/accounts.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/accounts.d.ts
CHANGED
|
@@ -33,73 +33,4 @@ export declare const SocialAccountsSchema: z.ZodPipe<z.ZodTransform<unknown, unk
|
|
|
33
33
|
}, z.core.$strip>>>;
|
|
34
34
|
export type SocialAccount = z.infer<typeof SocialAccountSchema>;
|
|
35
35
|
export type SocialAccounts = z.infer<typeof SocialAccountsSchema>;
|
|
36
|
-
export declare const SOCIAL_PLATFORMS: {
|
|
37
|
-
readonly linkedin: {
|
|
38
|
-
readonly label: "LinkedIn";
|
|
39
|
-
readonly icon: "i-simple-icons-linkedin";
|
|
40
|
-
readonly placeholder: "john-smith";
|
|
41
|
-
readonly getUrl: (handle: string) => string;
|
|
42
|
-
};
|
|
43
|
-
readonly x: {
|
|
44
|
-
readonly label: "X";
|
|
45
|
-
readonly icon: "i-simple-icons-x";
|
|
46
|
-
readonly placeholder: "johnsmith";
|
|
47
|
-
readonly getUrl: (handle: string) => string;
|
|
48
|
-
};
|
|
49
|
-
readonly facebook: {
|
|
50
|
-
readonly label: "Facebook";
|
|
51
|
-
readonly icon: "i-simple-icons-facebook";
|
|
52
|
-
readonly placeholder: "johnsmith";
|
|
53
|
-
readonly getUrl: (handle: string) => string;
|
|
54
|
-
};
|
|
55
|
-
readonly tiktok: {
|
|
56
|
-
readonly label: "TikTok";
|
|
57
|
-
readonly icon: "i-simple-icons-tiktok";
|
|
58
|
-
readonly placeholder: "johnsmith";
|
|
59
|
-
readonly getUrl: (handle: string) => string;
|
|
60
|
-
};
|
|
61
|
-
readonly youtube: {
|
|
62
|
-
readonly label: "YouTube";
|
|
63
|
-
readonly icon: "i-tabler-brand-youtube";
|
|
64
|
-
readonly placeholder: "johnsmith";
|
|
65
|
-
readonly getUrl: (handle: string) => string;
|
|
66
|
-
};
|
|
67
|
-
readonly github: {
|
|
68
|
-
readonly label: "GitHub";
|
|
69
|
-
readonly icon: "i-tabler-brand-github";
|
|
70
|
-
readonly placeholder: "johnsmith";
|
|
71
|
-
readonly getUrl: (handle: string) => string;
|
|
72
|
-
};
|
|
73
|
-
readonly instagram: {
|
|
74
|
-
readonly label: "Instagram";
|
|
75
|
-
readonly icon: "i-simple-icons-instagram";
|
|
76
|
-
readonly placeholder: "johnsmith";
|
|
77
|
-
readonly getUrl: (handle: string) => string;
|
|
78
|
-
};
|
|
79
|
-
readonly threads: {
|
|
80
|
-
readonly label: "Threads";
|
|
81
|
-
readonly icon: "i-simple-icons-threads";
|
|
82
|
-
readonly placeholder: "johnsmith";
|
|
83
|
-
readonly getUrl: (handle: string) => string;
|
|
84
|
-
};
|
|
85
|
-
readonly email: {
|
|
86
|
-
readonly label: "Email";
|
|
87
|
-
readonly icon: "i-tabler-mail";
|
|
88
|
-
readonly placeholder: "hello@example.com";
|
|
89
|
-
readonly getUrl: (handle: string) => string;
|
|
90
|
-
};
|
|
91
|
-
readonly phone: {
|
|
92
|
-
readonly label: "Phone";
|
|
93
|
-
readonly icon: "i-tabler-phone";
|
|
94
|
-
readonly placeholder: "+1-555-123-4567";
|
|
95
|
-
readonly getUrl: (handle: string) => string;
|
|
96
|
-
};
|
|
97
|
-
readonly website: {
|
|
98
|
-
readonly label: "Website";
|
|
99
|
-
readonly icon: "i-tabler-world";
|
|
100
|
-
readonly placeholder: "https://example.com";
|
|
101
|
-
readonly getUrl: (handle: string) => string;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
export type SocialPlatform = keyof typeof SOCIAL_PLATFORMS;
|
|
105
36
|
//# sourceMappingURL=accounts.d.ts.map
|
package/dist/accounts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAG9B,CAAA;AAGF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;mBAUhC,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAG9B,CAAA;AAGF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;mBAUhC,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC/D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
package/dist/accounts.js
CHANGED
|
@@ -11,73 +11,7 @@ export const SocialAccountsSchema = z.preprocess((val) => {
|
|
|
11
11
|
// Filter out items missing platform or handle
|
|
12
12
|
return val.filter(item => item && typeof item === 'object' && item.platform && item.handle);
|
|
13
13
|
}, z.array(SocialAccountSchema));
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
label: 'LinkedIn',
|
|
18
|
-
icon: 'i-simple-icons-linkedin',
|
|
19
|
-
placeholder: 'john-smith',
|
|
20
|
-
getUrl: (handle) => `https://linkedin.com/in/${handle}`,
|
|
21
|
-
},
|
|
22
|
-
x: {
|
|
23
|
-
label: 'X',
|
|
24
|
-
icon: 'i-simple-icons-x',
|
|
25
|
-
placeholder: 'johnsmith',
|
|
26
|
-
getUrl: (handle) => `https://x.com/${handle}`,
|
|
27
|
-
},
|
|
28
|
-
facebook: {
|
|
29
|
-
label: 'Facebook',
|
|
30
|
-
icon: 'i-simple-icons-facebook',
|
|
31
|
-
placeholder: 'johnsmith',
|
|
32
|
-
getUrl: (handle) => `https://facebook.com/${handle}`,
|
|
33
|
-
},
|
|
34
|
-
tiktok: {
|
|
35
|
-
label: 'TikTok',
|
|
36
|
-
icon: 'i-simple-icons-tiktok',
|
|
37
|
-
placeholder: 'johnsmith',
|
|
38
|
-
getUrl: (handle) => `https://tiktok.com/@${handle}`,
|
|
39
|
-
},
|
|
40
|
-
youtube: {
|
|
41
|
-
label: 'YouTube',
|
|
42
|
-
icon: 'i-tabler-brand-youtube',
|
|
43
|
-
placeholder: 'johnsmith',
|
|
44
|
-
getUrl: (handle) => `https://youtube.com/@${handle}`,
|
|
45
|
-
},
|
|
46
|
-
github: {
|
|
47
|
-
label: 'GitHub',
|
|
48
|
-
icon: 'i-tabler-brand-github',
|
|
49
|
-
placeholder: 'johnsmith',
|
|
50
|
-
getUrl: (handle) => `https://github.com/${handle}`,
|
|
51
|
-
},
|
|
52
|
-
instagram: {
|
|
53
|
-
label: 'Instagram',
|
|
54
|
-
icon: 'i-simple-icons-instagram',
|
|
55
|
-
placeholder: 'johnsmith',
|
|
56
|
-
getUrl: (handle) => `https://instagram.com/${handle}`,
|
|
57
|
-
},
|
|
58
|
-
threads: {
|
|
59
|
-
label: 'Threads',
|
|
60
|
-
icon: 'i-simple-icons-threads',
|
|
61
|
-
placeholder: 'johnsmith',
|
|
62
|
-
getUrl: (handle) => `https://threads.net/@${handle}`,
|
|
63
|
-
},
|
|
64
|
-
email: {
|
|
65
|
-
label: 'Email',
|
|
66
|
-
icon: 'i-tabler-mail',
|
|
67
|
-
placeholder: 'hello@example.com',
|
|
68
|
-
getUrl: (handle) => `mailto:${handle}`,
|
|
69
|
-
},
|
|
70
|
-
phone: {
|
|
71
|
-
label: 'Phone',
|
|
72
|
-
icon: 'i-tabler-phone',
|
|
73
|
-
placeholder: '+1-555-123-4567',
|
|
74
|
-
getUrl: (handle) => `tel:${handle.replace(/[^0-9+]/g, '')}`,
|
|
75
|
-
},
|
|
76
|
-
website: {
|
|
77
|
-
label: 'Website',
|
|
78
|
-
icon: 'i-tabler-world',
|
|
79
|
-
placeholder: 'https://example.com',
|
|
80
|
-
getUrl: (handle) => handle, // handle IS the URL
|
|
81
|
-
},
|
|
82
|
-
};
|
|
14
|
+
// NOTE: SOCIAL_PLATFORMS constant moved to @fiction/sdk/constants/socialPlatforms.ts
|
|
15
|
+
// This package only contains validation schemas and types
|
|
16
|
+
// Runtime UI metadata (icons, labels, URLs) lives in SDK for better DX
|
|
83
17
|
//# sourceMappingURL=accounts.js.map
|
package/dist/accounts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,iEAAiE;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IACnI,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAEF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,UAAU,CAC9C,CAAC,GAAG,EAAE,EAAE;IACN,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QACrB,OAAO,GAAG,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
export type { ApiResponse } from './api';
|
|
2
|
-
export { SocialAccountSchema, SocialAccountsSchema
|
|
3
|
-
export type { SocialAccount, SocialAccounts
|
|
2
|
+
export { SocialAccountSchema, SocialAccountsSchema } from './accounts';
|
|
3
|
+
export type { SocialAccount, SocialAccounts } from './accounts';
|
|
4
4
|
export { ActionAreaSchema, ActionButtonSchema, ButtonDesignSchema, ButtonThemeSchema } from './actions';
|
|
5
5
|
export type { ActionArea, ActionButton, ButtonDesign, ButtonTheme } from './actions';
|
|
6
6
|
export { NavItemSchema, NavListSchema } from './navItem';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGxC,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGxC,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACtE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAG/D,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AACvG,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEpF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACxD,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACnC,YAAY,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,YAAY,EAAE,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,5 +1,5 @@
|
|
|
1
|
-
// Social accounts
|
|
2
|
-
export { SocialAccountSchema, SocialAccountsSchema
|
|
1
|
+
// Social accounts (schemas and types only - SOCIAL_PLATFORMS moved to @fiction/sdk)
|
|
2
|
+
export { SocialAccountSchema, SocialAccountsSchema } from './accounts';
|
|
3
3
|
// UI types
|
|
4
4
|
export { ActionAreaSchema, ActionButtonSchema, ButtonDesignSchema, ButtonThemeSchema } from './actions';
|
|
5
5
|
export { NavItemSchema, NavListSchema } from './navItem';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,oFAAoF;AACpF,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGtE,WAAW;AACX,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAGvG,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAuBnC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,cAAc;AACd,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,SAAS,CAAA;AAgBhB,aAAa;AACb,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAGvD,aAAa;AACb,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,QAAQ,CAAA"}
|