@reekon-tools/boldr-utils 1.8.3 → 1.8.4

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/dist/exports.d.ts CHANGED
@@ -7,6 +7,7 @@ export * from './types/firestore.js';
7
7
  export * from './types/layout.js';
8
8
  export * from './types/annotation.js';
9
9
  export { getToleranceColor, calculateDeviationPercentage, isWithinTolerance, generateToleranceGradient, createDefaultToleranceThresholds, DEFAULT_TOLERANCE_COLORS, type ToleranceThreshold, type ToleranceConfig, } from './utils/tolerance.js';
10
+ export { GeneralColors, SecondaryColors, FormColors, TileColors, FormulaColors, YellowColors, RedColors, GreenColors, tailwindColors, } from './theme/colors.js';
10
11
  export { DEFAULT_GROUP_INDEX, isDefaultGroup, findDefaultGroup, isFormGroupCompleted, } from './utils/groups.js';
11
12
  export { ALL_EXPORT_CATEGORIES, ALL_EXPORT_MEASUREMENT_DATA_FIELDS, ALL_EXPORT_OBJECT_TYPES, DEFAULT_EXPORT_CONFIG, EXPORT_EVERYTHING_CONFIG, normalizeExportConfig, type ExportCategory, type ExportConfig, type ExportImageFormat, type ExportMeasurementDataField, type ExportMeasurementFilter, type ExportObjectType, } from './export/config.js';
12
13
  export { classifyFileForExport } from './export/objectKinds.js';
package/dist/exports.js CHANGED
@@ -11,6 +11,8 @@ export * from './types/firestore.js';
11
11
  export * from './types/layout.js';
12
12
  export * from './types/annotation.js';
13
13
  export { getToleranceColor, calculateDeviationPercentage, isWithinTolerance, generateToleranceGradient, createDefaultToleranceThresholds, DEFAULT_TOLERANCE_COLORS, } from './utils/tolerance.js';
14
+ // Shared color palette (canonical source for both apps' brand colors).
15
+ export { GeneralColors, SecondaryColors, FormColors, TileColors, FormulaColors, YellowColors, RedColors, GreenColors, tailwindColors, } from './theme/colors.js';
14
16
  export { DEFAULT_GROUP_INDEX, isDefaultGroup, findDefaultGroup, isFormGroupCompleted, } from './utils/groups.js';
15
17
  // Configurable job CSV export, shared by rock-pro-app and rock-desktop so
16
18
  // both platforms emit identical files.
@@ -0,0 +1,101 @@
1
+ export declare const GeneralColors: {
2
+ readonly darkGrey: "#1D1F21";
3
+ readonly grey1: "#2B2C2E";
4
+ readonly grey2: "#424345";
5
+ readonly grey3: "#626364";
6
+ readonly grey4: "#9FA0A2";
7
+ readonly white: "#FFFFFF";
8
+ };
9
+ export declare const SecondaryColors: {
10
+ readonly accentBlue1: "#2D3843";
11
+ readonly accentBlue2: "#2E4C6A";
12
+ readonly accentBlue3: "#4B6074";
13
+ readonly accentBlue4: "#67819A";
14
+ };
15
+ export declare const FormColors: {
16
+ readonly lightGrey1: "#BCBEC2";
17
+ readonly lightGrey2: "#E8EAED";
18
+ };
19
+ export declare const TileColors: {
20
+ readonly darkBlue: "#02274B";
21
+ readonly activeBlue: "#0066FF";
22
+ readonly lightBlue1: "#50A6FF";
23
+ readonly lightBlue2: "#89C3FF";
24
+ };
25
+ export declare const FormulaColors: {
26
+ readonly darkPurple: "#6C155F";
27
+ readonly purple: "#BD30A8";
28
+ };
29
+ export declare const YellowColors: {
30
+ readonly mainYellow: "#FFAD00";
31
+ };
32
+ export declare const RedColors: {
33
+ readonly warningRed: "#DA1100";
34
+ readonly red: "#E83D2F";
35
+ readonly mutedRed: "#DF6358";
36
+ };
37
+ export declare const GreenColors: {
38
+ readonly warningGreen: "#00E920";
39
+ readonly green: "#58A942";
40
+ readonly mutedGreen: "#8BB380";
41
+ };
42
+ /**
43
+ * The palette above shaped for Tailwind's `theme.extend.colors`. Spread it
44
+ * into the app's tailwind config (works with tailwindcss v3 and NativeWind):
45
+ *
46
+ * import { tailwindColors } from '@reekon-tools/boldr-utils/theme';
47
+ * export default {
48
+ * theme: { extend: { colors: { ...tailwindColors } } },
49
+ * };
50
+ *
51
+ * Class names follow the constant names, kebab-cased per group, e.g.
52
+ * `bg-general-dark-grey`, `text-secondary-accent-blue-1`, `bg-tile-active`,
53
+ * `border-form-light-grey-2`, `bg-formula`, `text-brand-red-muted`.
54
+ *
55
+ * The yellow/red/green groups are namespaced under `brand-*` so they don't
56
+ * shadow Tailwind's built-in `yellow`/`red`/`green` scales (extend replaces
57
+ * a color key wholesale, which would break classes like `text-red-500`).
58
+ */
59
+ export declare const tailwindColors: {
60
+ readonly general: {
61
+ readonly 'dark-grey': "#1D1F21";
62
+ readonly 'grey-1': "#2B2C2E";
63
+ readonly 'grey-2': "#424345";
64
+ readonly 'grey-3': "#626364";
65
+ readonly 'grey-4': "#9FA0A2";
66
+ readonly white: "#FFFFFF";
67
+ };
68
+ readonly secondary: {
69
+ readonly 'accent-blue-1': "#2D3843";
70
+ readonly 'accent-blue-2': "#2E4C6A";
71
+ readonly 'accent-blue-3': "#4B6074";
72
+ readonly 'accent-blue-4': "#67819A";
73
+ };
74
+ readonly form: {
75
+ readonly 'light-grey-1': "#BCBEC2";
76
+ readonly 'light-grey-2': "#E8EAED";
77
+ };
78
+ readonly tile: {
79
+ readonly dark: "#02274B";
80
+ readonly active: "#0066FF";
81
+ readonly 'light-1': "#50A6FF";
82
+ readonly 'light-2': "#89C3FF";
83
+ };
84
+ readonly formula: {
85
+ readonly DEFAULT: "#BD30A8";
86
+ readonly dark: "#6C155F";
87
+ };
88
+ readonly 'brand-yellow': {
89
+ readonly DEFAULT: "#FFAD00";
90
+ };
91
+ readonly 'brand-red': {
92
+ readonly DEFAULT: "#E83D2F";
93
+ readonly warning: "#DA1100";
94
+ readonly muted: "#DF6358";
95
+ };
96
+ readonly 'brand-green': {
97
+ readonly DEFAULT: "#58A942";
98
+ readonly warning: "#00E920";
99
+ readonly muted: "#8BB380";
100
+ };
101
+ };
@@ -0,0 +1,101 @@
1
+ export const GeneralColors = {
2
+ darkGrey: '#1D1F21',
3
+ grey1: '#2B2C2E',
4
+ grey2: '#424345',
5
+ grey3: '#626364',
6
+ grey4: '#9FA0A2',
7
+ white: '#FFFFFF',
8
+ };
9
+ export const SecondaryColors = {
10
+ accentBlue1: '#2D3843',
11
+ accentBlue2: '#2E4C6A',
12
+ accentBlue3: '#4B6074',
13
+ accentBlue4: '#67819A',
14
+ };
15
+ export const FormColors = {
16
+ lightGrey1: '#BCBEC2',
17
+ lightGrey2: '#E8EAED',
18
+ };
19
+ export const TileColors = {
20
+ darkBlue: '#02274B',
21
+ activeBlue: '#0066FF',
22
+ lightBlue1: '#50A6FF',
23
+ lightBlue2: '#89C3FF',
24
+ };
25
+ export const FormulaColors = {
26
+ darkPurple: '#6C155F',
27
+ purple: '#BD30A8',
28
+ };
29
+ export const YellowColors = {
30
+ mainYellow: '#FFAD00',
31
+ };
32
+ export const RedColors = {
33
+ warningRed: '#DA1100',
34
+ red: '#E83D2F',
35
+ mutedRed: '#DF6358',
36
+ };
37
+ export const GreenColors = {
38
+ warningGreen: '#00E920',
39
+ green: '#58A942',
40
+ mutedGreen: '#8BB380',
41
+ };
42
+ /**
43
+ * The palette above shaped for Tailwind's `theme.extend.colors`. Spread it
44
+ * into the app's tailwind config (works with tailwindcss v3 and NativeWind):
45
+ *
46
+ * import { tailwindColors } from '@reekon-tools/boldr-utils/theme';
47
+ * export default {
48
+ * theme: { extend: { colors: { ...tailwindColors } } },
49
+ * };
50
+ *
51
+ * Class names follow the constant names, kebab-cased per group, e.g.
52
+ * `bg-general-dark-grey`, `text-secondary-accent-blue-1`, `bg-tile-active`,
53
+ * `border-form-light-grey-2`, `bg-formula`, `text-brand-red-muted`.
54
+ *
55
+ * The yellow/red/green groups are namespaced under `brand-*` so they don't
56
+ * shadow Tailwind's built-in `yellow`/`red`/`green` scales (extend replaces
57
+ * a color key wholesale, which would break classes like `text-red-500`).
58
+ */
59
+ export const tailwindColors = {
60
+ general: {
61
+ 'dark-grey': GeneralColors.darkGrey,
62
+ 'grey-1': GeneralColors.grey1,
63
+ 'grey-2': GeneralColors.grey2,
64
+ 'grey-3': GeneralColors.grey3,
65
+ 'grey-4': GeneralColors.grey4,
66
+ white: GeneralColors.white,
67
+ },
68
+ secondary: {
69
+ 'accent-blue-1': SecondaryColors.accentBlue1,
70
+ 'accent-blue-2': SecondaryColors.accentBlue2,
71
+ 'accent-blue-3': SecondaryColors.accentBlue3,
72
+ 'accent-blue-4': SecondaryColors.accentBlue4,
73
+ },
74
+ form: {
75
+ 'light-grey-1': FormColors.lightGrey1,
76
+ 'light-grey-2': FormColors.lightGrey2,
77
+ },
78
+ tile: {
79
+ dark: TileColors.darkBlue,
80
+ active: TileColors.activeBlue,
81
+ 'light-1': TileColors.lightBlue1,
82
+ 'light-2': TileColors.lightBlue2,
83
+ },
84
+ formula: {
85
+ DEFAULT: FormulaColors.purple,
86
+ dark: FormulaColors.darkPurple,
87
+ },
88
+ 'brand-yellow': {
89
+ DEFAULT: YellowColors.mainYellow,
90
+ },
91
+ 'brand-red': {
92
+ DEFAULT: RedColors.red,
93
+ warning: RedColors.warningRed,
94
+ muted: RedColors.mutedRed,
95
+ },
96
+ 'brand-green': {
97
+ DEFAULT: GreenColors.green,
98
+ warning: GreenColors.warningGreen,
99
+ muted: GreenColors.mutedGreen,
100
+ },
101
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reekon-tools/boldr-utils",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "description": "Shared utilities for formulas and measurement conversion used in Reekon apps",
5
5
  "author": "REEKON Tools",
6
6
  "license": "MIT",
@@ -19,6 +19,11 @@
19
19
  "import": "./dist/index.js",
20
20
  "default": "./dist/index.js"
21
21
  },
22
+ "./theme": {
23
+ "types": "./dist/theme/colors.d.ts",
24
+ "import": "./dist/theme/colors.js",
25
+ "default": "./dist/theme/colors.js"
26
+ },
22
27
  "./package.json": "./package.json"
23
28
  },
24
29
  "scripts": {
@@ -30,7 +35,7 @@
30
35
  "coverage": "vitest run --coverage",
31
36
  "format": "prettier --write .",
32
37
  "check-format": "prettier --check .",
33
- "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
38
+ "check-exports": "attw --pack . --profile esm-only",
34
39
  "ci": "yarn run check-format && vitest run && yarn run build && yarn run check-exports"
35
40
  },
36
41
  "keywords": [],