@charisol/plexo-sdk 1.1.13 → 1.1.15

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.
Files changed (53) hide show
  1. package/dist/{compiler-BgBUwMe0.js → compiler-TjBEKCfw.js} +116 -146
  2. package/dist/compiler.js +1 -1
  3. package/dist/compilerClient.js +94 -72
  4. package/dist/components/icons.d.ts +65 -66
  5. package/dist/{iconSvgStatic-D5PrYZfC.js → iconSvgStatic-CA1z-vnh.js} +251 -149
  6. package/dist/index.js +4963 -4954
  7. package/dist/social-icons/applemusic.png +0 -0
  8. package/dist/social-icons/applepodcasts.png +0 -0
  9. package/dist/social-icons/behance.png +0 -0
  10. package/dist/social-icons/bluesky.png +0 -0
  11. package/dist/social-icons/buymeacoffee.png +0 -0
  12. package/dist/social-icons/clubhouse.png +0 -0
  13. package/dist/social-icons/discord.png +0 -0
  14. package/dist/social-icons/dribbble.png +0 -0
  15. package/dist/social-icons/facebook.png +0 -0
  16. package/dist/social-icons/fallback.png +0 -0
  17. package/dist/social-icons/goodreads.png +0 -0
  18. package/dist/social-icons/instagram.png +0 -0
  19. package/dist/social-icons/kakaotalk.png +0 -0
  20. package/dist/social-icons/kofi.png +0 -0
  21. package/dist/social-icons/line.png +0 -0
  22. package/dist/social-icons/linkedin.png +0 -0
  23. package/dist/social-icons/mastodon.png +0 -0
  24. package/dist/social-icons/messenger.png +0 -0
  25. package/dist/social-icons/patreon.png +0 -0
  26. package/dist/social-icons/pinterest.png +0 -0
  27. package/dist/social-icons/producthunt.png +0 -0
  28. package/dist/social-icons/quora.png +0 -0
  29. package/dist/social-icons/reddit.png +0 -0
  30. package/dist/social-icons/signal.png +0 -0
  31. package/dist/social-icons/snapchat.png +0 -0
  32. package/dist/social-icons/soundcloud.png +0 -0
  33. package/dist/social-icons/spotify.png +0 -0
  34. package/dist/social-icons/substack.png +0 -0
  35. package/dist/social-icons/telegram.png +0 -0
  36. package/dist/social-icons/threads.png +0 -0
  37. package/dist/social-icons/tiktok.png +0 -0
  38. package/dist/social-icons/tripadvisor.png +0 -0
  39. package/dist/social-icons/tumblr.png +0 -0
  40. package/dist/social-icons/twitch.png +0 -0
  41. package/dist/social-icons/viber.png +0 -0
  42. package/dist/social-icons/vimeo.png +0 -0
  43. package/dist/social-icons/vk.png +0 -0
  44. package/dist/social-icons/wechat.png +0 -0
  45. package/dist/social-icons/whatsapp.png +0 -0
  46. package/dist/social-icons/x.png +0 -0
  47. package/dist/social-icons/yelp.png +0 -0
  48. package/dist/social-icons/youtube.png +0 -0
  49. package/dist/utilities/elementResolvers.d.ts +16 -4
  50. package/dist/utilities/playground.constants.d.ts +1 -0
  51. package/dist/utilities/socialBrandIcons.d.ts +9 -6
  52. package/dist/utilities/strataTokenMapping.d.ts +1 -1
  53. package/package.json +6 -3
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -29,11 +29,23 @@ export interface ResolvedSocialLink {
29
29
  /**
30
30
  * Mirrors SortableElement.tsx's `elem.type === 'social'` block (per-link color/background/size
31
31
  * fall back to the element's own style, then a fixed default) -- except when the element's
32
- * `colorMode` attribute is 'branded', in which case every link's icon renders in that
33
- * provider's own official brand color on a transparent background, and any stored per-link or
34
- * element-level custom color/background is ignored rather than merely defaulted-around.
32
+ * `colorMode` attribute is 'branded' (a user's own choice, landing-page/canvas only), in which
33
+ * case every link's icon renders in that provider's own official brand color on a transparent
34
+ * background, and any stored per-link or element-level custom color/background is ignored
35
+ * rather than merely defaulted-around.
36
+ *
37
+ * `forceBrandedColor` is a second, independent way to get the branded icon color -- for an
38
+ * email-mode template, where compilerClient.ts's actual compiled output always uses the real
39
+ * brand-color PNG regardless of this attribute (Gmail supports neither inline <svg> nor any
40
+ * data:-URI image, so a custom icon color could never actually reach the inbox -- see that
41
+ * file's header comment). Passing it keeps the canvas/live-preview color in agreement with what
42
+ * will actually be sent, without the `colorMode: 'branded'` attribute's other effect (forcing a
43
+ * transparent background) -- an email badge's background is real CSS on its wrapping element,
44
+ * never baked into the image, so it stays fully customizable independent of the icon color.
35
45
  */
36
- export declare function resolveSocialLinks(elem: ElementJSON): ResolvedSocialLink[];
46
+ export declare function resolveSocialLinks(elem: ElementJSON, options?: {
47
+ forceBrandedColor?: boolean;
48
+ }): ResolvedSocialLink[];
37
49
  export interface ResolvedMenuLink {
38
50
  label: string;
39
51
  href: string;
@@ -11,6 +11,7 @@ export declare const CUSTOM_DEVICE_PRESETS: Array<{
11
11
  category: 'desktop' | 'tablet' | 'mobile';
12
12
  }>;
13
13
  export declare const LAPTOP_BASELINE_WIDTH = 1280;
14
+ /** Derived from SOCIAL_BRAND_ICONS (single source of truth) rather than duplicated here, so the icon picker's list and label always match whatever providers are actually renderable. */
14
15
  export declare const SOCIAL_OPTIONS: Array<{
15
16
  id: string;
16
17
  label: string;
@@ -1,15 +1,18 @@
1
1
  export interface SocialBrandIcon {
2
- /** SVG path data on a 24x24 viewBox, matching the hand-rolled glyphs this replaces. */
2
+ /** SVG path data on a 24x24 viewBox. */
3
3
  path: string;
4
4
  /** Official brand color as a `#rrggbb` hex string. */
5
5
  color: string;
6
+ /** Human-readable display name for icon pickers. */
7
+ label: string;
6
8
  }
7
9
  /**
8
- * The fixed provider set the social block supports as a real icon (playground.constants.ts's
9
- * SOCIAL_OPTIONS), each mapped to its actual brand mark and current official brand color --
10
- * shared by icons.tsx (canvas/builder UI) and elementResolvers.ts (compiler.ts/compilerClient.ts's
11
- * publish-time string rendering) so every render path draws the same shape, whether tinted to a
12
- * user's custom color or locked to the provider's own branded color.
10
+ * The full picker set (playground.constants.ts's SOCIAL_OPTIONS derives its labels from this),
11
+ * each mapped to its actual brand mark and current official brand color -- shared by icons.tsx
12
+ * (canvas/builder UI), elementResolvers.ts (compiler.ts/compilerClient.ts's publish-time
13
+ * rendering), and scripts/generate-social-icon-pngs.ts (the static PNGs compilerClient.ts's
14
+ * email target serves from jsDelivr, since Gmail supports neither inline <svg> nor any
15
+ * data:-URI image regardless of format -- see that script's own header comment).
13
16
  */
14
17
  export declare const SOCIAL_BRAND_ICONS: Record<string, SocialBrandIcon>;
15
18
  /** A generic dot, matching the existing fallback for a provider outside the fixed set above. */
@@ -38,5 +38,5 @@ export declare const resolveTokenValue: (value: string | undefined, tokenMapping
38
38
  /**
39
39
  * Create a swatch display for token values
40
40
  */
41
- export declare const createTokenSwatch: (token: StrataToken, className?: string) => string;
41
+ export declare const createTokenSwatch: (token: StrataToken, _className?: string) => string;
42
42
  export declare function fetchAndInitStrataTokens(projectId: string, setStrataTokens: (tokens: any[]) => void): Promise<boolean>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.1.13",
4
+ "version": "1.1.15",
5
5
  "description": "Plexo visual email and landing page builder SDK — drag-and-drop template editor with AI integration.",
6
6
  "keywords": [
7
7
  "email-builder",
@@ -50,7 +50,8 @@
50
50
  "test": "vitest run",
51
51
  "build": "vite build && tsc -p tsconfig.lib.json",
52
52
  "lint": "oxlint",
53
- "preview": "vite preview"
53
+ "preview": "vite preview",
54
+ "generate:social-icon-pngs": "tsx scripts/generate-social-icon-pngs.ts"
54
55
  },
55
56
  "dependencies": {
56
57
  "@dnd-kit/core": "^6.3.1",
@@ -61,7 +62,6 @@
61
62
  "lucide-static": "^1.25.0",
62
63
  "react": "^19.2.7",
63
64
  "react-dom": "^19.2.7",
64
- "simple-icons": "^16.28.0",
65
65
  "zod": "^4.4.3",
66
66
  "zustand": "^5.0.14"
67
67
  },
@@ -77,7 +77,10 @@
77
77
  "oxlint": "^1.71.0",
78
78
  "postcss": "^8.5.19",
79
79
  "postcss-prefix-selector": "^2.1.1",
80
+ "sharp": "^0.34.5",
81
+ "simple-icons": "^16.28.0",
80
82
  "tailwindcss": "^4.3.3",
83
+ "tsx": "^4.20.6",
81
84
  "typescript": "~6.0.2",
82
85
  "vite": "^8.1.1",
83
86
  "vitest": "^4.1.10"