@macroforge/svelte-preprocessor 0.1.76 → 0.1.78

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAgB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAyIvE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,6BAAkC,GAC1C,iBAAiB,CA2JnB;AAED;;;;;;;GAOG;AACH,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,EAAgB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAyIvE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,6BAAkC,GAC1C,iBAAiB,CA2JnB;AAED;;;;;;;GAOG;AACH,eAAe,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -25,6 +25,7 @@
25
25
  *
26
26
  * @packageDocumentation
27
27
  */
28
+ import { hasMacroAnnotations } from "@macroforge/shared";
28
29
  /**
29
30
  * Cached reference to the native `expandSync` function from the macroforge package.
30
31
  *
@@ -185,7 +186,7 @@ export function macroforgePreprocess(options = {}) {
185
186
  * Most components won't have macros, so this saves the cost of loading
186
187
  * and calling the native expansion engine in the common case.
187
188
  */
188
- if (!content.includes("@derive")) {
189
+ if (!hasMacroAnnotations(content)) {
189
190
  return;
190
191
  }
191
192
  /*
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "dependencies": {
3
- "macroforge": "^0.1.76"
3
+ "@macroforge/shared": "^0.1.78",
4
+ "macroforge": "^0.1.78"
4
5
  },
5
6
  "description": "Svelte preprocessor for expanding Macroforge macros in component script blocks",
6
7
  "devDependencies": {
@@ -37,5 +38,5 @@
37
38
  },
38
39
  "type": "module",
39
40
  "types": "dist/index.d.ts",
40
- "version": "0.1.76"
41
+ "version": "0.1.78"
41
42
  }