@wix/origami-system-components 1.10.1 → 1.10.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.
- package/README.md +76 -0
- package/dist/InternalContainer.css +1 -1
- package/dist/layout/BaseInternalContainer.js +5 -5
- package/dist/layout/Page.css +23 -0
- package/dist/layout/Page.css.d.ts +1 -0
- package/dist/layout/Page.d.ts +21 -0
- package/dist/layout/Page.js +12 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -114,6 +114,82 @@ Standard artifact configuration publishes the built package; local builds and pa
|
|
|
114
114
|
|
|
115
115
|
## Layout contract
|
|
116
116
|
|
|
117
|
+
### Experimental Page
|
|
118
|
+
|
|
119
|
+
`@wix/origami-system-components/layout/Page` provides named/default `Page` exports
|
|
120
|
+
and `PageProps`. The root index and `./Page` continue to expose the legacy Page.
|
|
121
|
+
Newly exported sites import `layout/Page`, like the layout section components.
|
|
122
|
+
The site generator accepts both the legacy and layout Page imports when reading sites
|
|
123
|
+
back into Origami.
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import Page from '@wix/origami-system-components/layout/Page'
|
|
127
|
+
import Section from '@wix/origami-system-components/layout/Section'
|
|
128
|
+
|
|
129
|
+
<Page id="page" className="authored-page"
|
|
130
|
+
backgroundLayer={[<div key="color" className="page-color" />]}
|
|
131
|
+
header={<SharedHeader id="header-instance" className="header-instance" />}
|
|
132
|
+
footer={<SharedFooter id="footer-instance" className="footer-instance" />}>
|
|
133
|
+
<Section id="first">{/* InternalContainer and content */}</Section>
|
|
134
|
+
<Section id="second">{/* InternalContainer and content */}</Section>
|
|
135
|
+
</Page>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The required `id` and optional `className` belong to the outer div. Page adds its
|
|
139
|
+
structural `origami-page` class, without deriving a class from the ID. Only supported
|
|
140
|
+
props are forwarded. `backgroundLayer` is an optional array of React nodes; `header`,
|
|
141
|
+
`footer`, and `children` are optional React nodes. Callers supply at most one
|
|
142
|
+
Header-producing element and one Footer-producing element in their named slots,
|
|
143
|
+
and Section-producing children in authored order. Shared definitions are supported.
|
|
144
|
+
Page does not inspect component types or validate cardinality. Arrays require
|
|
145
|
+
caller-supplied stable keys. Additional slots and page-pinned content are out of scope.
|
|
146
|
+
|
|
147
|
+
During the DM transition, `structure.jsx` also accepts Header, Footer, and Background
|
|
148
|
+
elements as Page children. The site's JSX compatibility pass moves these into
|
|
149
|
+
`header`, `footer`, and `backgroundLayer` at build time, including shared
|
|
150
|
+
`Header_<id>` / `Footer_<id>` imports and backgrounds inside literal fragments.
|
|
151
|
+
Sections retain their authored order. Props and legacy children can be mixed;
|
|
152
|
+
an explicit slot prop (including `null`) replaces children for that slot.
|
|
153
|
+
This uses import bindings rather than runtime component names and leaves the
|
|
154
|
+
authored structure unchanged for round trips. Outside the site's build pipeline,
|
|
155
|
+
pass the slot props directly.
|
|
156
|
+
|
|
157
|
+
Rendering order is background wrapper, header, one main containing children, footer.
|
|
158
|
+
Absent header/footer add no wrappers; the background and main remain when empty.
|
|
159
|
+
Header/Footer preserve their identities and remain direct Page children. Sections
|
|
160
|
+
have main as their DOM parent: use `.authored-page > main > .section` for direct-child
|
|
161
|
+
selectors and account for main in parent traversal. A route shell must not add a
|
|
162
|
+
second main landmark. Skip links can target Section IDs (sections have `tabIndex=-1`).
|
|
163
|
+
|
|
164
|
+
Page imports its own scoped CSS, retained through package imports in Vite dev and
|
|
165
|
+
production. The relative root contains an absolute inset background with background-only
|
|
166
|
+
clipping. Background children overlap in one grid cell; main uses `display: contents`.
|
|
167
|
+
Authored CSS owns foreground grid layout, sizing, overflow, and sticky/fixed placement
|
|
168
|
+
and z-index on Header/Footer instances. It must keep foreground content above the
|
|
169
|
+
positioned background for the chosen layout. Page adds no stacking context, negative
|
|
170
|
+
z-index, or foreground clipping.
|
|
171
|
+
|
|
172
|
+
The authored browser fixture is in `test/fixtures/page`. After building, run
|
|
173
|
+
`pnpm --filter @wix/origami-system-components exec vite test/fixtures/page`.
|
|
174
|
+
The default fixture exercises two background layers, transparent sections, a shared
|
|
175
|
+
sticky header/footer, skip links, pointer interaction, and foreground overflow.
|
|
176
|
+
Use `?fixed` for fixed landmarks, `?bare` for omitted landmarks, and `?empty` for
|
|
177
|
+
omitted landmarks/children and an empty background array. Check desktop and mobile
|
|
178
|
+
widths, scroll positioning, one exposed main, section focus targets, and console warnings.
|
|
179
|
+
|
|
180
|
+
Validated in headless Chromium at 1280×800 and 390×800 (2026-10-22), for all four
|
|
181
|
+
fixture variants: background bounds equal Page bounds, background nodes overlap,
|
|
182
|
+
sections occupy consecutive rows without a background row, pointer clicks reach the
|
|
183
|
+
button, and skip-link activation focuses the first section. Sticky and fixed landmarks
|
|
184
|
+
remain at the viewport edges after scrolling. Chromium's accessibility tree exposes
|
|
185
|
+
one main even for empty content (the empty Page itself has zero height). No duplicate
|
|
186
|
+
IDs, React key warnings, or browser errors were observed. Screenshots confirm background
|
|
187
|
+
clipping and visible foreground overflow. This covers the authored fixture shell;
|
|
188
|
+
integration with generated route shells and other browser/accessibility combinations
|
|
189
|
+
still requires verification during migration.
|
|
190
|
+
|
|
191
|
+
### InternalContainer
|
|
192
|
+
|
|
117
193
|
```tsx
|
|
118
194
|
import InternalContainer from '@wix/origami-system-components/InternalContainer'
|
|
119
195
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.
|
|
1
|
+
/* ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.0_83b0c9fab67fcdbd3af97b6b9e87786a/node_modules/@wix/editor-system-components/dist/site/components/InternalContainer/css.css */
|
|
2
2
|
.internalContainerRoot__MJnN1 {
|
|
3
3
|
position: relative;
|
|
4
4
|
width: 100%;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.
|
|
3
|
+
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.0_83b0c9fab67fcdbd3af97b6b9e87786a/node_modules/@wix/editor-system-components/dist/site/components/InternalContainer/component.js
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import React__default, { useCallback } from "react";
|
|
6
6
|
|
|
7
|
-
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.
|
|
7
|
+
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.0_83b0c9fab67fcdbd3af97b6b9e87786a/node_modules/@wix/editor-system-components/dist/site/components/chunks/clsx.js
|
|
8
8
|
function r(e) {
|
|
9
9
|
var t, f, n = "";
|
|
10
10
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -17,7 +17,7 @@ function clsx() {
|
|
|
17
17
|
return n;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.
|
|
20
|
+
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.0_83b0c9fab67fcdbd3af97b6b9e87786a/node_modules/@wix/editor-system-components/dist/site/components/chunks/constants.js
|
|
21
21
|
var TestIds = {
|
|
22
22
|
overflow: "internal-container-overflow",
|
|
23
23
|
content: "internal-container-content",
|
|
@@ -27,7 +27,7 @@ var TestIds = {
|
|
|
27
27
|
};
|
|
28
28
|
var INTERNAL_CONTAINER_ROOT_CLASS = "container";
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.
|
|
30
|
+
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.0_83b0c9fab67fcdbd3af97b6b9e87786a/node_modules/@wix/editor-system-components/dist/site/components/InternalContainer/component.js
|
|
31
31
|
var internalContainerRoot = "internalContainerRoot__MJnN1";
|
|
32
32
|
var backgroundLayer = "backgroundLayer__ZDd0Q";
|
|
33
33
|
var pinnedLayer = "pinnedLayer__i0Pg8";
|
|
@@ -125,7 +125,7 @@ function component(props) {
|
|
|
125
125
|
return /* @__PURE__ */ jsx(InternalContainer$1, { ...props });
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.
|
|
128
|
+
// ../../node_modules/.pnpm/@wix+editor-system-components@1.1590.0_83b0c9fab67fcdbd3af97b6b9e87786a/node_modules/@wix/editor-system-components/dist/site/components/InternalContainer/index.js
|
|
129
129
|
var InternalContainer_default = component;
|
|
130
130
|
export {
|
|
131
131
|
component as InternalContainer,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.origami-page {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.origami-page__main {
|
|
6
|
+
display: contents;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.origami-page__background {
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
right: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-columns: 1fr;
|
|
17
|
+
grid-template-rows: 1fr;
|
|
18
|
+
overflow: clip;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.origami-page__background > * {
|
|
22
|
+
grid-area: 1 / 1 / 2 / 2;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import './Page.css';
|
|
3
|
+
export interface PageProps {
|
|
4
|
+
id: string;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
/** Background nodes overlap in one cell. Supply stable keys for array entries. */
|
|
7
|
+
backgroundLayer?: Array<ReactNode> | undefined;
|
|
8
|
+
/** At most one Header-producing element, including a shared definition. */
|
|
9
|
+
header?: ReactNode;
|
|
10
|
+
/** At most one Footer-producing element, including a shared definition. */
|
|
11
|
+
footer?: ReactNode;
|
|
12
|
+
/** Section-producing elements. The site build routes legacy DM landmark/background children to slots. */
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Experimental page composition. Slot semantics are the caller's responsibility;
|
|
17
|
+
* supplied nodes are rendered without component-type or cardinality validation.
|
|
18
|
+
* Authored CSS owns foreground layout and positioning. Main has no layout box.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Page({ id, className, backgroundLayer, header, footer, children }: PageProps): import("react").JSX.Element;
|
|
21
|
+
export default Page;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import './Page.css';
|
|
4
|
+
/**
|
|
5
|
+
* Experimental page composition. Slot semantics are the caller's responsibility;
|
|
6
|
+
* supplied nodes are rendered without component-type or cardinality validation.
|
|
7
|
+
* Authored CSS owns foreground layout and positioning. Main has no layout box.
|
|
8
|
+
*/
|
|
9
|
+
export function Page({ id, className, backgroundLayer, header, footer, children }) {
|
|
10
|
+
return (_jsxs("div", { id: id, className: ['origami-page', className].filter(Boolean).join(' '), children: [_jsx("div", { className: "origami-page__background", children: backgroundLayer }), header, _jsx("main", { className: "origami-page__main", children: children }), footer] }));
|
|
11
|
+
}
|
|
12
|
+
export default Page;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/origami-system-components",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Editor structural and system components for standalone Origami sites",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"esbuild": "^0.28.1",
|
|
23
23
|
"jsdom": "^23.0.1",
|
|
24
24
|
"react": "^18.3.1",
|
|
25
|
+
"react-dom": "^18.3.1",
|
|
25
26
|
"typescript": "^6.0.3",
|
|
26
27
|
"vite": "^6.4.3",
|
|
27
28
|
"vitest": "^4.1.11"
|
|
@@ -91,6 +92,10 @@
|
|
|
91
92
|
"types": "./dist/layout/layout-contract.d.ts",
|
|
92
93
|
"default": "./dist/layout/layout-contract.js"
|
|
93
94
|
},
|
|
95
|
+
"./layout/Page": {
|
|
96
|
+
"types": "./dist/layout/Page.d.ts",
|
|
97
|
+
"default": "./dist/layout/Page.js"
|
|
98
|
+
},
|
|
94
99
|
"./layout/Section": {
|
|
95
100
|
"types": "./dist/layout/Section.d.ts",
|
|
96
101
|
"default": "./dist/layout/Section.js"
|
|
@@ -118,5 +123,5 @@
|
|
|
118
123
|
"@wix/builder-state": "^1.49.3",
|
|
119
124
|
"@wix/editor-components": "^1.16.0"
|
|
120
125
|
},
|
|
121
|
-
"falconPackageHash": "
|
|
126
|
+
"falconPackageHash": "84bd255c072dd6dfec4e41cd37099d708fe051fb05052aa46b89ac1b"
|
|
122
127
|
}
|