@spaced-out/ui-design-system 0.5.7 → 0.5.9-beta.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.
@@ -1,14 +1,14 @@
1
+ // .storybook/main.ts
1
2
  import type {StorybookConfig} from '@storybook/react-webpack5';
2
3
  import path from 'node:path';
4
+ import webpack from 'webpack';
3
5
 
4
6
  const config: StorybookConfig = {
5
7
  stories: ['../src/**/*.mdx', '../src/**/*.stories.tsx'],
6
-
7
8
  addons: [
8
9
  {
9
10
  name: '@storybook/addon-docs',
10
11
  options: {
11
- // Not needed with automatic runtime, but harmless if you keep it
12
12
  configureJSX: false,
13
13
  babelOptions: {},
14
14
  sourceLoaderOptions: null,
@@ -17,12 +17,10 @@ const config: StorybookConfig = {
17
17
  },
18
18
  'storybook-css-modules',
19
19
  '@storybook/addon-a11y',
20
- // Forces Babel (not SWC) so our plugins run on TSX:
21
20
  '@storybook/addon-webpack5-compiler-babel',
22
21
  '@chromatic-com/storybook',
23
22
  ],
24
23
 
25
- // Global Babel for anything SB pipes through its own babel pass
26
24
  babel: async (options: any) => ({
27
25
  ...options,
28
26
  sourceType: 'unambiguous',
@@ -45,14 +43,23 @@ const config: StorybookConfig = {
45
43
  plugins: ['macros', '@regrapes/babel-plugin-add-react-memo-displayname'],
46
44
  }),
47
45
 
48
- webpackFinal: async (config) => {
49
- if (config.resolve) {
50
- config.resolve.alias = {
51
- ...(config.resolve.alias ?? {}),
52
- src: path.resolve(__dirname, '../src'),
53
- };
54
- }
55
- // Fix font rule clobbering images
46
+ webpackFinal: async (cfg) => {
47
+ const config = {...cfg};
48
+
49
+ // Alias for your “src/*” imports
50
+ config.resolve ||= {};
51
+ config.resolve.alias = {
52
+ ...(config.resolve.alias ?? {}),
53
+ src: path.resolve(__dirname, '../src'),
54
+ };
55
+
56
+ // Optional: fallback for other node built-ins if any 3p lib requires them
57
+ config.resolve.fallback = {
58
+ ...(config.resolve.fallback ?? {}),
59
+ process: require.resolve('process/browser'),
60
+ };
61
+
62
+ // Fix font rule clobbering images (your existing tweak)
56
63
  config.module!.rules = (config.module!.rules || []).map((rule: any) => {
57
64
  if (rule.test && rule.test.toString().includes('woff')) {
58
65
  return {
@@ -63,14 +70,14 @@ const config: StorybookConfig = {
63
70
  return rule;
64
71
  });
65
72
 
66
- // SCSS modules support (matches your current setup)
73
+ // SCSS modules
67
74
  config.module!.rules!.push({
68
75
  test: /\.scss$/,
69
76
  use: ['style-loader', 'css-loader?modules=true', 'sass-loader'],
70
77
  include: path.resolve(__dirname, '../'),
71
78
  });
72
79
 
73
- // Ensure TSX goes through babel-loader (so plugins above actually run)
80
+ // Ensure TSX goes through babel-loader
74
81
  config.module!.rules!.push({
75
82
  test: /\.(ts|tsx)$/,
76
83
  loader: require.resolve('babel-loader'),
@@ -80,20 +87,27 @@ const config: StorybookConfig = {
80
87
  },
81
88
  });
82
89
 
90
+ // ⬇️ Polyfill `process` and bake env at build time
91
+ config.plugins = [
92
+ ...(config.plugins ?? []),
93
+ new webpack.ProvidePlugin({
94
+ process: 'process/browser',
95
+ }),
96
+ new webpack.DefinePlugin({
97
+ // Provide at least NODE_ENV; add more keys if you reference them in code
98
+ 'process.env.NODE_ENV': JSON.stringify(
99
+ process.env.NODE_ENV ?? 'development',
100
+ ),
101
+ }),
102
+ ];
103
+
83
104
  (config.resolve!.extensions as string[]).push('.ts', '.tsx');
84
105
  return config;
85
106
  },
86
107
 
87
108
  staticDirs: ['public', '../design-tokens'],
88
-
89
- framework: {
90
- name: '@storybook/react-webpack5',
91
- options: {},
92
- },
93
-
94
- typescript: {
95
- reactDocgen: 'react-docgen-typescript',
96
- },
109
+ framework: {name: '@storybook/react-webpack5', options: {}},
110
+ typescript: {reactDocgen: 'react-docgen-typescript'},
97
111
  };
98
112
 
99
113
  export default config;
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.5.9-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.5.8...v0.5.9-beta.0) (2025-09-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * sankey ([f6abec9](https://github.com/spaced-out/ui-design-system/commit/f6abec9144765f940c0a0e1af7846ca2535bac8c))
11
+ * sankey fix ([1939379](https://github.com/spaced-out/ui-design-system/commit/19393791b5485f25b6f2067b240daec053772812))
12
+ * sankey import ([1ae482d](https://github.com/spaced-out/ui-design-system/commit/1ae482dc1cd82fa10c3505e5d28925852ab8037d))
13
+ * sankey issue ([62d6440](https://github.com/spaced-out/ui-design-system/commit/62d64409de8abea8c324d6c0e16cf7d315ffd6db))
14
+
15
+ ### [0.5.8](https://github.com/spaced-out/ui-design-system/compare/v0.5.7...v0.5.8) (2025-09-17)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * fixes storybook config ([5b57517](https://github.com/spaced-out/ui-design-system/commit/5b57517f5ed943fde0249c4fc1070c7ce3509ebc))
21
+ * resolved conflicts ([c587335](https://github.com/spaced-out/ui-design-system/commit/c587335250598e1dba5c56df8a55aff8aa7baaf8))
22
+
5
23
  ### [0.5.7](https://github.com/spaced-out/ui-design-system/compare/v0.5.7-beta.0...v0.5.7) (2025-09-17)
6
24
 
7
25
 
@@ -15,7 +15,7 @@ var _SankeyChartModule = _interopRequireDefault(require("./SankeyChart.module.cs
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
- if (typeof _sankey.default === 'function') {
18
+ if (window != null) {
19
19
  (0, _sankey.default)(_highcharts.default);
20
20
  }
21
21
  const SankeyChart = _ref => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.5.7",
3
+ "version": "0.5.9-beta.0",
4
4
  "description": "Sense UI components library",
5
5
  "author": {
6
6
  "name": "Spaced Out"
@@ -146,6 +146,7 @@
146
146
  "lint-staged": "^10.5.1",
147
147
  "paths.macro": "^3.0.1",
148
148
  "prettier": "^2.5.1",
149
+ "process": "^0.11.10",
149
150
  "react": "^19.1.0",
150
151
  "react-dom": "^19.1.0",
151
152
  "recast": "^0.23.11",