@zintljs/extractor 0.1.0-alpha.6 → 0.1.0-alpha.7

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@zintljs/extractor.svg?color=863bff&label=)](https://npmjs.com/package/@zintljs/extractor)
6
6
 
7
- This is an **internal package**. You almost certainly want [`zintl`](https://npmjs.com/package/zintl) instead — it bundles this extractor behind a ready-to-use Vite plugin.
7
+ This is an **internal package**. You almost certainly want [`zintljs`](https://npmjs.com/package/zintljs) instead — it bundles this extractor behind a ready-to-use Vite plugin.
8
8
 
9
9
  Install it directly only if you are building custom tooling on top of Zintl's extraction layer.
10
10
 
package/dist/index.d.mts CHANGED
@@ -86,7 +86,7 @@ interface ExtractionResult {
86
86
  needsLoader: boolean;
87
87
  /** If true, this module contains at least one trust anchor (zintl). */
88
88
  hasZintlMacro: boolean;
89
- /** If true, this module contains a side-effect import "zintl" ($M). */
89
+ /** If true, this module contains a side-effect import "zintljs" ($M). */
90
90
  hasZintlMarker: boolean;
91
91
  /** Locations of zintl calls for compiler-driven catalog injection. */
92
92
  anchorSites: AnchorSite[];
@@ -96,7 +96,7 @@ interface ExtractionResult {
96
96
  usedKeys: Set<string>;
97
97
  /** Map of boundaryId -> sha1 hash of its messages (text+context+note) */
98
98
  boundaryHashes: Record<string, string>;
99
- /** Location and actual source of existing import from "zintl" used for merging. */
99
+ /** Location and actual source of existing import from "zintljs" used for merging. */
100
100
  zintlImportGroup?: {
101
101
  start: number;
102
102
  end: number;
@@ -322,8 +322,15 @@ declare function generateMessageId(messageText: string, _context?: string, _note
322
322
  * extractor as descriptors. All four were already unreferenced (one survived
323
323
  * only inside a commented-out line) and have been removed.
324
324
  */
325
+ /**
326
+ * The macro's *identifier* — the `zintl(...)` call users write. This is the
327
+ * public API surface and is intentionally NOT the package name: the npm package
328
+ * is `zintljs` (the bare `zintl` name is blocked by npm's similarity filter),
329
+ * but the function it exports is still `zintl`.
330
+ */
325
331
  declare const ZINTL_MACRO = "zintl";
326
- declare const RUNTIME_PACKAGE = "zintl";
332
+ /** The npm package specifier that carries the runtime. */
333
+ declare const RUNTIME_PACKAGE = "zintljs";
327
334
  /**
328
335
  * Module specifiers that carry the Zintl runtime surface.
329
336
  *
package/dist/index.mjs CHANGED
@@ -113,8 +113,15 @@ const logger = new ZintlLogger();
113
113
  * extractor as descriptors. All four were already unreferenced (one survived
114
114
  * only inside a commented-out line) and have been removed.
115
115
  */
116
+ /**
117
+ * The macro's *identifier* — the `zintl(...)` call users write. This is the
118
+ * public API surface and is intentionally NOT the package name: the npm package
119
+ * is `zintljs` (the bare `zintl` name is blocked by npm's similarity filter),
120
+ * but the function it exports is still `zintl`.
121
+ */
116
122
  const ZINTL_MACRO = "zintl";
117
- const RUNTIME_PACKAGE = "zintl";
123
+ /** The npm package specifier that carries the runtime. */
124
+ const RUNTIME_PACKAGE = "zintljs";
118
125
  /**
119
126
  * Module specifiers that carry the Zintl runtime surface.
120
127
  *
@@ -125,9 +132,9 @@ const RUNTIME_PACKAGE = "zintl";
125
132
  * by three of the four checks and missed by the fourth.
126
133
  */
127
134
  const RUNTIME_SPECIFIERS = [
128
- "zintl",
129
- "zintl/internal",
130
- "zintl/macro",
135
+ "zintljs",
136
+ "zintljs/internal",
137
+ "zintljs/macro",
131
138
  "virtual:zintl/runtime/internal"
132
139
  ];
133
140
  /** Whether an import specifier resolves to the Zintl runtime. */
@@ -622,7 +629,7 @@ var ExtractionContext = class {
622
629
  this.fileBoundaryId = fileBoundaryId;
623
630
  this.options = options;
624
631
  this.logger = options.logger || logger;
625
- this.runtimePackage = options.runtimePackage || "zintl";
632
+ this.runtimePackage = options.runtimePackage || "zintljs";
626
633
  this.uiAttributes = options.uiAttributes ? new Set(options.uiAttributes) : /* @__PURE__ */ new Set();
627
634
  this.uiObjectFields = options.uiObjectFields ? new Set(options.uiObjectFields) : /* @__PURE__ */ new Set();
628
635
  this.uiSinkProperties = options.uiSinkProperties ? [...options.uiSinkProperties] : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintljs/extractor",
3
- "version": "0.1.0-alpha.6",
3
+ "version": "0.1.0-alpha.7",
4
4
  "description": "AST-based message extractor for Zintl",
5
5
  "keywords": [
6
6
  "ast",