@lynx-js/luna-stage 0.1.1 → 0.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"hooks/use-merged-refs.js","sources":["../../src/hooks/use-merged-refs.ts"],"sourcesContent":["// Copyright 2026 The Lynx Authors. All rights reserved.\n// Licensed under the Apache License Version 2.0 that can be found in the\n// LICENSE file in the root directory of this source tree.\n\nimport { useMemo } from 'react'\nimport type { Ref } from 'react'\n\ntype PossibleRef<T> = Ref<T> | undefined\ninterface WritableRefObject<T> {\n current: T | null\n}\n\nfunction setRef<T>(\n ref: PossibleRef<T>,\n value: T | null,\n): void {\n if (typeof ref === 'function') {\n ref(value)\n } else if (\n ref !== undefined && ref !== null && typeof ref === 'object'\n && 'current' in ref\n ) {\n ;(ref as WritableRefObject<T>).current = value\n }\n}\n\nfunction mergeRefs<T>(...refs: PossibleRef<T>[]) {\n return (node: T | null) => {\n refs.forEach(ref => {\n setRef(ref, node)\n })\n }\n}\n\nexport function useMergedRefs<T>(\n ...refs: PossibleRef<T>[]\n): (node: T | null) => void {\n // biome-ignore lint/correctness/useExhaustiveDependencies: refs is the dependency list for the merged ref callback.\n return useMemo(() => mergeRefs(...refs), refs)\n}\n"],"names":["setRef","ref","value","mergeRefs","refs","node","useMergedRefs","useMemo"],"mappings":";AAYA,SAASA,OACPC,GAAmB,EACnBC,KAAe;IAEf,IAAI,AAAe,cAAf,OAAOD,KACTA,IAAIC;SACC,IACLD,QAAAA,OAAqC,AAAe,YAAf,OAAOA,OACzC,aAAaA,KAEdA,IAA6B,OAAO,GAAGC;AAE7C;AAEA,SAASC,UAAa,GAAGC,IAAsB;IAC7C,OAAO,CAACC;QACND,KAAK,OAAO,CAACH,CAAAA;YACXD,OAAOC,KAAKI;QACd;IACF;AACF;AAEO,SAASC,cACd,GAAGF,IAAsB;IAGzB,OAAOG,QAAQ,IAAMJ,aAAaC,OAAOA;AAC3C"}
1
+ {"version":3,"file":"hooks/use-merged-refs.js","sources":["../../src/hooks/use-merged-refs.ts"],"sourcesContent":["// Copyright 2026 The Lynx Authors. All rights reserved.\n// Licensed under the Apache License Version 2.0 that can be found in the\n// LICENSE file in the root directory of this source tree.\n\nimport { useMemo } from 'react'\nimport type { Ref } from 'react'\n\ntype PossibleRef<T> = Ref<T> | undefined\ninterface WritableRefObject<T> {\n current: T | null\n}\n\nfunction setRef<T>(\n ref: PossibleRef<T>,\n value: T | null,\n): void {\n if (typeof ref === 'function') {\n ref(value)\n } else if (\n ref !== undefined && ref !== null && typeof ref === 'object'\n && 'current' in ref\n ) {\n ;(ref as WritableRefObject<T>).current = value\n }\n}\n\nfunction mergeRefs<T>(...refs: PossibleRef<T>[]) {\n return (node: T | null) => {\n refs.forEach(ref => {\n setRef(ref, node)\n })\n }\n}\n\nexport function useMergedRefs<T>(\n ...refs: PossibleRef<T>[]\n): (node: T | null) => void {\n // eslint-disable-next-line react-hooks/exhaustive-deps -- refs is the dependency list\n return useMemo(() => mergeRefs(...refs), refs)\n}\n"],"names":["setRef","ref","value","mergeRefs","refs","node","useMergedRefs","useMemo"],"mappings":";AAYA,SAASA,OACPC,GAAmB,EACnBC,KAAe;IAEf,IAAI,AAAe,cAAf,OAAOD,KACTA,IAAIC;SACC,IACLD,QAAAA,OAAqC,AAAe,YAAf,OAAOA,OACzC,aAAaA,KAEdA,IAA6B,OAAO,GAAGC;AAE7C;AAEA,SAASC,UAAa,GAAGC,IAAsB;IAC7C,OAAO,CAACC;QACND,KAAK,OAAO,CAACH,CAAAA;YACXD,OAAOC,KAAKI;QACd;IACF;AACF;AAEO,SAASC,cACd,GAAGF,IAAsB;IAGzB,OAAOG,QAAQ,IAAMJ,aAAaC,OAAOA;AAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/luna-stage",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Stage system and showcase components for the L.U.N.A project",
5
5
  "keywords": [
6
6
  "luna",
@@ -42,10 +42,10 @@
42
42
  "README.md"
43
43
  ],
44
44
  "dependencies": {
45
- "@lynx-js/luna-core": "0.2.2"
45
+ "@lynx-js/luna-core": "0.2.3"
46
46
  },
47
47
  "devDependencies": {
48
- "@lynx-js/web-core": "0.23.0",
48
+ "@lynx-js/web-core": "0.26.2",
49
49
  "@rsbuild/plugin-react": "2.1.0",
50
50
  "@rslib/core": "0.23.2",
51
51
  "@testing-library/jest-dom": "6.9.1",