@sbb-esta/lyne-react-dev 5.4.0-dev.1785707724 → 5.4.0-dev.1785742257
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/core.js +1 -1
- package/package.json +2 -2
package/core.js
CHANGED
|
@@ -7,4 +7,4 @@ import{isServer as e}from"lit";
|
|
|
7
7
|
* Copyright 2018 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
9
|
*/
|
|
10
|
-
const t=e,n=new Set([`children`,`localName`,`ref`,`style`,`className`,`id`]),r=new WeakMap,i=(e,t,n)=>{let i=r.get(e);i===void 0&&r.set(e,i=new Map);let a=i.get(t);n===void 0?a!==void 0&&(i.delete(t),e.removeEventListener(t,a)):a===void 0?(i.set(t,a={handleEvent:n}),e.addEventListener(t,a)):a.handleEvent=n},a=(e,t,n,r,a)=>{let o=a?.[t];if(o!==void 0){n!==r&&i(e,o,n);return}e[t]=n,n==null&&t in HTMLElement.prototype&&e.removeAttribute(t)},o=({react:e,tagName:r,elementClass:i,events:o,displayName:s})=>{i.finalize?.(),i.define?.();let c=new Set(Object.keys(o??{})),l=e.forwardRef((s,l)=>{let u=e.useRef(new Map),d=e.useRef(null),f={},p={},m=i.elementProperties;for(let[e,t]of Object.entries(s)){if(n.has(e)){f[e===`className`?`class`:e]=t;continue}
|
|
10
|
+
const t=e,n=new Set([`children`,`localName`,`ref`,`style`,`className`,`id`]),r=new WeakMap,i=(e,t,n)=>{let i=r.get(e);i===void 0&&r.set(e,i=new Map);let a=i.get(t);n===void 0?a!==void 0&&(i.delete(t),e.removeEventListener(t,a)):a===void 0?(i.set(t,a={handleEvent:n}),e.addEventListener(t,a)):a.handleEvent=n},a=(e,t,n,r,a)=>{let o=a?.[t];if(o!==void 0){n!==r&&i(e,o,n);return}e[t]=n,n==null&&t in HTMLElement.prototype&&e.removeAttribute(t)},o=({react:e,tagName:r,elementClass:i,events:o,displayName:s})=>{i.finalize?.(),i.define?.();let c=new Set(Object.keys(o??{})),l=e.forwardRef((s,l)=>{let u=e.useRef(new Map),d=e.useRef(null),f={},p={},m=i.elementProperties;for(let[e,t]of Object.entries(s)){if(n.has(e)){f[e===`className`?`class`:e]=t;continue}if(c.has(e)||e in i.prototype){let n=m?.get(e),r=n?.converter?.toAttribute;if(!n||n.attribute===!1||typeof t==`object`&&!r){p[e]=t;continue}let i=n.attribute===!0?e:n.attribute||e;n.type===Boolean?t?(f[i]=``,p[e]=t):p[e]=!1:f[i]=r?r(t):t;continue}f[e]=t}return t||(e.useLayoutEffect(()=>{if(d.current===null)return;let e=new Map;for(let t in p)a(d.current,t,s[t],u.current.get(t),o),u.current.delete(t),e.set(t,s[t]);for(let[e,t]of u.current)a(d.current,e,void 0,t,o);u.current=e}),e.useLayoutEffect(()=>{d.current?.removeAttribute(`defer-hydration`)},[])),t?(e.createElement.name===`litPatchedCreateElement`||globalThis.litSsrReactEnabled)&&Object.keys(p).length&&(f._$litProps$=p):f.suppressHydrationWarning=!0,e.createElement(r,{...f,ref:e.useCallback(e=>{d.current=e,typeof l==`function`?l(e):l!==null&&(l.current=e)},[l])})});return l.displayName=s??i.name,l};export{o as createComponent};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbb-esta/lyne-react-dev",
|
|
3
|
-
"version": "5.4.0-dev.
|
|
3
|
+
"version": "5.4.0-dev.1785742257",
|
|
4
4
|
"description": "Lyne Design System React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
7
7
|
"web components",
|
|
8
8
|
"lit",
|
|
9
9
|
"react",
|
|
10
|
-
"https://github.com/sbb-design-systems/lyne-components/commit/
|
|
10
|
+
"https://github.com/sbb-design-systems/lyne-components/commit/a61111eacbd169a8d92608337751ce14a461f18b"
|
|
11
11
|
],
|
|
12
12
|
"type": "module",
|
|
13
13
|
"exports": {
|