@flourish/ui-styles 5.0.2 → 5.0.3

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/.eslintrc.json CHANGED
@@ -1,3 +1,7 @@
1
1
  {
2
- "extends": "../../.eslintrc.cjs"
2
+ "extends": "../../.eslintrc.cjs",
3
+ "ignorePatterns": [
4
+ "ui-styles.js",
5
+ "ui-styles.min.js"
6
+ ]
3
7
  }
package/RELEASE_NOTES.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 5.0.3
2
+ * Republish version with pnpm
3
+
1
4
  # 5.0.2
2
5
  * Set slider-label box-sizing to content-box so that padding is included
3
6
 
package/package.json CHANGED
@@ -1,31 +1,33 @@
1
1
  {
2
2
  "name": "@flourish/ui-styles",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "private": false,
5
5
  "description": "Flourish module for styling UI elements",
6
6
  "main": "ui-styles.js",
7
7
  "module": "src/index.js",
8
- "scripts": {
9
- "lint": "eslint src",
10
- "build": "rollup -c",
11
- "prepare": "npm run build && npm run minify",
12
- "minify": "uglifyjs -m -o ui-styles.min.js ui-styles.js"
13
- },
14
8
  "author": "Kiln Enterprises Ltd",
15
9
  "license": "LicenseRef-LICENSE",
16
10
  "dependencies": {
17
- "@flourish/pocket-knife": "workspace:^",
18
- "d3-selection": "^1.4.0"
11
+ "d3-selection": "^1.4.0",
12
+ "@flourish/pocket-knife": "^1.3.0"
19
13
  },
20
14
  "devDependencies": {
15
+ "@babel/core": "^7.20.2",
16
+ "@babel/preset-env": "^7.20.2",
21
17
  "@flourish/eslint-plugin-flourish": "^0.7.2",
18
+ "@rollup/plugin-babel": "^6.0.4",
22
19
  "eslint": "^8.35.0",
23
- "rollup": "3",
24
- "rollup-plugin-node-resolve": "^5.2.0",
20
+ "rollup": "^4.6.1",
21
+ "@rollup/plugin-node-resolve": "^15.2.3",
25
22
  "uglify-js": "^3.17.4"
26
23
  },
27
24
  "repository": {
28
25
  "type": "git",
29
26
  "url": "git://github.com/kiln/flourish-ui-styles.git"
27
+ },
28
+ "scripts": {
29
+ "lint": "eslint src",
30
+ "build": "rollup -c",
31
+ "minify": "uglifyjs -m -o ui-styles.min.js ui-styles.js"
30
32
  }
31
- }
33
+ }
package/rollup.config.mjs CHANGED
@@ -1,4 +1,7 @@
1
- import nodeResolve from "rollup-plugin-node-resolve";
1
+ import nodeResolve from "@rollup/plugin-node-resolve";
2
+ import babel from "@rollup/plugin-babel";
3
+
4
+ const is_production = process.env.NODE_ENV === "production" || !!process.env.CI;
2
5
 
3
6
  export default {
4
7
  input: "src/index.js",
@@ -8,7 +11,8 @@ export default {
8
11
  name: "ui-styles"
9
12
  },
10
13
  plugins: [
11
- nodeResolve()
14
+ nodeResolve(),
15
+ is_production && babel({ babelHelpers: "bundled", rootMode: "upward" }),
12
16
  ],
13
17
  onwarn: function (warning, warn) {
14
18
  if (warning.code === "CIRCULAR_DEPENDENCY") return;
@@ -1,5 +1,5 @@
1
1
  import { hexToRgba, getTextDirection } from "@flourish/pocket-knife";
2
- import Stylesheet from "../lib/js2css";
2
+ import Stylesheet from "../lib/js2css.js";
3
3
 
4
4
  var DEFAULTS = Object.freeze({
5
5
  background: null,
@@ -1,5 +1,5 @@
1
1
  import { hexToRgba } from "@flourish/pocket-knife";
2
- import Stylesheet from "../lib/js2css";
2
+ import Stylesheet from "../lib/js2css.js";
3
3
 
4
4
  var DEFAULTS = Object.freeze({
5
5
  background: null,
@@ -1,4 +1,4 @@
1
- import Stylesheet from "../lib/js2css";
1
+ import Stylesheet from "../lib/js2css.js";
2
2
 
3
3
  var DEFAULTS = Object.freeze({
4
4
  font_size: 1,
package/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import GeneralControlsStyle from "./general-controls-style";
2
- import ButtonStyle from "./button-style";
3
- import DropdownStyle from "./dropdown-style";
4
- import SliderStyle from "./slider-style";
1
+ import GeneralControlsStyle from "./general-controls-style/index.js";
2
+ import ButtonStyle from "./button-style/index.js";
3
+ import DropdownStyle from "./dropdown-style/index.js";
4
+ import SliderStyle from "./slider-style/index.js";
5
5
 
6
6
  function createGeneralControlsStyle(state, selector, layout) {
7
7
  return new GeneralControlsStyle(state, selector, layout);
@@ -1,5 +1,5 @@
1
- import { remToPx } from "../lib/remToPx";
2
- import Stylesheet from "../lib/js2css";
1
+ import { remToPx } from "../lib/remToPx.js";
2
+ import Stylesheet from "../lib/js2css.js";
3
3
 
4
4
  var DEFAULTS = Object.freeze({
5
5
  play_color: null,