ripple 0.3.19 → 0.3.21
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 +14 -0
- package/package.json +2 -5
- package/tests/client/basic/basic.attributes.test.tsrx +4 -10
- package/tests/client/composite/composite.render.test.tsrx +4 -6
- package/tests/client/css/global-additional-cases.test.tsrx +27 -27
- package/tests/client/css/global-advanced-selectors.test.tsrx +2 -2
- package/tests/client/css/global-at-rules.test.tsrx +5 -5
- package/tests/client/css/global-basic.test.tsrx +8 -8
- package/tests/client/css/global-classes-ids.test.tsrx +13 -13
- package/tests/client/css/global-combinators.test.tsrx +8 -8
- package/tests/client/css/global-complex-nesting.test.tsrx +19 -19
- package/tests/client/css/global-edge-cases.test.tsrx +12 -12
- package/tests/client/css/global-keyframes.test.tsrx +7 -7
- package/tests/client/css/global-nested.test.tsrx +10 -10
- package/tests/client/css/global-pseudo.test.tsrx +7 -7
- package/tests/client/css/global-scoping.test.tsrx +20 -20
- package/tests/client/css/style-identifier.test.tsrx +7 -7
- package/tests/client/dynamic-elements.test.tsrx +14 -14
- package/tests/server/basic.attributes.test.tsrx +4 -10
- package/tests/server/dynamic-elements.test.tsrx +11 -11
- package/tests/server/style-identifier.test.tsrx +12 -14
- package/src/compiler/types/rpc.d.ts +0 -5
|
@@ -25,7 +25,7 @@ describe('#style identifier (server)', () => {
|
|
|
25
25
|
expect(div).toBeTruthy();
|
|
26
26
|
expect(div.textContent).toBe('styled child');
|
|
27
27
|
const classes = Array.from(div.classList);
|
|
28
|
-
expect(classes.some((cls: string) => cls.startsWith('
|
|
28
|
+
expect(classes.some((cls: string) => cls.startsWith('tsrx-'))).toBe(true);
|
|
29
29
|
expect(classes.some((cls: string) => cls === 'highlight')).toBe(true);
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -58,11 +58,11 @@ describe('#style identifier (server)', () => {
|
|
|
58
58
|
expect(span).toBeTruthy();
|
|
59
59
|
|
|
60
60
|
const divClasses = Array.from(div.classList);
|
|
61
|
-
expect(divClasses.some((cls: string) => cls.startsWith('
|
|
61
|
+
expect(divClasses.some((cls: string) => cls.startsWith('tsrx-'))).toBe(true);
|
|
62
62
|
expect(divClasses.some((cls: string) => cls === 'primary')).toBe(true);
|
|
63
63
|
|
|
64
64
|
const spanClasses = Array.from(span.classList);
|
|
65
|
-
expect(spanClasses.some((cls: string) => cls.startsWith('
|
|
65
|
+
expect(spanClasses.some((cls: string) => cls.startsWith('tsrx-'))).toBe(true);
|
|
66
66
|
expect(spanClasses.some((cls: string) => cls === 'secondary')).toBe(true);
|
|
67
67
|
});
|
|
68
68
|
});
|
|
@@ -89,7 +89,7 @@ describe('#style identifier (server)', () => {
|
|
|
89
89
|
const button = document.querySelector('button');
|
|
90
90
|
expect(button).toBeTruthy();
|
|
91
91
|
const classes = Array.from(button.classList);
|
|
92
|
-
expect(classes.some((cls: string) => cls.startsWith('
|
|
92
|
+
expect(classes.some((cls: string) => cls.startsWith('tsrx-'))).toBe(true);
|
|
93
93
|
expect(classes.some((cls: string) => cls === 'fancy')).toBe(true);
|
|
94
94
|
});
|
|
95
95
|
|
|
@@ -152,7 +152,7 @@ describe('#style identifier (server)', () => {
|
|
|
152
152
|
const span = document.querySelector('span');
|
|
153
153
|
expect(span).toBeTruthy();
|
|
154
154
|
const classes = Array.from(span.classList);
|
|
155
|
-
expect(classes.some((cls: string) => cls.startsWith('
|
|
155
|
+
expect(classes.some((cls: string) => cls.startsWith('tsrx-'))).toBe(true);
|
|
156
156
|
expect(classes.some((cls: string) => cls === 'dual')).toBe(true);
|
|
157
157
|
},
|
|
158
158
|
);
|
|
@@ -182,7 +182,7 @@ describe('#style identifier (server)', () => {
|
|
|
182
182
|
const span = document.querySelector('span');
|
|
183
183
|
expect(span).toBeTruthy();
|
|
184
184
|
const classes = Array.from(span.classList);
|
|
185
|
-
expect(classes.some((cls: string) => cls.startsWith('
|
|
185
|
+
expect(classes.some((cls: string) => cls.startsWith('tsrx-'))).toBe(true);
|
|
186
186
|
expect(classes.some((cls: string) => cls === 'text')).toBe(true);
|
|
187
187
|
});
|
|
188
188
|
|
|
@@ -220,10 +220,8 @@ describe('#style identifier (server)', () => {
|
|
|
220
220
|
const { document } = parseHtml(body);
|
|
221
221
|
const wrapper = document.querySelector('.green');
|
|
222
222
|
const child = document.querySelector('.red');
|
|
223
|
-
const wrapper_scopes = Array.from(wrapper.classList).filter(
|
|
224
|
-
|
|
225
|
-
);
|
|
226
|
-
const child_scopes = Array.from(child.classList).filter((name) => name.startsWith('ripple-'));
|
|
223
|
+
const wrapper_scopes = Array.from(wrapper.classList).filter((name) => name.startsWith('tsrx-'));
|
|
224
|
+
const child_scopes = Array.from(child.classList).filter((name) => name.startsWith('tsrx-'));
|
|
227
225
|
|
|
228
226
|
expect(wrapper_scopes).toHaveLength(1);
|
|
229
227
|
expect(child_scopes).toHaveLength(1);
|
|
@@ -256,7 +254,7 @@ describe('#style identifier (server)', () => {
|
|
|
256
254
|
const { document } = parseHtml(body);
|
|
257
255
|
const slotted_child = document.querySelector('section > div.green');
|
|
258
256
|
const slotted_scopes = Array.from(slotted_child.classList).filter(
|
|
259
|
-
(name) => name.startsWith('
|
|
257
|
+
(name) => name.startsWith('tsrx-'),
|
|
260
258
|
);
|
|
261
259
|
|
|
262
260
|
expect(slotted_scopes).toHaveLength(1);
|
|
@@ -280,7 +278,7 @@ export component App() {
|
|
|
280
278
|
const { js } = compile(source, 'test.tsrx', { mode: 'server' });
|
|
281
279
|
|
|
282
280
|
expect(js.code).toContain('highlight');
|
|
283
|
-
expect(js.code).toMatch(/
|
|
281
|
+
expect(js.code).toMatch(/tsrx-[a-z0-9]+/);
|
|
284
282
|
expect(js.code).toContain('register_css');
|
|
285
283
|
});
|
|
286
284
|
|
|
@@ -303,9 +301,9 @@ export component App() {
|
|
|
303
301
|
|
|
304
302
|
expect(css.size).toBeGreaterThan(0);
|
|
305
303
|
const hashes = Array.from(css);
|
|
306
|
-
expect(hashes.some((h: string) => h.startsWith('
|
|
304
|
+
expect(hashes.some((h: string) => h.startsWith('tsrx-'))).toBe(true);
|
|
307
305
|
|
|
308
|
-
expect(body).toMatch(/
|
|
306
|
+
expect(body).toMatch(/tsrx-[a-z0-9]+/);
|
|
309
307
|
expect(body).toContain('styled');
|
|
310
308
|
});
|
|
311
309
|
});
|