@machinemetrics/mm-react-components 1.1.1 → 1.1.2

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 +1 @@
1
- {"version":3,"file":"DatePickerPreview.d.ts","sourceRoot":"","sources":["../../src/preview/DatePickerPreview.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,iBAAiB,4CAgExC"}
1
+ {"version":3,"file":"DatePickerPreview.d.ts","sourceRoot":"","sources":["../../src/preview/DatePickerPreview.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,iBAAiB,4CAwExC"}
@@ -10,4 +10,12 @@
10
10
  * are stable and don't depend on timing.
11
11
  */
12
12
  export declare function getDelayForVisualTest(defaultDelayMs: number): number;
13
+ /**
14
+ * Returns a fixed date when document has data-visual-test (Playwright visual test
15
+ * mode), otherwise undefined. Use for date picker/calendar previews so the
16
+ * displayed month (and day grid) is stable across runs and not tied to "today".
17
+ * Same pattern as getDelayForVisualTest: check data-visual-test, return stable
18
+ * value when set.
19
+ */
20
+ export declare function getFixedDateForVisualTest(): Date | undefined;
13
21
  //# sourceMappingURL=visualTestUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visualTestUtils.d.ts","sourceRoot":"","sources":["../../src/preview/visualTestUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAKpE"}
1
+ {"version":3,"file":"visualTestUtils.d.ts","sourceRoot":"","sources":["../../src/preview/visualTestUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,GAAG,SAAS,CAK5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@machinemetrics/mm-react-components",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Industrial-grade React components for manufacturing applications",
5
5
  "keywords": [
6
6
  "react",
@@ -81,10 +81,14 @@
81
81
  "test": "playwright test",
82
82
  "test:ui": "playwright test --ui",
83
83
  "test:headed": "playwright test --headed",
84
- "test:visual": "playwright test --config=playwright.config.ts",
84
+ "test:visual": "npm run test:visual:light && npm run test:visual:dark",
85
+ "test:visual:light": "playwright test --config=playwright.config.ts --project=chromium",
86
+ "test:visual:dark": "cross-env PLAYWRIGHT_DARK_RUN=1 playwright test --config=playwright.config.ts --project=chromium-dark --workers=1",
85
87
  "test:visual:ui": "playwright test --config=playwright.config.ts --ui",
86
- "test:visual:update": "playwright test --config=playwright.config.ts --update-snapshots",
87
- "test:visual:ci": "playwright test --config=playwright.config.ts --reporter=github",
88
+ "test:visual:update": "npm run test:visual:update:light && npm run test:visual:update:dark",
89
+ "test:visual:update:light": "playwright test --config=playwright.config.ts --project=chromium --update-snapshots",
90
+ "test:visual:update:dark": "cross-env PLAYWRIGHT_DARK_RUN=1 playwright test --config=playwright.config.ts --project=chromium-dark --workers=1 --update-snapshots",
91
+ "test:visual:ci": "npm run test:visual:light -- --reporter=github && npm run test:visual:dark -- --reporter=github",
88
92
  "update-components": "tsx scripts/update-components.ts",
89
93
  "update-components:bash": "./scripts/update-components.sh",
90
94
  "update-components:full": "tsx scripts/update-components.ts && tsx scripts/apply-customizations.ts",
@@ -176,6 +180,7 @@
176
180
  "@vitejs/plugin-react": "^5.1.2",
177
181
  "autoprefixer": "^10.4.23",
178
182
  "cheerio": "^1.0.0",
183
+ "cross-env": "^7.0.3",
179
184
  "eslint": "^9.39.2",
180
185
  "eslint-config-prettier": "^10.1.8",
181
186
  "eslint-plugin-jsx-a11y": "^6.10.2",
@@ -185,8 +190,8 @@
185
190
  "eslint-plugin-react-refresh": "^0.4.26",
186
191
  "globals": "^17.0.0",
187
192
  "playwright": "^1.57.0",
188
- "prism-react-renderer": "^2.4.1",
189
193
  "prettier": "^3.7.4",
194
+ "prism-react-renderer": "^2.4.1",
190
195
  "react-element-to-jsx-string": "^17.0.1",
191
196
  "tailwindcss": "^4.1.18",
192
197
  "terser": "^5.44.1",