@immense/vue-pom-generator 1.0.49 → 1.0.51

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 (37) hide show
  1. package/RELEASE_NOTES.md +14 -20
  2. package/class-generation/{BasePage.ts → base-page.ts} +20 -4
  3. package/class-generation/callout.ts +827 -0
  4. package/class-generation/floating-ui.ts +837 -0
  5. package/class-generation/index.ts +11 -10
  6. package/class-generation/{Pointer.ts → pointer.ts} +81 -101
  7. package/dist/class-generation/{BasePage.d.ts → base-page.d.ts} +6 -2
  8. package/dist/class-generation/base-page.d.ts.map +1 -0
  9. package/dist/class-generation/callout.d.ts +20 -0
  10. package/dist/class-generation/callout.d.ts.map +1 -0
  11. package/dist/class-generation/floating-ui.d.ts +100 -0
  12. package/dist/class-generation/floating-ui.d.ts.map +1 -0
  13. package/dist/class-generation/{Pointer.d.ts → pointer.d.ts} +5 -5
  14. package/dist/class-generation/pointer.d.ts.map +1 -0
  15. package/dist/index.cjs +27 -14
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.mjs +27 -14
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/playwright.config.d.ts +3 -0
  20. package/dist/playwright.config.d.ts.map +1 -0
  21. package/dist/plugin/support/build-plugin.d.ts.map +1 -1
  22. package/dist/plugin/support/dev-plugin.d.ts.map +1 -1
  23. package/dist/plugin/types.d.ts +1 -1
  24. package/dist/tests/fixtures/generated-tsc/{BasePage.full.d.ts → base-page.full.d.ts} +1 -1
  25. package/dist/tests/fixtures/generated-tsc/base-page.full.d.ts.map +1 -0
  26. package/dist/tests/fixtures/generated-tsc/{BasePage.minimal.d.ts → base-page.minimal.d.ts} +1 -1
  27. package/dist/tests/fixtures/generated-tsc/base-page.minimal.d.ts.map +1 -0
  28. package/dist/tests/fixtures/generated-tsc/{Pointer.d.ts → pointer.d.ts} +1 -1
  29. package/dist/tests/fixtures/generated-tsc/pointer.d.ts.map +1 -0
  30. package/dist/tests/playwright/pointer-callout.spec.d.ts +2 -0
  31. package/dist/tests/playwright/pointer-callout.spec.d.ts.map +1 -0
  32. package/package.json +6 -2
  33. package/dist/class-generation/BasePage.d.ts.map +0 -1
  34. package/dist/class-generation/Pointer.d.ts.map +0 -1
  35. package/dist/tests/fixtures/generated-tsc/BasePage.full.d.ts.map +0 -1
  36. package/dist/tests/fixtures/generated-tsc/BasePage.minimal.d.ts.map +0 -1
  37. package/dist/tests/fixtures/generated-tsc/Pointer.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -3887,7 +3887,7 @@ async function generateSplitTypeScriptFiles(componentHierarchyMap, vueFilesPathM
3887
3887
  customPomImportAliases: options.customPomImportAliases,
3888
3888
  customPomImportNameCollisionBehavior: options.customPomImportNameCollisionBehavior
3889
3889
  });
3890
- const runtimeBasePagePath = path.join(base, "_pom-runtime", "class-generation", "BasePage.ts");
3890
+ const runtimeBasePagePath = path.join(base, "_pom-runtime", "class-generation", "base-page.ts");
3891
3891
  const files = [];
3892
3892
  for (const [name, deps] of entries) {
3893
3893
  const filePath = generatedTsFilePathByComponent.get(name);
@@ -5036,7 +5036,7 @@ function getRuntimeGeneratedAssetSpecs(baseDir, basePageClassPath) {
5036
5036
  const runtimeDirAbs = path.join(baseDir, "_pom-runtime");
5037
5037
  const runtimeClassGenAbs = path.join(runtimeDirAbs, "class-generation");
5038
5038
  const runtimeClassGenSourceDir = resolvePluginAsset("../class-generation");
5039
- const runtimeClassGenFiles = fs.readdirSync(runtimeClassGenSourceDir).filter((file) => file.endsWith(".ts")).filter((file) => file !== "BasePage.ts" && file !== "index.ts").sort((left, right) => left.localeCompare(right));
5039
+ const runtimeClassGenFiles = fs.readdirSync(runtimeClassGenSourceDir).filter((file) => file.endsWith(".ts")).filter((file) => file !== "base-page.ts" && file !== "index.ts").sort((left, right) => left.localeCompare(right));
5040
5040
  return [
5041
5041
  {
5042
5042
  absolutePath: resolvePluginAsset("../click-instrumentation.ts"),
@@ -5050,8 +5050,8 @@ function getRuntimeGeneratedAssetSpecs(baseDir, basePageClassPath) {
5050
5050
  })),
5051
5051
  {
5052
5052
  absolutePath: basePageClassPath,
5053
- description: "BasePage.ts",
5054
- outputPath: path.join(runtimeClassGenAbs, "BasePage.ts")
5053
+ description: "base-page.ts",
5054
+ outputPath: path.join(runtimeClassGenAbs, "base-page.ts")
5055
5055
  }
5056
5056
  ];
5057
5057
  }
@@ -5218,12 +5218,13 @@ async function generateAggregatedFiles(componentHierarchyMap, vueFilesPathMap, b
5218
5218
  const runtimeDirRel = "./_pom-runtime";
5219
5219
  const runtimeClassGenRel = `${runtimeDirRel}/class-generation`;
5220
5220
  imports.push(`import type { PwLocator, PwPage } from "${runtimeClassGenRel}/playwright-types";`);
5221
- imports.push(`import { BasePage } from "${runtimeClassGenRel}/BasePage";`);
5222
- imports.push(`import type { Fluent } from "${runtimeClassGenRel}/BasePage";`);
5221
+ imports.push(`import { BasePage } from "${runtimeClassGenRel}/base-page";`);
5222
+ imports.push(`import type { Fluent } from "${runtimeClassGenRel}/base-page";`);
5223
5223
  imports.push(`export * from "${runtimeDirRel}/click-instrumentation";`);
5224
5224
  imports.push(`export * from "${runtimeClassGenRel}/playwright-types";`);
5225
- imports.push(`export * from "${runtimeClassGenRel}/Pointer";`);
5226
- imports.push(`export * from "${runtimeClassGenRel}/BasePage";`);
5225
+ imports.push(`export * from "${runtimeClassGenRel}/callout";`);
5226
+ imports.push(`export * from "${runtimeClassGenRel}/pointer";`);
5227
+ imports.push(`export * from "${runtimeClassGenRel}/base-page";`);
5227
5228
  const customPomImportResolution = resolveCustomPomImportResolution(generatedClassNames, projectRoot, {
5228
5229
  customPomDir: options.customPomDir,
5229
5230
  customPomImportAliases: options.customPomImportAliases,
@@ -6782,14 +6783,19 @@ function createBuildProcessorPlugin(options) {
6782
6783
  return null;
6783
6784
  });
6784
6785
  if (!fs.existsSync(basePageClassPath)) {
6785
- this.error(`BasePage.ts not found at ${basePageClassPath}. Ensure it is included in the build.`);
6786
+ this.error(`Base page runtime file not found at ${basePageClassPath}. Ensure it is included in the build.`);
6786
6787
  }
6787
6788
  this.addWatchFile(basePageClassPath);
6788
- const pointerPath = path.resolve(path.dirname(basePageClassPath), "Pointer.ts");
6789
+ const pointerPath = path.resolve(path.dirname(basePageClassPath), "pointer.ts");
6789
6790
  if (!fs.existsSync(pointerPath)) {
6790
- this.error(`Pointer.ts not found at ${pointerPath}. Ensure it is included in the build.`);
6791
+ this.error(`pointer.ts not found at ${pointerPath}. Ensure it is included in the build.`);
6791
6792
  }
6792
6793
  this.addWatchFile(pointerPath);
6794
+ const calloutPath = path.resolve(path.dirname(basePageClassPath), "callout.ts");
6795
+ if (!fs.existsSync(calloutPath)) {
6796
+ this.error(`callout.ts not found at ${calloutPath}. Ensure it is included in the build.`);
6797
+ }
6798
+ this.addWatchFile(calloutPath);
6793
6799
  },
6794
6800
  async buildEnd(error) {
6795
6801
  if (error) {
@@ -7122,7 +7128,14 @@ function createDevProcessorPlugin(options) {
7122
7128
  };
7123
7129
  const watchedVueGlobs = scanDirs.map((dir) => path.resolve(projectRootRef.current, dir, "**", "*.vue"));
7124
7130
  const watchedPluginGlob = path.resolve(projectRootRef.current, "vite-plugins", "vue-pom-generator", "**", "*.ts");
7125
- server.watcher.add([...watchedVueGlobs, watchedPluginGlob, basePageClassPath]);
7131
+ const runtimeDir = path.dirname(basePageClassPath);
7132
+ server.watcher.add([
7133
+ ...watchedVueGlobs,
7134
+ watchedPluginGlob,
7135
+ basePageClassPath,
7136
+ path.resolve(runtimeDir, "pointer.ts"),
7137
+ path.resolve(runtimeDir, "callout.ts")
7138
+ ]);
7126
7139
  scheduleVueFileRegenLocal = (filePath, source) => {
7127
7140
  pendingChangedVueFiles.add(filePath);
7128
7141
  logDebug(`queued(${source}): files=${pendingChangedVueFiles.size} deleted=${pendingDeletedComponents.size}`);
@@ -7311,9 +7324,9 @@ function createSupportPlugins(options) {
7311
7324
  const resolvedRouterEntry = resolveRouterEntry2();
7312
7325
  const getDefaultBasePageClassPath = () => {
7313
7326
  try {
7314
- return fileURLToPath(new URL("../class-generation/BasePage.ts", import.meta.url));
7327
+ return fileURLToPath(new URL("../class-generation/base-page.ts", import.meta.url));
7315
7328
  } catch {
7316
- return path.resolve(__dirname, "..", "class-generation", "BasePage.ts");
7329
+ return path.resolve(__dirname, "..", "class-generation", "base-page.ts");
7317
7330
  }
7318
7331
  };
7319
7332
  const basePageClassPath = basePageClassPathOverride ?? getDefaultBasePageClassPath();