@xyd-js/components 0.0.0-build-d294e50-20250813115432 → 0.0.0-build-4d57ef6-20250813141749
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/CHANGELOG.md +2 -2
- package/dist/{Button-CK-fydeS.js → Button-CfTjsiEz.js} +2 -2
- package/dist/{Button-CK-fydeS.js.map → Button-CfTjsiEz.js.map} +1 -1
- package/dist/{CodeSample-Cumebkfv.js → CodeSample-DgijtuT7.js} +2 -2
- package/dist/{CodeSample-Cumebkfv.js.map → CodeSample-DgijtuT7.js.map} +1 -1
- package/dist/{Icon-DOS80wjf.js → Icon-gKzgH4ex.js} +2 -2
- package/dist/{Icon-DOS80wjf.js.map → Icon-gKzgH4ex.js.map} +1 -1
- package/dist/{PageFirstSlide-Cs_m9IBI.js → PageFirstSlide-Bfx34kba.js} +2 -2
- package/dist/{PageFirstSlide-Cs_m9IBI.js.map → PageFirstSlide-Bfx34kba.js.map} +1 -1
- package/dist/{TabsAnalytics-Lb1vgP-v.js → TabsAnalytics-8y98Ezj_.js} +2 -2
- package/dist/{TabsAnalytics-Lb1vgP-v.js.map → TabsAnalytics-8y98Ezj_.js.map} +1 -1
- package/dist/{Update-Bm08VuQ_.js → Update-7V1BhBn-.js} +2 -2
- package/dist/{Update-Bm08VuQ_.js.map → Update-7V1BhBn-.js.map} +1 -1
- package/dist/{VideoGuide-C59pFDlX.js → VideoGuide-D3thgLCE.js} +2 -2
- package/dist/{VideoGuide-C59pFDlX.js.map → VideoGuide-D3thgLCE.js.map} +1 -1
- package/dist/{_rollupPluginBabelHelpers-C_0uOe2e.js → _rollupPluginBabelHelpers-CH1gfnxm.js} +1 -1
- package/dist/_rollupPluginBabelHelpers-CH1gfnxm.js.map +1 -0
- package/dist/coder.js +1 -1
- package/dist/content.js +1 -1
- package/dist/index.css +73 -73
- package/dist/layouts.js +1 -1
- package/dist/pages.js +1 -1
- package/dist/system.js +1 -1
- package/dist/{useUXClick-C9mHvdtJ.js → useUXClick-Baq4z_Wi.js} +2 -2
- package/dist/{useUXClick-C9mHvdtJ.js.map → useUXClick-Baq4z_Wi.js.map} +1 -1
- package/dist/{useUXEvents-DgVj--z9.js → useUXEvents-B3F0EGgl.js} +1 -1
- package/dist/{useUXEvents-DgVj--z9.js.map → useUXEvents-B3F0EGgl.js.map} +1 -1
- package/dist/{useUXScrollDepth-CYmZj27Z.js → useUXScrollDepth-C7qYwQmL.js} +1 -1
- package/dist/{useUXScrollDepth-CYmZj27Z.js.map → useUXScrollDepth-C7qYwQmL.js.map} +1 -1
- package/dist/uxsdk.js +1 -1
- package/dist/writer.js +1 -1
- package/package.json +2 -2
- package/dist/_rollupPluginBabelHelpers-C_0uOe2e.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUXScrollDepth-
|
|
1
|
+
{"version":3,"file":"useUXScrollDepth-C7qYwQmL.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","_options$thresholds","thresholds","onDepthReached","reachedDepthsRef","useRef","Set","useEffect","current","element","addEventListener","handleScroll","removeEventListener","scrollTop","scrollableHeight","scrollHeight","clientHeight","scrollPercentage","Math","round","forEach","threshold","has","add"],"mappings":"uDAOgBA,EACZC,GACgC,IAAhCC,yDAA8B,CAAA,EAE9BC,EAA2DD,EAAnDE,WAAAA,OAAU,IAAAD,EAAG,CAAC,GAAI,GAAI,GAAI,KAAIA,EAAEE,EAAmBH,EAAnBG,eAClCC,EAAmBC,EAAoB,IAAIC,KAEjDC,EAAU,WACN,GAAKR,EAAIS,QAAT,CAyBA,IAAMC,EAAUV,EAAIS,QAGpB,OAFAC,EAAQC,iBAAiB,SAAUC,GAE5B,WACHF,EAAQG,oBAAoB,SAAUD,EAC1C,CA5BA,CAEA,SAASA,IACL,IAAMF,EAAUV,EAAIS,QACpB,GAAKC,EAAL,CAEA,IAAQI,EAA0CJ,EAA1CI,UAGFC,EAH4CL,EAA/BM,aAA+BN,EAAjBO,aAIjC,KAAIF,GAAoB,GAAxB,CAEA,IAAMG,EAAmBC,KAAKC,MAAON,EAAYC,EAAoB,KAGrEZ,EAAWkB,QAAQ,SAAAC,GACXJ,GAAoBI,IAAcjB,EAAiBI,QAAQc,IAAID,KAC/DjB,EAAiBI,QAAQe,IAAIF,GAC7BlB,SAAAA,EAAiBkB,GAEzB,EAV2B,CANb,CAiBlB,CAQJ,EAAG,CAACtB,EAAIS,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-
|
|
1
|
+
export{E as EVENT_COMPONENT_TAB_CHANGE,u as useUXEvents}from"./useUXEvents-B3F0EGgl.js";export{u as useUXClick}from"./useUXClick-Baq4z_Wi.js";export{u as useUXScrollDepth}from"./useUXScrollDepth-C7qYwQmL.js";import{useRef as e,useCallback as r,useEffect as t}from"react";import"openux-js";import"./_rollupPluginBabelHelpers-CH1gfnxm.js";function n(n,u,c){var o=e(!1),i=e(!1),s=e(null),l=e(0),a=r(function(){var e=Date.now();e-l.current>1e3&&(o.current=!0,l.current=e,u())},[u]),m=r(function(){s.current&&clearTimeout(s.current),s.current=setTimeout(function(){o.current=!1,s.current=null},50)},[]);t(function(){if(n.current)return n.current.addEventListener("mouseenter",a),n.current.addEventListener("mouseleave",m),function(){n.current&&(n.current.removeEventListener("mouseenter",a),n.current.removeEventListener("mouseleave",m)),s.current&&clearTimeout(s.current)}},[n.current,a,m]);var v=r(function(){s.current&&(clearTimeout(s.current),s.current=null),i.current=!1,o.current&&(o.current=!1,i.current=!0,c())},[c]);t(function(){return document.addEventListener("visibilitychange",v),function(){document.removeEventListener("visibilitychange",v),s.current&&clearTimeout(s.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-
|
|
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-D3thgLCE.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-7V1BhBn-.js";export{B as Button}from"./Button-CfTjsiEz.js";import{I as e,a as r}from"./Icon-gKzgH4ex.js";export{b as IconProvider}from"./Icon-gKzgH4ex.js";import t from"react";export{T as Text}from"./TabsAnalytics-8y98Ezj_.js";import"./useUXEvents-B3F0EGgl.js";import"./_rollupPluginBabelHelpers-CH1gfnxm.js";import"radix-ui";import"lucide-react";import"./useUXClick-Baq4z_Wi.js";import"openux-js";function s(e){return e}function o(e){var a=e.children,r=e.className;return t.createElement("pre",{className:"".concat("p1vb39qj"," ").concat(r||"")},a)}function n(e){return e}var i="TocCard-module_TocCardHost__pT0XJ";function l(a){var r=a.title,s=a.description,o=a.href,n=a.className,c=a.icon,l=a.as||m;return t.createElement("xyd-toccard",{className:"".concat(i," ").concat(n||"")},t.createElement("div",{part:"container"},t.createElement(l,{part:"link",href:o,target:"_blank",rel:"noreferrer"},t.createElement("div",{part:"title-container"},t.createElement("div",{part:"title"},r),c&&t.createElement(e,{name:c,size:16})),t.createElement("div",{part:"description"},s))))}function m(e){var a=e.children,s=e.href,o=r(e,["children","href"]);return t.createElement("a",Object.assign({href:s},o),a)}export{s as DetailsPropsProps,e as Icon,o as Pre,n as TabsProps,l 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-
|
|
3
|
+
"version": "0.0.0-build-4d57ef6-20250813141749",
|
|
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-
|
|
52
|
+
"@xyd-js/core": "0.0.0-build-4d57ef6-20250813141749"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@linaria/core": "^6.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-C_0uOe2e.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|