@ripple-ts/typescript-plugin 0.2.184 → 0.2.186

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/language.js +3 -3
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "TypeScript plugin for Ripple",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.2.184",
6
+ "version": "0.2.186",
7
7
  "main": "src/index.js",
8
8
  "homepage": "https://ripplejs.com",
9
9
  "repository": {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "typescript": "^5.9.2",
26
- "ripple": "0.2.184"
26
+ "ripple": "0.2.186"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "tsdown",
package/src/language.js CHANGED
@@ -341,12 +341,12 @@ class RippleVirtualCode {
341
341
  this.mappings = transpiled.mappings ?? [];
342
342
  this.isErrorMode = false;
343
343
 
344
- const { cssMappings, cssSources } = transpiled;
344
+ const cssMappings = transpiled.cssMappings;
345
345
  if (cssMappings.length > 0) {
346
346
  log('Creating', cssMappings.length, 'CSS embedded codes');
347
347
 
348
348
  this.embeddedCodes = cssMappings.map((mapping, index) => {
349
- const cssContent = cssSources[index];
349
+ const cssContent = /** @type {string} */ (mapping.data?.customData?.content);
350
350
  log(
351
351
  `CSS region ${index}: \
352
352
  offset ${mapping.sourceOffsets[0]}-${mapping.sourceOffsets[0] + mapping.lengths[0]}, \
@@ -354,7 +354,7 @@ class RippleVirtualCode {
354
354
  );
355
355
 
356
356
  return {
357
- id: `style_${index}`,
357
+ id: /** @type {string} */ (mapping.data?.customData?.embeddedId),
358
358
  languageId: 'css',
359
359
  snapshot: {
360
360
  getText: (start, end) => cssContent.substring(start, end),