@butternutbox/pawprint-native 0.25.1 → 1.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.
@@ -7,12 +7,12 @@
7
7
  CJS Build start
8
8
  ESM Build start
9
9
  DTS Build start
10
- CJS dist/index.cjs 555.31 KB
11
- CJS dist/index.cjs.map 1.08 MB
12
- CJS ⚡️ Build success in 8617ms
13
- ESM dist/index.js 524.64 KB
10
+ ESM dist/index.js 523.46 KB
14
11
  ESM dist/index.js.map 1.08 MB
15
- ESM ⚡️ Build success in 8621ms
16
- DTS ⚡️ Build success in 23481ms
17
- DTS dist/index.d.cts 103.29 KB
18
- DTS dist/index.d.ts 103.29 KB
12
+ ESM ⚡️ Build success in 8053ms
13
+ CJS dist/index.cjs 553.74 KB
14
+ CJS dist/index.cjs.map 1.08 MB
15
+ CJS ⚡️ Build success in 8056ms
16
+ DTS ⚡️ Build success in 24238ms
17
+ DTS dist/index.d.cts 103.09 KB
18
+ DTS dist/index.d.ts 103.09 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @butternutbox/pawprint-native
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 8d9c9e7: Adopt `@butternutbox/pawprint-fonts` as the source of brand font assets.
8
+ - **Native** — `.ttf` files and font helpers no longer ship inside `@butternutbox/pawprint-native`. The package now depends on `@butternutbox/pawprint-fonts` and re-exports `BRAND_FONTS` / `resolveFont` from it, so consumers importing those symbols from `@butternutbox/pawprint-native` continue to work with no code changes. Downstream Expo apps should add `@butternutbox/pawprint-fonts` to their dependencies alongside the bump.
9
+ - **Web** — Ida Narrow `.woff2` files no longer ship inside `@butternutbox/pawprint-web`. Ida Narrow is imported via `@butternutbox/pawprint-fonts/*.woff2` subpath imports and resolved at consumer build time (Next.js, Vite, and webpack handle `.woff2` imports out of the box). IBM Plex Sans Condensed (from `@fontsource/ibm-plex-sans-condensed`) continues to be inlined into the bundle as before.
10
+
11
+ Why: font bytes shipped inside `pawprint-native` are embedded into the native app bundle by `expo-font`, so any change flows into Expo's fingerprint and forces a native rebuild in consuming apps. Font bytes inside `pawprint-web` bloat every published bundle. Moving them into a separately-versioned `pawprint-fonts` package that changes rarely avoids both — JS-only bumps to these packages no longer touch font bytes downstream.
12
+
3
13
  ## 0.25.1
4
14
 
5
15
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -3,12 +3,7 @@
3
3
  var react = require('@emotion/react');
4
4
  var pawprintTokens = require('@butternutbox/pawprint-tokens');
5
5
  var styled51 = require('@emotion/native');
6
- var idaNarrow500 = require('./ida-narrow-500-normal.ttf');
7
- var idaNarrow700 = require('./ida-narrow-700-normal.ttf');
8
- var ibmPlexSansCondensed400 = require('./ibm-plex-sans-condensed-400-normal.ttf');
9
- var ibmPlexSansCondensed500 = require('./ibm-plex-sans-condensed-500-normal.ttf');
10
- var ibmPlexSansCondensed600 = require('./ibm-plex-sans-condensed-600-normal.ttf');
11
- var ibmPlexSansCondensed700 = require('./ibm-plex-sans-condensed-700-normal.ttf');
6
+ var pawprintFonts = require('@butternutbox/pawprint-fonts');
12
7
  var React66 = require('react');
13
8
  var jsxRuntime = require('react/jsx-runtime');
14
9
  var AvatarPrimitive = require('@rn-primitives/avatar');
@@ -48,12 +43,6 @@ function _interopNamespace(e) {
48
43
  }
49
44
 
50
45
  var styled51__default = /*#__PURE__*/_interopDefault(styled51);
51
- var idaNarrow500__default = /*#__PURE__*/_interopDefault(idaNarrow500);
52
- var idaNarrow700__default = /*#__PURE__*/_interopDefault(idaNarrow700);
53
- var ibmPlexSansCondensed400__default = /*#__PURE__*/_interopDefault(ibmPlexSansCondensed400);
54
- var ibmPlexSansCondensed500__default = /*#__PURE__*/_interopDefault(ibmPlexSansCondensed500);
55
- var ibmPlexSansCondensed600__default = /*#__PURE__*/_interopDefault(ibmPlexSansCondensed600);
56
- var ibmPlexSansCondensed700__default = /*#__PURE__*/_interopDefault(ibmPlexSansCondensed700);
57
46
  var React66__default = /*#__PURE__*/_interopDefault(React66);
58
47
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
59
48
  var Svg__default = /*#__PURE__*/_interopDefault(Svg);
@@ -116,33 +105,6 @@ var __async = (__this, __arguments, generator) => {
116
105
  step((generator = generator.apply(__this, __arguments)).next());
117
106
  });
118
107
  };
119
- var BRAND_FONTS = {
120
- [pawprintTokens.Brand.Butternutbox]: {
121
- "IdaWebNarrow-Medium": idaNarrow500__default.default,
122
- "IdaWebNarrow-Bold": idaNarrow700__default.default,
123
- "IBMPlexSansCond-Regular": ibmPlexSansCondensed400__default.default,
124
- "IBMPlexSansCond-Medium": ibmPlexSansCondensed500__default.default,
125
- "IBMPlexSansCond-SemiBold": ibmPlexSansCondensed600__default.default,
126
- "IBMPlexSansCond-Bold": ibmPlexSansCondensed700__default.default
127
- }
128
- };
129
- var FONT_MAP = {
130
- "IBM Plex Sans Condensed": {
131
- "400": "IBMPlexSansCond-Regular",
132
- "500": "IBMPlexSansCond-Medium",
133
- "600": "IBMPlexSansCond-SemiBold",
134
- "700": "IBMPlexSansCond-Bold"
135
- },
136
- "Ida Narrow": {
137
- "500": "IdaWebNarrow-Medium",
138
- "700": "IdaWebNarrow-Bold"
139
- }
140
- };
141
- var resolveFont = (fontFamily, fontWeight) => {
142
- var _a;
143
- const resolved = (_a = FONT_MAP[fontFamily]) == null ? void 0 : _a[fontWeight];
144
- return { fontFamily: resolved != null ? resolved : fontFamily };
145
- };
146
108
  var createPawprintTheme = (brand = pawprintTokens.Brand.Butternutbox, theme2 = pawprintTokens.Theme.Default) => {
147
109
  const brandThemes = pawprintTokens.THEME_OPTIONS_MAP[brand];
148
110
  const themeOptions = brandThemes && theme2 in brandThemes ? brandThemes[theme2] : pawprintTokens.DEFAULT_THEME_OPTIONS;
@@ -193,7 +155,7 @@ var resolveLetterSpacing = (letterSpacing, fontSize) => {
193
155
  return parseFloat(letterSpacing);
194
156
  };
195
157
  var semanticToStyle = (token) => {
196
- const { fontFamily } = resolveFont(token.fontFamily, token.fontWeight);
158
+ const { fontFamily } = pawprintFonts.resolveFont(token.fontFamily, token.fontWeight);
197
159
  const fontSize = parseTokenValue(token.fontSize);
198
160
  return __spreadValues({
199
161
  fontFamily,
@@ -206,7 +168,7 @@ var semanticToStyle = (token) => {
206
168
  var nativeTokenToStyle = (token) => {
207
169
  const style = {};
208
170
  if (token.fontFamily && token.fontWeight) {
209
- const { fontFamily } = resolveFont(token.fontFamily, token.fontWeight);
171
+ const { fontFamily } = pawprintFonts.resolveFont(token.fontFamily, token.fontWeight);
210
172
  style.fontFamily = fontFamily;
211
173
  } else if (token.fontFamily) {
212
174
  style.fontFamily = token.fontFamily;
@@ -1270,7 +1232,7 @@ var Button = React66__default.default.forwardRef(
1270
1232
  const spacingTokens = buttons.spacing[size];
1271
1233
  const typographyKey = sizeToTypographyKey[size];
1272
1234
  const typography = buttons.text[typographyKey];
1273
- resolveFont(typography.fontFamily, typography.fontWeight);
1235
+ pawprintFonts.resolveFont(typography.fontFamily, typography.fontWeight);
1274
1236
  const [pressed, setPressed] = React66__default.default.useState(false);
1275
1237
  const getVariantStyles = (isPressed) => {
1276
1238
  if (variant === "filled") {
@@ -1680,7 +1642,7 @@ var StyledInput = styled51__default.default(reactNative.TextInput)(({
1680
1642
  var _a, _b;
1681
1643
  const { colour, field } = theme2.tokens.components.inputs;
1682
1644
  const typography = field.placeholder.default;
1683
- const { fontFamily } = resolveFont(
1645
+ const { fontFamily } = pawprintFonts.resolveFont(
1684
1646
  typography.fontFamily,
1685
1647
  typography.fontWeight
1686
1648
  );
@@ -5014,7 +4976,7 @@ var StyledTextArea = styled51__default.default(reactNative.TextInput)(({ theme:
5014
4976
  var _a, _b;
5015
4977
  const { colour, field } = theme2.tokens.components.inputs;
5016
4978
  const typography = field.placeholder.default;
5017
- const { fontFamily } = resolveFont(
4979
+ const { fontFamily } = pawprintFonts.resolveFont(
5018
4980
  typography.fontFamily,
5019
4981
  typography.fontWeight
5020
4982
  );
@@ -7448,7 +7410,7 @@ var NumberFieldInput = React66__default.default.forwardRef(
7448
7410
  [onChangeText]
7449
7411
  );
7450
7412
  const typographyToken = fieldSize === "lg" ? tokens3.typography.field.large : tokens3.typography.field.small;
7451
- const resolvedInputFontFamily = typographyToken.fontFamily && typographyToken.fontWeight ? resolveFont(typographyToken.fontFamily, typographyToken.fontWeight).fontFamily : typographyToken.fontFamily;
7413
+ const resolvedInputFontFamily = typographyToken.fontFamily && typographyToken.fontWeight ? pawprintFonts.resolveFont(typographyToken.fontFamily, typographyToken.fontWeight).fontFamily : typographyToken.fontFamily;
7452
7414
  return /* @__PURE__ */ jsxRuntime.jsxs(StyledRow, { rowGap: parseTokenValue35(sizeTokens.group.gap), children: [
7453
7415
  showDecrementButton && /* @__PURE__ */ jsxRuntime.jsx(
7454
7416
  IconButton,
@@ -9368,7 +9330,7 @@ var parseSize = (value) => {
9368
9330
  };
9369
9331
  var resolveTypography = (typography) => {
9370
9332
  var _a, _b;
9371
- const { fontFamily } = resolveFont(
9333
+ const { fontFamily } = pawprintFonts.resolveFont(
9372
9334
  typography.fontFamily,
9373
9335
  typography.fontWeight
9374
9336
  );
@@ -12606,7 +12568,6 @@ Object.defineProperty(exports, "styled", {
12606
12568
  exports.Accordion = Accordion;
12607
12569
  exports.Animated = Animated5;
12608
12570
  exports.Avatar = Avatar;
12609
- exports.BRAND_FONTS = BRAND_FONTS;
12610
12571
  exports.Badge = Badge;
12611
12572
  exports.Button = Button;
12612
12573
  exports.ButtonDock = ButtonDock;
@@ -12680,7 +12641,6 @@ exports.fadeAnimation = fadeAnimation;
12680
12641
  exports.fadeDownAnimation = fadeDownAnimation;
12681
12642
  exports.fadeUpAnimation = fadeUpAnimation;
12682
12643
  exports.registerLogo = registerLogo;
12683
- exports.resolveFont = resolveFont;
12684
12644
  exports.resolveLogo = resolveLogo;
12685
12645
  exports.scaleAnimation = scaleAnimation;
12686
12646
  exports.slideInAnimation = slideInAnimation;
@@ -12692,5 +12652,11 @@ exports.usePasswordField = usePasswordField;
12692
12652
  exports.usePawprint = usePawprint;
12693
12653
  exports.useSearchField = useSearchField;
12694
12654
  exports.useSelectField = useSelectField;
12655
+ Object.keys(pawprintFonts).forEach(function (k) {
12656
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
12657
+ enumerable: true,
12658
+ get: function () { return pawprintFonts[k]; }
12659
+ });
12660
+ });
12695
12661
  //# sourceMappingURL=index.cjs.map
12696
12662
  //# sourceMappingURL=index.cjs.map