@founderhq/journeys 1.0.0 → 1.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Astrophage Labs (FounderHQ)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -323,6 +323,16 @@ architecture and security model are documented in
323
323
 
324
324
  ## Release notes
325
325
 
326
+ ### 1.0.2
327
+
328
+ - Icons show again in the timeline, callout, card, metric, table and before-after blocks. From 0.6.0 to 1.0.1 they rendered with no stroke and were invisible.
329
+ - A glow spot (`blobs`) with a percentage `size` stays round: the size is a share of the screen's longer side, as the default `60vmax`. Before, "60%" was 60% of the width and of the height, which cut the glow off at its sides on a phone.
330
+
331
+ ### 1.0.1
332
+
333
+ - The package now ships its MIT licence: a `LICENSE` file and the `license` field.
334
+ - Updated dependencies, among them `motion` 14 and `@lottiefiles/dotlottie-react` 0.21.
335
+
326
336
  ### 0.8.1
327
337
 
328
338
  Native Android hosts can provide measured safe-area insets. The renderer keeps progress, navigation, and overlays clear of system bars on older WebViews while preserving edge-to-edge backgrounds and the existing iOS CSS inset behavior.
@@ -218,6 +218,9 @@ declare type BlobConfig = {
218
218
  b: number;
219
219
  a: number;
220
220
  };
221
+ /** One side of the blob's round glow, e.g. "60vmax" (the default). A
222
+ * percentage is a share of the screen's longer side, so "60%" equals
223
+ * "60vmax". */
221
224
  size?: string;
222
225
  };
223
226
  export { BlobConfig }
@@ -2194,6 +2197,15 @@ declare function resolveJourneyBlobDefaultSize(viewport?: JourneyBlobViewport):
2194
2197
  export { resolveJourneyBlobDefaultSize }
2195
2198
  export { resolveJourneyBlobDefaultSize as resolveJourneyBlobDefaultSize_alias_1 }
2196
2199
 
2200
+ /**
2201
+ * The CSS size of one side of a blob's square box. A blob is a circle, so
2202
+ * a percentage means a share of the screen's longer side, as the default
2203
+ * `60vmax` does. As plain CSS, "60%" would be 60 % of the width AND 60 % of
2204
+ * the height: a tall narrow box on a phone that cuts the round glow off at
2205
+ * its left and right sides.
2206
+ */
2207
+ export declare function resolveJourneyBlobSize(size: string | undefined, viewport?: JourneyBlobViewport): string;
2208
+
2197
2209
  /** Resolve editor font labels to the self-hosted faces shipped by Journeys. */
2198
2210
  declare function resolveJourneyFontFamily(fontFamily: string | undefined): string | undefined;
2199
2211
  export { resolveJourneyFontFamily }
@@ -218,6 +218,9 @@ declare type BlobConfig = {
218
218
  b: number;
219
219
  a: number;
220
220
  };
221
+ /** One side of the blob's round glow, e.g. "60vmax" (the default). A
222
+ * percentage is a share of the screen's longer side, so "60%" equals
223
+ * "60vmax". */
221
224
  size?: string;
222
225
  };
223
226
  export { BlobConfig }
@@ -2194,6 +2197,15 @@ declare function resolveJourneyBlobDefaultSize(viewport?: JourneyBlobViewport):
2194
2197
  export { resolveJourneyBlobDefaultSize }
2195
2198
  export { resolveJourneyBlobDefaultSize as resolveJourneyBlobDefaultSize_alias_1 }
2196
2199
 
2200
+ /**
2201
+ * The CSS size of one side of a blob's square box. A blob is a circle, so
2202
+ * a percentage means a share of the screen's longer side, as the default
2203
+ * `60vmax` does. As plain CSS, "60%" would be 60 % of the width AND 60 % of
2204
+ * the height: a tall narrow box on a phone that cuts the round glow off at
2205
+ * its left and right sides.
2206
+ */
2207
+ export declare function resolveJourneyBlobSize(size: string | undefined, viewport?: JourneyBlobViewport): string;
2208
+
2197
2209
  /** Resolve editor font labels to the self-hosted faces shipped by Journeys. */
2198
2210
  declare function resolveJourneyFontFamily(fontFamily: string | undefined): string | undefined;
2199
2211
  export { resolveJourneyFontFamily }
package/dist/index.cjs CHANGED
@@ -71,8 +71,13 @@ var __objRest = (source, exclude) => {
71
71
  }
72
72
  return target;
73
73
  };
74
- var __esm = (fn, res) => function __init() {
75
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
74
+ var __esm = (fn, res, err) => function __init() {
75
+ if (err) throw err[0];
76
+ try {
77
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
78
+ } catch (e) {
79
+ throw err = [e], e;
80
+ }
76
81
  };
77
82
  var __export = (target, all) => {
78
83
  for (var name in all)
@@ -5818,7 +5823,16 @@ function DynamicIcon({
5818
5823
  }) {
5819
5824
  const Icon = lucideIcons5[name];
5820
5825
  if (isLucideIcon(Icon)) {
5821
- return /* @__PURE__ */ jsxRuntime.jsx(Icon, { size, className, style, stroke, children });
5826
+ return /* @__PURE__ */ jsxRuntime.jsx(
5827
+ Icon,
5828
+ __spreadProps(__spreadValues({
5829
+ size,
5830
+ className,
5831
+ style
5832
+ }, stroke ? { stroke } : {}), {
5833
+ children
5834
+ })
5835
+ );
5822
5836
  }
5823
5837
  return /* @__PURE__ */ jsxRuntime.jsx(
5824
5838
  "span",
@@ -12078,6 +12092,15 @@ function resolveJourneyBlobDefaultSize(viewport) {
12078
12092
  if (!viewport) return "60vmax";
12079
12093
  return `${Math.max(viewport.width, viewport.height) * 0.6}px`;
12080
12094
  }
12095
+ var PERCENT_SIZE = /^\s*(\d+(?:\.\d+)?)\s*%\s*$/;
12096
+ function resolveJourneyBlobSize(size, viewport) {
12097
+ if (size === void 0) return resolveJourneyBlobDefaultSize(viewport);
12098
+ const percent = PERCENT_SIZE.exec(size);
12099
+ if (!percent) return size;
12100
+ const share = Number(percent[1]);
12101
+ if (!viewport) return `${share}vmax`;
12102
+ return `${Math.max(viewport.width, viewport.height) * share / 100}px`;
12103
+ }
12081
12104
  var BLOB_POSITIONS = [
12082
12105
  [
12083
12106
  { x: "-5%", y: "-10%" },
@@ -12127,12 +12150,12 @@ function themedBlobGradient(peakAlpha) {
12127
12150
  function colorKey(c) {
12128
12151
  return `${c.r}-${c.g}-${c.b}-${c.a}`;
12129
12152
  }
12130
- function resolveBlobVisual(config, index, defaultSize) {
12131
- var _a, _b;
12153
+ function resolveBlobVisual(config, index, viewport) {
12154
+ var _a;
12132
12155
  const color = config == null ? void 0 : config.color;
12133
12156
  return {
12134
12157
  position: (_a = config == null ? void 0 : config.position) != null ? _a : { x: "50%", y: "50%" },
12135
- size: (_b = config == null ? void 0 : config.size) != null ? _b : defaultSize,
12158
+ size: resolveJourneyBlobSize(config == null ? void 0 : config.size, viewport),
12136
12159
  background: color ? blobGradient(color) : themedBlobGradient(BLOB_PEAK_ALPHAS[index % BLOB_PEAK_ALPHAS.length]),
12137
12160
  fadeKey: color ? colorKey(color) : `themed-${index % BLOB_PEAK_ALPHAS.length}`
12138
12161
  };
@@ -12141,12 +12164,12 @@ function AnimatedBlob({
12141
12164
  config,
12142
12165
  index,
12143
12166
  visible,
12144
- defaultSize
12167
+ viewport
12145
12168
  }) {
12146
12169
  const { position, size, background, fadeKey } = resolveBlobVisual(
12147
12170
  config,
12148
12171
  index,
12149
- defaultSize
12172
+ viewport
12150
12173
  );
12151
12174
  return /* @__PURE__ */ jsxRuntime.jsx(
12152
12175
  react.m.div,
@@ -12180,12 +12203,12 @@ function AnimatedBlob({
12180
12203
  function StaticBlob({
12181
12204
  config,
12182
12205
  index,
12183
- defaultSize
12206
+ viewport
12184
12207
  }) {
12185
12208
  const { position, size, background } = resolveBlobVisual(
12186
12209
  config,
12187
12210
  index,
12188
- defaultSize
12211
+ viewport
12189
12212
  );
12190
12213
  return /* @__PURE__ */ jsxRuntime.jsx(
12191
12214
  "div",
@@ -12219,10 +12242,8 @@ function JourneyBlobLayer({
12219
12242
  theme,
12220
12243
  themeVariables
12221
12244
  }) {
12222
- const defaultSize = resolveJourneyBlobDefaultSize(viewport);
12223
12245
  const blobConfigs = blobs ? blobs : showRandomBlobs ? BLOB_POSITIONS[stepIndex % BLOB_POSITIONS.length].map((position) => ({
12224
- position,
12225
- size: defaultSize
12246
+ position
12226
12247
  })) : [];
12227
12248
  const themeStyle = themeVariables ? Object.fromEntries(
12228
12249
  Object.entries(themeVariables).filter(([key]) => key.startsWith("--"))
@@ -12238,7 +12259,7 @@ function JourneyBlobLayer({
12238
12259
  {
12239
12260
  config: blobConfigs[index],
12240
12261
  index,
12241
- defaultSize
12262
+ viewport
12242
12263
  },
12243
12264
  slot
12244
12265
  )) : BLOB_SLOTS.map((slot, index) => {
@@ -12249,7 +12270,7 @@ function JourneyBlobLayer({
12249
12270
  config: (_a = blobConfigs[index]) != null ? _a : null,
12250
12271
  index,
12251
12272
  visible: index < blobConfigs.length,
12252
- defaultSize
12273
+ viewport
12253
12274
  },
12254
12275
  slot
12255
12276
  );
@@ -12824,7 +12845,7 @@ function useJourneyConfig({
12824
12845
 
12825
12846
  // src/engine/journey-capture.ts
12826
12847
  var JOURNEY_LIBRARY_NAME = "@founderhq/journeys";
12827
- var JOURNEY_LIBRARY_VERSION = "1.0.0";
12848
+ var JOURNEY_LIBRARY_VERSION = "1.0.2";
12828
12849
  var DEFAULT_QUEUE_TTL_MS = 24 * 60 * 60 * 1e3;
12829
12850
  var MAX_QUEUED_CAPTURE_EVENTS = 100;
12830
12851
  var MAX_BEACON_BYTES = 60 * 1024;
package/dist/index.js CHANGED
@@ -3711,7 +3711,16 @@ function DynamicIcon({
3711
3711
  }) {
3712
3712
  const Icon = lucideIcons5[name];
3713
3713
  if (isLucideIcon(Icon)) {
3714
- return /* @__PURE__ */ jsx(Icon, { size, className, style, stroke, children });
3714
+ return /* @__PURE__ */ jsx(
3715
+ Icon,
3716
+ __spreadProps(__spreadValues({
3717
+ size,
3718
+ className,
3719
+ style
3720
+ }, stroke ? { stroke } : {}), {
3721
+ children
3722
+ })
3723
+ );
3715
3724
  }
3716
3725
  return /* @__PURE__ */ jsx(
3717
3726
  "span",
@@ -9971,6 +9980,15 @@ function resolveJourneyBlobDefaultSize(viewport) {
9971
9980
  if (!viewport) return "60vmax";
9972
9981
  return `${Math.max(viewport.width, viewport.height) * 0.6}px`;
9973
9982
  }
9983
+ var PERCENT_SIZE = /^\s*(\d+(?:\.\d+)?)\s*%\s*$/;
9984
+ function resolveJourneyBlobSize(size, viewport) {
9985
+ if (size === void 0) return resolveJourneyBlobDefaultSize(viewport);
9986
+ const percent = PERCENT_SIZE.exec(size);
9987
+ if (!percent) return size;
9988
+ const share = Number(percent[1]);
9989
+ if (!viewport) return `${share}vmax`;
9990
+ return `${Math.max(viewport.width, viewport.height) * share / 100}px`;
9991
+ }
9974
9992
  var BLOB_POSITIONS = [
9975
9993
  [
9976
9994
  { x: "-5%", y: "-10%" },
@@ -10020,12 +10038,12 @@ function themedBlobGradient(peakAlpha) {
10020
10038
  function colorKey(c) {
10021
10039
  return `${c.r}-${c.g}-${c.b}-${c.a}`;
10022
10040
  }
10023
- function resolveBlobVisual(config, index, defaultSize) {
10024
- var _a, _b;
10041
+ function resolveBlobVisual(config, index, viewport) {
10042
+ var _a;
10025
10043
  const color = config == null ? void 0 : config.color;
10026
10044
  return {
10027
10045
  position: (_a = config == null ? void 0 : config.position) != null ? _a : { x: "50%", y: "50%" },
10028
- size: (_b = config == null ? void 0 : config.size) != null ? _b : defaultSize,
10046
+ size: resolveJourneyBlobSize(config == null ? void 0 : config.size, viewport),
10029
10047
  background: color ? blobGradient(color) : themedBlobGradient(BLOB_PEAK_ALPHAS[index % BLOB_PEAK_ALPHAS.length]),
10030
10048
  fadeKey: color ? colorKey(color) : `themed-${index % BLOB_PEAK_ALPHAS.length}`
10031
10049
  };
@@ -10034,12 +10052,12 @@ function AnimatedBlob({
10034
10052
  config,
10035
10053
  index,
10036
10054
  visible,
10037
- defaultSize
10055
+ viewport
10038
10056
  }) {
10039
10057
  const { position, size, background, fadeKey } = resolveBlobVisual(
10040
10058
  config,
10041
10059
  index,
10042
- defaultSize
10060
+ viewport
10043
10061
  );
10044
10062
  return /* @__PURE__ */ jsx(
10045
10063
  m.div,
@@ -10073,12 +10091,12 @@ function AnimatedBlob({
10073
10091
  function StaticBlob({
10074
10092
  config,
10075
10093
  index,
10076
- defaultSize
10094
+ viewport
10077
10095
  }) {
10078
10096
  const { position, size, background } = resolveBlobVisual(
10079
10097
  config,
10080
10098
  index,
10081
- defaultSize
10099
+ viewport
10082
10100
  );
10083
10101
  return /* @__PURE__ */ jsx(
10084
10102
  "div",
@@ -10112,10 +10130,8 @@ function JourneyBlobLayer({
10112
10130
  theme,
10113
10131
  themeVariables
10114
10132
  }) {
10115
- const defaultSize = resolveJourneyBlobDefaultSize(viewport);
10116
10133
  const blobConfigs = blobs ? blobs : showRandomBlobs ? BLOB_POSITIONS[stepIndex % BLOB_POSITIONS.length].map((position) => ({
10117
- position,
10118
- size: defaultSize
10134
+ position
10119
10135
  })) : [];
10120
10136
  const themeStyle = themeVariables ? Object.fromEntries(
10121
10137
  Object.entries(themeVariables).filter(([key]) => key.startsWith("--"))
@@ -10131,7 +10147,7 @@ function JourneyBlobLayer({
10131
10147
  {
10132
10148
  config: blobConfigs[index],
10133
10149
  index,
10134
- defaultSize
10150
+ viewport
10135
10151
  },
10136
10152
  slot
10137
10153
  )) : BLOB_SLOTS.map((slot, index) => {
@@ -10142,7 +10158,7 @@ function JourneyBlobLayer({
10142
10158
  config: (_a = blobConfigs[index]) != null ? _a : null,
10143
10159
  index,
10144
10160
  visible: index < blobConfigs.length,
10145
- defaultSize
10161
+ viewport
10146
10162
  },
10147
10163
  slot
10148
10164
  );
@@ -10717,7 +10733,7 @@ function useJourneyConfig({
10717
10733
 
10718
10734
  // src/engine/journey-capture.ts
10719
10735
  var JOURNEY_LIBRARY_NAME = "@founderhq/journeys";
10720
- var JOURNEY_LIBRARY_VERSION = "1.0.0";
10736
+ var JOURNEY_LIBRARY_VERSION = "1.0.2";
10721
10737
  var DEFAULT_QUEUE_TTL_MS = 24 * 60 * 60 * 1e3;
10722
10738
  var MAX_QUEUED_CAPTURE_EVENTS = 100;
10723
10739
  var MAX_BEACON_BYTES = 60 * 1024;