@wix/origami-system-components 1.10.12 → 1.10.13

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/dist/Footer.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { RootClassName } from '@wix/origami-runtime';
2
3
  export interface FooterProps {
3
4
  id: string;
4
- className?: string | undefined;
5
+ className?: RootClassName;
5
6
  children?: ReactNode;
6
7
  }
7
8
  /**
package/dist/Footer.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { resolvedRootClass } from './rootClassName.js';
3
4
  /**
4
5
  * Footer landmark, the element Thunderbolt's RefComponent renders.
5
6
  * It is the root of the shared Footer_<sharedCompId> definition and wraps its
@@ -8,6 +9,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
8
9
  * fixed positioning and z-index.
9
10
  */
10
11
  export function Footer({ id, className, children }) {
11
- return (_jsx("footer", { id: id, className: className, children: children }));
12
+ return (_jsx("footer", { id: id, className: resolvedRootClass(undefined, className), children: children }));
12
13
  }
13
14
  export default Footer;
package/dist/Header.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { RootClassName } from '@wix/origami-runtime';
2
3
  export interface HeaderProps {
3
4
  id: string;
4
- className?: string | undefined;
5
+ className?: RootClassName;
5
6
  children?: ReactNode;
6
7
  }
7
8
  /**
package/dist/Header.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { resolvedRootClass } from './rootClassName.js';
3
4
  /**
4
5
  * Header landmark, the element Thunderbolt's RefComponent renders.
5
6
  * It is the root of the shared Header_<sharedCompId> definition and wraps its
@@ -8,6 +9,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
8
9
  * sticky/fixed positioning and z-index.
9
10
  */
10
11
  export function Header({ id, className, children }) {
11
- return (_jsx("header", { id: id, className: className, children: children }));
12
+ return (_jsx("header", { id: id, className: resolvedRootClass(undefined, className), children: children }));
12
13
  }
13
14
  export default Header;
@@ -1,8 +1,9 @@
1
1
  import type { AriaRole, ReactNode } from 'react';
2
2
  import './InternalContainer.css';
3
+ import type { RootClassName } from '@wix/origami-runtime';
3
4
  export interface InternalContainerProps {
4
5
  id: string;
5
- className?: string;
6
+ className?: RootClassName;
6
7
  role?: AriaRole;
7
8
  tabIndex?: number;
8
9
  'data-scope'?: string;
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import BaseInternalContainer from './layout/BaseInternalContainer.js';
4
4
  import './InternalContainer.css';
5
+ import { resolvedRootClass } from './rootClassName.js';
5
6
  import { buildContainerClasses } from './layout/container-contract.js';
6
7
  import { LAYOUT_FLAGS } from './layout/layout-constants.js';
7
8
  export function InternalContainer(props) {
@@ -16,6 +17,6 @@ export function InternalContainer(props) {
16
17
  pinnedLayer: props.pinnedLayer,
17
18
  children: props.children,
18
19
  };
19
- return (_jsx(BaseInternalContainer, { ...supportedProps, className: [props.id, props.className].filter(Boolean).join(' '), hasOverflow: LAYOUT_FLAGS.HAS_OVERFLOW, hasScrollOverflow: LAYOUT_FLAGS.HAS_SCROLL_OVERFLOW, shouldOmitWrapperLayers: LAYOUT_FLAGS.SHOULD_OMIT_WRAPPER_LAYERS, containerLayoutClassName: classes.contentClass, overlowWrapperClassName: classes.overflowClass }));
20
+ return (_jsx(BaseInternalContainer, { ...supportedProps, className: resolvedRootClass(props.id, props.className), hasOverflow: LAYOUT_FLAGS.HAS_OVERFLOW, hasScrollOverflow: LAYOUT_FLAGS.HAS_SCROLL_OVERFLOW, shouldOmitWrapperLayers: LAYOUT_FLAGS.SHOULD_OMIT_WRAPPER_LAYERS, containerLayoutClassName: classes.contentClass, overlowWrapperClassName: classes.overflowClass }));
20
21
  }
21
22
  export default InternalContainer;
package/dist/Page.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { RootClassName } from '@wix/origami-runtime';
2
3
  import './PinnedToScreen.css';
3
4
  import './Page.css';
4
5
  export interface PageProps {
5
6
  id: string;
6
- className?: string | undefined;
7
+ className?: RootClassName;
7
8
  /** Background nodes overlap in one cell. Supply stable keys for array entries. */
8
9
  backgroundLayer?: Array<ReactNode> | undefined;
9
10
  /** At most one Header-producing element, including a shared definition. */
package/dist/Page.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { resolvedRootClass } from './rootClassName.js';
3
4
  import './PinnedToScreen.css';
4
5
  import './Page.css';
5
6
  /**
@@ -11,6 +12,6 @@ import './Page.css';
11
12
  * targets, so popups must not render it.
12
13
  */
13
14
  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
+ return (_jsxs("div", { id: id, className: resolvedRootClass(undefined, className, 'origami-page'), 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
  }
16
17
  export default Page;
package/dist/Section.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import type { ReactNode } from 'react';
2
+ import { type RootClassName } from '@wix/origami-runtime';
2
3
  import './Section.css';
3
4
  export interface SectionProps {
4
5
  id: string;
5
- className?: string | undefined;
6
+ className?: RootClassName;
6
7
  children?: ReactNode;
7
8
  wix?: {
8
9
  compPath?: string | undefined;
package/dist/Section.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { withInteractions } from '@wix/origami-runtime';
4
+ import { resolvedRootClass } from './rootClassName.js';
4
5
  import './Section.css';
5
6
  /**
6
7
  * The authored InternalContainer child owns its
@@ -8,7 +9,7 @@ import './Section.css';
8
9
  * It owns the constant single-cell grid that hosts that InternalContainer.
9
10
  */
10
11
  function BaseSection({ id, className, children }) {
11
- return (_jsx("section", { id: id, className: ['origami-section', className].filter(Boolean).join(' '), tabIndex: -1, children: children }));
12
+ return (_jsx("section", { id: id, className: resolvedRootClass(undefined, className, 'origami-section'), tabIndex: -1, children: children }));
12
13
  }
13
14
  const InteractiveSection = withInteractions(BaseSection);
14
15
  export function Section(props) {
@@ -0,0 +1,6 @@
1
+ import { type RootClassName } from '@wix/origami-runtime';
2
+ /**
3
+ * The class a system component renders for DM's `className`: its own classes, then `rootClass()`.
4
+ * These components don't run under `withOrigami`, so the className's bindings (`ctx()`, `is()`) resolve here.
5
+ */
6
+ export declare const resolvedRootClass: (id: string | undefined, className: RootClassName, ...ownClasses: string[]) => string | undefined;
@@ -0,0 +1,6 @@
1
+ import { resolve, rootClass } from '@wix/origami-runtime';
2
+ /**
3
+ * The class a system component renders for DM's `className`: its own classes, then `rootClass()`.
4
+ * These components don't run under `withOrigami`, so the className's bindings (`ctx()`, `is()`) resolve here.
5
+ */
6
+ export const resolvedRootClass = (id, className, ...ownClasses) => [...ownClasses, rootClass(id, resolve(className))].filter(Boolean).join(' ') || undefined;
@@ -3,3 +3,15 @@
3
3
  :root {
4
4
  --above-all-z-index: 100000;
5
5
  }
6
+
7
+ /* DM's `wix-visibility-*` className terms, as Thunderbolt defines them (same names, the doubled collapsed selector and
8
+ `--l_display`). Scoped to the page root, as Thunderbolt scopes to #main_MF, so they beat a component's #id rules,
9
+ e.g. a layout container's `display: grid`. */
10
+ #root .wix-visibility-hidden {
11
+ visibility: hidden;
12
+ }
13
+
14
+ #root .wix-visibility-collapsed.wix-visibility-collapsed {
15
+ --l_display: none;
16
+ display: none;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/origami-system-components",
3
- "version": "1.10.12",
3
+ "version": "1.10.13",
4
4
  "description": "Editor structural and system components for standalone Origami sites",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -19,7 +19,7 @@
19
19
  "@testing-library/react": "^16.3.0",
20
20
  "@types/react": "^18.3.1",
21
21
  "@wix/editor-system-components": "^1.1573.0",
22
- "@wix/origami-runtime": "0.19.1",
22
+ "@wix/origami-runtime": "0.20.0",
23
23
  "@wix/services-manager": "^1.0.7",
24
24
  "@wix/services-manager-react": "^1.0.8",
25
25
  "@wix/site-service-interactions": "^1.0.28",
@@ -32,7 +32,7 @@
32
32
  "vitest": "^4.1.11"
33
33
  },
34
34
  "peerDependencies": {
35
- "@wix/origami-runtime": "^0.19.1",
35
+ "@wix/origami-runtime": "^0.20.0",
36
36
  "react": "^18.3.1"
37
37
  },
38
38
  "publishUnscoped": false,
@@ -114,5 +114,5 @@
114
114
  "dependencies": {
115
115
  "@wix/editor-components": "^1.16.0"
116
116
  },
117
- "falconPackageHash": "570b6a20aac14202f1ebbac53908728e7201b2852232b23c22c1e740"
117
+ "falconPackageHash": "9bccf7dfd04e4ed15e4674b4baa1b37d23d6bc0ee4969d4b92bdaa2a"
118
118
  }