@wix/origami-transforms 0.1.22 → 0.1.24

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/README.md CHANGED
@@ -10,7 +10,12 @@ through `setCommand`. It has no Vite dependency.
10
10
 
11
11
  JavaScript source lives in `src/`; `pnpm build` emits declarations to `dist/`.
12
12
  Run `pnpm test` and `pnpm lint` for the transform suite and lint checks.
13
- Transform specs and CSS fixtures live only in this package. The old runtime keeps its
14
- own integration, browser and packed-package tests. Consumers import the shared API
13
+ Transform specs and CSS fixtures live only in this package. `test/packed.spec.js` loads the
14
+ packed package outside the monorepo.
15
+ `pnpm test:browser` checks the compiled CSS in Chromium: SPX scaling (`test/spx.browser.mjs`) and the
16
+ maintained InternalContainer with system-component CSS (`test/semanticContainer.browser.mjs`: responsive SPX,
17
+ grid/flex, max widths and alignment, overflow, visibility, focus and pointer events, HMR and a production build).
18
+ CI doesn't run it. Install Playwright Chromium (`pnpm exec playwright install chromium`) or set
19
+ `CHROME_CHANNEL=chrome` to use the installed Chrome. Consumers import the shared API
15
20
  and types from `@wix/origami-transforms`; there are no public subpath exports.
16
21
  The host layout only needs a `root` string.
@@ -23,6 +23,7 @@ export function entryTarget(registration: CompanionRegistration, srcDir: string)
23
23
  export function findFile(target: string, exists: (path: string) => boolean): string | undefined;
24
24
  export function companionExports(modules: ReadonlyMap<string, CompanionModule>, entry: (registration: CompanionRegistration) => string): Record<string, string>;
25
25
  export function readCompanionRegistrationsIn(srcDir: string): Map<string, CompanionRegistration>;
26
+ export function extensionFiles(directory: string): string[];
26
27
  export type CompanionModule = {
27
28
  registration: CompanionRegistration;
28
29
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/origami-transforms",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "Babel and PostCSS checks and transforms for Wix origami page files.",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -11,20 +11,25 @@
11
11
  "build": "rm -rf dist tsconfig.tsbuildinfo && tsc -b .",
12
12
  "lint": "oxlint .",
13
13
  "test": "node --test test/*.spec.js",
14
+ "test:browser": "node test/spx.browser.mjs && node test/semanticContainer.browser.mjs",
14
15
  "clean": "rm -rf dist tsconfig.tsbuildinfo"
15
16
  },
16
17
  "dependencies": {
17
18
  "@babel/core": "^7.26.0",
18
19
  "@babel/parser": "^7.25.0",
19
20
  "@babel/types": "^7.25.2",
20
- "@wix/origami-fonts": "1.0.2",
21
- "@wix/origami-system-components": "1.10.4",
21
+ "@wix/origami-fonts": "1.0.3",
22
+ "@wix/origami-system-components": "1.10.5",
22
23
  "postcss": "^8.5.3",
23
24
  "postcss-custom-media": "^12.0.1"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/node": "^22.0.0",
27
- "typescript": "^6.0.3"
28
+ "playwright": "^1.61.1",
29
+ "react": "^18.3.1",
30
+ "react-dom": "^18.3.1",
31
+ "typescript": "^6.0.3",
32
+ "vite": "^8"
28
33
  },
29
34
  "publishUnscoped": false,
30
35
  "publishConfig": {
@@ -64,5 +69,5 @@
64
69
  },
65
70
  "type": "module",
66
71
  "types": "./dist/index.d.ts",
67
- "falconPackageHash": "0dc5d47f1c3d377148b93a34ae639da5d57514cdbd710b9baa2259bd"
72
+ "falconPackageHash": "398f6cf44892edee778a3cce4a42b93f61f9ffbea23beb4703826cf8"
68
73
  }
@@ -1,5 +1,5 @@
1
1
  // A companion app's `editorReactComponent` and `contextProvider` registrations, read the same way by the export
2
- // (origami-site-generator, from the exported files) and by the site's Vite plugin (origami-site-runtime, from disk).
2
+ // (from the exported files) and by import-site (from disk), both in origami-site-generator.
3
3
  import { existsSync, readFileSync, readdirSync } from 'node:fs'
4
4
  import { posix } from 'node:path'
5
5
  import { parse } from '@babel/parser'
@@ -177,8 +177,11 @@ export const readCompanionRegistrationsIn = srcDir =>
177
177
  extensionFiles(srcDir).map(file => /** @type {const} */ ([file, readFileSync(file, 'utf8')]))
178
178
  )
179
179
 
180
- /** @param {string} directory @returns {string[]} */
181
- const extensionFiles = directory =>
180
+ /**
181
+ * Every registration file under `directory`, skipping `node_modules`; none when it doesn't exist.
182
+ * @param {string} directory @returns {string[]}
183
+ */
184
+ export const extensionFiles = directory =>
182
185
  existsSync(directory)
183
186
  ? readdirSync(directory, { withFileTypes: true }).flatMap(entry => {
184
187
  const path = posix.join(directory, entry.name)