@xyd-js/components 0.0.0-build-2acf05c-20251207022018 → 0.0.0-build-8a0317f-20251214165542

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/{Button-DVheWCHZ.js → Button-DjBpaLuF.js} +2 -2
  3. package/dist/{Button-DVheWCHZ.js.map → Button-DjBpaLuF.js.map} +1 -1
  4. package/dist/{CodeSample-Z2tmreLV.js → CodeSample-01rQdSpA.js} +2 -2
  5. package/dist/{CodeSample-Z2tmreLV.js.map → CodeSample-01rQdSpA.js.map} +1 -1
  6. package/dist/{Icon-DRU1J0gy.js → Icon-Dm0K2oVd.js} +1 -1
  7. package/dist/{Icon-DRU1J0gy.js.map → Icon-Dm0K2oVd.js.map} +1 -1
  8. package/dist/{PageFirstSlide-CTEJrGgv.js → PageFirstSlide-C4KyVTWY.js} +2 -2
  9. package/dist/{PageFirstSlide-CTEJrGgv.js.map → PageFirstSlide-C4KyVTWY.js.map} +1 -1
  10. package/dist/{TabsAnalytics-DnUqUOCF.js → TabsAnalytics-OtEY-IVF.js} +1 -1
  11. package/dist/{TabsAnalytics-DnUqUOCF.js.map → TabsAnalytics-OtEY-IVF.js.map} +1 -1
  12. package/dist/{Update-DwhBb6ZG.js → Update-DZW4oHtS.js} +2 -2
  13. package/dist/{Update-DwhBb6ZG.js.map → Update-DZW4oHtS.js.map} +1 -1
  14. package/dist/{VideoGuide-vl_Ad-Xk.js → VideoGuide-Bn9CpMS8.js} +2 -2
  15. package/dist/{VideoGuide-vl_Ad-Xk.js.map → VideoGuide-Bn9CpMS8.js.map} +1 -1
  16. package/dist/coder.js +1 -1
  17. package/dist/content.js +1 -1
  18. package/dist/index.css +54 -54
  19. package/dist/pages.js +1 -1
  20. package/dist/system.js +1 -1
  21. package/dist/{useUXClick-Bv4rNVsp.js → useUXClick-KGnkc4ZV.js} +1 -1
  22. package/dist/{useUXClick-Bv4rNVsp.js.map → useUXClick-KGnkc4ZV.js.map} +1 -1
  23. package/dist/{useUXEvents-YcA1HwRl.js → useUXEvents-CUaLMbsI.js} +1 -1
  24. package/dist/{useUXEvents-YcA1HwRl.js.map → useUXEvents-CUaLMbsI.js.map} +1 -1
  25. package/dist/{useUXScrollDepth-C8I-j4cx.js → useUXScrollDepth-DC_3o9Jj.js} +1 -1
  26. package/dist/{useUXScrollDepth-C8I-j4cx.js.map → useUXScrollDepth-DC_3o9Jj.js.map} +1 -1
  27. package/dist/uxsdk.js +1 -1
  28. package/dist/writer.js +1 -1
  29. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"useUXScrollDepth-C8I-j4cx.js","sources":["../src/uxsdk/useUXScrollDepth.ts"],"sourcesContent":["import React, {useEffect, useRef} from \"react\";\n\nexport interface ScrollDepthOptions {\n thresholds?: number[]; // Default: [25, 50, 75, 100]\n onDepthReached?: (depth: number) => void;\n}\n\nexport function useUXScrollDepth(\n ref: React.RefObject<HTMLElement | null>, \n options: ScrollDepthOptions = {}\n) {\n const { thresholds = [25, 50, 75, 100], onDepthReached } = options;\n const reachedDepthsRef = useRef<Set<number>>(new Set());\n\n useEffect(() => {\n if (!ref.current) {\n return\n }\n\n function handleScroll() {\n const element = ref.current;\n if (!element) return;\n\n const { scrollTop, scrollHeight, clientHeight } = element;\n \n // Calculate current scroll percentage\n const scrollableHeight = scrollHeight - clientHeight;\n if (scrollableHeight <= 0) return;\n \n const scrollPercentage = Math.round((scrollTop / scrollableHeight) * 100);\n \n // Check which thresholds have been reached\n thresholds.forEach(threshold => {\n if (scrollPercentage >= threshold && !reachedDepthsRef.current.has(threshold)) {\n reachedDepthsRef.current.add(threshold);\n onDepthReached?.(threshold);\n }\n });\n }\n\n const element = ref.current;\n element.addEventListener('scroll', handleScroll);\n\n return () => {\n element.removeEventListener('scroll', handleScroll);\n };\n }, [ref.current, thresholds, onDepthReached]);\n}\n\n"],"names":["useUXScrollDepth","ref","options","thresholds","onDepthReached","reachedDepthsRef","useRef","Set","useEffect","current","handleScroll","element","scrollTop","scrollHeight","clientHeight","scrollableHeight","scrollPercentage","Math","round","forEach","threshold","has","add","addEventListener","removeEventListener"],"mappings":"8CAOO,SAASA,EACZC,EACAC,EAA8B,IAE9B,MAAMC,WAAEA,EAAa,CAAC,GAAI,GAAI,GAAI,KAAIC,eAAEA,GAAmBF,EACrDG,EAAmBC,EAAoB,IAAIC,KAEjDC,EAAU,KACN,IAAKP,EAAIQ,QACL,OAGJ,SAASC,IACL,MAAMC,EAAUV,EAAIQ,QACpB,IAAKE,EAAS,OAEd,MAAMC,UAAEA,EAASC,aAAEA,EAAYC,aAAEA,GAAiBH,EAG5CI,EAAmBF,EAAeC,EACxC,GAAIC,GAAoB,EAAG,OAE3B,MAAMC,EAAmBC,KAAKC,MAAON,EAAYG,EAAoB,KAGrEZ,EAAWgB,QAAQC,IACXJ,GAAoBI,IAAcf,EAAiBI,QAAQY,IAAID,KAC/Df,EAAiBI,QAAQa,IAAIF,GAC7BhB,IAAiBgB,KAG7B,CAEA,MAAMT,EAAUV,EAAIQ,QAGpB,OAFAE,EAAQY,iBAAiB,SAAUb,GAE5B,KACHC,EAAQa,oBAAoB,SAAUd,KAE3C,CAACT,EAAIQ,QAASN,EAAYC,GACjC"}
1
+ {"version":3,"file":"useUXScrollDepth-DC_3o9Jj.js","sources":["../src/uxsdk/useUXScrollDepth.ts"],"sourcesContent":["import React, {useEffect, useRef} from \"react\";\n\nexport interface ScrollDepthOptions {\n thresholds?: number[]; // Default: [25, 50, 75, 100]\n onDepthReached?: (depth: number) => void;\n}\n\nexport function useUXScrollDepth(\n ref: React.RefObject<HTMLElement | null>, \n options: ScrollDepthOptions = {}\n) {\n const { thresholds = [25, 50, 75, 100], onDepthReached } = options;\n const reachedDepthsRef = useRef<Set<number>>(new Set());\n\n useEffect(() => {\n if (!ref.current) {\n return\n }\n\n function handleScroll() {\n const element = ref.current;\n if (!element) return;\n\n const { scrollTop, scrollHeight, clientHeight } = element;\n \n // Calculate current scroll percentage\n const scrollableHeight = scrollHeight - clientHeight;\n if (scrollableHeight <= 0) return;\n \n const scrollPercentage = Math.round((scrollTop / scrollableHeight) * 100);\n \n // Check which thresholds have been reached\n thresholds.forEach(threshold => {\n if (scrollPercentage >= threshold && !reachedDepthsRef.current.has(threshold)) {\n reachedDepthsRef.current.add(threshold);\n onDepthReached?.(threshold);\n }\n });\n }\n\n const element = ref.current;\n element.addEventListener('scroll', handleScroll);\n\n return () => {\n element.removeEventListener('scroll', handleScroll);\n };\n }, [ref.current, thresholds, onDepthReached]);\n}\n\n"],"names":["useUXScrollDepth","ref","options","thresholds","onDepthReached","reachedDepthsRef","useRef","Set","useEffect","current","handleScroll","element","scrollTop","scrollHeight","clientHeight","scrollableHeight","scrollPercentage","Math","round","forEach","threshold","has","add","addEventListener","removeEventListener"],"mappings":"8CAOO,SAASA,EACZC,EACAC,EAA8B,IAE9B,MAAMC,WAAEA,EAAa,CAAC,GAAI,GAAI,GAAI,KAAIC,eAAEA,GAAmBF,EACrDG,EAAmBC,EAAoB,IAAIC,KAEjDC,EAAU,KACN,IAAKP,EAAIQ,QACL,OAGJ,SAASC,IACL,MAAMC,EAAUV,EAAIQ,QACpB,IAAKE,EAAS,OAEd,MAAMC,UAAEA,EAASC,aAAEA,EAAYC,aAAEA,GAAiBH,EAG5CI,EAAmBF,EAAeC,EACxC,GAAIC,GAAoB,EAAG,OAE3B,MAAMC,EAAmBC,KAAKC,MAAON,EAAYG,EAAoB,KAGrEZ,EAAWgB,QAAQC,IACXJ,GAAoBI,IAAcf,EAAiBI,QAAQY,IAAID,KAC/Df,EAAiBI,QAAQa,IAAIF,GAC7BhB,IAAiBgB,KAG7B,CAEA,MAAMT,EAAUV,EAAIQ,QAGpB,OAFAE,EAAQY,iBAAiB,SAAUb,GAE5B,KACHC,EAAQa,oBAAoB,SAAUd,KAE3C,CAACT,EAAIQ,QAASN,EAAYC,GACjC"}
package/dist/uxsdk.js CHANGED
@@ -1,2 +1,2 @@
1
- export{E as EVENT_COMPONENT_TAB_CHANGE,u as useUXEvents}from"./useUXEvents-YcA1HwRl.js";export{u as useUXClick}from"./useUXClick-Bv4rNVsp.js";export{u as useUXScrollDepth}from"./useUXScrollDepth-C8I-j4cx.js";import{useRef as e,useCallback as r,useEffect as t}from"react";import"openux-js";function n(n,u,c){const o=e(!1),s=e(!1),i=e(null),l=e(0),m=r(()=>{const e=Date.now();e-l.current>1e3&&(o.current=!0,l.current=e,u())},[u]),a=r(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{o.current=!1,i.current=null},50)},[]);t(()=>{if(n.current)return n.current.addEventListener("mouseenter",m),n.current.addEventListener("mouseleave",a),()=>{n.current&&(n.current.removeEventListener("mouseenter",m),n.current.removeEventListener("mouseleave",a)),i.current&&clearTimeout(i.current)}},[n.current,m,a]);const v=r(()=>{i.current&&(clearTimeout(i.current),i.current=null),s.current=!1,o.current&&(o.current=!1,s.current=!0,c())},[c]);t(()=>(document.addEventListener("visibilitychange",v),()=>{document.removeEventListener("visibilitychange",v),i.current&&clearTimeout(i.current)}),[v])}export{n as useUXUnreachableElementTracker};
1
+ export{E as EVENT_COMPONENT_TAB_CHANGE,u as useUXEvents}from"./useUXEvents-CUaLMbsI.js";export{u as useUXClick}from"./useUXClick-KGnkc4ZV.js";export{u as useUXScrollDepth}from"./useUXScrollDepth-DC_3o9Jj.js";import{useRef as e,useCallback as r,useEffect as t}from"react";import"openux-js";function n(n,u,c){const o=e(!1),s=e(!1),i=e(null),l=e(0),m=r(()=>{const e=Date.now();e-l.current>1e3&&(o.current=!0,l.current=e,u())},[u]),a=r(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{o.current=!1,i.current=null},50)},[]);t(()=>{if(n.current)return n.current.addEventListener("mouseenter",m),n.current.addEventListener("mouseleave",a),()=>{n.current&&(n.current.removeEventListener("mouseenter",m),n.current.removeEventListener("mouseleave",a)),i.current&&clearTimeout(i.current)}},[n.current,m,a]);const v=r(()=>{i.current&&(clearTimeout(i.current),i.current=null),s.current=!1,o.current&&(o.current=!1,s.current=!0,c())},[c]);t(()=>(document.addEventListener("visibilitychange",v),()=>{document.removeEventListener("visibilitychange",v),i.current&&clearTimeout(i.current)}),[v])}export{n as useUXUnreachableElementTracker};
2
2
  //# sourceMappingURL=uxsdk.js.map
package/dist/writer.js CHANGED
@@ -1,2 +1,2 @@
1
- export{A as Anchor,B as Badge,c as Banner,G as GuideCard,H as Heading,I as IconSocial,L as List,a as ListOl,N as NavLinks,S as Steps,T as Table,b as Tabs,V as VideoGuide}from"./VideoGuide-vl_Ad-Xk.js";export{B as Blockquote,c as Breadcrumbs,a as Callout,d as Card,b as Code,C as ColorSchemeButton,D as Details,H as Hr,I as Image,U as Update,u as useColorScheme}from"./Update-DwhBb6ZG.js";export{B as Button}from"./Button-DVheWCHZ.js";import{I as e}from"./Icon-DRU1J0gy.js";export{a as IconProvider}from"./Icon-DRU1J0gy.js";import r from"react";export{T as Text}from"./TabsAnalytics-DnUqUOCF.js";import"./useUXEvents-YcA1HwRl.js";import"radix-ui";import"lucide-react";import"./useUXClick-Bv4rNVsp.js";import"openux-js";function t(e){return e}function s({children:e,className:a}){return r.createElement("pre",{className:`p1vb39qj ${a||""}`},e)}function o(e){return e}var n="TocCard-module_TocCardHost__pT0XJ";function i({title:a,description:t,href:s,className:o,icon:i,as:c}){const m=c||l;return r.createElement("xyd-toccard",{className:`${n} ${o||""}`},r.createElement("div",{part:"container"},r.createElement(m,{part:"link",href:s,target:"_blank",rel:"noreferrer"},r.createElement("div",{part:"title-container"},r.createElement("div",{part:"title"},a),i&&r.createElement(e,{name:i,size:16})),r.createElement("div",{part:"description"},t))))}function l({children:e,href:a,...t}){return r.createElement("a",{href:a,...t},e)}export{t as DetailsPropsProps,e as Icon,s as Pre,o as TabsProps,i as TocCard};
1
+ export{A as Anchor,B as Badge,c as Banner,G as GuideCard,H as Heading,I as IconSocial,L as List,a as ListOl,N as NavLinks,S as Steps,T as Table,b as Tabs,V as VideoGuide}from"./VideoGuide-Bn9CpMS8.js";export{B as Blockquote,c as Breadcrumbs,a as Callout,d as Card,b as Code,C as ColorSchemeButton,D as Details,H as Hr,I as Image,U as Update,u as useColorScheme}from"./Update-DZW4oHtS.js";export{B as Button}from"./Button-DjBpaLuF.js";import{I as e}from"./Icon-Dm0K2oVd.js";export{a as IconProvider}from"./Icon-Dm0K2oVd.js";import r from"react";export{T as Text}from"./TabsAnalytics-OtEY-IVF.js";import"./useUXEvents-CUaLMbsI.js";import"radix-ui";import"lucide-react";import"./useUXClick-KGnkc4ZV.js";import"openux-js";function t(e){return e}function s({children:e,className:a}){return r.createElement("pre",{className:`p1vb39qj ${a||""}`},e)}function o(e){return e}var n="TocCard-module_TocCardHost__pT0XJ";function i({title:a,description:t,href:s,className:o,icon:i,as:c}){const m=c||l;return r.createElement("xyd-toccard",{className:`${n} ${o||""}`},r.createElement("div",{part:"container"},r.createElement(m,{part:"link",href:s,target:"_blank",rel:"noreferrer"},r.createElement("div",{part:"title-container"},r.createElement("div",{part:"title"},a),i&&r.createElement(e,{name:i,size:16})),r.createElement("div",{part:"description"},t))))}function l({children:e,href:a,...t}){return r.createElement("a",{href:a,...t},e)}export{t as DetailsPropsProps,e as Icon,s as Pre,o as TabsProps,i as TocCard};
2
2
  //# sourceMappingURL=writer.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyd-js/components",
3
- "version": "0.0.0-build-2acf05c-20251207022018",
3
+ "version": "0.0.0-build-8a0317f-20251214165542",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -49,7 +49,7 @@
49
49
  "@code-hike/lighter": "^1.0.3",
50
50
  "openux-js": "0.0.0-pre.1",
51
51
  "react": "^19.1.0",
52
- "@xyd-js/core": "0.0.0-build-2acf05c-20251207022018"
52
+ "@xyd-js/core": "0.0.0-build-8a0317f-20251214165542"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@linaria/core": "^6.2.0",