@wix/origami-site-runtime 1.0.6 → 1.0.8

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
@@ -1,5 +1,7 @@
1
1
  # Wix import site runtime
2
2
 
3
+ Before local tests, run `pnpm -r run build` from the repository root to build workspace dependencies in order.
4
+
3
5
  Static routes come from item folders under `src/pages`. The home page is the page folder in parentheses, e.g. `src/pages/(home)`; a folder in parentheses is left out of the URL. Each document loads its item's `_generated/index.jsx`; `pages/error404` supplies an optional custom 404 page.
4
6
 
5
7
  ## Routing roadmap
@@ -28,7 +30,9 @@ cannot hide an illegally placed target. Diagnostics retain the original node sou
28
30
  routes to `#id > .id-overflow-wrapper`. Names come from the pure
29
31
  `@wix/origami-runtime/layout-contract` entry point. Root sizing, item placement, visibility
30
32
  and ordinary positioning remain on the ID selector. Background, border and pinned-layer
31
- CSS stays in the snapshot; the maintained component preserves focus and wrapper flags. Ref support is deferred
33
+ CSS comes from `@wix/origami-system-components/InternalContainer.css`, imported by the maintained
34
+ `@wix/origami-runtime/components/InternalContainer` component. The component preserves focus and
35
+ wrapper flags. Ref support is deferred
32
36
  (see the [runtime decision](../origami-runtime/README.md#decision-defer-ref-support-2026-09-24)).
33
37
 
34
38
  Only explicit targets in site-owned layout.css carriers opt in. Sources of inlined nodes
@@ -58,11 +62,16 @@ half-pixel floor; fixed values retain fractional pixels; zero is zero. See the
58
62
 
59
63
  ## Release and limitations
60
64
 
61
- Use the existing snapshot 0.4.0 baseline. Publish origami-runtime 0.2.0 (including layout-contract), then this runtime
62
- 1.1.0, before the generator/CLI that selects these minimum versions. Explicit local/file
63
- runtime overrides remain supported. Packed tests verify the compiler and pure contract
64
- outside the workspace without loading React or the snapshot. Coordinate DM 0.42 publication
65
- and first-published reader loadability separately; that producer check is not established here.
65
+ Generated structures import Page, Section, HeaderSection and FooterSection from
66
+ `@wix/origami-system-components` subpaths, InternalContainer from `@wix/origami-runtime`,
67
+ and other editor components from fetched wrappers. The package dependency order is
68
+ `@wix/origami-system-components` → `@wix/origami-runtime` → `@wix/origami-site-runtime`;
69
+ publish the required entry points before generator/CLI releases that consume them. Existing dependency
70
+ entries, including local/file runtime overrides, are preserved when component dependencies are added.
71
+ Packed tests verify the compiler and pure layout contract outside the workspace with only
72
+ compiler dependencies installed, without React or component implementations. Producer publication
73
+ and first-published reader loadability require separate verification; the producer fixtures here
74
+ are static captures (see test/fixtures/css/README.md).
66
75
 
67
76
  `--spx-stopper-max` is preserved but does not clamp scaling. The SPX plugin does not generate its runtime clamp formula. `position: stickyToHeader` is preserved
68
77
  as authored but is not a browser position value and receives no lowering. These are release
@@ -71,7 +80,7 @@ limitations, not claims of Thunderbolt parity; they need a separate producer/run
71
80
  ## Verification
72
81
 
73
82
  - `pnpm --filter @wix/origami-site-runtime run test`: parser/compiler, Vite and packed tests.
74
- - `pnpm --filter @wix/origami-site-runtime run test:browser`: actual component/snapshot in Chromium,
83
+ - `pnpm --filter @wix/origami-site-runtime run test:browser`: maintained InternalContainer and system-component CSS in Chromium,
75
84
  responsive SPX and grid/flex, nested fractional fixed values, max widths/alignment, overflow,
76
85
  visibility, focus/pointer mechanics, HMR and production build. Install Playwright Chromium or
77
86
  set `CHROME_CHANNEL=chrome` to use installed Chrome.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/origami-site-runtime",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Vite development and build helpers for wix-import static sites",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -9,7 +9,7 @@
9
9
  "scripts": {
10
10
  "build": "rm -rf dist tsconfig.tsbuildinfo && tsc -b .",
11
11
  "lint": "oxlint .",
12
- "test": "pnpm run build && node --test test/*.spec.js",
12
+ "test": "node --test test/*.spec.js",
13
13
  "clean": "rm -rf dist tsconfig.tsbuildinfo",
14
14
  "test:browser": "node test/spx.browser.mjs && node test/semanticContainer.browser.mjs"
15
15
  },
@@ -19,7 +19,7 @@
19
19
  "@babel/types": "^7.25.2",
20
20
  "@wix/builder-error-pages": "^1.1.6",
21
21
  "@wix/builder-piler-components": "^1.6.7",
22
- "@wix/origami-runtime": "0.10.0",
22
+ "@wix/origami-runtime": "0.11.0",
23
23
  "postcss": "^8.5.3",
24
24
  "postcss-custom-media": "^12.0.1",
25
25
  "react": "^18.3.1",
@@ -64,5 +64,5 @@
64
64
  "./default-error-404": "./src/default-error-404.jsx"
65
65
  },
66
66
  "type": "module",
67
- "falconPackageHash": "03fcf32ded6ac1f9f248523d7056780488e501e4e1a97ebc41860633"
67
+ "falconPackageHash": "6816322c222999dcbe8c51a591cff934a894bfc9b63294e23c90b7a7"
68
68
  }
@@ -1,27 +1,24 @@
1
- // Which local names in a module refer to an Origami component the rules care about. Resolved by
2
- // import identity rather than by JSX tag name, so a local component that happens to share a name
3
- // with an Origami one is left alone.
1
+ // Resolve Origami component identity from named virtual-module imports or named/default imports
2
+ // from @wix/origami-system-components/<Name>. Local aliases keep that identity; unrelated local
3
+ // components with the same JSX tag name are left alone.
4
4
 
5
5
  const ORIGAMI_MODULES = new Set(['document', 'document/components', 'wixEditorElements'])
6
- const COMPONENTS_DIRECTORY = 'components'
7
6
 
8
7
  const importedName = specifier => {
9
8
  if (specifier.type !== 'ImportSpecifier') return undefined
10
9
  return specifier.imported.type === 'Identifier' ? specifier.imported.name : specifier.imported.value
11
10
  }
12
11
 
13
- // A default import is an Origami component only when it comes from a bare `.../components/<Name>`
14
- // specifier; relative paths are the site's own global components.
15
- const defaultComponentName = source => {
16
- if (source.startsWith('.') || source.startsWith('/')) return undefined
17
-
18
- const segments = source.replace(/\/+$/u, '').split('/')
19
- return segments.at(-2) === COMPONENTS_DIRECTORY ? segments.at(-1) : undefined
20
- }
21
-
22
12
  const componentName = (source, specifier) => {
23
- if (specifier.type === 'ImportDefaultSpecifier') return defaultComponentName(source)
24
- return ORIGAMI_MODULES.has(source) ? importedName(specifier) : undefined
13
+ if (ORIGAMI_MODULES.has(source)) return importedName(specifier)
14
+
15
+ const match = /^@wix\/origami-system-components\/([^/]+)$/u.exec(source)
16
+ if (!match) return undefined
17
+ const name = match[1]
18
+ const imported = importedName(specifier)
19
+ return specifier.type === 'ImportDefaultSpecifier' || imported === name || imported === 'default'
20
+ ? name
21
+ : undefined
25
22
  }
26
23
 
27
24
  /**