@wix/origami-system-components 1.10.10 → 1.10.12
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 +32 -50
- package/dist/{layout/Footer.d.ts → Footer.d.ts} +1 -1
- package/dist/{layout/Footer.js → Footer.js} +1 -1
- package/dist/FooterSection.d.ts +9 -10
- package/dist/FooterSection.js +10 -5
- package/dist/{layout/Header.d.ts → Header.d.ts} +1 -1
- package/dist/{layout/Header.js → Header.js} +1 -1
- package/dist/HeaderSection.d.ts +10 -11
- package/dist/HeaderSection.js +11 -6
- package/dist/{layout/InternalContainer.d.ts → InternalContainer.d.ts} +1 -1
- package/dist/{layout/InternalContainer.js → InternalContainer.js} +4 -4
- package/dist/Page.d.ts +33 -8
- package/dist/Page.js +14 -5
- package/dist/{layout/PinnedToScreen.d.ts → PinnedToScreen.d.ts} +1 -1
- package/dist/{layout/PinnedToScreen.js → PinnedToScreen.js} +1 -1
- package/dist/Section.d.ts +10 -9
- package/dist/Section.js +15 -6
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -4
- package/package.json +25 -43
- package/dist/hocs.js +0 -22
- package/dist/layout/FooterSection.d.ts +0 -9
- package/dist/layout/FooterSection.js +0 -12
- package/dist/layout/HeaderSection.d.ts +0 -10
- package/dist/layout/HeaderSection.js +0 -13
- package/dist/layout/Page.d.ts +0 -33
- package/dist/layout/Page.js +0 -16
- package/dist/layout/Section.d.ts +0 -12
- package/dist/layout/Section.js +0 -17
- /package/dist/{layout/Page.css → Page.css} +0 -0
- /package/dist/{layout/Page.css.d.ts → Page.css.d.ts} +0 -0
- /package/dist/{layout/PinnedToScreen.css → PinnedToScreen.css} +0 -0
- /package/dist/{layout/PinnedToScreen.css.d.ts → PinnedToScreen.css.d.ts} +0 -0
- /package/dist/{layout/Section.css → Section.css} +0 -0
- /package/dist/{layout/Section.css.d.ts → Section.css.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -6,10 +6,6 @@ have named and default exports; the root index has named exports only.
|
|
|
6
6
|
| Component | Upstream source | Wrapping |
|
|
7
7
|
| --- | --- | --- |
|
|
8
8
|
| InternalContainer | `@wix/editor-system-components/InternalContainer` | Fixed wrapper layers, derived classes, supported props |
|
|
9
|
-
| Page | `@wix/editor-components/skin/Page/ResponsivePageWithColorBG` | `withNormalChildren` |
|
|
10
|
-
| Section | `@wix/editor-components/component/Section` | `withNormalChildren(withController(...))` |
|
|
11
|
-
| HeaderSection | `@wix/editor-components/component/HeaderSection` | `withNormalChildren(withController(...))` |
|
|
12
|
-
| FooterSection | `@wix/editor-components/component/FooterSection` | `withNormalChildren`, no controller |
|
|
13
9
|
| Anchor | `@wix/editor-components/component/Anchor` | None |
|
|
14
10
|
| UnsupportedWidgetPlaceholder | None (self-contained) | None |
|
|
15
11
|
|
|
@@ -20,33 +16,27 @@ viewport while a tall placeholder scrolls. `message` replaces the whole text, an
|
|
|
20
16
|
`--placeholder-sticky-top` custom property offsets it below a fixed header. It imports only
|
|
21
17
|
React and its own `UnsupportedWidgetPlaceholder.css`, which the build copies to `dist`.
|
|
22
18
|
|
|
23
|
-
There
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
from wix-next's system-core, without depending on that package; Page is renamed and
|
|
28
|
-
defaults added.
|
|
29
|
-
The controller still passes empty services and accepts no services argument.
|
|
19
|
+
There are no Thunderbolt-generated components (PageSections, PinnedLayer,
|
|
20
|
+
ResponsiveContainer, PagesContainer, PageGroup, HeaderContainer, FooterContainer,
|
|
21
|
+
ResponsivePopupPage). Anchor is for exported user anchors; Page renders the
|
|
22
|
+
top/bottom scroll targets itself.
|
|
30
23
|
|
|
31
24
|
## Importing
|
|
32
25
|
|
|
33
26
|
For hand-written site code:
|
|
34
27
|
|
|
35
28
|
```tsx
|
|
36
|
-
import {
|
|
29
|
+
import { Anchor, UnsupportedWidgetPlaceholder } from '@wix/origami-system-components'
|
|
37
30
|
```
|
|
38
31
|
|
|
39
32
|
The index excludes InternalContainer: use the adapted component from
|
|
40
|
-
`@wix/origami-system-components/InternalContainer`.
|
|
41
|
-
`@wix/origami-system-components/Section`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
when importing a site.
|
|
48
|
-
|
|
49
|
-
`layout/Header` and `layout/Footer` are also public named/default exports. Exported
|
|
33
|
+
`@wix/origami-system-components/InternalContainer`. The structural components are
|
|
34
|
+
`@wix/origami-system-components/Page`, `/Section`, `/HeaderSection`
|
|
35
|
+
and `/FooterSection`. These plain React components render a section around
|
|
36
|
+
ordinary children, with the authored InternalContainer owning the background and
|
|
37
|
+
content layers. They do not include controllers, scroll effects or section CSS.
|
|
38
|
+
|
|
39
|
+
`/Header` and `/Footer` are also public named/default exports. Exported
|
|
50
40
|
files containing `document.Header` or `document.Footer` resolve to these landmarks.
|
|
51
41
|
A shared `Header_<id>` / `Footer_<id>` definition may receive `({ id, className })`
|
|
52
42
|
and pass that identity to its landmark, wrapping exactly one matching
|
|
@@ -65,22 +55,18 @@ InternalContainer is bundled because its upstream has a Wix dependency tree.
|
|
|
65
55
|
installs. The adapter imports `InternalContainer.css` itself so Vite preserves it
|
|
66
56
|
during pre-bundling. The upstream implementation is private.
|
|
67
57
|
|
|
68
|
-
|
|
69
|
-
|
|
58
|
+
Anchor compiles with plain tsc (ES2022, classic React JSX) and installs
|
|
59
|
+
`@wix/editor-components: ^1.16.0` at runtime. That public npm package is
|
|
70
60
|
pre-bundled per component with zero dependencies and React, React DOM, and lodash
|
|
71
|
-
peers. Only React is needed by
|
|
61
|
+
peers. Only React is needed by Anchor; we add neither React DOM nor lodash.
|
|
72
62
|
Editor fixes—and behavior changes—can reach sites without a release here.
|
|
73
63
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
its own stylesheet; the five have no copied CSS or CSS exports. The internal
|
|
77
|
-
`hocs.js` helper uses extensionless `./hocs` imports, resolved by Vite.
|
|
64
|
+
Anchor imports the real `dist/**/*.css` file: Vite dev pre-bundling drops
|
|
65
|
+
extensionless CSS imports. It has no copied CSS or CSS export.
|
|
78
66
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
and this README are published. Hand-written structural declarations avoid unpublished
|
|
83
|
-
upstream types: containers accept normal React children and Anchor accepts none.
|
|
67
|
+
React remains a peer. The semantic CSS compiler depends directly on this package;
|
|
68
|
+
only `dist`, metadata, and this README are published. Anchor's hand-written
|
|
69
|
+
declaration avoids unpublished upstream types; it accepts no children.
|
|
84
70
|
InternalContainer declarations are emitted from its adapted props.
|
|
85
71
|
|
|
86
72
|
## Build and tests
|
|
@@ -88,11 +74,11 @@ InternalContainer declarations are emitted from its adapted props.
|
|
|
88
74
|
Run `pnpm --filter @wix/origami-system-components run build`, then
|
|
89
75
|
`pnpm --filter @wix/origami-system-components test`. Build before packing.
|
|
90
76
|
`build.mjs` clears dist, bundles InternalContainer/CSS, and copies declarations;
|
|
91
|
-
tsc emits the
|
|
77
|
+
tsc emits Anchor, the placeholder, the index and the structural components without
|
|
92
78
|
source maps, using the editor-components ambient shim. Only React imports may escape
|
|
93
|
-
InternalContainer's private bundle; tests check
|
|
94
|
-
Packed consumers verify InternalContainer without upstream packages,
|
|
95
|
-
Vite dev
|
|
79
|
+
InternalContainer's private bundle; tests check Anchor's imports, exports, and standalone React-only types.
|
|
80
|
+
Packed consumers verify InternalContainer without upstream packages, Anchor and Page CSS in
|
|
81
|
+
Vite dev, production CSS, and index tree-shaking.
|
|
96
82
|
Package DOM and ID-validation tests and the generator's packed-site test cover integration.
|
|
97
83
|
|
|
98
84
|
## Adding a component
|
|
@@ -102,9 +88,8 @@ package export, and packed-consumer coverage. For an upstream with dependencies,
|
|
|
102
88
|
bundle it as a development dependency, build/export CSS with a matching `.css.d.ts`,
|
|
103
89
|
and retain the leak check. For a self-contained upstream, install it as a production dependency,
|
|
104
90
|
include the source in `tsconfig.build.json`, and add its declaration to the copy list.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
editor `dist/**/*.css`, and `./hocs`.
|
|
91
|
+
Use real `.css` imports. Editor-wrapping imports are limited to React, editor
|
|
92
|
+
component entries, and editor `dist/**/*.css`.
|
|
108
93
|
|
|
109
94
|
## Release order
|
|
110
95
|
|
|
@@ -115,17 +100,14 @@ Standard artifact configuration publishes the built package; local builds and pa
|
|
|
115
100
|
|
|
116
101
|
## Layout contract
|
|
117
102
|
|
|
118
|
-
###
|
|
103
|
+
### Page
|
|
119
104
|
|
|
120
|
-
`@wix/origami-system-components/
|
|
121
|
-
and `PageProps`.
|
|
122
|
-
Newly exported sites import `layout/Page`, like the layout section components.
|
|
123
|
-
The site generator accepts both the legacy and layout Page imports when reading sites
|
|
124
|
-
back into Origami.
|
|
105
|
+
`@wix/origami-system-components/Page` provides named/default `Page` exports
|
|
106
|
+
and `PageProps`. Exported sites import `/Page`, like the section components.
|
|
125
107
|
|
|
126
108
|
```tsx
|
|
127
|
-
import Page from '@wix/origami-system-components/
|
|
128
|
-
import Section from '@wix/origami-system-components/
|
|
109
|
+
import Page from '@wix/origami-system-components/Page'
|
|
110
|
+
import Section from '@wix/origami-system-components/Section'
|
|
129
111
|
|
|
130
112
|
<Page id="page" className="authored-page"
|
|
131
113
|
backgroundLayer={[<div key="color" className="page-color" />]}
|
|
@@ -149,7 +131,7 @@ caller-supplied stable keys. Additional slots are out of scope.
|
|
|
149
131
|
|
|
150
132
|
A page child pinned to the screen (`FixedItemLayout`) is rendered in one of two ways.
|
|
151
133
|
A pinned Section, header or footer stays in its slot, wrapped in
|
|
152
|
-
`@wix/origami-system-components/
|
|
134
|
+
`@wix/origami-system-components/PinnedToScreen`
|
|
153
135
|
(`header={<PinnedToScreen><SharedHeader /></PinnedToScreen>}`, or among the
|
|
154
136
|
children). The wrapper takes exactly one child and no props, and goes outside the
|
|
155
137
|
child's `<interact-element>`. Every other pinned page child (buttons, boxes, widgets)
|
|
@@ -5,7 +5,7 @@ export interface FooterProps {
|
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Footer landmark, the element Thunderbolt's RefComponent renders.
|
|
9
9
|
* It is the root of the shared Footer_<sharedCompId> definition and wraps its
|
|
10
10
|
* FooterSection. The page passes its instance ID and class through the definition's
|
|
11
11
|
* Structure props; the page layout.css targets them for placement,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Footer landmark, the element Thunderbolt's RefComponent renders.
|
|
5
5
|
* It is the root of the shared Footer_<sharedCompId> definition and wraps its
|
|
6
6
|
* FooterSection. The page passes its instance ID and class through the definition's
|
|
7
7
|
* Structure props; the page layout.css targets them for placement,
|
package/dist/FooterSection.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
export default FooterSection
|
|
1
|
+
import { type SectionProps } from './Section.js';
|
|
2
|
+
export type FooterSectionProps = SectionProps;
|
|
3
|
+
/**
|
|
4
|
+
* The shared footer definition's root, rendered
|
|
5
|
+
* as the generic Section with the definition's ID and class. The `<footer>`
|
|
6
|
+
* landmark and the page's instance identity belong to the enclosing Footer.
|
|
7
|
+
*/
|
|
8
|
+
export declare function FooterSection({ id, className, children, wix }: FooterSectionProps): import("react").JSX.Element;
|
|
9
|
+
export default FooterSection;
|
package/dist/FooterSection.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import Section from './Section.js';
|
|
4
|
+
/**
|
|
5
|
+
* The shared footer definition's root, rendered
|
|
6
|
+
* as the generic Section with the definition's ID and class. The `<footer>`
|
|
7
|
+
* landmark and the page's instance identity belong to the enclosing Footer.
|
|
8
|
+
*/
|
|
9
|
+
export function FooterSection({ id, className, children, wix }) {
|
|
10
|
+
return (_jsx(Section, { id: id, className: className, wix: wix, children: children }));
|
|
11
|
+
}
|
|
7
12
|
export default FooterSection;
|
|
@@ -5,7 +5,7 @@ export interface HeaderProps {
|
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Header landmark, the element Thunderbolt's RefComponent renders.
|
|
9
9
|
* It is the root of the shared Header_<sharedCompId> definition and wraps its
|
|
10
10
|
* HeaderSection. The page passes its instance ID and class through the definition's
|
|
11
11
|
* Structure props; the page layout.css targets them for placement,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Header landmark, the element Thunderbolt's RefComponent renders.
|
|
5
5
|
* It is the root of the shared Header_<sharedCompId> definition and wraps its
|
|
6
6
|
* HeaderSection. The page passes its instance ID and class through the definition's
|
|
7
7
|
* Structure props; the page layout.css targets them for placement,
|
package/dist/HeaderSection.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export default HeaderSection
|
|
1
|
+
import { type SectionProps } from './Section.js';
|
|
2
|
+
export type HeaderSectionProps = SectionProps;
|
|
3
|
+
/**
|
|
4
|
+
* The shared header definition's root, rendered
|
|
5
|
+
* as the generic Section with the definition's ID and class. The `<header>`
|
|
6
|
+
* landmark and the page's instance identity belong to the enclosing Header.
|
|
7
|
+
* Legacy scroll effects are not implemented here.
|
|
8
|
+
*/
|
|
9
|
+
export declare function HeaderSection({ id, className, children, wix }: HeaderSectionProps): import("react").JSX.Element;
|
|
10
|
+
export default HeaderSection;
|
package/dist/HeaderSection.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import Section from './Section.js';
|
|
4
|
+
/**
|
|
5
|
+
* The shared header definition's root, rendered
|
|
6
|
+
* as the generic Section with the definition's ID and class. The `<header>`
|
|
7
|
+
* landmark and the page's instance identity belong to the enclosing Header.
|
|
8
|
+
* Legacy scroll effects are not implemented here.
|
|
9
|
+
*/
|
|
10
|
+
export function HeaderSection({ id, className, children, wix }) {
|
|
11
|
+
return (_jsx(Section, { id: id, className: className, wix: wix, children: children }));
|
|
12
|
+
}
|
|
8
13
|
export default HeaderSection;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import BaseInternalContainer from './BaseInternalContainer.js';
|
|
4
|
-
import '
|
|
5
|
-
import { buildContainerClasses } from './container-contract.js';
|
|
6
|
-
import { LAYOUT_FLAGS } from './layout-constants.js';
|
|
3
|
+
import BaseInternalContainer from './layout/BaseInternalContainer.js';
|
|
4
|
+
import './InternalContainer.css';
|
|
5
|
+
import { buildContainerClasses } from './layout/container-contract.js';
|
|
6
|
+
import { LAYOUT_FLAGS } from './layout/layout-constants.js';
|
|
7
7
|
export function InternalContainer(props) {
|
|
8
8
|
const classes = buildContainerClasses(props.id);
|
|
9
9
|
const supportedProps = {
|
package/dist/Page.d.ts
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import './PinnedToScreen.css';
|
|
3
|
+
import './Page.css';
|
|
3
4
|
export interface PageProps {
|
|
4
|
-
id: string
|
|
5
|
-
className?: string | undefined
|
|
6
|
-
|
|
5
|
+
id: string;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
/** Background nodes overlap in one cell. Supply stable keys for array entries. */
|
|
8
|
+
backgroundLayer?: Array<ReactNode> | undefined;
|
|
9
|
+
/** At most one Header-producing element, including a shared definition. */
|
|
10
|
+
header?: ReactNode;
|
|
11
|
+
/** At most one Footer-producing element, including a shared definition. */
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
/** Section-producing elements. The site build routes legacy DM landmark/background children to slots. */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Page children pinned to the screen other than Sections, header and footer, in
|
|
17
|
+
* their saved relative order. They share one screen-covering layer after the
|
|
18
|
+
* footer, rendered only when non-empty. Supply stable keys for array entries.
|
|
19
|
+
*/
|
|
20
|
+
viewportLayer?: Array<ReactNode> | undefined;
|
|
21
|
+
/** The DM page data the converter writes on the Page. Accepted, not rendered. */
|
|
22
|
+
data?: any;
|
|
23
|
+
/** The DM skin a popup's Page carries (`WithoutOverlay`). Accepted, not rendered. */
|
|
24
|
+
skin?: string;
|
|
7
25
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Page composition. Slot semantics are the caller's responsibility;
|
|
28
|
+
* supplied nodes are rendered without component-type or cardinality validation.
|
|
29
|
+
* Authored CSS owns foreground layout and positioning. Main has no layout box.
|
|
30
|
+
*
|
|
31
|
+
* Page is the document page: it renders the document's only `#top` / `#bottom` scroll
|
|
32
|
+
* targets, so popups must not render it.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Page({ id, className, backgroundLayer, header, footer, children, viewportLayer }: PageProps): import("react").JSX.Element;
|
|
35
|
+
export default Page;
|
package/dist/Page.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import '
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import './PinnedToScreen.css';
|
|
4
|
+
import './Page.css';
|
|
5
|
+
/**
|
|
6
|
+
* Page composition. Slot semantics are the caller's responsibility;
|
|
7
|
+
* supplied nodes are rendered without component-type or cardinality validation.
|
|
8
|
+
* Authored CSS owns foreground layout and positioning. Main has no layout box.
|
|
9
|
+
*
|
|
10
|
+
* Page is the document page: it renders the document's only `#top` / `#bottom` scroll
|
|
11
|
+
* targets, so popups must not render it.
|
|
12
|
+
*/
|
|
13
|
+
export function Page({ id, className, backgroundLayer, header, footer, children, viewportLayer }) {
|
|
14
|
+
return (_jsxs("div", { id: id, className: ['origami-page', className].filter(Boolean).join(' '), children: [_jsx("div", { id: "top", className: "origami-page__anchor origami-page__anchor--top" }), _jsx("div", { className: "origami-page__background", children: backgroundLayer }), header, _jsx("main", { className: "origami-page__main", children: children }), footer, viewportLayer?.length ? _jsx("div", { className: "origami-page__viewport-layer", children: viewportLayer }) : null, _jsx("div", { id: "bottom", className: "origami-page__anchor origami-page__anchor--bottom" })] }));
|
|
15
|
+
}
|
|
7
16
|
export default Page;
|
|
@@ -5,7 +5,7 @@ export interface PinnedToScreenProps {
|
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Screen-pinned wrapper for a page's Section, header or footer, rendered
|
|
9
9
|
* in place in its Page slot. It always covers the screen and lets clicks through;
|
|
10
10
|
* the child gets clicks back from PinnedToScreen.css and docks itself in the single
|
|
11
11
|
* grid cell with its own alignment, margins and size. Its placement in that cell comes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import './PinnedToScreen.css';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Screen-pinned wrapper for a page's Section, header or footer, rendered
|
|
6
6
|
* in place in its Page slot. It always covers the screen and lets clicks through;
|
|
7
7
|
* the child gets clicks back from PinnedToScreen.css and docks itself in the single
|
|
8
8
|
* grid cell with its own alignment, margins and size. Its placement in that cell comes
|
package/dist/Section.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import './Section.css';
|
|
3
3
|
export interface SectionProps {
|
|
4
|
-
id: string
|
|
5
|
-
className?: string | undefined
|
|
6
|
-
children?: ReactNode
|
|
7
|
-
|
|
4
|
+
id: string;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
wix?: {
|
|
8
|
+
compPath?: string | undefined;
|
|
9
|
+
} | undefined;
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export default Section
|
|
11
|
+
export declare function Section(props: SectionProps): import("react").JSX.Element;
|
|
12
|
+
export default Section;
|
package/dist/Section.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { withInteractions } from '@wix/origami-runtime';
|
|
4
|
+
import './Section.css';
|
|
5
|
+
/**
|
|
6
|
+
* The authored InternalContainer child owns its
|
|
7
|
+
* background and content layers; this component does not create another container.
|
|
8
|
+
* It owns the constant single-cell grid that hosts that InternalContainer.
|
|
9
|
+
*/
|
|
10
|
+
function BaseSection({ id, className, children }) {
|
|
11
|
+
return (_jsx("section", { id: id, className: ['origami-section', className].filter(Boolean).join(' '), tabIndex: -1, children: children }));
|
|
12
|
+
}
|
|
13
|
+
const InteractiveSection = withInteractions(BaseSection);
|
|
14
|
+
export function Section(props) {
|
|
15
|
+
return _jsx(InteractiveSection, { ...props });
|
|
16
|
+
}
|
|
8
17
|
export default Section;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export { Page, type PageProps } from './Page'
|
|
2
|
-
export { Section, type SectionProps } from './Section'
|
|
3
|
-
export { HeaderSection, type HeaderSectionProps } from './HeaderSection'
|
|
4
|
-
export { FooterSection, type FooterSectionProps } from './FooterSection'
|
|
5
1
|
export { Anchor, type AnchorProps } from './Anchor'
|
|
6
2
|
export { UnsupportedWidgetPlaceholder, type UnsupportedWidgetPlaceholderProps } from './UnsupportedWidgetPlaceholder'
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export { Page } from './Page';
|
|
2
|
-
export { Section } from './Section';
|
|
3
|
-
export { HeaderSection } from './HeaderSection';
|
|
4
|
-
export { FooterSection } from './FooterSection';
|
|
5
1
|
export { Anchor } from './Anchor';
|
|
6
2
|
export { UnsupportedWidgetPlaceholder } from './UnsupportedWidgetPlaceholder';
|
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.12",
|
|
4
4
|
"description": "Editor structural and system components for standalone Origami sites",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -61,30 +61,14 @@
|
|
|
61
61
|
"default": "./dist/index.js"
|
|
62
62
|
},
|
|
63
63
|
"./InternalContainer": {
|
|
64
|
-
"types": "./dist/
|
|
65
|
-
"default": "./dist/
|
|
64
|
+
"types": "./dist/InternalContainer.d.ts",
|
|
65
|
+
"default": "./dist/InternalContainer.js"
|
|
66
66
|
},
|
|
67
67
|
"./site.global.css": "./dist/site.global.css",
|
|
68
68
|
"./InternalContainer.css": {
|
|
69
69
|
"types": "./dist/InternalContainer.css.d.ts",
|
|
70
70
|
"default": "./dist/InternalContainer.css"
|
|
71
71
|
},
|
|
72
|
-
"./Page": {
|
|
73
|
-
"types": "./dist/Page.d.ts",
|
|
74
|
-
"default": "./dist/Page.js"
|
|
75
|
-
},
|
|
76
|
-
"./Section": {
|
|
77
|
-
"types": "./dist/Section.d.ts",
|
|
78
|
-
"default": "./dist/Section.js"
|
|
79
|
-
},
|
|
80
|
-
"./HeaderSection": {
|
|
81
|
-
"types": "./dist/HeaderSection.d.ts",
|
|
82
|
-
"default": "./dist/HeaderSection.js"
|
|
83
|
-
},
|
|
84
|
-
"./FooterSection": {
|
|
85
|
-
"types": "./dist/FooterSection.d.ts",
|
|
86
|
-
"default": "./dist/FooterSection.js"
|
|
87
|
-
},
|
|
88
72
|
"./Anchor": {
|
|
89
73
|
"types": "./dist/Anchor.d.ts",
|
|
90
74
|
"default": "./dist/Anchor.js"
|
|
@@ -97,40 +81,38 @@
|
|
|
97
81
|
"types": "./dist/layout/layout-contract.d.ts",
|
|
98
82
|
"default": "./dist/layout/layout-contract.js"
|
|
99
83
|
},
|
|
100
|
-
"./
|
|
101
|
-
"types": "./dist/
|
|
102
|
-
"default": "./dist/
|
|
84
|
+
"./Page": {
|
|
85
|
+
"types": "./dist/Page.d.ts",
|
|
86
|
+
"default": "./dist/Page.js"
|
|
103
87
|
},
|
|
104
|
-
"./
|
|
105
|
-
"types": "./dist/
|
|
106
|
-
"default": "./dist/
|
|
88
|
+
"./Section": {
|
|
89
|
+
"types": "./dist/Section.d.ts",
|
|
90
|
+
"default": "./dist/Section.js"
|
|
107
91
|
},
|
|
108
|
-
"./
|
|
109
|
-
"types": "./dist/
|
|
110
|
-
"default": "./dist/
|
|
92
|
+
"./HeaderSection": {
|
|
93
|
+
"types": "./dist/HeaderSection.d.ts",
|
|
94
|
+
"default": "./dist/HeaderSection.js"
|
|
111
95
|
},
|
|
112
|
-
"./
|
|
113
|
-
"types": "./dist/
|
|
114
|
-
"default": "./dist/
|
|
96
|
+
"./FooterSection": {
|
|
97
|
+
"types": "./dist/FooterSection.d.ts",
|
|
98
|
+
"default": "./dist/FooterSection.js"
|
|
115
99
|
},
|
|
116
|
-
"./
|
|
117
|
-
"types": "./dist/
|
|
118
|
-
"default": "./dist/
|
|
100
|
+
"./Header": {
|
|
101
|
+
"types": "./dist/Header.d.ts",
|
|
102
|
+
"default": "./dist/Header.js"
|
|
119
103
|
},
|
|
120
|
-
"./
|
|
121
|
-
"types": "./dist/
|
|
122
|
-
"default": "./dist/
|
|
104
|
+
"./Footer": {
|
|
105
|
+
"types": "./dist/Footer.d.ts",
|
|
106
|
+
"default": "./dist/Footer.js"
|
|
123
107
|
},
|
|
124
|
-
"./
|
|
125
|
-
"types": "./dist/
|
|
126
|
-
"default": "./dist/
|
|
108
|
+
"./PinnedToScreen": {
|
|
109
|
+
"types": "./dist/PinnedToScreen.d.ts",
|
|
110
|
+
"default": "./dist/PinnedToScreen.js"
|
|
127
111
|
}
|
|
128
112
|
},
|
|
129
113
|
"type": "module",
|
|
130
114
|
"dependencies": {
|
|
131
|
-
"@wix/builder-state-react": "^1.22.5",
|
|
132
|
-
"@wix/builder-state": "^1.49.3",
|
|
133
115
|
"@wix/editor-components": "^1.16.0"
|
|
134
116
|
},
|
|
135
|
-
"falconPackageHash": "
|
|
117
|
+
"falconPackageHash": "570b6a20aac14202f1ebbac53908728e7201b2852232b23c22c1e740"
|
|
136
118
|
}
|
package/dist/hocs.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { useStateOverrides } from '@wix/builder-state-react';
|
|
4
|
-
/**
|
|
5
|
-
* An HOC that gets a container component that expects children as a function (like EditorElement components)
|
|
6
|
-
* and returns a container component that gets children as an array.
|
|
7
|
-
*/
|
|
8
|
-
export const withNormalChildren = (Component) => ({ children, ...props }) => React.createElement(Component, { ...props }, () => children || []);
|
|
9
|
-
/**
|
|
10
|
-
* An HOC that connects a component to its EditorElements controller.
|
|
11
|
-
* As this is a special code for EditorElements, it should be moved to their project in the future.
|
|
12
|
-
*
|
|
13
|
-
* Note:
|
|
14
|
-
* Since the controller can update props, and since they have to be synced with velo if exists,
|
|
15
|
-
* every component with a controller should be connected by default. Since the consumer (widget genreated code)
|
|
16
|
-
* doesn't always connect the component, we do the connection here for now.
|
|
17
|
-
*/
|
|
18
|
-
export const withController = (Component, controller) => (props) => {
|
|
19
|
-
const [propsOverrides = {}, , setters] = useStateOverrides(props.nickname);
|
|
20
|
-
const controllerProps = controller.useComponentProps({ ...props, ...propsOverrides }, {}, setters);
|
|
21
|
-
return React.createElement(Component, { ...props, ...controllerProps });
|
|
22
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type SectionProps } from './Section.js';
|
|
2
|
-
export type FooterSectionProps = SectionProps;
|
|
3
|
-
/**
|
|
4
|
-
* Experimental plain FooterSection: the shared footer definition's root, rendered
|
|
5
|
-
* as the generic Section with the definition's ID and class. The `<footer>`
|
|
6
|
-
* landmark and the page's instance identity belong to the enclosing Footer.
|
|
7
|
-
*/
|
|
8
|
-
export declare function FooterSection({ id, className, children, wix }: FooterSectionProps): import("react").JSX.Element;
|
|
9
|
-
export default FooterSection;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Section from './Section.js';
|
|
4
|
-
/**
|
|
5
|
-
* Experimental plain FooterSection: the shared footer definition's root, rendered
|
|
6
|
-
* as the generic Section with the definition's ID and class. The `<footer>`
|
|
7
|
-
* landmark and the page's instance identity belong to the enclosing Footer.
|
|
8
|
-
*/
|
|
9
|
-
export function FooterSection({ id, className, children, wix }) {
|
|
10
|
-
return (_jsx(Section, { id: id, className: className, wix: wix, children: children }));
|
|
11
|
-
}
|
|
12
|
-
export default FooterSection;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type SectionProps } from './Section.js';
|
|
2
|
-
export type HeaderSectionProps = SectionProps;
|
|
3
|
-
/**
|
|
4
|
-
* Experimental plain HeaderSection: the shared header definition's root, rendered
|
|
5
|
-
* as the generic Section with the definition's ID and class. The `<header>`
|
|
6
|
-
* landmark and the page's instance identity belong to the enclosing Header.
|
|
7
|
-
* Legacy scroll effects are not implemented here.
|
|
8
|
-
*/
|
|
9
|
-
export declare function HeaderSection({ id, className, children, wix }: HeaderSectionProps): import("react").JSX.Element;
|
|
10
|
-
export default HeaderSection;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Section from './Section.js';
|
|
4
|
-
/**
|
|
5
|
-
* Experimental plain HeaderSection: the shared header definition's root, rendered
|
|
6
|
-
* as the generic Section with the definition's ID and class. The `<header>`
|
|
7
|
-
* landmark and the page's instance identity belong to the enclosing Header.
|
|
8
|
-
* Legacy scroll effects are not implemented here.
|
|
9
|
-
*/
|
|
10
|
-
export function HeaderSection({ id, className, children, wix }) {
|
|
11
|
-
return (_jsx(Section, { id: id, className: className, wix: wix, children: children }));
|
|
12
|
-
}
|
|
13
|
-
export default HeaderSection;
|
package/dist/layout/Page.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import './PinnedToScreen.css';
|
|
3
|
-
import './Page.css';
|
|
4
|
-
export interface PageProps {
|
|
5
|
-
id: string;
|
|
6
|
-
className?: string | undefined;
|
|
7
|
-
/** Background nodes overlap in one cell. Supply stable keys for array entries. */
|
|
8
|
-
backgroundLayer?: Array<ReactNode> | undefined;
|
|
9
|
-
/** At most one Header-producing element, including a shared definition. */
|
|
10
|
-
header?: ReactNode;
|
|
11
|
-
/** At most one Footer-producing element, including a shared definition. */
|
|
12
|
-
footer?: ReactNode;
|
|
13
|
-
/** Section-producing elements. The site build routes legacy DM landmark/background children to slots. */
|
|
14
|
-
children?: ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* Page children pinned to the screen other than Sections, header and footer, in
|
|
17
|
-
* their saved relative order. They share one screen-covering layer after the
|
|
18
|
-
* footer, rendered only when non-empty. Supply stable keys for array entries.
|
|
19
|
-
*/
|
|
20
|
-
viewportLayer?: Array<ReactNode> | undefined;
|
|
21
|
-
/** The DM page data the converter writes on the Page. Accepted, not rendered. */
|
|
22
|
-
data?: any;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Experimental page composition. Slot semantics are the caller's responsibility;
|
|
26
|
-
* supplied nodes are rendered without component-type or cardinality validation.
|
|
27
|
-
* Authored CSS owns foreground layout and positioning. Main has no layout box.
|
|
28
|
-
*
|
|
29
|
-
* Page is the document page: it renders the document's only `#top` / `#bottom` scroll
|
|
30
|
-
* targets, so popups must not render it.
|
|
31
|
-
*/
|
|
32
|
-
export declare function Page({ id, className, backgroundLayer, header, footer, children, viewportLayer }: PageProps): import("react").JSX.Element;
|
|
33
|
-
export default Page;
|
package/dist/layout/Page.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import './PinnedToScreen.css';
|
|
4
|
-
import './Page.css';
|
|
5
|
-
/**
|
|
6
|
-
* Experimental page composition. Slot semantics are the caller's responsibility;
|
|
7
|
-
* supplied nodes are rendered without component-type or cardinality validation.
|
|
8
|
-
* Authored CSS owns foreground layout and positioning. Main has no layout box.
|
|
9
|
-
*
|
|
10
|
-
* Page is the document page: it renders the document's only `#top` / `#bottom` scroll
|
|
11
|
-
* targets, so popups must not render it.
|
|
12
|
-
*/
|
|
13
|
-
export function Page({ id, className, backgroundLayer, header, footer, children, viewportLayer }) {
|
|
14
|
-
return (_jsxs("div", { id: id, className: ['origami-page', className].filter(Boolean).join(' '), children: [_jsx("div", { id: "top", className: "origami-page__anchor origami-page__anchor--top" }), _jsx("div", { className: "origami-page__background", children: backgroundLayer }), header, _jsx("main", { className: "origami-page__main", children: children }), footer, viewportLayer?.length ? _jsx("div", { className: "origami-page__viewport-layer", children: viewportLayer }) : null, _jsx("div", { id: "bottom", className: "origami-page__anchor origami-page__anchor--bottom" })] }));
|
|
15
|
-
}
|
|
16
|
-
export default Page;
|
package/dist/layout/Section.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import './Section.css';
|
|
3
|
-
export interface SectionProps {
|
|
4
|
-
id: string;
|
|
5
|
-
className?: string | undefined;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
wix?: {
|
|
8
|
-
compPath?: string | undefined;
|
|
9
|
-
} | undefined;
|
|
10
|
-
}
|
|
11
|
-
export declare function Section(props: SectionProps): import("react").JSX.Element;
|
|
12
|
-
export default Section;
|
package/dist/layout/Section.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { withInteractions } from '@wix/origami-runtime';
|
|
4
|
-
import './Section.css';
|
|
5
|
-
/**
|
|
6
|
-
* Experimental plain Section. The authored InternalContainer child owns its
|
|
7
|
-
* background and content layers; this component does not create another container.
|
|
8
|
-
* It owns the constant single-cell grid that hosts that InternalContainer.
|
|
9
|
-
*/
|
|
10
|
-
function BaseSection({ id, className, children }) {
|
|
11
|
-
return (_jsx("section", { id: id, className: ['origami-section', className].filter(Boolean).join(' '), tabIndex: -1, children: children }));
|
|
12
|
-
}
|
|
13
|
-
const InteractiveSection = withInteractions(BaseSection);
|
|
14
|
-
export function Section(props) {
|
|
15
|
-
return _jsx(InteractiveSection, { ...props });
|
|
16
|
-
}
|
|
17
|
-
export default Section;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|