@lynx-js/web-elements-canary 0.10.2-canary-20260108-d4e7b0a3 → 0.11.0-canary-20260108-fc9e8632
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 +17 -1
- package/dist/compat/LinearContainer/LinearContainer.d.ts +3 -1
- package/dist/compat/LinearContainer/LinearContainer.js +4 -39
- package/dist/compat/index.d.ts +1 -0
- package/dist/compat/index.js +2 -0
- package/dist/element-reactive/component.d.ts +1 -1
- package/dist/element-reactive/component.js +37 -26
- package/dist/elements/ScrollView/ScrollView.js +2 -0
- package/dist/elements/XFoldViewNg/XFoldviewHeaderNg.js +2 -0
- package/dist/elements/XFoldViewNg/XFoldviewNg.js +2 -0
- package/dist/elements/XFoldViewNg/XFoldviewSlotDragNg.js +2 -0
- package/dist/elements/XFoldViewNg/XFoldviewSlotNg.js +2 -0
- package/dist/elements/XFoldViewNg/XFoldviewToolbarNg.js +2 -0
- package/dist/elements/XRefreshView/XRefreshFooter.js +2 -0
- package/dist/elements/XRefreshView/XRefreshHeader.js +2 -0
- package/dist/elements/XRefreshView/XRefreshView.js +2 -1
- package/dist/elements/XSwiper/SwiperItem.js +5 -1
- package/dist/elements/XView/XView.js +2 -0
- package/dist/elements/XViewpagerNg/XViewpagerItemNg.js +2 -0
- package/dist/elements/XViewpagerNg/XViewpagerNg.js +2 -1
- package/index.css +16 -1
- package/package.json +1 -12
- package/src/compat/LinearContainer/linear-compat.css +66 -66
- package/src/elements/common-css/linear.css +0 -1
- package/elements.css +0 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# @lynx-js/web-elements
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.11.0-canary-20260108130640-fc9e86323bf6d0a67a841d128152c33f6f92cb4d
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- feat: integrate the LinearContainer Compat plugin ([#2100](https://github.com/lynx-family/lynx-stack/pull/2100))
|
|
8
|
+
|
|
9
|
+
**This is a BREAKING CHANGE**
|
|
10
|
+
|
|
11
|
+
Now we integrated the `LinearCompat` into @lynx-js/web-elements. Developers can safely remove the following imports:
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import "@lynx-js/web-elements/compat/LinearContainer";
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import "@lynx-js/web-elements-compat/LinearContainer";
|
|
19
|
+
```
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
6
22
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type AttributeReactiveClass } from '../../element-reactive/index.js';
|
|
2
2
|
import '../../../src/compat/LinearContainer/linear-compat.css';
|
|
3
|
-
|
|
3
|
+
declare class LinearContainerImpl implements InstanceType<AttributeReactiveClass<typeof HTMLElement>> {
|
|
4
4
|
#private;
|
|
5
5
|
static readonly observedAttributes: never[];
|
|
6
6
|
static readonly observedCSSProperties: string[];
|
|
7
7
|
constructor(currentElement: HTMLElement);
|
|
8
8
|
}
|
|
9
|
+
export declare const LinearContainer: typeof LinearContainerImpl | undefined;
|
|
10
|
+
export {};
|
|
@@ -50,7 +50,7 @@ import '../../../src/compat/LinearContainer/linear-compat.css';
|
|
|
50
50
|
const supportContainerStyleQuery = CSS.supports('width:1rex')
|
|
51
51
|
&& CSS.supports('transition-behavior:allow-discrete')
|
|
52
52
|
&& CSS.supports('content-visibility: auto');
|
|
53
|
-
|
|
53
|
+
class LinearContainerImpl {
|
|
54
54
|
static observedAttributes = [];
|
|
55
55
|
static observedCSSProperties = [
|
|
56
56
|
'--lynx-display',
|
|
@@ -68,42 +68,7 @@ export class LinearContainer {
|
|
|
68
68
|
#setComputedDisplay = bindToAttribute(() => this.#dom, 'lynx-computed-display');
|
|
69
69
|
#setLinearOrientation = bindToAttribute(() => this.#dom, 'lynx-linear-orientation');
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
* @see https://bugzilla.mozilla.org/show_bug.cgi?id=1795622
|
|
75
|
-
*/
|
|
76
|
-
if (!supportContainerStyleQuery) {
|
|
77
|
-
const targetElements = new Set([
|
|
78
|
-
'x-view',
|
|
79
|
-
'scroll-view',
|
|
80
|
-
'x-foldview-header-ng',
|
|
81
|
-
'x-foldview-ng',
|
|
82
|
-
'x-foldview-slot-drag-ng',
|
|
83
|
-
'x-foldview-slot-ng',
|
|
84
|
-
'x-foldview-toolbar-ng',
|
|
85
|
-
'x-refresh-footer',
|
|
86
|
-
'x-refresh-header',
|
|
87
|
-
'x-refresh-view',
|
|
88
|
-
'x-swiper-item',
|
|
89
|
-
'x-viewpager-item-ng',
|
|
90
|
-
'x-viewpager-ng',
|
|
91
|
-
]);
|
|
92
|
-
const realDefine = customElements.define.bind(customElements);
|
|
93
|
-
const fakeDefine = (name, cls, options) => {
|
|
94
|
-
if (targetElements.has(name)) {
|
|
95
|
-
cls.registerPlugin?.(LinearContainer);
|
|
96
|
-
targetElements.delete(name);
|
|
97
|
-
}
|
|
98
|
-
realDefine(name, cls, options);
|
|
99
|
-
};
|
|
100
|
-
customElements.define = fakeDefine;
|
|
101
|
-
for (const tag of targetElements) {
|
|
102
|
-
(customElements.whenDefined(tag)).then((cls) => {
|
|
103
|
-
if (targetElements.has(tag)) {
|
|
104
|
-
cls.registerPlugin?.(LinearContainer);
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
71
|
+
export const LinearContainer = supportContainerStyleQuery
|
|
72
|
+
? undefined
|
|
73
|
+
: LinearContainerImpl;
|
|
109
74
|
//# sourceMappingURL=LinearContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LinearContainer } from './LinearContainer/LinearContainer.js';
|
|
@@ -40,4 +40,4 @@ export type AttributeReactiveObject = {
|
|
|
40
40
|
dispose?(): void;
|
|
41
41
|
connectedCallback?(): void;
|
|
42
42
|
};
|
|
43
|
-
export declare function Component<T extends WebComponentClass>(tag: string,
|
|
43
|
+
export declare function Component<T extends WebComponentClass>(tag: string, attributeReactiveClassesOptional: (AttributeReactiveClass<T> | undefined)[], template?: string): (target: T, context: ClassDecoratorContext<T>) => T;
|
|
@@ -7,8 +7,9 @@ function convertStyleWithPriority(value, priority) {
|
|
|
7
7
|
return value;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export function Component(tag,
|
|
10
|
+
export function Component(tag, attributeReactiveClassesOptional, template) {
|
|
11
11
|
let templateElement;
|
|
12
|
+
const attributeReactiveClasses = attributeReactiveClassesOptional.filter((e) => Boolean(e));
|
|
12
13
|
return (target, { addInitializer }) => {
|
|
13
14
|
const observedStyleProperties = new Set([
|
|
14
15
|
...attributeReactiveClasses
|
|
@@ -158,52 +159,62 @@ export function Component(tag, attributeReactiveClasses, template) {
|
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
#eventListenerMap = {};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
this.#eventListenerMap[type] ??= {
|
|
162
|
+
enableEvent(eventName) {
|
|
163
|
+
this.#eventListenerMap[eventName] ??= {
|
|
164
164
|
count: 0,
|
|
165
165
|
listenerCount: new WeakMap(),
|
|
166
166
|
captureListenerCount: new WeakMap(),
|
|
167
167
|
};
|
|
168
|
-
const targetEventInfo = this.#eventListenerMap[
|
|
169
|
-
const capture = typeof options === 'object' ? options.capture : options;
|
|
170
|
-
const targetMap = capture
|
|
171
|
-
? targetEventInfo.captureListenerCount
|
|
172
|
-
: targetEventInfo.listenerCount;
|
|
173
|
-
const currentListenerCount = targetMap.get(listener) ?? 0;
|
|
174
|
-
targetMap.set(listener, currentListenerCount + 1);
|
|
168
|
+
const targetEventInfo = this.#eventListenerMap[eventName];
|
|
175
169
|
if (targetEventInfo.count === 0) {
|
|
176
170
|
// trigger eventStatusChangeHandler
|
|
177
171
|
for (const oneReactive of this.#attributeReactives) {
|
|
178
|
-
const handler = oneReactive.eventStatusChangedHandler?.[
|
|
172
|
+
const handler = oneReactive.eventStatusChangedHandler?.[eventName];
|
|
179
173
|
if (handler) {
|
|
180
|
-
handler.call(oneReactive, true,
|
|
174
|
+
handler.call(oneReactive, true, eventName);
|
|
181
175
|
}
|
|
182
176
|
}
|
|
183
177
|
}
|
|
184
178
|
targetEventInfo.count++;
|
|
185
179
|
}
|
|
180
|
+
disableEvent(eventName) {
|
|
181
|
+
const targetEventInfo = this.#eventListenerMap[eventName];
|
|
182
|
+
if (targetEventInfo && targetEventInfo.count > 0) {
|
|
183
|
+
targetEventInfo.count--;
|
|
184
|
+
if (targetEventInfo.count === 0) {
|
|
185
|
+
// trigger eventStatusChangeHandler
|
|
186
|
+
for (const oneReactive of this.#attributeReactives) {
|
|
187
|
+
const handler = oneReactive.eventStatusChangedHandler?.[eventName];
|
|
188
|
+
if (handler) {
|
|
189
|
+
handler.call(oneReactive, false, eventName);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
addEventListener(type, listener, options) {
|
|
196
|
+
super.addEventListener(type, listener, options);
|
|
197
|
+
this.enableEvent(type);
|
|
198
|
+
const targetEventInfo = this.#eventListenerMap[type];
|
|
199
|
+
const capture = typeof options === 'object' ? options.capture : options;
|
|
200
|
+
const targetMap = capture
|
|
201
|
+
? targetEventInfo.captureListenerCount
|
|
202
|
+
: targetEventInfo.listenerCount;
|
|
203
|
+
const currentListenerCount = targetMap.get(listener) ?? 0;
|
|
204
|
+
targetMap.set(listener, currentListenerCount + 1);
|
|
205
|
+
}
|
|
186
206
|
removeEventListener(type, listener, options) {
|
|
187
207
|
super.removeEventListener(type, listener, options);
|
|
188
208
|
const capture = typeof options === 'object' ? options.capture : options;
|
|
189
209
|
const targetEventInfo = this.#eventListenerMap[type];
|
|
190
210
|
if (targetEventInfo && targetEventInfo.count > 0) {
|
|
191
211
|
const targetMap = capture
|
|
192
|
-
? targetEventInfo
|
|
193
|
-
: targetEventInfo
|
|
212
|
+
? targetEventInfo.captureListenerCount
|
|
213
|
+
: targetEventInfo.listenerCount;
|
|
194
214
|
const currentListenerCount = targetMap.get(listener);
|
|
195
215
|
if (currentListenerCount === 1) {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if (targetEventInfo.count === 0) {
|
|
199
|
-
// trigger eventStatusChangeHandler
|
|
200
|
-
for (const oneReactive of this.#attributeReactives) {
|
|
201
|
-
const handler = oneReactive.eventStatusChangedHandler?.[type];
|
|
202
|
-
if (handler) {
|
|
203
|
-
handler.call(oneReactive, false, type);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
216
|
+
targetMap.delete(listener);
|
|
217
|
+
this.disableEvent(type);
|
|
207
218
|
}
|
|
208
219
|
}
|
|
209
220
|
}
|
|
@@ -12,8 +12,10 @@ import { ScrollIntoView } from './ScrollIntoView.js';
|
|
|
12
12
|
import { Component } from '../../element-reactive/index.js';
|
|
13
13
|
import { scrollContainerDom } from '../common/constants.js';
|
|
14
14
|
import { templateScrollView } from '../htmlTemplates.js';
|
|
15
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
15
16
|
let ScrollView = (() => {
|
|
16
17
|
let _classDecorators = [Component('scroll-view', [
|
|
18
|
+
LinearContainer,
|
|
17
19
|
CommonEventsAndMethods,
|
|
18
20
|
ScrollAttributes,
|
|
19
21
|
FadeEdgeLengthAttribute,
|
|
@@ -8,8 +8,10 @@ import { Component } from '../../element-reactive/index.js';
|
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
9
|
import { resizeObserver } from './XFoldviewNg.js';
|
|
10
10
|
import { getCombinedDirectParentElement } from '../common/getCombinedParentElement.js';
|
|
11
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
11
12
|
let XFoldviewHeaderNg = (() => {
|
|
12
13
|
let _classDecorators = [Component('x-foldview-header-ng', [
|
|
14
|
+
LinearContainer,
|
|
13
15
|
CommonEventsAndMethods,
|
|
14
16
|
])];
|
|
15
17
|
let _classDescriptor;
|
|
@@ -8,12 +8,14 @@ import { Component } from '../../element-reactive/index.js';
|
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
9
|
import { XFoldviewNgEvents } from './XFoldviewNgEvents.js';
|
|
10
10
|
import { scrollContainerDom } from '../common/constants.js';
|
|
11
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
11
12
|
export const scrollableLength = Symbol('scrollableLength');
|
|
12
13
|
export const isHeaderShowing = Symbol('isHeaderShowing');
|
|
13
14
|
export const resizeObserver = Symbol('resizeObserver');
|
|
14
15
|
export const slotKid = Symbol('slotKid');
|
|
15
16
|
let XFoldviewNg = (() => {
|
|
16
17
|
let _classDecorators = [Component('x-foldview-ng', [
|
|
18
|
+
LinearContainer,
|
|
17
19
|
CommonEventsAndMethods,
|
|
18
20
|
XFoldviewNgEvents,
|
|
19
21
|
])];
|
|
@@ -6,8 +6,10 @@ import { __esDecorate, __runInitializers } from "tslib";
|
|
|
6
6
|
*/
|
|
7
7
|
import { Component } from '../../element-reactive/index.js';
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
9
10
|
let XFoldviewSlotDragNg = (() => {
|
|
10
11
|
let _classDecorators = [Component('x-foldview-slot-drag-ng', [
|
|
12
|
+
LinearContainer,
|
|
11
13
|
CommonEventsAndMethods,
|
|
12
14
|
])];
|
|
13
15
|
let _classDescriptor;
|
|
@@ -8,8 +8,10 @@ import { Component } from '../../element-reactive/index.js';
|
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
9
|
import { XFoldviewSlotNgTouchEventsHandler } from './XFoldviewSlotNgTouchEventsHandler.js';
|
|
10
10
|
import { slotKid } from './XFoldviewNg.js';
|
|
11
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
11
12
|
let XFoldviewSlotNg = (() => {
|
|
12
13
|
let _classDecorators = [Component('x-foldview-slot-ng', [
|
|
14
|
+
LinearContainer,
|
|
13
15
|
CommonEventsAndMethods,
|
|
14
16
|
XFoldviewSlotNgTouchEventsHandler,
|
|
15
17
|
])];
|
|
@@ -8,8 +8,10 @@ import { Component } from '../../element-reactive/index.js';
|
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
9
|
import { resizeObserver } from './XFoldviewNg.js';
|
|
10
10
|
import { getCombinedDirectParentElement } from '../common/getCombinedParentElement.js';
|
|
11
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
11
12
|
let XFoldviewToolbarNg = (() => {
|
|
12
13
|
let _classDecorators = [Component('x-foldview-toolbar-ng', [
|
|
14
|
+
LinearContainer,
|
|
13
15
|
CommonEventsAndMethods,
|
|
14
16
|
])];
|
|
15
17
|
let _classDescriptor;
|
|
@@ -7,8 +7,10 @@ import { __esDecorate, __runInitializers } from "tslib";
|
|
|
7
7
|
import { Component } from '../../element-reactive/index.js';
|
|
8
8
|
import { XRefreshSubElementIntersectionObserver } from './XRefreshSubElementIntersectionObserver.js';
|
|
9
9
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
10
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
10
11
|
let XRefreshFooter = (() => {
|
|
11
12
|
let _classDecorators = [Component('x-refresh-footer', [
|
|
13
|
+
LinearContainer,
|
|
12
14
|
CommonEventsAndMethods,
|
|
13
15
|
XRefreshSubElementIntersectionObserver,
|
|
14
16
|
])];
|
|
@@ -7,8 +7,10 @@ import { __esDecorate, __runInitializers } from "tslib";
|
|
|
7
7
|
import { Component } from '../../element-reactive/index.js';
|
|
8
8
|
import { XRefreshSubElementIntersectionObserver } from './XRefreshSubElementIntersectionObserver.js';
|
|
9
9
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
10
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
10
11
|
let XRefreshHeader = (() => {
|
|
11
12
|
let _classDecorators = [Component('x-refresh-header', [
|
|
13
|
+
LinearContainer,
|
|
12
14
|
CommonEventsAndMethods,
|
|
13
15
|
XRefreshSubElementIntersectionObserver,
|
|
14
16
|
])];
|
|
@@ -9,8 +9,9 @@ import { XRefreshViewEventsEmitter } from './XRefreshViewEventsEmitter.js';
|
|
|
9
9
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
10
10
|
import { scrollContainerDom } from '../common/constants.js';
|
|
11
11
|
import { templateXRefreshView } from '../htmlTemplates.js';
|
|
12
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
12
13
|
let XRefreshView = (() => {
|
|
13
|
-
let _classDecorators = [Component('x-refresh-view', [CommonEventsAndMethods, XRefreshViewEventsEmitter], templateXRefreshView)];
|
|
14
|
+
let _classDecorators = [Component('x-refresh-view', [LinearContainer, CommonEventsAndMethods, XRefreshViewEventsEmitter], templateXRefreshView)];
|
|
14
15
|
let _classDescriptor;
|
|
15
16
|
let _classExtraInitializers = [];
|
|
16
17
|
let _classThis;
|
|
@@ -6,8 +6,12 @@ import { __esDecorate, __runInitializers } from "tslib";
|
|
|
6
6
|
*/
|
|
7
7
|
import { Component } from '../../element-reactive/index.js';
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
9
10
|
let SwiperItem = (() => {
|
|
10
|
-
let _classDecorators = [Component('x-swiper-item', [
|
|
11
|
+
let _classDecorators = [Component('x-swiper-item', [
|
|
12
|
+
LinearContainer,
|
|
13
|
+
CommonEventsAndMethods,
|
|
14
|
+
])];
|
|
11
15
|
let _classDescriptor;
|
|
12
16
|
let _classExtraInitializers = [];
|
|
13
17
|
let _classThis;
|
|
@@ -7,8 +7,10 @@ import { __esDecorate, __runInitializers } from "tslib";
|
|
|
7
7
|
import { Component } from '../../element-reactive/index.js';
|
|
8
8
|
import { ScrollIntoView } from '../ScrollView/ScrollIntoView.js';
|
|
9
9
|
import { CommonEventsAndMethods, layoutChangeTarget, } from '../common/CommonEventsAndMethods.js';
|
|
10
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
10
11
|
let XView = (() => {
|
|
11
12
|
let _classDecorators = [Component('x-view', [
|
|
13
|
+
LinearContainer,
|
|
12
14
|
CommonEventsAndMethods,
|
|
13
15
|
])];
|
|
14
16
|
let _classDescriptor;
|
|
@@ -6,8 +6,10 @@ import { __esDecorate, __runInitializers } from "tslib";
|
|
|
6
6
|
*/
|
|
7
7
|
import { Component } from '../../element-reactive/index.js';
|
|
8
8
|
import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
9
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
9
10
|
let XViewpagerItemNg = (() => {
|
|
10
11
|
let _classDecorators = [Component('x-viewpager-item-ng', [
|
|
12
|
+
LinearContainer,
|
|
11
13
|
CommonEventsAndMethods,
|
|
12
14
|
])];
|
|
13
15
|
let _classDescriptor;
|
|
@@ -9,8 +9,9 @@ import { CommonEventsAndMethods } from '../common/CommonEventsAndMethods.js';
|
|
|
9
9
|
import { XViewpagerNgEvents } from './XViewpagerNgEvents.js';
|
|
10
10
|
import { scrollContainerDom } from '../common/constants.js';
|
|
11
11
|
import { templateXViewpageNg } from '../htmlTemplates.js';
|
|
12
|
+
import { LinearContainer } from '../../compat/index.js';
|
|
12
13
|
let XViewpagerNg = (() => {
|
|
13
|
-
let _classDecorators = [Component('x-viewpager-ng', [CommonEventsAndMethods, XViewpagerNgEvents], templateXViewpageNg)];
|
|
14
|
+
let _classDecorators = [Component('x-viewpager-ng', [LinearContainer, CommonEventsAndMethods, XViewpagerNgEvents], templateXViewpageNg)];
|
|
14
15
|
let _classDescriptor;
|
|
15
16
|
let _classExtraInitializers = [];
|
|
16
17
|
let _classThis;
|
package/index.css
CHANGED
|
@@ -2,5 +2,20 @@
|
|
|
2
2
|
Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
LICENSE file in the root directory of this source tree.
|
|
4
4
|
*/
|
|
5
|
+
@import url("./src/compat/LinearContainer/linear-compat.css");
|
|
5
6
|
@import url("./src/elements/common-css/linear.css");
|
|
6
|
-
@import url("./elements.css");
|
|
7
|
+
@import url("./src/elements/LynxWrapper/lynx-wrapper.css");
|
|
8
|
+
@import url("./src/elements/XText/x-text.css");
|
|
9
|
+
@import url("./src/elements/ScrollView/scroll-view.css");
|
|
10
|
+
@import url("./src/elements/XFoldViewNg/x-foldview-ng.css");
|
|
11
|
+
@import url("./src/elements/XViewpagerNg/x-viewpager-ng.css");
|
|
12
|
+
@import url("./src/elements/XCanvas/x-canvas.css");
|
|
13
|
+
@import url("./src/elements/XSvg/x-svg.css");
|
|
14
|
+
@import url("./src/elements/XImage/x-image.css");
|
|
15
|
+
@import url("./src/elements/XInput/x-input.css");
|
|
16
|
+
@import url("./src/elements/XOverlayNg/x-overlay-ng.css");
|
|
17
|
+
@import url("./src/elements/XRefreshView/x-refresh-view.css");
|
|
18
|
+
@import url("./src/elements/XSwiper/x-swiper.css");
|
|
19
|
+
@import url("./src/elements/XTextarea/x-textarea.css");
|
|
20
|
+
@import url("./src/elements/XList/x-list.css");
|
|
21
|
+
@import url("./src/elements/XWebView/x-webview.css");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/web-elements-canary",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-canary-20260108-fc9e8632",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"./index.css": {
|
|
19
19
|
"default": "./index.css"
|
|
20
20
|
},
|
|
21
|
-
"./elements.css": {
|
|
22
|
-
"default": "./elements.css"
|
|
23
|
-
},
|
|
24
21
|
"./all": {
|
|
25
22
|
"@lynx-js/source-field": "./src/elements/all.ts",
|
|
26
23
|
"types": "./dist/elements/all.d.ts",
|
|
@@ -115,14 +112,6 @@
|
|
|
115
112
|
"@lynx-js/source-field": "./src/elements/htmlTemplates.ts",
|
|
116
113
|
"types": "./dist/elements/htmlTemplates.d.ts",
|
|
117
114
|
"default": "./dist/elements/htmlTemplates.js"
|
|
118
|
-
},
|
|
119
|
-
"./compat/LinearContainer": {
|
|
120
|
-
"@lynx-js/source-field": "./src/compat/LinearContainer/LinearContainer.ts",
|
|
121
|
-
"types": "./dist/compat/LinearContainer/LinearContainer.d.ts",
|
|
122
|
-
"default": "./dist/compat/LinearContainer/LinearContainer.js"
|
|
123
|
-
},
|
|
124
|
-
"./compat/LinearContainer/linear-compat.css": {
|
|
125
|
-
"default": "./src/compat/LinearContainer/linear-compat.css"
|
|
126
115
|
}
|
|
127
116
|
},
|
|
128
117
|
"main": "dist/index.js",
|
|
@@ -47,78 +47,78 @@
|
|
|
47
47
|
--flex-wrap: nowrap;
|
|
48
48
|
--align-self: auto;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
50
|
+
[lynx-computed-display="linear"] {
|
|
51
|
+
flex-wrap: nowrap !important;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
justify-content: flex-start;
|
|
54
|
+
}
|
|
56
55
|
|
|
57
|
-
[lynx-computed-display="flex"] {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
56
|
+
[lynx-computed-display="flex"] {
|
|
57
|
+
flex-direction: var(--flex-direction);
|
|
58
|
+
justify-content: var(--justify-content);
|
|
59
|
+
flex-wrap: var(--flex-wrap);
|
|
60
|
+
}
|
|
62
61
|
|
|
63
|
-
[lynx-computed-display="flex"] > *,
|
|
64
|
-
[lynx-computed-display="flex"] > lynx-wrapper > * {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
[lynx-computed-display="linear"] > *,
|
|
71
|
-
[lynx-computed-display="linear"] > lynx-wrapper > * {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
[lynx-computed-display="flex"] > *,
|
|
63
|
+
[lynx-computed-display="flex"] > lynx-wrapper > * {
|
|
64
|
+
flex: var(
|
|
65
|
+
--flex,
|
|
66
|
+
var(--flex-grow) var(--flex-shrink) var(--flex-basis)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
[lynx-computed-display="linear"] > *,
|
|
70
|
+
[lynx-computed-display="linear"] > lynx-wrapper > * {
|
|
71
|
+
flex-shrink: 0 !important;
|
|
72
|
+
flex-grow: calc(
|
|
73
|
+
var(--lynx-linear-weight) /
|
|
74
|
+
calc(
|
|
75
|
+
var(--lynx-linear-weight-sum) +
|
|
76
|
+
(
|
|
77
|
+
1 - clamp(0, var(--lynx-linear-weight-sum) * 999999, 1)
|
|
78
|
+
)
|
|
79
79
|
)
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
80
|
+
) !important;
|
|
81
|
+
flex-basis: var(--lynx-linear-weight-basis) !important;
|
|
82
|
+
}
|
|
84
83
|
|
|
85
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="vertical"] {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
84
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="vertical"] {
|
|
85
|
+
flex-direction: column !important;
|
|
86
|
+
justify-content: var(--justify-content-column);
|
|
87
|
+
}
|
|
89
88
|
|
|
90
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"] {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
89
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"] {
|
|
90
|
+
flex-direction: row !important;
|
|
91
|
+
justify-content: var(--justify-content-row);
|
|
92
|
+
}
|
|
94
93
|
|
|
95
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="vertical-reverse"] {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
94
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="vertical-reverse"] {
|
|
95
|
+
flex-direction: column-reverse !important;
|
|
96
|
+
justify-content: var(--justify-content-column-reverse);
|
|
97
|
+
}
|
|
99
98
|
|
|
100
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"] {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
99
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"] {
|
|
100
|
+
flex-direction: row-reverse !important;
|
|
101
|
+
justify-content: var(--justify-content-row-reverse);
|
|
102
|
+
}
|
|
104
103
|
|
|
105
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="vertical"] > *,
|
|
106
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="vertical-reverse"],
|
|
107
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="vertical"]
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="vertical-reverse"]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"] > *,
|
|
116
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"],
|
|
117
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"]
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"]
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
104
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="vertical"] > *,
|
|
105
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="vertical-reverse"],
|
|
106
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="vertical"]
|
|
107
|
+
> lynx-wrapper
|
|
108
|
+
> *,
|
|
109
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="vertical-reverse"]
|
|
110
|
+
> lynx-wrapper
|
|
111
|
+
> * {
|
|
112
|
+
align-self: var(--align-self-column);
|
|
113
|
+
}
|
|
114
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"] > *,
|
|
115
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"],
|
|
116
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal"]
|
|
117
|
+
> lynx-wrapper
|
|
118
|
+
> *,
|
|
119
|
+
[lynx-computed-display="linear"][lynx-linear-orientation="horizontal-reverse"]
|
|
120
|
+
> lynx-wrapper
|
|
121
|
+
> * {
|
|
122
|
+
align-self: var(--align-self-row);
|
|
123
|
+
}
|
|
124
124
|
}
|
|
@@ -258,7 +258,6 @@ list-item {
|
|
|
258
258
|
*
|
|
259
259
|
* update this once firefox supports this.
|
|
260
260
|
*
|
|
261
|
-
* If you want to be fully compatible with chrome below 117, you need to use @lynx-js/web-elements/compat/LinearContainer.
|
|
262
261
|
*/
|
|
263
262
|
@supports (content-visibility: auto) and
|
|
264
263
|
(transition-behavior: allow-discrete) and (width: 1rex) {
|
package/elements.css
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/* Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
-
Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
-
LICENSE file in the root directory of this source tree.
|
|
4
|
-
*/
|
|
5
|
-
@import url("./src/elements/LynxWrapper/lynx-wrapper.css");
|
|
6
|
-
@import url("./src/elements/XText/x-text.css");
|
|
7
|
-
@import url("./src/elements/ScrollView/scroll-view.css");
|
|
8
|
-
@import url("./src/elements/XFoldViewNg/x-foldview-ng.css");
|
|
9
|
-
@import url("./src/elements/XViewpagerNg/x-viewpager-ng.css");
|
|
10
|
-
@import url("./src/elements/XCanvas/x-canvas.css");
|
|
11
|
-
@import url("./src/elements/XSvg/x-svg.css");
|
|
12
|
-
@import url("./src/elements/XImage/x-image.css");
|
|
13
|
-
@import url("./src/elements/XInput/x-input.css");
|
|
14
|
-
@import url("./src/elements/XOverlayNg/x-overlay-ng.css");
|
|
15
|
-
@import url("./src/elements/XRefreshView/x-refresh-view.css");
|
|
16
|
-
@import url("./src/elements/XSwiper/x-swiper.css");
|
|
17
|
-
@import url("./src/elements/XTextarea/x-textarea.css");
|
|
18
|
-
@import url("./src/elements/XList/x-list.css");
|
|
19
|
-
@import url("./src/elements/XWebView/x-webview.css");
|