inventive-ui 0.0.3 → 0.0.4

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/dist/index.js CHANGED
@@ -190,7 +190,7 @@ var BANNER_COMPACT = [
190
190
  var FULL_BANNER_WIDTH = 101;
191
191
  function resolveCliVersion() {
192
192
  try {
193
- return true ? "0.0.3" : "1.0.0";
193
+ return true ? "0.0.4" : "1.0.0";
194
194
  } catch {
195
195
  return "1.0.0";
196
196
  }
@@ -5879,7 +5879,12 @@ function writeComponentSlotFiles(cwd = process.cwd()) {
5879
5879
  if (fs15.existsSync(outPath)) fs15.removeSync(outPath);
5880
5880
  continue;
5881
5881
  }
5882
- safeWriteFile(outPath, renderGroupedSlotFileContent(group.emitters));
5882
+ safeWriteFile(
5883
+ outPath,
5884
+ renderGroupedSlotFileContent(group.emitters, {
5885
+ prefetch: group.fileName === SLOT_GROUP_CORE_FILE
5886
+ })
5887
+ );
5883
5888
  }
5884
5889
  const existingSlots = fs15.existsSync(slotsDir) ? fs15.readdirSync(slotsDir).filter((f) => f.endsWith(".slot.tsx") || f.endsWith(".generated.tsx")) : [];
5885
5890
  for (const file of existingSlots) {
@@ -5908,7 +5913,7 @@ function writeComponentSlotFiles(cwd = process.cwd()) {
5908
5913
  );
5909
5914
  }
5910
5915
  }
5911
- function renderGroupedSlotFileContent(emitters) {
5916
+ function renderGroupedSlotFileContent(emitters, options = {}) {
5912
5917
  const needsComponentProps = emitters.some((emitter) => emitter.propsName === "Props");
5913
5918
  const lines = [
5914
5919
  "// Managed by iui. Do not edit manually.",
@@ -5956,6 +5961,9 @@ function renderGroupedSlotFileContent(emitters) {
5956
5961
  lines.push(`const ${renderer} = createEagerComponent<${alias}SlotProps>(`);
5957
5962
  lines.push(` () => import(${escapeTsStringLiteral(emitter.lazyImportSpecifier)}),`);
5958
5963
  lines.push(` (mod) => ${renderGetComponentExpr(emitter)} as React.ComponentType<${alias}SlotProps>,`);
5964
+ if (options.prefetch) {
5965
+ lines.push(" { prefetch: true },");
5966
+ }
5959
5967
  lines.push(");", "");
5960
5968
  lines.push(`registerSlot(${escapeTsStringLiteral(emitter.type)}, (slot) => {`);
5961
5969
  lines.push(" const { type, ...props } = slot;");
@@ -8581,7 +8589,7 @@ async function updateCommand(opts = {}) {
8581
8589
  const auth = await ensureAuthSession();
8582
8590
  await ensureLicenseSession();
8583
8591
  const inProject = isInsideProject();
8584
- const currentCliVersion = true ? "0.0.3" : "unknown";
8592
+ const currentCliVersion = true ? "0.0.4" : "unknown";
8585
8593
  const latestCliVersion = await fetchLatestCliVersion(auth.token);
8586
8594
  const cliUpdateAvailable = latestCliVersion !== null && isVersionGreater(latestCliVersion, currentCliVersion);
8587
8595
  if (latestCliVersion && cliUpdateAvailable) {
@@ -8863,7 +8871,7 @@ var AUTH_EXEMPT_COMMANDS = /* @__PURE__ */ new Set([
8863
8871
  "doctor",
8864
8872
  "list"
8865
8873
  ]);
8866
- program.name("iui").description("The official CLI for the Inventive UI Design System").version(true ? "0.0.3" : "1.0.0").option("-C, --cwd <dir>", "Run as if started in the given directory").option("-q, --quiet", "Minimal output (also respects IUI_QUIET=1)").option("--no-color", "Disable ANSI colors");
8874
+ program.name("iui").description("The official CLI for the Inventive UI Design System").version(true ? "0.0.4" : "1.0.0").option("-C, --cwd <dir>", "Run as if started in the given directory").option("-q, --quiet", "Minimal output (also respects IUI_QUIET=1)").option("--no-color", "Disable ANSI colors");
8867
8875
  program.command("login").description("Authenticate with GitHub and link your license").option("-f, --force", "Force re-authentication and register this device").option("--bootstrap", "After login, run optional setup prompts").action((opts) => loginCommand(opts));
8868
8876
  program.command("logout").description("Remove stored credentials").action(logoutCommand);
8869
8877
  program.command("whoami").description("Show authenticated identity and license details").action(whoamiCommand);