@sps-woodland/editable-table 8.50.1 → 8.51.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.
package/lib/style.css CHANGED
@@ -116,7 +116,7 @@
116
116
  }.wds-editable-table.handsontable th {
117
117
  font-weight: var(--type-weight-bold);
118
118
  text-align: left;
119
- }.wds-editable-table.handsontable tr:first-child th {
119
+ }.wds-editable-table.handsontable thead tr:first-child th {
120
120
  border-width: 0 0 2px 0 !important;
121
121
  }td.wds-editable-table.htAutocomplete {
122
122
  --caret-width: 10px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sps-woodland/editable-table",
3
3
  "description": "SPS Woodland Design System Editable Table component",
4
- "version": "8.50.1",
4
+ "version": "8.51.0",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/editable-table",
@@ -20,6 +20,10 @@
20
20
  "./lib/style.css": {
21
21
  "import": "./lib/style.css",
22
22
  "require": "./lib/style.css"
23
+ },
24
+ "./style.css": {
25
+ "import": "./lib/style.css",
26
+ "require": "./lib/style.css"
23
27
  }
24
28
  },
25
29
  "publishConfig": {
@@ -29,29 +33,21 @@
29
33
  "@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
30
34
  "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
31
35
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
32
- "@sps-woodland/core": "8.50.1",
33
- "@sps-woodland/tokens": "8.50.1"
36
+ "@sps-woodland/core": "8.51.0",
37
+ "@sps-woodland/tokens": "8.51.0"
34
38
  },
35
39
  "devDependencies": {
36
40
  "@spscommerce/utils": "9.0.3",
37
- "@vanilla-extract/css": "1.17.4",
38
- "@vanilla-extract/recipes": "0.2.5",
39
- "postcss": "^8.5.14",
40
- "postcss-import": "^16.1.1",
41
41
  "react": "16.14.0",
42
42
  "react-dom": "16.14.0",
43
- "@sps-woodland/core": "8.50.1",
44
- "@sps-woodland/tokens": "8.50.1"
45
- },
46
- "dependencies": {
47
- "@handsontable/react": "^15.3.0",
48
- "@handsontable/react-wrapper": "^15.3.0",
49
- "handsontable": "15.3.0"
43
+ "@sps-woodland/core": "8.51.0",
44
+ "@sps-woodland/tokens": "8.51.0"
50
45
  },
51
46
  "scripts": {
52
- "build": "pnpm run build:js && pnpm run build:types",
47
+ "build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
53
48
  "build:js": "vite build",
54
49
  "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
50
+ "build:css": "cp ../core/lib/editable-table/style.css lib/style.css 2>/dev/null || echo 'editable-table style.css not found, skipping'",
55
51
  "watch": "vite build --watch",
56
52
  "clean": "git clean -fdX",
57
53
  "pub": "node ../../../scripts/publish-package.mjs"
package/vite.config.mjs CHANGED
@@ -1,38 +1,8 @@
1
1
  import path from "node:path";
2
- import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
3
2
  import { defineConfig } from "vite";
4
- import { getVanillaExtractPluginProps } from "../../../scripts/vanilla-extract-plugin-props.mjs";
5
3
  import pkg from "./package.json";
6
- import fs from "node:fs";
7
-
8
- const packageVersion = process.env.PREDICTED_VERSION || pkg.version;
9
4
 
10
5
  export default defineConfig({
11
- plugins: [
12
- vanillaExtractPlugin(
13
- getVanillaExtractPluginProps({
14
- packageName: pkg.name,
15
- packageVersion,
16
- })
17
- ),
18
- {
19
- name: 'process-css',
20
- async writeBundle() {
21
- const postcss = (await import('postcss')).default;
22
- const postcssImport = (await import('postcss-import')).default;
23
-
24
- const css = await fs.promises.readFile(path.resolve(__dirname, 'src/EditableTable.css'), 'utf8');
25
-
26
- const result = await postcss([postcssImport()])
27
- .process(css, {
28
- from: path.resolve(__dirname, 'src/EditableTable.css'),
29
- to: path.resolve(__dirname, 'lib/style.css')
30
- });
31
-
32
- await fs.promises.writeFile(path.resolve(__dirname, 'lib/style.css'), result.css);
33
- }
34
- }
35
- ],
36
6
  build: {
37
7
  lib: {
38
8
  entry: path.resolve(__dirname, "src/index.ts"),
@@ -42,7 +12,11 @@ export default defineConfig({
42
12
  outDir: path.resolve(__dirname, "./lib"),
43
13
  emptyOutDir: false,
44
14
  rollupOptions: {
45
- external: pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [],
15
+ // External must match subpath imports like @sps-woodland/core/editable-table
16
+ external: (id) => {
17
+ const peerDeps = pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [];
18
+ return peerDeps.some((dep) => id === dep || id.startsWith(dep + "/"));
19
+ },
46
20
  },
47
21
  },
48
22
  });
@@ -1,5 +0,0 @@
1
- import * as React from "react";
2
- import type { HotTableClass } from "@handsontable/react";
3
- export declare const EditableTable: React.ForwardRefExoticComponent<Omit<import("@handsontable/react").HotTableProps & React.RefAttributes<HotTableClass>, "height" | "licenseKey" | "ref"> & {
4
- requiredColumns?: number[];
5
- } & React.RefAttributes<unknown>>;