ripple 0.3.20 → 0.3.22

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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # ripple
2
2
 
3
+ ## 0.3.22
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bc8a6ed`](https://github.com/Ripple-TS/ripple/commit/bc8a6ed53d451da90cb6eb6ff9ec564f6f0cabe8)
8
+ Thanks [@trueadm](https://github.com/trueadm)! - Restore the `ripple/compiler`
9
+ subpath export. The compiler was moved into `@tsrx/ripple` during the
10
+ Ripple/TSRX split, which accidentally dropped `ripple/compiler` from the
11
+ published `exports` map — breaking downstream tooling that imports the compiler
12
+ by the public path, including `livecodes` and any playground served through
13
+ `esm.sh`. The path now re-exports the `@tsrx/ripple` API (`compile`, `parse`,
14
+ `compile_to_volar_mappings`, and the shared types), and `@tsrx/ripple` is
15
+ promoted to a runtime dependency so the re-export resolves for installed
16
+ consumers.
17
+ - Updated dependencies
18
+ [[`bc8a6ed`](https://github.com/Ripple-TS/ripple/commit/bc8a6ed53d451da90cb6eb6ff9ec564f6f0cabe8)]:
19
+ - ripple@0.3.22
20
+
21
+ ## 0.3.21
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - ripple@0.3.21
27
+
3
28
  ## 0.3.20
4
29
 
5
30
  ### Patch Changes
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Ripple is an elegant TypeScript UI framework",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.3.20",
6
+ "version": "0.3.22",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index-client.js",
9
9
  "main": "src/runtime/index-client.js",
@@ -33,6 +33,10 @@
33
33
  "types": "./types/server.d.ts",
34
34
  "default": "./src/server/index.js"
35
35
  },
36
+ "./compiler": {
37
+ "types": "./types/compiler.d.ts",
38
+ "default": "./src/compiler/index.js"
39
+ },
36
40
  "./compiler/internal/import": {
37
41
  "types": "./src/compiler/types/import.d.ts"
38
42
  },
@@ -71,7 +75,8 @@
71
75
  "devalue": "^5.6.3",
72
76
  "esm-env": "^1.2.2",
73
77
  "@types/estree": "^1.0.8",
74
- "@types/estree-jsx": "^1.0.5"
78
+ "@types/estree-jsx": "^1.0.5",
79
+ "@tsrx/ripple": "0.0.5"
75
80
  },
76
81
  "devDependencies": {
77
82
  "@types/node": "^24.3.0",
@@ -79,10 +84,9 @@
79
84
  "typescript": "^5.9.3",
80
85
  "@volar/language-core": "~2.4.28",
81
86
  "vscode-languageserver-types": "^3.17.5",
82
- "@tsrx/core": "0.0.4",
83
- "@tsrx/ripple": "0.0.5"
87
+ "@tsrx/core": "0.0.4"
84
88
  },
85
89
  "peerDependencies": {
86
- "ripple": "0.3.20"
90
+ "ripple": "0.3.22"
87
91
  }
88
92
  }
@@ -0,0 +1,5 @@
1
+ // Public re-export of the Ripple compiler. The compiler itself lives in
2
+ // `@tsrx/ripple` since the Ripple/TSRX split; this module exists so
3
+ // downstream consumers (playgrounds, esm.sh users, older tooling) can keep
4
+ // importing `ripple/compiler` without knowing about the internal package.
5
+ export * from '@tsrx/ripple';
@@ -37,9 +37,7 @@ describe('basic client > attribute rendering', () => {
37
37
  const button = container.querySelector('button');
38
38
  const div = container.querySelector('div');
39
39
 
40
- expect(Array.from(div.classList).some((className) => className.startsWith('ripple-'))).toBe(
41
- true,
42
- );
40
+ expect(Array.from(div.classList).some((className) => className.startsWith('tsrx-'))).toBe(true);
43
41
  expect(div.classList.contains('inactive')).toBe(true);
44
42
 
45
43
  button.click();
@@ -82,9 +80,7 @@ describe('basic client > attribute rendering', () => {
82
80
 
83
81
  const div = container.querySelector('div');
84
82
 
85
- expect(Array.from(div.classList).some((className) => className.startsWith('ripple-'))).toBe(
86
- true,
87
- );
83
+ expect(Array.from(div.classList).some((className) => className.startsWith('tsrx-'))).toBe(true);
88
84
  expect(div.classList.contains('foo')).toBe(true);
89
85
  expect(div.classList.contains('bar')).toBe(true);
90
86
  expect(div.classList.contains('baz')).toBe(true);
@@ -121,9 +117,7 @@ describe('basic client > attribute rendering', () => {
121
117
  const button = container.querySelector('button');
122
118
  const div = container.querySelector('div');
123
119
 
124
- expect(Array.from(div.classList).some((className) => className.startsWith('ripple-'))).toBe(
125
- true,
126
- );
120
+ expect(Array.from(div.classList).some((className) => className.startsWith('tsrx-'))).toBe(true);
127
121
  expect(div.classList.contains('inactive')).toBe(true);
128
122
  expect(div.classList.contains('active')).toBe(false);
129
123
 
@@ -162,7 +156,7 @@ describe('basic client > attribute rendering', () => {
162
156
  const divs = container.querySelectorAll('div');
163
157
 
164
158
  divs.forEach((div) => {
165
- expect(Array.from(div.classList).some((className) => className.startsWith('ripple-'))).toBe(
159
+ expect(Array.from(div.classList).some((className) => className.startsWith('tsrx-'))).toBe(
166
160
  true,
167
161
  );
168
162
  });
@@ -137,10 +137,8 @@ describe('composite > render', () => {
137
137
 
138
138
  const wrapper = container.querySelector('.green');
139
139
  const child = container.querySelector('.red');
140
- const wrapper_scopes = Array.from(wrapper.classList).filter(
141
- (name) => name.startsWith('ripple-'),
142
- );
143
- const child_scopes = Array.from(child.classList).filter((name) => name.startsWith('ripple-'));
140
+ const wrapper_scopes = Array.from(wrapper.classList).filter((name) => name.startsWith('tsrx-'));
141
+ const child_scopes = Array.from(child.classList).filter((name) => name.startsWith('tsrx-'));
144
142
 
145
143
  expect(wrapper_scopes).toHaveLength(1);
146
144
  expect(child_scopes).toHaveLength(1);
@@ -230,8 +228,8 @@ describe('scoped styles with children', () => {
230
228
  const wrapper = container.querySelector('.green');
231
229
  const child = container.querySelector('.red');
232
230
 
233
- const wrapper_classes = Array.from(wrapper.classList).filter((c) => c.startsWith('ripple-'));
234
- const child_classes = Array.from(child.classList).filter((c) => c.startsWith('ripple-'));
231
+ const wrapper_classes = Array.from(wrapper.classList).filter((c) => c.startsWith('tsrx-'));
232
+ const child_classes = Array.from(child.classList).filter((c) => c.startsWith('tsrx-'));
235
233
 
236
234
  expect(wrapper_classes).toHaveLength(1);
237
235
  expect(child_classes).toHaveLength(1);
@@ -15,7 +15,7 @@ export component Test() {
15
15
  }`;
16
16
  const { css } = compile(source, 'test.tsrx');
17
17
 
18
- expect(css).toMatch(/div\.ripple-[a-z0-9]+\.x {/);
18
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+\.x {/);
19
19
  });
20
20
 
21
21
  it('handles :global modifier in nested syntax', () => {
@@ -67,7 +67,7 @@ export component Test() {
67
67
  }`;
68
68
  const { css } = compile(source, 'test.tsrx');
69
69
 
70
- expect(css).toMatch(/div\.ripple-[a-z0-9]+:is\(html\.dark-mode \*\) {/);
70
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+:is\(html\.dark-mode \*\) {/);
71
71
  });
72
72
 
73
73
  it('handles :global with & inside :global block', () => {
@@ -85,7 +85,7 @@ export component Test() {
85
85
  }`;
86
86
  const { css } = compile(source, 'test.tsrx');
87
87
 
88
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ {/);
88
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ {/);
89
89
  expect(css).toContain('&.class {');
90
90
  });
91
91
 
@@ -105,7 +105,7 @@ export component Test() {
105
105
  const { css } = compile(source, 'test.tsrx');
106
106
 
107
107
  expect(css).toContain('* {');
108
- expect(css).toMatch(/&:hover \.class\.ripple-[a-z0-9]+ {/);
108
+ expect(css).toMatch(/&:hover \.class\.tsrx-[a-z0-9]+ {/);
109
109
  });
110
110
 
111
111
  it('handles multiple :global selectors in list', () => {
@@ -142,7 +142,7 @@ export component Test() {
142
142
  }`;
143
143
  const { css } = compile(source, 'test.tsrx');
144
144
 
145
- expect(css).toMatch(/div\.ripple-[a-z0-9]+/);
145
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+/);
146
146
  expect(css).toContain('z {');
147
147
  });
148
148
 
@@ -180,8 +180,8 @@ export component Test() {
180
180
  expect(css).toContain('@keyframes test-in {');
181
181
  expect(css).toContain('.x {');
182
182
  expect(css).toContain('.y {');
183
- expect(css).toMatch(/@keyframes ripple-[a-z0-9]+-test/);
184
- expect(css).not.toMatch(/\.x\.ripple-[a-z0-9]+/);
183
+ expect(css).toMatch(/@keyframes tsrx-[a-z0-9]+-test/);
184
+ expect(css).not.toMatch(/\.x\.tsrx-[a-z0-9]+/);
185
185
  });
186
186
 
187
187
  it('handles global keyframes with no component elements', () => {
@@ -222,9 +222,9 @@ export component Test() {
222
222
  }`;
223
223
  const { css } = compile(source, 'test.tsrx');
224
224
 
225
- expect(css).toMatch(/div\.ripple-[a-z0-9]+\.blue {/);
226
- expect(css).toMatch(/span\.blue\.x\.ripple-[a-z0-9]+ {/);
227
- expect(css).toMatch(/span\.x\.ripple-[a-z0-9]+\.bg {/);
225
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+\.blue {/);
226
+ expect(css).toMatch(/span\.blue\.x\.tsrx-[a-z0-9]+ {/);
227
+ expect(css).toMatch(/span\.x\.tsrx-[a-z0-9]+\.bg {/);
228
228
  });
229
229
 
230
230
  it('handles multiple :global() in descendant sequence', () => {
@@ -241,7 +241,7 @@ export component Test() {
241
241
  const { css } = compile(source, 'test.tsrx');
242
242
 
243
243
  expect(css).toContain('div > section > p');
244
- expect(css).toMatch(/p\.ripple-[a-z0-9]+ {/);
244
+ expect(css).toMatch(/p\.tsrx-[a-z0-9]+ {/);
245
245
  });
246
246
 
247
247
  it('handles :is with :global and html context', () => {
@@ -261,7 +261,7 @@ export component Test() {
261
261
  }`;
262
262
  const { css } = compile(source, 'test.tsrx');
263
263
 
264
- expect(css).toMatch(/x\.ripple-[a-z0-9]+ :is\(html \*\) {/);
264
+ expect(css).toMatch(/x\.tsrx-[a-z0-9]+ :is\(html \*\) {/);
265
265
  });
266
266
 
267
267
  it('handles :global block with :has inside', () => {
@@ -289,9 +289,9 @@ export component Test() {
289
289
  const { css } = compile(source, 'test.tsrx');
290
290
 
291
291
  expect(css).toContain('.foo {');
292
- expect(css).toMatch(/\.ripple-[a-z0-9]+:has\(x:where\(\.ripple-[a-z0-9]+\)\) {/);
293
- expect(css).toMatch(/&:has\(x\.ripple-[a-z0-9]+\) {/);
294
- expect(css).toMatch(/.foo:has\(x\.ripple-[a-z0-9]+\) {/);
292
+ expect(css).toMatch(/\.tsrx-[a-z0-9]+:has\(x:where\(\.tsrx-[a-z0-9]+\)\) {/);
293
+ expect(css).toMatch(/&:has\(x\.tsrx-[a-z0-9]+\) {/);
294
+ expect(css).toMatch(/.foo:has\(x\.tsrx-[a-z0-9]+\) {/);
295
295
  });
296
296
 
297
297
  it('handles :not with :global in complex nesting', () => {
@@ -378,7 +378,7 @@ export component Test({ children }) {
378
378
  }`;
379
379
  const { css } = compile(source, 'test.tsrx');
380
380
 
381
- expect(css).toMatch(/\.before\.ripple-[a-z0-9]+ \+ \.foo:where\(\.ripple-[a-z0-9]+\) {/);
381
+ expect(css).toMatch(/\.before\.tsrx-[a-z0-9]+ \+ \.foo:where\(\.tsrx-[a-z0-9]+\) {/);
382
382
  expect((css.match(/\.x\ /g) || []).length).toBe(0);
383
383
  expect((css.match(/\(unused\) :global\(\.x\) /g) || []).length).toBe(6);
384
384
  expect(css).toContain('(unused) :global(.x) + .bar {');
@@ -419,7 +419,7 @@ component Child1() {
419
419
  }`;
420
420
  const { css } = compile(source, 'test.tsrx');
421
421
 
422
- expect(css).toMatch(/\.before\.ripple-[a-z0-9]+ \+ \.foo:where\(\.ripple-[a-z0-9]+\) {/);
422
+ expect(css).toMatch(/\.before\.tsrx-[a-z0-9]+ \+ \.foo:where\(\.tsrx-[a-z0-9]+\) {/);
423
423
  expect((css.match(/\.x\ /g) || []).length).toBe(5);
424
424
  expect((css.match(/\(unused\) :global\(\.x\) /g) || []).length).toBe(1);
425
425
  expect(css).toContain('(unused) :global(.x) + .bar {');
@@ -465,7 +465,7 @@ component Child1() {
465
465
  }`;
466
466
  const { css } = compile(source, 'test.tsrx');
467
467
 
468
- expect(css).toMatch(/\.before\.ripple-[a-z0-9]+ \+ \.foo:where\(\.ripple-[a-z0-9]+\) {/);
468
+ expect(css).toMatch(/\.before\.tsrx-[a-z0-9]+ \+ \.foo:where\(\.tsrx-[a-z0-9]+\) {/);
469
469
  expect((css.match(/\.x\ /g) || []).length).toBe(5);
470
470
  expect((css.match(/\(unused\) :global\(\.x\) /g) || []).length).toBe(1);
471
471
  expect(css).toContain('(unused) :global(.x) + .bar {');
@@ -509,7 +509,7 @@ export component Test({ children, classes }) {
509
509
 
510
510
  const { css } = compile(source, 'test.tsrx');
511
511
 
512
- expect(css).toMatch(/\.before\.ripple-[a-z0-9]+ \+ \.foo:where\(\.ripple-[a-z0-9]+\) {/);
512
+ expect(css).toMatch(/\.before\.tsrx-[a-z0-9]+ \+ \.foo:where\(\.tsrx-[a-z0-9]+\) {/);
513
513
  expect((css.match(/\.x\ /g) || []).length).toBe(5);
514
514
  expect((css.match(/\(unused\) :global\(\.x\) /g) || []).length).toBe(1);
515
515
  expect(css).toContain('(unused) :global(.x) + .bar {');
@@ -533,7 +533,7 @@ export component Test() {
533
533
  }`;
534
534
  const { css } = compile(source, 'test.tsrx');
535
535
 
536
- expect(css).toMatch(/html body \.root\.ripple-[a-z0-9]+ p:where\(\.ripple-[a-z0-9]+\) {/);
536
+ expect(css).toMatch(/html body \.root\.tsrx-[a-z0-9]+ p:where\(\.tsrx-[a-z0-9]+\) {/);
537
537
  });
538
538
 
539
539
  it('handles nested @media with :global blocks', () => {
@@ -561,7 +561,7 @@ export component Test() {
561
561
 
562
562
  expect(css).toContain('@media (min-width: 768px) {');
563
563
  expect(css).toContain('.foo {');
564
- expect(css).not.toMatch(/\.foo\.ripple-[a-z0-9]+/);
564
+ expect(css).not.toMatch(/\.foo\.tsrx-[a-z0-9]+/);
565
565
  });
566
566
 
567
567
  it('handles :has with complex combinators', () => {
@@ -591,7 +591,7 @@ export component Test() {
591
591
  const { css } = compile(source, 'test.tsrx');
592
592
 
593
593
  expect(css).toMatch(
594
- /g\.ripple-[a-z0-9]+:has\(> h:where\(\.ripple-[a-z0-9]+\) > i:where\(\.ripple-[a-z0-9]+\)\)/,
594
+ /g\.tsrx-[a-z0-9]+:has\(> h:where\(\.tsrx-[a-z0-9]+\) > i:where\(\.tsrx-[a-z0-9]+\)\)/,
595
595
  );
596
596
  expect(css).toContain('(unused) h:has(> h > i)');
597
597
  });
@@ -614,7 +614,7 @@ export component Test() {
614
614
  }`;
615
615
  const { css } = compile(source, 'test.tsrx');
616
616
 
617
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ h1\[data-title="Hello, world!"\]/);
617
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ h1\[data-title="Hello, world!"\]/);
618
618
  expect(css).toContain('h1[attribute], video[autoplay]');
619
619
  });
620
620
 
@@ -633,7 +633,7 @@ export component Test() {
633
633
  }`;
634
634
  const { css } = compile(source, 'test.tsrx');
635
635
 
636
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ \.h1\\,h2\\,h3 {/);
636
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ \.h1\\,h2\\,h3 {/);
637
637
  });
638
638
 
639
639
  /**
@@ -658,8 +658,8 @@ export component Test() {
658
658
  }`;
659
659
  const { css } = compile(source, 'test.tsrx');
660
660
 
661
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ :is\(h1, h2\)/);
662
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ :where\(h1, h2\)/);
661
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ :is\(h1, h2\)/);
662
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ :where\(h1, h2\)/);
663
663
  });
664
664
 
665
665
  it('handles :global with :is containing compound selectors', () => {
@@ -679,7 +679,7 @@ export component Test() {
679
679
  }`;
680
680
  const { css } = compile(source, 'test.tsrx');
681
681
 
682
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ h1 ~ :is\(h2, h3\)/);
682
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ h1 ~ :is\(h2, h3\)/);
683
683
  });
684
684
 
685
685
  it('handles :global with pseudo-elements', () => {
@@ -20,7 +20,7 @@ export component Test() {
20
20
  }`;
21
21
  const { css } = compile(source, 'test.tsrx');
22
22
 
23
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ ::slotted\(span\) {/);
23
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ ::slotted\(span\) {/);
24
24
  expect(css).toContain('::slotted(*) {');
25
25
  });
26
26
 
@@ -41,7 +41,7 @@ export component Test() {
41
41
  }`;
42
42
  const { css } = compile(source, 'test.tsrx');
43
43
 
44
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ ::part\(input\) {/);
44
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ ::part\(input\) {/);
45
45
  expect(css).toContain('::part(button) {');
46
46
  });
47
47
 
@@ -22,7 +22,7 @@ export component Test() {
22
22
 
23
23
  expect(css).toContain('@media (min-width: 768px) {');
24
24
  expect(css).toContain('div {');
25
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ span {/);
25
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ span {/);
26
26
  });
27
27
 
28
28
  it('handles :global inside @supports queries', () => {
@@ -46,7 +46,7 @@ export component Test() {
46
46
 
47
47
  expect(css).toContain('@supports (display: grid) {');
48
48
  expect(css).toContain('.container {');
49
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ \.item {/);
49
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ \.item {/);
50
50
  });
51
51
 
52
52
  it('handles nested @media with :global', () => {
@@ -74,8 +74,8 @@ export component Test() {
74
74
 
75
75
  expect(css).toContain('@media (min-width: 768px) {');
76
76
  expect(css).toContain('.foo {');
77
- expect(css).not.toMatch(/\.foo\.ripple-[a-z0-9]+/);
78
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ {/);
77
+ expect(css).not.toMatch(/\.foo\.tsrx-[a-z0-9]+/);
78
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ {/);
79
79
  });
80
80
 
81
81
  it('handles :global in @container queries', () => {
@@ -121,6 +121,6 @@ export component Test() {
121
121
  expect(css).toContain('@media screen {');
122
122
  expect(css).toContain('@supports (display: flex) {');
123
123
  expect(css).toContain('.flex-container {');
124
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ \.flex-item {/);
124
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ \.flex-item {/);
125
125
  });
126
126
  });
@@ -16,7 +16,7 @@ export component Test() {
16
16
 
17
17
  expect(css).toContain('div {');
18
18
  expect(css).toContain('color: red;');
19
- expect(css).not.toMatch(/div\.ripple-[a-z0-9]+/);
19
+ expect(css).not.toMatch(/div\.tsrx-[a-z0-9]+/);
20
20
  });
21
21
 
22
22
  it('applies global selector with class', () => {
@@ -38,7 +38,7 @@ export component Test() {
38
38
 
39
39
  expect(css).toContain('div.foo {');
40
40
  expect(css).toContain('.foo {');
41
- expect(css).not.toMatch(/\.foo\.ripple-[a-z0-9]+/);
41
+ expect(css).not.toMatch(/\.foo\.tsrx-[a-z0-9]+/);
42
42
  });
43
43
 
44
44
  it('mixes global and local selectors', () => {
@@ -62,7 +62,7 @@ export component Test() {
62
62
 
63
63
  expect(css).toContain('div .foo');
64
64
  expect(css).toContain('div > .foo');
65
- expect(css).toMatch(/\.foo\.ripple-[a-z0-9]+/);
65
+ expect(css).toMatch(/\.foo\.tsrx-[a-z0-9]+/);
66
66
  });
67
67
 
68
68
  it('handles global block syntax', () => {
@@ -86,7 +86,7 @@ export component Test() {
86
86
 
87
87
  expect(css).toContain('.x {');
88
88
  expect(css).toContain('.a, .selector, .list {');
89
- expect(css).not.toMatch(/\.x\.ripple-[a-z0-9]+/);
89
+ expect(css).not.toMatch(/\.x\.tsrx-[a-z0-9]+/);
90
90
  });
91
91
 
92
92
  it('handles global with pseudo-classes', () => {
@@ -108,7 +108,7 @@ export component Test() {
108
108
 
109
109
  expect(css).toContain('button:hover {');
110
110
  expect(css).toContain('button:focus {');
111
- expect(css).not.toMatch(/button\.ripple-[a-z0-9]+/);
111
+ expect(css).not.toMatch(/button\.tsrx-[a-z0-9]+/);
112
112
  });
113
113
 
114
114
  it('handles multiple global selectors in selector list', () => {
@@ -157,9 +157,9 @@ export component Test() {
157
157
  }`;
158
158
  const { css } = compile(source, 'test.tsrx');
159
159
 
160
- expect(css).toMatch(/\.styled-container\.ripple-[a-z0-9]+/);
161
- expect(css).toMatch(/\.text\.ripple-[a-z0-9]+/);
160
+ expect(css).toMatch(/\.styled-container\.tsrx-[a-z0-9]+/);
161
+ expect(css).toMatch(/\.text\.tsrx-[a-z0-9]+/);
162
162
  expect(css).toContain('h1 {');
163
- expect(css).not.toMatch(/h1\.ripple-[a-z0-9]+/);
163
+ expect(css).not.toMatch(/h1\.tsrx-[a-z0-9]+/);
164
164
  });
165
165
  });
@@ -15,7 +15,7 @@ export component Test() {
15
15
  const { css } = compile(source, 'test.tsrx');
16
16
 
17
17
  expect(css).toContain('.foo {');
18
- expect(css).not.toMatch(/\.foo\.ripple-[a-z0-9]+/);
18
+ expect(css).not.toMatch(/\.foo\.tsrx-[a-z0-9]+/);
19
19
  });
20
20
 
21
21
  it('handles :global with chained classes', () => {
@@ -40,8 +40,8 @@ export component Test() {
40
40
  const { css } = compile(source, 'test.tsrx');
41
41
 
42
42
  expect(css).toContain('.foo.bar {');
43
- expect(css).toMatch(/\.foo\.bar\.ripple-[a-z0-9]+ {/);
44
- expect(css).toMatch(/\.foo\.ripple-[a-z0-9]+\.bar {/);
43
+ expect(css).toMatch(/\.foo\.bar\.tsrx-[a-z0-9]+ {/);
44
+ expect(css).toMatch(/\.foo\.tsrx-[a-z0-9]+\.bar {/);
45
45
  });
46
46
 
47
47
  it('handles local class inside :global selector', () => {
@@ -63,7 +63,7 @@ export component Test() {
63
63
  }`;
64
64
  const { css } = compile(source, 'test.tsrx');
65
65
 
66
- expect(css).toMatch(/\.outer \.inner\.ripple-[a-z0-9]+ {/);
66
+ expect(css).toMatch(/\.outer \.inner\.tsrx-[a-z0-9]+ {/);
67
67
  expect(css).toMatch(/\(unused\) :global\(div\) \.foo {/);
68
68
  });
69
69
 
@@ -92,8 +92,8 @@ export component Test() {
92
92
 
93
93
  expect(css).toContain('#app {');
94
94
  expect(css).not.toContain('#app #content {');
95
- expect(css).not.toMatch(/#app\.ripple-[a-z0-9]+/);
96
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ #content {/);
95
+ expect(css).not.toMatch(/#app\.tsrx-[a-z0-9]+/);
96
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ #content {/);
97
97
  });
98
98
 
99
99
  it('handles :global with class and ID combination', () => {
@@ -118,8 +118,8 @@ export component Test() {
118
118
  const { css } = compile(source, 'test.tsrx');
119
119
 
120
120
  expect(css).toContain('#app.container {');
121
- expect(css).toMatch(/\.container#app\.ripple-[a-z0-9]+ {/);
122
- expect(css).toMatch(/#app\.ripple-[a-z0-9]+\.container {/);
121
+ expect(css).toMatch(/\.container#app\.tsrx-[a-z0-9]+ {/);
122
+ expect(css).toMatch(/#app\.tsrx-[a-z0-9]+\.container {/);
123
123
  });
124
124
 
125
125
  it('handles multiple classes with :global', () => {
@@ -143,8 +143,8 @@ export component Test() {
143
143
  }`;
144
144
  const { css } = compile(source, 'test.tsrx');
145
145
 
146
- expect((css.match(/\.a\.b\.c\.ripple-[a-z0-9]+ {/g) || []).length).toBe(2);
147
- expect(css).toMatch(/\.a\.b\.ripple-[a-z0-9]+\.c {/);
146
+ expect((css.match(/\.a\.b\.c\.tsrx-[a-z0-9]+ {/g) || []).length).toBe(2);
147
+ expect(css).toMatch(/\.a\.b\.tsrx-[a-z0-9]+\.c {/);
148
148
  });
149
149
 
150
150
  it('handles :global with class descendant selectors', () => {
@@ -172,8 +172,8 @@ export component Test() {
172
172
  }`;
173
173
  const { css } = compile(source, 'test.tsrx');
174
174
 
175
- expect(css).toMatch(/\.outer \.middle\.ripple-[a-z0-9]+ \.inner:where\(\.ripple-[a-z0-9]+\)/);
176
- expect(css).toMatch(/\.outer\.ripple-[a-z0-9]+ \.middle \.inner {/);
177
- expect(css).toMatch(/\.outer\.ripple-[a-z0-9]+ \.middle:where\(\.ripple-[a-z0-9]+\)\.inner/);
175
+ expect(css).toMatch(/\.outer \.middle\.tsrx-[a-z0-9]+ \.inner:where\(\.tsrx-[a-z0-9]+\)/);
176
+ expect(css).toMatch(/\.outer\.tsrx-[a-z0-9]+ \.middle \.inner {/);
177
+ expect(css).toMatch(/\.outer\.tsrx-[a-z0-9]+ \.middle:where\(\.tsrx-[a-z0-9]+\)\.inner/);
178
178
  });
179
179
  });
@@ -16,8 +16,8 @@ export component Test() {
16
16
  }`;
17
17
  const { css } = compile(source, 'test.tsrx');
18
18
 
19
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ > span {/);
20
- expect(css).not.toMatch(/span\.ripple-[a-z0-9]+/);
19
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ > span {/);
20
+ expect(css).not.toMatch(/span\.tsrx-[a-z0-9]+/);
21
21
  });
22
22
 
23
23
  it('handles :global with adjacent sibling combinator', () => {
@@ -40,7 +40,7 @@ export component Test() {
40
40
  }`;
41
41
  const { css } = compile(source, 'test.tsrx');
42
42
 
43
- expect(css).toMatch(/span\.ripple-[a-z0-9]+ \+ span {/);
43
+ expect(css).toMatch(/span\.tsrx-[a-z0-9]+ \+ span {/);
44
44
  expect(css).toContain('(unused) :global(div) + span {');
45
45
  });
46
46
 
@@ -66,7 +66,7 @@ export component Test() {
66
66
 
67
67
  expect(css).toContain('~');
68
68
 
69
- expect(css).toMatch(/span\.ripple-[a-z0-9]+ ~ span {/);
69
+ expect(css).toMatch(/span\.tsrx-[a-z0-9]+ ~ span {/);
70
70
  expect(css).toMatch('(unused) :global(div) ~ span {');
71
71
  });
72
72
 
@@ -92,8 +92,8 @@ export component Test() {
92
92
  }`;
93
93
  const { css } = compile(source, 'test.tsrx');
94
94
 
95
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ > span > button {/);
96
- expect(css).toMatch(/div > span\.ripple-[a-z0-9]+ \+ button:where\(\.ripple-[a-z0-9]+\) {/);
95
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ > span > button {/);
96
+ expect(css).toMatch(/div > span\.tsrx-[a-z0-9]+ \+ button:where\(\.tsrx-[a-z0-9]+\) {/);
97
97
  });
98
98
 
99
99
  it('handles :global with descendant combinator', () => {
@@ -118,7 +118,7 @@ export component Test() {
118
118
 
119
119
  const { css } = compile(source, 'test.tsrx');
120
120
 
121
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ span button {/);
122
- expect(css).toMatch(/div span\.ripple-[a-z0-9]+ button:where\(\.ripple-[a-z0-9]+\) {/);
121
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ span button {/);
122
+ expect(css).toMatch(/div span\.tsrx-[a-z0-9]+ button:where\(\.tsrx-[a-z0-9]+\) {/);
123
123
  });
124
124
  });
@@ -26,9 +26,9 @@ export component Test() {
26
26
  }`;
27
27
  const { css } = compile(source, 'test.tsrx');
28
28
 
29
- expect(css).not.toMatch(/div\.ripple-[a-z0-9]+ {/);
30
- expect(css).not.toMatch(/span\.ripple-[a-z0-9]+ {/);
31
- expect(css).not.toMatch(/button\.ripple-[a-z0-9]+ {/);
29
+ expect(css).not.toMatch(/div\.tsrx-[a-z0-9]+ {/);
30
+ expect(css).not.toMatch(/span\.tsrx-[a-z0-9]+ {/);
31
+ expect(css).not.toMatch(/button\.tsrx-[a-z0-9]+ {/);
32
32
  });
33
33
 
34
34
  it('handles local block with :global nested inside', () => {
@@ -54,8 +54,8 @@ export component Test() {
54
54
  }`;
55
55
  const { css } = compile(source, 'test.tsrx');
56
56
 
57
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ {/);
58
- expect(css).not.toMatch(/span\.ripple-[a-z0-9]+ {/);
57
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ {/);
58
+ expect(css).not.toMatch(/span\.tsrx-[a-z0-9]+ {/);
59
59
  expect(css).toContain('(unused) p {');
60
60
  });
61
61
 
@@ -82,8 +82,8 @@ export component Test() {
82
82
 
83
83
  expect(css).toContain('div {');
84
84
  expect(css).toContain('.local {');
85
- expect(css).not.toMatch(/div\.ripple-[a-z0-9]+ {/);
86
- expect(css).not.toMatch(/\.local\.ripple-[a-z0-9]+ {/);
85
+ expect(css).not.toMatch(/div\.tsrx-[a-z0-9]+ {/);
86
+ expect(css).not.toMatch(/\.local\.tsrx-[a-z0-9]+ {/);
87
87
  });
88
88
 
89
89
  it('handles alternating :global and local nesting', () => {
@@ -111,8 +111,8 @@ export component Test() {
111
111
  }`;
112
112
  const { css } = compile(source, 'test.tsrx');
113
113
 
114
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ {/);
115
- expect(css).toMatch(/button\.ripple-[a-z0-9]+ {/);
114
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ {/);
115
+ expect(css).toMatch(/button\.tsrx-[a-z0-9]+ {/);
116
116
  expect(css).toContain('span {');
117
117
  expect(css).toContain('em {');
118
118
  });
@@ -142,11 +142,11 @@ export component Test() {
142
142
  }`;
143
143
  const { css } = compile(source, 'test.tsrx');
144
144
 
145
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ {/);
145
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ {/);
146
146
  expect(css).toContain('span {');
147
147
  expect(css).toContain('button {');
148
- expect(css).not.toMatch(/span\.ripple-[a-z0-9]+/);
149
- expect(css).not.toMatch(/button\.ripple-[a-z0-9]+/);
148
+ expect(css).not.toMatch(/span\.tsrx-[a-z0-9]+/);
149
+ expect(css).not.toMatch(/button\.tsrx-[a-z0-9]+/);
150
150
  });
151
151
 
152
152
  it('handles :global with nesting combinator &', () => {
@@ -174,8 +174,8 @@ export component Test() {
174
174
  }`;
175
175
  const { css } = compile(source, 'test.tsrx');
176
176
 
177
- expect(css).toMatch(/\.container\.ripple-[a-z0-9]+ {/);
178
- expect(css).toMatch(/button\.ripple-[a-z0-9]+ {/);
177
+ expect(css).toMatch(/\.container\.tsrx-[a-z0-9]+ {/);
178
+ expect(css).toMatch(/button\.tsrx-[a-z0-9]+ {/);
179
179
  expect(css).toContain('&.active {');
180
180
  expect(css).toContain('&.pressed {');
181
181
  });
@@ -209,13 +209,13 @@ export component Test() {
209
209
  }`;
210
210
  const { css } = compile(source, 'test.tsrx');
211
211
 
212
- expect(css).toMatch(/div\.ripple-[a-z0-9]+ {/);
213
- expect(css).toMatch(/ul\.ripple-[a-z0-9]+ {/);
214
- expect(css).toMatch(/a\.ripple-[a-z0-9]+ {/);
212
+ expect(css).toMatch(/div\.tsrx-[a-z0-9]+ {/);
213
+ expect(css).toMatch(/ul\.tsrx-[a-z0-9]+ {/);
214
+ expect(css).toMatch(/a\.tsrx-[a-z0-9]+ {/);
215
215
 
216
216
  expect(css).toContain('nav {');
217
217
  expect(css).toContain('li {');
218
- expect(css).not.toMatch(/nav\.ripple-[a-z0-9]+ {/);
219
- expect(css).not.toMatch(/li\.ripple-[a-z0-9]+ {/);
218
+ expect(css).not.toMatch(/nav\.tsrx-[a-z0-9]+ {/);
219
+ expect(css).not.toMatch(/li\.tsrx-[a-z0-9]+ {/);
220
220
  });
221
221
  });