@nodeblocks/frontend-chat-conversation-block 0.1.0 → 0.2.0
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/chat-conversation.d.ts +251 -0
- package/dist/chat-conversation.d.ts.map +1 -0
- package/dist/context.d.ts +14 -8
- package/dist/context.d.ts.map +1 -1
- package/dist/index.cjs.js +7503 -45745
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7500 -45724
- package/dist/index.esm.js.map +1 -1
- package/dist/lib.d.ts +21 -1
- package/dist/lib.d.ts.map +1 -1
- package/package.json +10 -9
package/dist/lib.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
import { ComponentProps, FunctionComponent, ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { ComponentProps, FunctionComponent, LegacyRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that returns:
|
|
4
|
+
* - a legacy ref
|
|
5
|
+
* - the element pointed to by the ref
|
|
6
|
+
* - a boolean if the element is visible in the viewport, or false
|
|
7
|
+
* otherwise. This is determined by using the IntersectionObserver API.
|
|
8
|
+
*
|
|
9
|
+
* Use this by passing the ref to the element you want to observe.
|
|
10
|
+
*
|
|
11
|
+
* A callback can be provided to be called when the element becomes visible.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useIsVisible<ElementType extends Element = HTMLDivElement>(onVisible?: () => void): readonly [LegacyRef<ElementType>, ElementType, boolean];
|
|
14
|
+
/**
|
|
15
|
+
* A hook that determines the nearest parent component of this component that
|
|
16
|
+
* can be scrolled and returns it.
|
|
17
|
+
*
|
|
18
|
+
* A onScroll callback can be provided to perform logic when this parent component
|
|
19
|
+
* is scrolled
|
|
20
|
+
*/
|
|
21
|
+
export declare function useNearestScrollAncestor(childEl: HTMLElement | null, onScroll?: (event: Event) => void): HTMLElement | null;
|
|
2
22
|
/**
|
|
3
23
|
* The function to be passed into a block component as `children` to selectively override default blocks, or just a `ReactNode`.
|
|
4
24
|
*
|
package/dist/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,SAAS,EAGV,MAAM,OAAO,CAAC;AAMf;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,WAAW,SAAS,OAAO,GAAG,cAAc,EAAE,SAAS,CAAC,EAAE,MAAM,IAAI,2DAuBhG;AAWD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,sBAwBtG;AAMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,cAAc,CAAC,aAAa,EAAE,YAAY,IAClD,CAAC,CAAC,EACA,aAAa,EACb,iBAAiB,GAClB,EAAE;IACD,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,SAAS,CAAC,MAAM,aAAa,CAAC,EAAE,CAAC;CACrD,KAAK;IACJ,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,YAAY,CAAC;IAE9C,UAAU,EAAE,SAAS,CAAC,MAAM,aAAa,CAAC,EAAE,GAAG,SAAS,CAAC,MAAM,YAAY,CAAC,EAAE,CAAC;CAChF,CAAC,GACF,SAAS,CAAC;AAEd;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAClF,UAAU,EAAE,CAAC,GACZ;KACA,CAAC,IAAI,MAAM,CAAC,GAAG,YAAY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,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC;AAEzD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAE1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodeblocks/frontend-chat-conversation-block",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"browser": "dist/index.iife.js",
|
|
@@ -14,16 +14,20 @@
|
|
|
14
14
|
"watch": "rm -rf dist && cross-env NODE_ENV=development rollup -c --watch"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"react": "^
|
|
18
|
-
"
|
|
17
|
+
"@emotion/react": "^11.14.0",
|
|
18
|
+
"@emotion/styled": "^11.14.1",
|
|
19
|
+
"@mui/material": "^7.3.5",
|
|
20
|
+
"react": ">=18 <20",
|
|
21
|
+
"react-dom": ">=18 <20"
|
|
19
22
|
},
|
|
20
23
|
"devDependencies": {
|
|
21
24
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
22
25
|
"@rollup/plugin-json": "^6.1.0",
|
|
23
26
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
24
27
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
25
|
-
"@types/
|
|
26
|
-
"@types/react
|
|
28
|
+
"@types/luxon": "^3.4.2",
|
|
29
|
+
"@types/react": "19.2.7",
|
|
30
|
+
"@types/react-dom": "19.2.3",
|
|
27
31
|
"rollup": "^4.28.0",
|
|
28
32
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
29
33
|
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
@@ -33,9 +37,6 @@
|
|
|
33
37
|
"typescript": "^5.7.2"
|
|
34
38
|
},
|
|
35
39
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"@mui/base": "5.0.0-beta.30",
|
|
38
|
-
"date-fns": "^4.1.0",
|
|
39
|
-
"deepmerge": "^4.3.1"
|
|
40
|
+
"luxon": "^3.5.0"
|
|
40
41
|
}
|
|
41
42
|
}
|