@octaviaflow/type 1.0.0 → 2.0.0

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 (4) hide show
  1. package/es/index.js +252 -318
  2. package/lib/index.js +252 -318
  3. package/package.json +9 -12
  4. package/umd/index.js +252 -318
package/es/index.js CHANGED
@@ -1,17 +1,6 @@
1
1
  import { px, baseFontSize, rem, breakpoint, breakpoints } from '@octaviaflow/layout';
2
2
 
3
- /**
4
- * Copyright OctaviaFlow
5
- * Author: Vishal Kumar
6
- * Created: 11/November/2025
7
- *
8
- * This source code is licensed under the Apache-2.0 license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
-
12
- // Font family fallbacks for: IBM Plex Mono, IBM Plex Sans, IBM Plex Sans
13
- // Condensed, IBM Plex Sans Hebrew, and IBM Plex Serif
14
- var fontFamilies = {
3
+ const fontFamilies = {
15
4
  mono: "'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",
16
5
  sans: "'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif",
17
6
  sansCondensed: "'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif",
@@ -20,66 +9,49 @@ var fontFamilies = {
20
9
  };
21
10
  function fontFamily(name) {
22
11
  if (!fontFamilies[name]) {
23
- throw new Error("Unable to find font family: `".concat(name, "`. Expected one of: ") + "[".concat(Object.keys(fontFamilies).join(', '), "]"));
12
+ throw new Error(
13
+ `Unable to find font family: \`${name}\`. Expected one of: [${Object.keys(fontFamilies).join(", ")}]`
14
+ );
24
15
  }
25
16
  return {
26
17
  fontFamily: fontFamilies[name]
27
18
  };
28
19
  }
29
20
 
30
- /**
31
- * Copyright OctaviaFlow
32
- * Author: Vishal Kumar
33
- * Created: 11/November/2025
34
- *
35
- * This source code is licensed under the Apache-2.0 license found in the
36
- * LICENSE file in the root directory of this source tree.
37
- */
38
-
39
- var fontWeights = {
21
+ const fontWeights = {
40
22
  light: 300,
41
23
  regular: 400,
42
24
  semibold: 600
43
25
  };
44
26
  function fontWeight(weight) {
45
27
  if (!fontWeights[weight]) {
46
- throw new Error("Unable to find font weight: `".concat(weight, "`. Expected one of: ") + "[".concat(Object.keys(fontWeights).join(', '), "]"));
28
+ throw new Error(
29
+ `Unable to find font weight: \`${weight}\`. Expected one of: [${Object.keys(fontWeights).join(", ")}]`
30
+ );
47
31
  }
48
32
  return {
49
33
  fontWeight: fontWeights[weight]
50
34
  };
51
35
  }
52
36
 
53
- /**
54
- * Copyright OctaviaFlow
55
- * Author: Vishal Kumar
56
- * Created: 11/November/2025
57
- *
58
- * This source code is licensed under the Apache-2.0 license found in the
59
- * LICENSE file in the root directory of this source tree.
60
- */
61
-
62
37
  function print(block) {
63
- return Object.keys(block).reduce(function (acc, key, index) {
64
- // Short-circuit on the foreign key 'breakpoints'. This is used in our
65
- // tokens for fluid type and should not be printed. In the future, we should
66
- // tie this to media query outputs.
67
- if (key === 'breakpoints') {
38
+ return Object.keys(block).reduce((acc, key, index) => {
39
+ if (key === "breakpoints") {
68
40
  return acc;
69
41
  }
70
- var property = "".concat(paramCase(key), ": ").concat(block[key], ";");
42
+ const property = `${paramCase(key)}: ${block[key]};`;
71
43
  if (index === 0) {
72
44
  return property;
73
45
  }
74
- return acc + '\n' + property;
75
- }, '');
46
+ return acc + "\n" + property;
47
+ }, "");
76
48
  }
77
49
  function paramCase(string) {
78
- var result = '';
79
- for (var i = 0; i < string.length; i++) {
80
- var character = string[i];
50
+ let result = "";
51
+ for (let i = 0; i < string.length; i++) {
52
+ const character = string[i];
81
53
  if (character === character.toUpperCase()) {
82
- result += '-' + character.toLowerCase();
54
+ result += "-" + character.toLowerCase();
83
55
  continue;
84
56
  }
85
57
  result += character;
@@ -87,24 +59,16 @@ function paramCase(string) {
87
59
  return result;
88
60
  }
89
61
 
90
- /**
91
- * Copyright OctaviaFlow
92
- * Author: Vishal Kumar
93
- * Created: 11/November/2025
94
- *
95
- * This source code is licensed under the Apache-2.0 license found in the
96
- * LICENSE file in the root directory of this source tree.
97
- */
98
- var reset = {
62
+ const reset = {
99
63
  html: {
100
64
  fontSize: px(baseFontSize)
101
65
  },
102
66
  body: {
103
67
  fontFamily: fontFamilies.sans,
104
68
  fontWeight: fontWeights.regular,
105
- textRendering: 'optimizeLegibility',
106
- '-webkit-font-smoothing': 'antialiased',
107
- '-moz-osx-font-smoothing': 'grayscale'
69
+ textRendering: "optimizeLegibility",
70
+ "-webkit-font-smoothing": "antialiased",
71
+ "-moz-osx-font-smoothing": "grayscale"
108
72
  },
109
73
  strong: {
110
74
  fontWeight: fontWeights.semibold
@@ -114,242 +78,173 @@ var reset = {
114
78
  }
115
79
  };
116
80
 
117
- /**
118
- * Copyright OctaviaFlow
119
- * Author: Vishal Kumar
120
- * Created: 11/November/2025
121
- *
122
- * This source code is licensed under the Apache-2.0 license found in the
123
- * LICENSE file in the root directory of this source tree.
124
- */
125
-
126
- /**
127
- * Get the type size for the given step
128
- * @param {number} step
129
- * @returns {number}
130
- */
131
81
  function getTypeSize(step) {
132
82
  if (step <= 1) {
133
83
  return 12;
134
84
  }
135
- // Yn = Yn-1 + {FLOOR[(n - 2) / 4] + 1} * 2
136
85
  return getTypeSize(step - 1) + Math.floor((step - 2) / 4 + 1) * 2;
137
86
  }
87
+ const scale = [
88
+ 12,
89
+ 14,
90
+ 16,
91
+ 18,
92
+ 20,
93
+ 24,
94
+ 28,
95
+ 32,
96
+ 36,
97
+ 42,
98
+ 48,
99
+ 54,
100
+ 60,
101
+ 68,
102
+ 76,
103
+ 84,
104
+ 92,
105
+ 102,
106
+ 112,
107
+ 122,
108
+ 132,
109
+ 144,
110
+ 156
111
+ ];
138
112
 
139
- /**
140
- * The default type scale for 23 steps. Inlined as an array here through running
141
- * the follow step:
142
- *
143
- * > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
144
- */
145
- var scale = [12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 54, 60, 68, 76, 84, 92, 102, 112, 122, 132, 144, 156];
146
-
147
- function _defineProperty(e, r, t) {
148
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
149
- value: t,
150
- enumerable: !0,
151
- configurable: !0,
152
- writable: !0
153
- }) : e[r] = t, e;
154
- }
155
- function ownKeys(e, r) {
156
- var t = Object.keys(e);
157
- if (Object.getOwnPropertySymbols) {
158
- var o = Object.getOwnPropertySymbols(e);
159
- r && (o = o.filter(function (r) {
160
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
161
- })), t.push.apply(t, o);
162
- }
163
- return t;
164
- }
165
- function _objectSpread2(e) {
166
- for (var r = 1; r < arguments.length; r++) {
167
- var t = null != arguments[r] ? arguments[r] : {};
168
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
169
- _defineProperty(e, r, t[r]);
170
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
171
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
172
- });
173
- }
174
- return e;
175
- }
176
- function _objectWithoutProperties(e, t) {
177
- if (null == e) return {};
178
- var o,
179
- r,
180
- i = _objectWithoutPropertiesLoose(e, t);
181
- if (Object.getOwnPropertySymbols) {
182
- var n = Object.getOwnPropertySymbols(e);
183
- for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
184
- }
185
- return i;
186
- }
187
- function _objectWithoutPropertiesLoose(r, e) {
188
- if (null == r) return {};
189
- var t = {};
190
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
191
- if (-1 !== e.indexOf(n)) continue;
192
- t[n] = r[n];
193
- }
194
- return t;
195
- }
196
- function _toPrimitive(t, r) {
197
- if ("object" != typeof t || !t) return t;
198
- var e = t[Symbol.toPrimitive];
199
- if (void 0 !== e) {
200
- var i = e.call(t, r || "default");
201
- if ("object" != typeof i) return i;
202
- throw new TypeError("@@toPrimitive must return a primitive value.");
203
- }
204
- return ("string" === r ? String : Number)(t);
205
- }
206
- function _toPropertyKey(t) {
207
- var i = _toPrimitive(t, "string");
208
- return "symbol" == typeof i ? i : i + "";
209
- }
210
- function _typeof(o) {
211
- "@babel/helpers - typeof";
212
-
213
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
214
- return typeof o;
215
- } : function (o) {
216
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
217
- }, _typeof(o);
218
- }
219
-
220
- var caption01$1 = {
113
+ const caption01$1 = {
221
114
  fontSize: rem(scale[0]),
222
115
  fontWeight: fontWeights.regular,
223
116
  lineHeight: 1.33333,
224
117
  letterSpacing: px(0.32)
225
118
  };
226
- var caption02$1 = {
119
+ const caption02$1 = {
227
120
  fontSize: rem(scale[1]),
228
121
  fontWeight: fontWeights.regular,
229
122
  lineHeight: 1.28572,
230
123
  letterSpacing: px(0.32)
231
124
  };
232
- var label01$1 = {
125
+ const label01$1 = {
233
126
  fontSize: rem(scale[0]),
234
127
  fontWeight: fontWeights.regular,
235
128
  lineHeight: 1.33333,
236
129
  letterSpacing: px(0.32)
237
130
  };
238
- var label02$1 = {
131
+ const label02$1 = {
239
132
  fontSize: rem(scale[1]),
240
133
  fontWeight: fontWeights.regular,
241
134
  lineHeight: 1.28572,
242
135
  letterSpacing: px(0.16)
243
136
  };
244
- var helperText01$1 = {
137
+ const helperText01$1 = {
245
138
  fontSize: rem(scale[0]),
246
139
  lineHeight: 1.33333,
247
140
  letterSpacing: px(0.32)
248
141
  };
249
- var helperText02$1 = {
142
+ const helperText02$1 = {
250
143
  fontSize: rem(scale[1]),
251
144
  lineHeight: 1.28572,
252
145
  letterSpacing: px(0.16)
253
146
  };
254
- var bodyShort01$1 = {
147
+ const bodyShort01$1 = {
255
148
  fontSize: rem(scale[1]),
256
149
  fontWeight: fontWeights.regular,
257
150
  lineHeight: 1.28572,
258
151
  letterSpacing: px(0.16)
259
152
  };
260
- var bodyLong01$1 = {
153
+ const bodyLong01$1 = {
261
154
  fontSize: rem(scale[1]),
262
155
  fontWeight: fontWeights.regular,
263
156
  lineHeight: 1.42857,
264
157
  letterSpacing: px(0.16)
265
158
  };
266
- var bodyShort02$1 = {
159
+ const bodyShort02$1 = {
267
160
  fontSize: rem(scale[2]),
268
161
  fontWeight: fontWeights.regular,
269
162
  lineHeight: 1.375,
270
163
  letterSpacing: 0
271
164
  };
272
- var bodyLong02$1 = {
165
+ const bodyLong02$1 = {
273
166
  fontSize: rem(scale[2]),
274
167
  fontWeight: fontWeights.regular,
275
168
  lineHeight: 1.5,
276
169
  letterSpacing: 0
277
170
  };
278
- var code01$1 = {
171
+ const code01$1 = {
279
172
  fontFamily: fontFamilies.mono,
280
173
  fontSize: rem(scale[0]),
281
174
  fontWeight: fontWeights.regular,
282
175
  lineHeight: 1.33333,
283
176
  letterSpacing: px(0.32)
284
177
  };
285
- var code02$1 = {
178
+ const code02$1 = {
286
179
  fontFamily: fontFamilies.mono,
287
180
  fontSize: rem(scale[1]),
288
181
  fontWeight: fontWeights.regular,
289
182
  lineHeight: 1.42857,
290
183
  letterSpacing: px(0.32)
291
184
  };
292
- var heading01$1 = {
185
+ const heading01$1 = {
293
186
  fontSize: rem(scale[1]),
294
187
  fontWeight: fontWeights.semibold,
295
188
  lineHeight: 1.42857,
296
189
  letterSpacing: px(0.16)
297
190
  };
298
- var productiveHeading01$1 = {
191
+ const productiveHeading01$1 = {
299
192
  fontSize: rem(scale[1]),
300
193
  fontWeight: fontWeights.semibold,
301
194
  lineHeight: 1.28572,
302
195
  letterSpacing: px(0.16)
303
196
  };
304
- var heading02$1 = {
197
+ const heading02$1 = {
305
198
  fontSize: rem(scale[2]),
306
199
  fontWeight: fontWeights.semibold,
307
200
  lineHeight: 1.5,
308
201
  letterSpacing: 0
309
202
  };
310
- var productiveHeading02$1 = {
203
+ const productiveHeading02$1 = {
311
204
  fontSize: rem(scale[2]),
312
205
  fontWeight: fontWeights.semibold,
313
206
  lineHeight: 1.375,
314
207
  letterSpacing: 0
315
208
  };
316
- var productiveHeading03$1 = {
209
+ const productiveHeading03$1 = {
317
210
  fontSize: rem(scale[4]),
318
211
  fontWeight: fontWeights.regular,
319
212
  lineHeight: 1.4,
320
213
  letterSpacing: 0
321
214
  };
322
- var productiveHeading04$1 = {
215
+ const productiveHeading04$1 = {
323
216
  fontSize: rem(scale[6]),
324
217
  fontWeight: fontWeights.regular,
325
218
  lineHeight: 1.28572,
326
219
  letterSpacing: 0
327
220
  };
328
- var productiveHeading05$1 = {
221
+ const productiveHeading05$1 = {
329
222
  fontSize: rem(scale[7]),
330
223
  fontWeight: fontWeights.regular,
331
224
  lineHeight: 1.25,
332
225
  letterSpacing: 0
333
226
  };
334
- var productiveHeading06$1 = {
227
+ const productiveHeading06$1 = {
335
228
  fontSize: rem(scale[9]),
336
229
  fontWeight: fontWeights.light,
337
230
  lineHeight: 1.199,
338
231
  letterSpacing: 0
339
232
  };
340
- var productiveHeading07$1 = {
233
+ const productiveHeading07$1 = {
341
234
  fontSize: rem(scale[11]),
342
235
  fontWeight: fontWeights.light,
343
236
  lineHeight: 1.199,
344
237
  letterSpacing: 0
345
238
  };
346
- var expressiveHeading01$1 = _objectSpread2(_objectSpread2({}, heading01$1), {}, {
239
+ const expressiveHeading01$1 = {
240
+ ...heading01$1,
347
241
  lineHeight: 1.25
348
- });
349
- var expressiveHeading02$1 = _objectSpread2(_objectSpread2({}, heading02$1), {}, {
242
+ };
243
+ const expressiveHeading02$1 = {
244
+ ...heading02$1,
350
245
  lineHeight: 1.5
351
- });
352
- var expressiveHeading03$1 = {
246
+ };
247
+ const expressiveHeading03$1 = {
353
248
  fontSize: rem(scale[4]),
354
249
  fontWeight: fontWeights.regular,
355
250
  lineHeight: 1.4,
@@ -365,7 +260,7 @@ var expressiveHeading03$1 = {
365
260
  }
366
261
  }
367
262
  };
368
- var expressiveHeading04$1 = {
263
+ const expressiveHeading04$1 = {
369
264
  fontSize: rem(scale[6]),
370
265
  fontWeight: fontWeights.regular,
371
266
  lineHeight: 1.28572,
@@ -382,7 +277,7 @@ var expressiveHeading04$1 = {
382
277
  }
383
278
  }
384
279
  };
385
- var expressiveHeading05$1 = {
280
+ const expressiveHeading05$1 = {
386
281
  fontSize: rem(scale[7]),
387
282
  fontWeight: fontWeights.regular,
388
283
  lineHeight: 1.25,
@@ -410,7 +305,7 @@ var expressiveHeading05$1 = {
410
305
  }
411
306
  }
412
307
  };
413
- var expressiveHeading06$1 = {
308
+ const expressiveHeading06$1 = {
414
309
  fontSize: rem(scale[7]),
415
310
  fontWeight: fontWeights.semibold,
416
311
  lineHeight: 1.25,
@@ -441,7 +336,7 @@ var expressiveHeading06$1 = {
441
336
  }
442
337
  }
443
338
  };
444
- var expressiveParagraph01$1 = {
339
+ const expressiveParagraph01$1 = {
445
340
  fontSize: rem(scale[5]),
446
341
  fontWeight: fontWeights.light,
447
342
  lineHeight: 1.334,
@@ -457,7 +352,7 @@ var expressiveParagraph01$1 = {
457
352
  }
458
353
  }
459
354
  };
460
- var quotation01$1 = {
355
+ const quotation01$1 = {
461
356
  fontFamily: fontFamilies.serif,
462
357
  fontSize: rem(scale[4]),
463
358
  fontWeight: fontWeights.regular,
@@ -489,7 +384,7 @@ var quotation01$1 = {
489
384
  }
490
385
  }
491
386
  };
492
- var quotation02$1 = {
387
+ const quotation02$1 = {
493
388
  fontFamily: fontFamilies.serif,
494
389
  fontSize: rem(scale[7]),
495
390
  fontWeight: fontWeights.light,
@@ -513,7 +408,7 @@ var quotation02$1 = {
513
408
  }
514
409
  }
515
410
  };
516
- var display01$1 = {
411
+ const display01$1 = {
517
412
  fontSize: rem(scale[9]),
518
413
  fontWeight: fontWeights.light,
519
414
  lineHeight: 1.19,
@@ -535,7 +430,7 @@ var display01$1 = {
535
430
  }
536
431
  }
537
432
  };
538
- var display02$1 = {
433
+ const display02$1 = {
539
434
  fontSize: rem(scale[9]),
540
435
  fontWeight: fontWeights.semibold,
541
436
  lineHeight: 1.19,
@@ -557,7 +452,7 @@ var display02$1 = {
557
452
  }
558
453
  }
559
454
  };
560
- var display03$1 = {
455
+ const display03$1 = {
561
456
  fontSize: rem(scale[9]),
562
457
  fontWeight: fontWeights.light,
563
458
  lineHeight: 1.19,
@@ -583,7 +478,7 @@ var display03$1 = {
583
478
  }
584
479
  }
585
480
  };
586
- var display04$1 = {
481
+ const display04$1 = {
587
482
  fontSize: rem(scale[9]),
588
483
  fontWeight: fontWeights.light,
589
484
  lineHeight: 1.19,
@@ -610,53 +505,40 @@ var display04$1 = {
610
505
  }
611
506
  }
612
507
  };
613
-
614
- // Type changes - V11
615
-
616
- // Small styles
617
- // No changes for code-01, code-02, label-01, label-02
618
- var legal01$1 = {
508
+ const legal01$1 = {
619
509
  fontSize: rem(scale[0]),
620
510
  fontWeight: fontWeights.regular,
621
511
  lineHeight: 1.33333,
622
512
  letterSpacing: px(0.32)
623
513
  };
624
- var legal02$1 = {
514
+ const legal02$1 = {
625
515
  fontSize: rem(scale[1]),
626
516
  fontWeight: fontWeights.regular,
627
517
  lineHeight: 1.28572,
628
518
  letterSpacing: px(0.16)
629
519
  };
630
-
631
- // Body styles
632
- var bodyCompact01$1 = bodyShort01$1;
633
- var bodyCompact02$1 = bodyShort02$1;
634
- var body01$1 = bodyLong01$1;
635
- var body02$1 = bodyLong02$1;
636
-
637
- // Fixed heading styles
638
- var headingCompact01$1 = productiveHeading01$1;
639
- var headingCompact02$1 = productiveHeading02$1;
640
- var heading03$1 = productiveHeading03$1;
641
- var heading04$1 = productiveHeading04$1;
642
- var heading05$1 = productiveHeading05$1;
643
- var heading06$1 = productiveHeading06$1;
644
- var heading07$1 = productiveHeading07$1;
645
-
646
- // Fluid heading styles
647
- var fluidHeading03$1 = expressiveHeading03$1;
648
- var fluidHeading04$1 = expressiveHeading04$1;
649
- var fluidHeading05$1 = expressiveHeading05$1;
650
- var fluidHeading06$1 = expressiveHeading06$1;
651
-
652
- // Additional fluid styles
653
- var fluidParagraph01$1 = expressiveParagraph01$1;
654
- var fluidQuotation01$1 = quotation01$1;
655
- var fluidQuotation02$1 = quotation02$1;
656
- var fluidDisplay01$1 = display01$1;
657
- var fluidDisplay02$1 = display02$1;
658
- var fluidDisplay03$1 = display03$1;
659
- var fluidDisplay04$1 = display04$1;
520
+ const bodyCompact01$1 = bodyShort01$1;
521
+ const bodyCompact02$1 = bodyShort02$1;
522
+ const body01$1 = bodyLong01$1;
523
+ const body02$1 = bodyLong02$1;
524
+ const headingCompact01$1 = productiveHeading01$1;
525
+ const headingCompact02$1 = productiveHeading02$1;
526
+ const heading03$1 = productiveHeading03$1;
527
+ const heading04$1 = productiveHeading04$1;
528
+ const heading05$1 = productiveHeading05$1;
529
+ const heading06$1 = productiveHeading06$1;
530
+ const heading07$1 = productiveHeading07$1;
531
+ const fluidHeading03$1 = expressiveHeading03$1;
532
+ const fluidHeading04$1 = expressiveHeading04$1;
533
+ const fluidHeading05$1 = expressiveHeading05$1;
534
+ const fluidHeading06$1 = expressiveHeading06$1;
535
+ const fluidParagraph01$1 = expressiveParagraph01$1;
536
+ const fluidQuotation01$1 = quotation01$1;
537
+ const fluidQuotation02$1 = quotation02$1;
538
+ const fluidDisplay01$1 = display01$1;
539
+ const fluidDisplay02$1 = display02$1;
540
+ const fluidDisplay03$1 = display03$1;
541
+ const fluidDisplay04$1 = display04$1;
660
542
 
661
543
  var styles = /*#__PURE__*/Object.freeze({
662
544
  __proto__: null,
@@ -720,41 +602,40 @@ var styles = /*#__PURE__*/Object.freeze({
720
602
  fluidDisplay04: fluidDisplay04$1
721
603
  });
722
604
 
723
- var _excluded = ["breakpoints"];
724
- var breakpointNames = Object.keys(breakpoints);
605
+ const breakpointNames = Object.keys(breakpoints);
725
606
  function next(name) {
726
607
  return breakpointNames[breakpointNames.indexOf(name) + 1];
727
608
  }
728
609
  function fluid(selector) {
729
- var fluidBreakpoints = selector.breakpoints,
730
- styles = _objectWithoutProperties(selector, _excluded);
731
- if (_typeof(fluidBreakpoints) !== 'object') {
610
+ const { breakpoints: fluidBreakpoints, ...styles } = selector;
611
+ if (typeof fluidBreakpoints !== "object") {
732
612
  return styles;
733
613
  }
734
- var fluidBreakpointNames = Object.keys(fluidBreakpoints);
614
+ const fluidBreakpointNames = Object.keys(fluidBreakpoints);
735
615
  if (fluidBreakpointNames.length === 0) {
736
616
  return styles;
737
617
  }
738
- styles.fontSize = fluidTypeSize(styles, 'sm', fluidBreakpoints);
739
- fluidBreakpointNames.forEach(function (name) {
740
- styles[breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
618
+ styles.fontSize = fluidTypeSize(styles, "sm", fluidBreakpoints);
619
+ fluidBreakpointNames.forEach((name) => {
620
+ styles[breakpoint(name)] = {
621
+ ...fluidBreakpoints[name],
741
622
  fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
742
- });
623
+ };
743
624
  });
744
625
  return styles;
745
626
  }
746
627
  function fluidTypeSize(defaultStyles, fluidBreakpointName, fluidBreakpoints) {
747
- var breakpoint = breakpoints[fluidBreakpointName];
748
- var fluidBreakpoint = fluidBreakpointName === 'sm' ? defaultStyles : fluidBreakpoints[fluidBreakpointName];
749
- var maxFontSize = defaultStyles.fontSize;
750
- var minFontSize = defaultStyles.fontSize;
628
+ const breakpoint = breakpoints[fluidBreakpointName];
629
+ const fluidBreakpoint = fluidBreakpointName === "sm" ? defaultStyles : fluidBreakpoints[fluidBreakpointName];
630
+ let maxFontSize = defaultStyles.fontSize;
631
+ let minFontSize = defaultStyles.fontSize;
751
632
  if (fluidBreakpoint.fontSize) {
752
633
  minFontSize = fluidBreakpoint.fontSize;
753
634
  }
754
- var maxViewportWidth = breakpoint.width;
755
- var minViewportWidth = breakpoint.width;
756
- var nextBreakpointAvailable = next(fluidBreakpointName);
757
- var nextFluidBreakpointName = null;
635
+ let maxViewportWidth = breakpoint.width;
636
+ let minViewportWidth = breakpoint.width;
637
+ let nextBreakpointAvailable = next(fluidBreakpointName);
638
+ let nextFluidBreakpointName = null;
758
639
  while (nextBreakpointAvailable) {
759
640
  if (fluidBreakpoints[nextBreakpointAvailable]) {
760
641
  nextFluidBreakpointName = nextBreakpointAvailable;
@@ -763,10 +644,16 @@ function fluidTypeSize(defaultStyles, fluidBreakpointName, fluidBreakpoints) {
763
644
  nextBreakpointAvailable = next(nextBreakpointAvailable);
764
645
  }
765
646
  if (nextFluidBreakpointName) {
766
- var nextFluidBreakpoint = breakpoints[nextFluidBreakpointName];
647
+ const nextFluidBreakpoint = breakpoints[nextFluidBreakpointName];
767
648
  maxFontSize = fluidBreakpoints[nextFluidBreakpointName].fontSize;
768
649
  maxViewportWidth = nextFluidBreakpoint.width;
769
- return "calc(".concat(minFontSize, " + ").concat(subtract(maxFontSize, minFontSize), " * ((100vw - ").concat(minViewportWidth, ") / ").concat(subtract(maxViewportWidth, minViewportWidth), "))");
650
+ return `calc(${minFontSize} + ${subtract(
651
+ maxFontSize,
652
+ minFontSize
653
+ )} * ((100vw - ${minViewportWidth}) / ${subtract(
654
+ maxViewportWidth,
655
+ minViewportWidth
656
+ )}))`;
770
657
  }
771
658
  return minFontSize;
772
659
  }
@@ -774,77 +661,124 @@ function subtract(a, b) {
774
661
  return parseFloat(a) - parseFloat(b);
775
662
  }
776
663
 
777
- /**
778
- * Copyright OctaviaFlow
779
- * Author: Vishal Kumar
780
- * Created: 11/November/2025
781
- *
782
- * This source code is licensed under the Apache-2.0 license found in the
783
- * LICENSE file in the root directory of this source tree.
784
- */
785
-
786
- // Unstable tokens
787
- var caption01 = 'caption01';
788
- var caption02 = 'caption02';
789
- var label01 = 'label01';
790
- var label02 = 'label02';
791
- var helperText01 = 'helperText01';
792
- var helperText02 = 'helperText02';
793
- var bodyShort01 = 'bodyShort01';
794
- var bodyLong01 = 'bodyLong01';
795
- var bodyShort02 = 'bodyShort02';
796
- var bodyLong02 = 'bodyLong02';
797
- var code01 = 'code01';
798
- var code02 = 'code02';
799
- var heading01 = 'heading01';
800
- var productiveHeading01 = 'productiveHeading01';
801
- var heading02 = 'heading02';
802
- var productiveHeading02 = 'productiveHeading02';
803
- var productiveHeading03 = 'productiveHeading03';
804
- var productiveHeading04 = 'productiveHeading04';
805
- var productiveHeading05 = 'productiveHeading05';
806
- var productiveHeading06 = 'productiveHeading06';
807
- var productiveHeading07 = 'productiveHeading07';
808
- var expressiveHeading01 = 'expressiveHeading01';
809
- var expressiveHeading02 = 'expressiveHeading02';
810
- var expressiveHeading03 = 'expressiveHeading03';
811
- var expressiveHeading04 = 'expressiveHeading04';
812
- var expressiveHeading05 = 'expressiveHeading05';
813
- var expressiveHeading06 = 'expressiveHeading06';
814
- var expressiveParagraph01 = 'expressiveParagraph01';
815
- var quotation01 = 'quotation01';
816
- var quotation02 = 'quotation02';
817
- var display01 = 'display01';
818
- var display02 = 'display02';
819
- var display03 = 'display03';
820
- var display04 = 'display04';
821
- // V11 Tokens
822
- var legal01 = 'legal01';
823
- var legal02 = 'legal02';
824
- var bodyCompact01 = 'bodyCompact01';
825
- var bodyCompact02 = 'bodyCompact02';
826
- var body01 = 'body01';
827
- var body02 = 'body02';
828
- var headingCompact01 = 'headingCompact01';
829
- var headingCompact02 = 'headingCompact02';
830
- var heading03 = 'heading03';
831
- var heading04 = 'heading04';
832
- var heading05 = 'heading05';
833
- var heading06 = 'heading06';
834
- var heading07 = 'heading07';
835
- var fluidHeading03 = 'fluidHeading03';
836
- var fluidHeading04 = 'fluidHeading04';
837
- var fluidHeading05 = 'fluidHeading05';
838
- var fluidHeading06 = 'fluidHeading06';
839
- var fluidParagraph01 = 'fluidParagraph01';
840
- var fluidQuotation01 = 'fluidQuotation01';
841
- var fluidQuotation02 = 'fluidQuotation02';
842
- var fluidDisplay01 = 'fluidDisplay01';
843
- var fluidDisplay02 = 'fluidDisplay02';
844
- var fluidDisplay03 = 'fluidDisplay03';
845
- var fluidDisplay04 = 'fluidDisplay04';
846
- var unstable_tokens = [caption01, caption02, label01, label02, helperText01, helperText02, bodyShort01, bodyLong01, bodyShort02, bodyLong02, code01, code02, heading01, productiveHeading01, heading02, productiveHeading02, productiveHeading03, productiveHeading04, productiveHeading05, productiveHeading06, productiveHeading07, expressiveHeading01, expressiveHeading02, expressiveHeading03, expressiveHeading04, expressiveHeading05, expressiveHeading06, expressiveParagraph01, quotation01, quotation02, display01, display02, display03, display04,
847
- // V11 Tokens
848
- legal01, legal02, bodyCompact01, bodyCompact02, body01, body02, headingCompact01, headingCompact02, heading03, heading04, heading05, heading06, heading07, fluidHeading03, fluidHeading04, fluidHeading05, fluidHeading06, fluidParagraph01, fluidQuotation01, fluidQuotation02, fluidDisplay01, fluidDisplay02, fluidDisplay03, fluidDisplay04];
664
+ const caption01 = "caption01";
665
+ const caption02 = "caption02";
666
+ const label01 = "label01";
667
+ const label02 = "label02";
668
+ const helperText01 = "helperText01";
669
+ const helperText02 = "helperText02";
670
+ const bodyShort01 = "bodyShort01";
671
+ const bodyLong01 = "bodyLong01";
672
+ const bodyShort02 = "bodyShort02";
673
+ const bodyLong02 = "bodyLong02";
674
+ const code01 = "code01";
675
+ const code02 = "code02";
676
+ const heading01 = "heading01";
677
+ const productiveHeading01 = "productiveHeading01";
678
+ const heading02 = "heading02";
679
+ const productiveHeading02 = "productiveHeading02";
680
+ const productiveHeading03 = "productiveHeading03";
681
+ const productiveHeading04 = "productiveHeading04";
682
+ const productiveHeading05 = "productiveHeading05";
683
+ const productiveHeading06 = "productiveHeading06";
684
+ const productiveHeading07 = "productiveHeading07";
685
+ const expressiveHeading01 = "expressiveHeading01";
686
+ const expressiveHeading02 = "expressiveHeading02";
687
+ const expressiveHeading03 = "expressiveHeading03";
688
+ const expressiveHeading04 = "expressiveHeading04";
689
+ const expressiveHeading05 = "expressiveHeading05";
690
+ const expressiveHeading06 = "expressiveHeading06";
691
+ const expressiveParagraph01 = "expressiveParagraph01";
692
+ const quotation01 = "quotation01";
693
+ const quotation02 = "quotation02";
694
+ const display01 = "display01";
695
+ const display02 = "display02";
696
+ const display03 = "display03";
697
+ const display04 = "display04";
698
+ const legal01 = "legal01";
699
+ const legal02 = "legal02";
700
+ const bodyCompact01 = "bodyCompact01";
701
+ const bodyCompact02 = "bodyCompact02";
702
+ const body01 = "body01";
703
+ const body02 = "body02";
704
+ const headingCompact01 = "headingCompact01";
705
+ const headingCompact02 = "headingCompact02";
706
+ const heading03 = "heading03";
707
+ const heading04 = "heading04";
708
+ const heading05 = "heading05";
709
+ const heading06 = "heading06";
710
+ const heading07 = "heading07";
711
+ const fluidHeading03 = "fluidHeading03";
712
+ const fluidHeading04 = "fluidHeading04";
713
+ const fluidHeading05 = "fluidHeading05";
714
+ const fluidHeading06 = "fluidHeading06";
715
+ const fluidParagraph01 = "fluidParagraph01";
716
+ const fluidQuotation01 = "fluidQuotation01";
717
+ const fluidQuotation02 = "fluidQuotation02";
718
+ const fluidDisplay01 = "fluidDisplay01";
719
+ const fluidDisplay02 = "fluidDisplay02";
720
+ const fluidDisplay03 = "fluidDisplay03";
721
+ const fluidDisplay04 = "fluidDisplay04";
722
+ const unstable_tokens = [
723
+ caption01,
724
+ caption02,
725
+ label01,
726
+ label02,
727
+ helperText01,
728
+ helperText02,
729
+ bodyShort01,
730
+ bodyLong01,
731
+ bodyShort02,
732
+ bodyLong02,
733
+ code01,
734
+ code02,
735
+ heading01,
736
+ productiveHeading01,
737
+ heading02,
738
+ productiveHeading02,
739
+ productiveHeading03,
740
+ productiveHeading04,
741
+ productiveHeading05,
742
+ productiveHeading06,
743
+ productiveHeading07,
744
+ expressiveHeading01,
745
+ expressiveHeading02,
746
+ expressiveHeading03,
747
+ expressiveHeading04,
748
+ expressiveHeading05,
749
+ expressiveHeading06,
750
+ expressiveParagraph01,
751
+ quotation01,
752
+ quotation02,
753
+ display01,
754
+ display02,
755
+ display03,
756
+ display04,
757
+ // V11 Tokens
758
+ legal01,
759
+ legal02,
760
+ bodyCompact01,
761
+ bodyCompact02,
762
+ body01,
763
+ body02,
764
+ headingCompact01,
765
+ headingCompact02,
766
+ heading03,
767
+ heading04,
768
+ heading05,
769
+ heading06,
770
+ heading07,
771
+ fluidHeading03,
772
+ fluidHeading04,
773
+ fluidHeading05,
774
+ fluidHeading06,
775
+ fluidParagraph01,
776
+ fluidQuotation01,
777
+ fluidQuotation02,
778
+ fluidDisplay01,
779
+ fluidDisplay02,
780
+ fluidDisplay03,
781
+ fluidDisplay04
782
+ ];
849
783
 
850
784
  export { body01$1 as body01, body02$1 as body02, bodyCompact01$1 as bodyCompact01, bodyCompact02$1 as bodyCompact02, bodyLong01$1 as bodyLong01, bodyLong02$1 as bodyLong02, bodyShort01$1 as bodyShort01, bodyShort02$1 as bodyShort02, caption01$1 as caption01, caption02$1 as caption02, code01$1 as code01, code02$1 as code02, display01$1 as display01, display02$1 as display02, display03$1 as display03, display04$1 as display04, expressiveHeading01$1 as expressiveHeading01, expressiveHeading02$1 as expressiveHeading02, expressiveHeading03$1 as expressiveHeading03, expressiveHeading04$1 as expressiveHeading04, expressiveHeading05$1 as expressiveHeading05, expressiveHeading06$1 as expressiveHeading06, expressiveParagraph01$1 as expressiveParagraph01, fluid, fluidDisplay01$1 as fluidDisplay01, fluidDisplay02$1 as fluidDisplay02, fluidDisplay03$1 as fluidDisplay03, fluidDisplay04$1 as fluidDisplay04, fluidHeading03$1 as fluidHeading03, fluidHeading04$1 as fluidHeading04, fluidHeading05$1 as fluidHeading05, fluidHeading06$1 as fluidHeading06, fluidParagraph01$1 as fluidParagraph01, fluidQuotation01$1 as fluidQuotation01, fluidQuotation02$1 as fluidQuotation02, fontFamilies, fontFamily, fontWeight, fontWeights, getTypeSize, heading01$1 as heading01, heading02$1 as heading02, heading03$1 as heading03, heading04$1 as heading04, heading05$1 as heading05, heading06$1 as heading06, heading07$1 as heading07, headingCompact01$1 as headingCompact01, headingCompact02$1 as headingCompact02, helperText01$1 as helperText01, helperText02$1 as helperText02, label01$1 as label01, label02$1 as label02, legal01$1 as legal01, legal02$1 as legal02, print, productiveHeading01$1 as productiveHeading01, productiveHeading02$1 as productiveHeading02, productiveHeading03$1 as productiveHeading03, productiveHeading04$1 as productiveHeading04, productiveHeading05$1 as productiveHeading05, productiveHeading06$1 as productiveHeading06, productiveHeading07$1 as productiveHeading07, quotation01$1 as quotation01, quotation02$1 as quotation02, reset, scale, styles, unstable_tokens };