@lynx-js/web-elements 0.12.11 → 0.12.12
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 +6 -0
- package/dist/element-reactive/registerAttributeHandler.d.ts +2 -2
- package/dist/element-reactive/registerAttributeHandler.js +2 -2
- package/dist/element-reactive/registerEventStatusChangedHandler.d.ts +1 -1
- package/dist/element-reactive/registerEventStatusChangedHandler.js +1 -1
- package/dist/elements/ScrollView/index.d.ts +3 -2
- package/dist/elements/ScrollView/index.js +3 -2
- package/dist/elements/XInput/index.d.ts +2 -2
- package/dist/elements/XInput/index.js +2 -2
- package/dist/elements/XList/XList.d.ts +1 -2
- package/dist/elements/XList/index.d.ts +3 -3
- package/dist/elements/XList/index.js +3 -3
- package/dist/elements/XMarkdown/index.d.ts +4 -1
- package/dist/elements/XMarkdown/index.js +4 -1
- package/dist/elements/XSwiper/index.d.ts +1 -2
- package/dist/elements/XSwiper/index.js +1 -2
- package/dist/elements/XTextarea/index.d.ts +3 -5
- package/dist/elements/XTextarea/index.js +3 -5
- package/dist/elements/XViewpagerNg/index.d.ts +2 -1
- package/dist/elements/XViewpagerNg/index.js +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type AttributeChangeHandler = (newValue: string | null, oldValue: string | null, attributeName: string) => void;
|
|
7
7
|
/**
|
|
8
|
-
* @param
|
|
9
|
-
* @param noDomMeasure
|
|
8
|
+
* @param key - The attribute name
|
|
9
|
+
* @param args - `[noDomMeasure]`: if there are any measurement operation, the handler will be invoked after connected
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
12
|
export declare const registerAttributeHandler: (key: string, args_0: boolean) => <T>(this: T, target: AttributeChangeHandler | undefined, context: ClassMemberDecoratorContext | ClassFieldDecoratorContext<T>) => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { generateRegister } from './generateRegister.js';
|
|
2
2
|
/**
|
|
3
|
-
* @param
|
|
4
|
-
* @param noDomMeasure
|
|
3
|
+
* @param key - The attribute name
|
|
4
|
+
* @param args - `[noDomMeasure]`: if there are any measurement operation, the handler will be invoked after connected
|
|
5
5
|
* @returns
|
|
6
6
|
*/
|
|
7
7
|
export const registerAttributeHandler = generateRegister('attributeChangedHandler', (handler, [noDomMeasure]) => ({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type EventStatusChangeHandler = (enable: boolean, eventName: string) => void;
|
|
7
7
|
/**
|
|
8
|
-
* @param
|
|
8
|
+
* @param key - The event name
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
export declare const registerEventEnableStatusChangeHandler: (key: string) => <T>(this: T, target: EventStatusChangeHandler | undefined, context: ClassMemberDecoratorContext | ClassFieldDecoratorContext<T>) => any;
|
|
@@ -13,12 +13,13 @@
|
|
|
13
13
|
* - `scroll-orientation`: 'vertical' | 'horizontal' | 'both'.
|
|
14
14
|
* - `scroll-y`: 'true' | 'false' to enable vertical scrolling.
|
|
15
15
|
* - `scroll-x`: 'true' | 'false' to enable horizontal scrolling.
|
|
16
|
-
* - `enable-scroll`:
|
|
16
|
+
* - `enable-scroll`: Set to 'false' to disable user scrolling (enabled by default).
|
|
17
17
|
*
|
|
18
18
|
* Events:
|
|
19
19
|
* - `scrolltoupper`: Reached top threshold.
|
|
20
20
|
* - `scrolltolower`: Reached bottom threshold.
|
|
21
|
-
* - `scroll
|
|
21
|
+
* - `scroll` (mapped to `lynxscroll`): Fired on scroll. Detail: `{ scrollTop, scrollLeft, scrollHeight, scrollWidth, isDragging, deltaX, deltaY }`.
|
|
22
|
+
* - `scrollend` (mapped to `lynxscrollend`): Fired when scrolling ends. Same detail as `scroll`.
|
|
22
23
|
*
|
|
23
24
|
* CSS:
|
|
24
25
|
* - Forces `display: flex` and linear layout behavior.
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
* - `scroll-orientation`: 'vertical' | 'horizontal' | 'both'.
|
|
17
17
|
* - `scroll-y`: 'true' | 'false' to enable vertical scrolling.
|
|
18
18
|
* - `scroll-x`: 'true' | 'false' to enable horizontal scrolling.
|
|
19
|
-
* - `enable-scroll`:
|
|
19
|
+
* - `enable-scroll`: Set to 'false' to disable user scrolling (enabled by default).
|
|
20
20
|
*
|
|
21
21
|
* Events:
|
|
22
22
|
* - `scrolltoupper`: Reached top threshold.
|
|
23
23
|
* - `scrolltolower`: Reached bottom threshold.
|
|
24
|
-
* - `scroll
|
|
24
|
+
* - `scroll` (mapped to `lynxscroll`): Fired on scroll. Detail: `{ scrollTop, scrollLeft, scrollHeight, scrollWidth, isDragging, deltaX, deltaY }`.
|
|
25
|
+
* - `scrollend` (mapped to `lynxscrollend`): Fired when scrolling ends. Same detail as `scroll`.
|
|
25
26
|
*
|
|
26
27
|
* CSS:
|
|
27
28
|
* - Forces `display: flex` and linear layout behavior.
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Events:
|
|
22
22
|
* - `input` (mapped to `lynxinput`): Fired on input.
|
|
23
|
-
* - `focus
|
|
24
|
-
* - `blur
|
|
23
|
+
* - `focus` (mapped to `lynxfocus`): Fired on focus.
|
|
24
|
+
* - `blur` (mapped to `lynxblur`): Fired on blur.
|
|
25
25
|
* - `confirm` (submit): Fired on enter key.
|
|
26
26
|
*
|
|
27
27
|
* Methods:
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
*
|
|
24
24
|
* Events:
|
|
25
25
|
* - `input` (mapped to `lynxinput`): Fired on input.
|
|
26
|
-
* - `focus
|
|
27
|
-
* - `blur
|
|
26
|
+
* - `focus` (mapped to `lynxfocus`): Fired on focus.
|
|
27
|
+
* - `blur` (mapped to `lynxblur`): Fired on blur.
|
|
28
28
|
* - `confirm` (submit): Fired on enter key.
|
|
29
29
|
*
|
|
30
30
|
* Methods:
|
|
@@ -27,8 +27,7 @@ export declare class XList extends HTMLElement {
|
|
|
27
27
|
*/
|
|
28
28
|
rate: `${number}px` | `${number}rpx` | `${number}ppx` | number;
|
|
29
29
|
/**
|
|
30
|
-
* @description start
|
|
31
|
-
* @defaultValue true
|
|
30
|
+
* @description true to start, false to stop.
|
|
32
31
|
*/
|
|
33
32
|
start: boolean;
|
|
34
33
|
/**
|
|
@@ -16,8 +16,8 @@ export { ListItem } from './ListItem.js';
|
|
|
16
16
|
* Events:
|
|
17
17
|
* - `scrolltoupper`: Reached top threshold.
|
|
18
18
|
* - `scrolltolower`: Reached bottom threshold.
|
|
19
|
-
* - `scroll
|
|
20
|
-
* - `scrollend
|
|
19
|
+
* - `scroll` (mapped to `lynxscroll`): Fired on scroll.
|
|
20
|
+
* - `scrollend` (mapped to `lynxscrollend`): Fired when scrolling stops.
|
|
21
21
|
* - `snap`: Fired on scroll snap.
|
|
22
22
|
*
|
|
23
23
|
* Methods:
|
|
@@ -26,7 +26,7 @@ export { ListItem } from './ListItem.js';
|
|
|
26
26
|
*
|
|
27
27
|
* CSS:
|
|
28
28
|
* - `list-type="flow"` uses `display: grid`.
|
|
29
|
-
* - `list-type="waterfall"` uses `display: flex` (column
|
|
29
|
+
* - `list-type="waterfall"` uses `display: flex` (`flex-direction: column`, or `row` when horizontal) with absolute positioning for items.
|
|
30
30
|
* - `sticky` items use `position: sticky`.
|
|
31
31
|
*/
|
|
32
32
|
export { XList } from './XList.js';
|
|
@@ -19,8 +19,8 @@ export { ListItem } from './ListItem.js';
|
|
|
19
19
|
* Events:
|
|
20
20
|
* - `scrolltoupper`: Reached top threshold.
|
|
21
21
|
* - `scrolltolower`: Reached bottom threshold.
|
|
22
|
-
* - `scroll
|
|
23
|
-
* - `scrollend
|
|
22
|
+
* - `scroll` (mapped to `lynxscroll`): Fired on scroll.
|
|
23
|
+
* - `scrollend` (mapped to `lynxscrollend`): Fired when scrolling stops.
|
|
24
24
|
* - `snap`: Fired on scroll snap.
|
|
25
25
|
*
|
|
26
26
|
* Methods:
|
|
@@ -29,7 +29,7 @@ export { ListItem } from './ListItem.js';
|
|
|
29
29
|
*
|
|
30
30
|
* CSS:
|
|
31
31
|
* - `list-type="flow"` uses `display: grid`.
|
|
32
|
-
* - `list-type="waterfall"` uses `display: flex` (column
|
|
32
|
+
* - `list-type="waterfall"` uses `display: flex` (`flex-direction: column`, or `row` when horizontal) with absolute positioning for items.
|
|
33
33
|
* - `sticky` items use `position: sticky`.
|
|
34
34
|
*/
|
|
35
35
|
export { XList } from './XList.js';
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* @module elements/XMarkdown
|
|
3
3
|
*
|
|
4
4
|
* `x-markdown` renders markdown content with minimal styling.
|
|
5
|
-
*
|
|
5
|
+
* Key attributes: `content`, `markdown-style`, `content-id`, `text-selection`,
|
|
6
|
+
* `text-maxline`, `content-range`, `markdown-effect`, and the typewriter
|
|
7
|
+
* controls `animation-type`, `animation-velocity`, `animation-paused`,
|
|
8
|
+
* `initial-animation-step` and `content-complete`.
|
|
6
9
|
*/
|
|
7
10
|
export { XMarkdown } from './XMarkdown.js';
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* @module elements/XMarkdown
|
|
6
6
|
*
|
|
7
7
|
* `x-markdown` renders markdown content with minimal styling.
|
|
8
|
-
*
|
|
8
|
+
* Key attributes: `content`, `markdown-style`, `content-id`, `text-selection`,
|
|
9
|
+
* `text-maxline`, `content-range`, `markdown-effect`, and the typewriter
|
|
10
|
+
* controls `animation-type`, `animation-velocity`, `animation-paused`,
|
|
11
|
+
* `initial-animation-step` and `content-complete`.
|
|
9
12
|
*/
|
|
10
13
|
export { XMarkdown } from './XMarkdown.js';
|
|
11
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -5,13 +5,12 @@ export { SwiperItem } from './SwiperItem.js';
|
|
|
5
5
|
* `x-swiper` provides a swipeable container for items.
|
|
6
6
|
*
|
|
7
7
|
* Attributes:
|
|
8
|
-
* - `mode`: 'normal' | 'carousel' | 'flat-coverflow'.
|
|
8
|
+
* - `mode`: 'normal' | 'carousel' | 'coverflow' | 'flat-coverflow'.
|
|
9
9
|
* - `vertical`: 'true' | 'false', vertical scrolling.
|
|
10
10
|
* - `circular`: 'true' | 'false', circular scrolling.
|
|
11
11
|
* - `current`: Current index.
|
|
12
12
|
* - `autoplay`: 'true' | 'false'.
|
|
13
13
|
* - `interval`: Autoplay interval in ms (default 5000).
|
|
14
|
-
* - `duration`: Animation duration.
|
|
15
14
|
* - `smooth-scroll`: 'true' | 'false'.
|
|
16
15
|
* - `indicator-dots`: 'true' | 'false', show indicator dots.
|
|
17
16
|
* - `indicator-color`: Color of inactive indicator dots.
|
|
@@ -8,13 +8,12 @@ export { SwiperItem } from './SwiperItem.js';
|
|
|
8
8
|
* `x-swiper` provides a swipeable container for items.
|
|
9
9
|
*
|
|
10
10
|
* Attributes:
|
|
11
|
-
* - `mode`: 'normal' | 'carousel' | 'flat-coverflow'.
|
|
11
|
+
* - `mode`: 'normal' | 'carousel' | 'coverflow' | 'flat-coverflow'.
|
|
12
12
|
* - `vertical`: 'true' | 'false', vertical scrolling.
|
|
13
13
|
* - `circular`: 'true' | 'false', circular scrolling.
|
|
14
14
|
* - `current`: Current index.
|
|
15
15
|
* - `autoplay`: 'true' | 'false'.
|
|
16
16
|
* - `interval`: Autoplay interval in ms (default 5000).
|
|
17
|
-
* - `duration`: Animation duration.
|
|
18
17
|
* - `smooth-scroll`: 'true' | 'false'.
|
|
19
18
|
* - `indicator-dots`: 'true' | 'false', show indicator dots.
|
|
20
19
|
* - `indicator-color`: Color of inactive indicator dots.
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* - `disabled`: 'true' | 'false'.
|
|
9
9
|
* - `placeholder`: Placeholder text.
|
|
10
10
|
* - `maxlength`: Max character length (default 140).
|
|
11
|
-
* - `auto-height`: 'true' | 'false', auto resize height.
|
|
12
11
|
* - `confirm-type`: 'send' | 'search' | 'next' | 'go' | 'done'.
|
|
13
12
|
* - `confirm-enter`: 'true' | 'false', trigger confirm event on enter.
|
|
14
13
|
* - `max-height`: Max height style.
|
|
@@ -19,11 +18,10 @@
|
|
|
19
18
|
* - `placeholder-font-family`: Font family of the placeholder.
|
|
20
19
|
*
|
|
21
20
|
* Events:
|
|
22
|
-
* - `input
|
|
23
|
-
* - `focus
|
|
24
|
-
* - `blur
|
|
21
|
+
* - `input` (mapped to `lynxinput`): Fired on input.
|
|
22
|
+
* - `focus` (mapped to `lynxfocus`): Fired on focus.
|
|
23
|
+
* - `blur` (mapped to `lynxblur`): Fired on blur.
|
|
25
24
|
* - `confirm`: Fired on confirm/enter.
|
|
26
|
-
* - `linechange`: Fired when line count changes.
|
|
27
25
|
*
|
|
28
26
|
* Methods:
|
|
29
27
|
* - `addText({ text })`: Inserts text.
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
* - `disabled`: 'true' | 'false'.
|
|
12
12
|
* - `placeholder`: Placeholder text.
|
|
13
13
|
* - `maxlength`: Max character length (default 140).
|
|
14
|
-
* - `auto-height`: 'true' | 'false', auto resize height.
|
|
15
14
|
* - `confirm-type`: 'send' | 'search' | 'next' | 'go' | 'done'.
|
|
16
15
|
* - `confirm-enter`: 'true' | 'false', trigger confirm event on enter.
|
|
17
16
|
* - `max-height`: Max height style.
|
|
@@ -22,11 +21,10 @@
|
|
|
22
21
|
* - `placeholder-font-family`: Font family of the placeholder.
|
|
23
22
|
*
|
|
24
23
|
* Events:
|
|
25
|
-
* - `input
|
|
26
|
-
* - `focus
|
|
27
|
-
* - `blur
|
|
24
|
+
* - `input` (mapped to `lynxinput`): Fired on input.
|
|
25
|
+
* - `focus` (mapped to `lynxfocus`): Fired on focus.
|
|
26
|
+
* - `blur` (mapped to `lynxblur`): Fired on blur.
|
|
28
27
|
* - `confirm`: Fired on confirm/enter.
|
|
29
|
-
* - `linechange`: Fired when line count changes.
|
|
30
28
|
*
|
|
31
29
|
* Methods:
|
|
32
30
|
* - `addText({ text })`: Inserts text.
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* `x-viewpager-ng` provides a page container that allows sliding between pages.
|
|
5
5
|
*
|
|
6
6
|
* Attributes:
|
|
7
|
-
* - `select-index`:
|
|
7
|
+
* - `select-index`: Page shown on connect; later changes are ignored, use `selectTab()`.
|
|
8
8
|
* - `initial-select-index`: Initial selected index.
|
|
9
9
|
* - `allow-horizontal-gesture`: 'true' | 'false'.
|
|
10
10
|
* - `enable-scroll`: 'true' | 'false'.
|
|
11
11
|
*
|
|
12
12
|
* Events:
|
|
13
13
|
* - `change`: Fired when the selected page changes. Detail: `{ index, isDragged }`.
|
|
14
|
+
* - `willchange`: Fired on touch end with the page the view will settle on. Detail: `{ index }`.
|
|
14
15
|
* - `offsetchange`: Fired when scroll offset changes. Detail: `{ offset }`.
|
|
15
16
|
*
|
|
16
17
|
* Methods:
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
* `x-viewpager-ng` provides a page container that allows sliding between pages.
|
|
8
8
|
*
|
|
9
9
|
* Attributes:
|
|
10
|
-
* - `select-index`:
|
|
10
|
+
* - `select-index`: Page shown on connect; later changes are ignored, use `selectTab()`.
|
|
11
11
|
* - `initial-select-index`: Initial selected index.
|
|
12
12
|
* - `allow-horizontal-gesture`: 'true' | 'false'.
|
|
13
13
|
* - `enable-scroll`: 'true' | 'false'.
|
|
14
14
|
*
|
|
15
15
|
* Events:
|
|
16
16
|
* - `change`: Fired when the selected page changes. Detail: `{ index, isDragged }`.
|
|
17
|
+
* - `willchange`: Fired on touch end with the page the view will settle on. Detail: `{ index }`.
|
|
17
18
|
* - `offsetchange`: Fired when scroll offset changes. Detail: `{ offset }`.
|
|
18
19
|
*
|
|
19
20
|
* Methods:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-elements",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -140,13 +140,13 @@
|
|
|
140
140
|
],
|
|
141
141
|
"dependencies": {
|
|
142
142
|
"dompurify": "^3.4.13",
|
|
143
|
-
"markdown-it": "^15.0.
|
|
143
|
+
"markdown-it": "^15.0.2"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
146
|
"@lynx-js/playwright-fixtures": "0.0.0",
|
|
147
147
|
"@playwright/test": "^1.61.1",
|
|
148
|
-
"@rsbuild/core": "2.2.
|
|
149
|
-
"@rsbuild/plugin-source-build": "1.0.
|
|
148
|
+
"@rsbuild/core": "2.2.9",
|
|
149
|
+
"@rsbuild/plugin-source-build": "1.0.7",
|
|
150
150
|
"@types/markdown-it": "^14.1.2",
|
|
151
151
|
"@types/node": "^24.13.3",
|
|
152
152
|
"nyc": "^18.0.0",
|