@panomc/theme-core 1.0.0-dev.39 → 1.0.0-dev.41

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.
@@ -49,7 +49,7 @@ export function collectLicenses(outputDir = null) {
49
49
  const packageJson = readPackageJson(packageJsonPath);
50
50
 
51
51
  if (!packageJson) {
52
- throw new Error("package.json bulunamadı!");
52
+ throw new Error("package.json not found!");
53
53
  }
54
54
 
55
55
  const allDependencies = {
@@ -65,7 +65,7 @@ export function collectLicenses(outputDir = null) {
65
65
  const packageJsonPath = join(packagePath, "package.json");
66
66
 
67
67
  if (!existsSync(packageJsonPath)) {
68
- console.warn(`Paket bulunamadı: ${packageName}`);
68
+ console.warn(`Package not found: ${packageName}`);
69
69
  continue;
70
70
  }
71
71
 
@@ -92,30 +92,30 @@ export function collectLicenses(outputDir = null) {
92
92
  });
93
93
  }
94
94
 
95
- // Lisanslara göre sırala
95
+ // Sort by license
96
96
  licenses.sort((a, b) => a.name.localeCompare(b.name));
97
97
 
98
- // Output path'i belirle
98
+ // Determine the output path
99
99
  let outputPath;
100
100
  if (outputDir) {
101
- // Build klasörüne kaydet (sadece build sırasında)
101
+ // Save to the build folder (only during build)
102
102
  if (!existsSync(outputDir)) {
103
103
  mkdirSync(outputDir, { recursive: true });
104
104
  }
105
105
  outputPath = join(outputDir, "licenses.json");
106
106
  } else {
107
- // Ana dizine kaydet (npm run generate-licenses için)
107
+ // Save to the root directory (for npm run generate-licenses)
108
108
  outputPath = join(projectRoot, "licenses.json");
109
109
  }
110
110
 
111
111
  writeFileSync(outputPath, JSON.stringify(licenses, null, 2), "utf-8");
112
112
 
113
- console.log(`✅ ${licenses.length} paketin lisans bilgisi toplandı ve ${outputPath} dosyasına kaydedildi.`);
113
+ console.log(`✅ Collected license info for ${licenses.length} packages and saved it to ${outputPath}.`);
114
114
  }
115
115
 
116
- // Eğer direkt çalıştırılıyorsa (npm run generate-licenses)
117
- // Sadece script direkt çalıştırıldığında çalış, import edildiğinde çalışma
118
- // import.meta.url'yi file:// ile karşılaştırarak kontrol et
116
+ // If run directly (npm run generate-licenses)
117
+ // Only run when the script is executed directly, not when imported
118
+ // Check by comparing import.meta.url against file://
119
119
  const isMainModule = import.meta.url === `file://${process.argv[1]}` ||
120
120
  (process.argv[1] && process.argv[1].endsWith("generate-licenses.js"));
121
121
 
package/bin/new.js CHANGED
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * theme-core new — scaffold a working Pano theme.
4
4
  *
5
- * bunx theme-core new my-theme npm-published core (default)
6
- * bunx theme-core new my-theme --local file: links into a local theme-core
5
+ * bunx @panomc/theme-core new my-theme npm-published core (default)
6
+ * bunx @panomc/theme-core new my-theme --local file: links into a local theme-core
7
7
  * checkout (this workspace)
8
8
  *
9
9
  * The result runs immediately and looks like vanilla; the author's job starts
@@ -26,7 +26,7 @@ const name = args.find((a) => !a.startsWith("-"));
26
26
  const local = args.includes("--local") || corePkg.version === "0.0.0-development";
27
27
 
28
28
  if (!name || !/^[a-z][a-z0-9-]*$/.test(name)) {
29
- console.error("usage: theme-core new <kebab-case-name> [--local]");
29
+ console.error("usage: bunx @panomc/theme-core new <kebab-case-name> [--local]");
30
30
  process.exit(1);
31
31
  }
32
32
 
@@ -46,7 +46,7 @@ const title = name
46
46
  // Local mode links straight into the workspace checkout so the scaffold works
47
47
  // before the packages exist on npm; published mode uses semver ranges.
48
48
  let coreDep = `^${corePkg.version}`;
49
- let sdkDep = "*";
49
+ let sdkDep = `^${corePkg.version}`;
50
50
  if (local) {
51
51
  const sdkDir = dirname(require.resolve("@panomc/sdk/package.json"));
52
52
  coreDep = `file:${corePkgDir}`;
@@ -107,7 +107,7 @@ const FILES = {
107
107
  *
108
108
  * Tier 1: edit src/styles/tokens.scss and ship — this file stays empty.
109
109
  * Tier 2: eject a view, register it here:
110
- * bunx theme-core eject-view LoginView
110
+ * bunx @panomc/theme-core eject-view LoginView
111
111
  * Extra settings your views edit are declared in settingsSchema (see the
112
112
  * theme-core author guide).
113
113
  */
@@ -255,7 +255,7 @@ bun run build && bun run package
255
255
  \`\`\`
256
256
 
257
257
  - Tier 1: edit \`src/styles/tokens.scss\`.
258
- - Tier 2: \`bunx theme-core eject-view <ViewName>\` (see \`theme-core list-views\`).
258
+ - Tier 2: \`bunx @panomc/theme-core eject-view <ViewName>\` (see \`theme-core list-views\`).
259
259
  `,
260
260
  };
261
261
 
@@ -277,5 +277,5 @@ Next steps:
277
277
 
278
278
  Make it yours:
279
279
  src/styles/tokens.scss colors / fonts / radius (Tier 1)
280
- bunx theme-core list-views what you can override
281
- bunx theme-core eject-view HomeView own a page's markup (Tier 2)`);
280
+ bunx @panomc/theme-core list-views what you can override
281
+ bunx @panomc/theme-core eject-view HomeView own a page's markup (Tier 2)`);
package/bin/theme-core.js CHANGED
@@ -2,16 +2,15 @@
2
2
  /**
3
3
  * theme-core CLI — the theme author's single entry point.
4
4
  *
5
- * bunx theme-core sync regenerate route shims + host-provides stubs
6
- * bunx theme-core eject-view <ViewName>
5
+ * bunx @panomc/theme-core sync regenerate route shims + host-provides stubs
6
+ * bunx @panomc/theme-core eject-view <ViewName>
7
7
  * copy a core default view into src/views/ and
8
8
  * register it in theme.config.js
9
- * bunx theme-core check contract lint (view registry, svelte pin,
9
+ * bunx @panomc/theme-core check contract lint (view registry, svelte pin,
10
10
  * settings keys, mandatory slots)
11
- * bunx theme-core package reproducible zip of build/ (the zip sha256
11
+ * bunx @panomc/theme-core package reproducible zip of build/ (the zip sha256
12
12
  * is the premium license identity)
13
13
  *
14
- * Scaffolding a NEW theme lives in `bunx @panomc/create-pano-theme` (P4).
15
14
  */
16
15
  import { spawnSync } from "node:child_process";
17
16
  import { existsSync, readFileSync, writeFileSync, copyFileSync, mkdirSync } from "node:fs";
@@ -49,7 +48,7 @@ switch (cmd) {
49
48
  `\nRegistry components (chrome + plugin-facing):\n ${contract.registry_components.join(", ")}`,
50
49
  );
51
50
  console.log(
52
- "\nEject one with: bunx theme-core eject-view <ViewName>\n(the file's header documents every prop in detail)",
51
+ "\nEject one with: bunx @panomc/theme-core eject-view <ViewName>\n(the file's header documents every prop in detail)",
53
52
  );
54
53
  break;
55
54
  }
@@ -62,7 +61,7 @@ switch (cmd) {
62
61
  case "eject-view": {
63
62
  const name = args[0];
64
63
  if (!name || !/^[A-Z][A-Za-z0-9]*View$/.test(name)) {
65
- console.error("usage: theme-core eject-view <ViewName> (e.g. LoginView)");
64
+ console.error("usage: bunx @panomc/theme-core eject-view <ViewName> (e.g. LoginView)");
66
65
  process.exit(1);
67
66
  }
68
67
  const source = join(binDir, "..", "src", "lib", "views", `${name}.svelte`);
@@ -98,6 +97,6 @@ switch (cmd) {
98
97
  break;
99
98
  }
100
99
  default:
101
- console.error("usage: theme-core <new|sync|check|list-views|eject-view|package>");
100
+ console.error("usage: bunx @panomc/theme-core <new|sync|check|list-views|eject-view|package>");
102
101
  process.exit(1);
103
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panomc/theme-core",
3
- "version": "1.0.0-dev.39",
3
+ "version": "1.0.0-dev.41",
4
4
  "description": "The Pano theme engine: hooks factories, plugin engine, headless page controllers, default views and the theme CLI. Themes depend on this package instead of forking vanilla-theme.",
5
5
  "author": "PanoMC",
6
6
  "license": "MIT",
@@ -30,10 +30,10 @@ Array.prototype.remove = function(index) {
30
30
  };
31
31
 
32
32
  /**
33
- * Panel ile aynı: satırda kısa süre "okunmamış" vurgusu, 3 sn sonra yerelde READ (API ayrı).
33
+ * Same as the panel: a brief "unread" highlight on the row, then locally marked READ after 3s (API is separate).
34
34
  * @param {import('svelte/store').Writable} notificationsStore
35
35
  * @param {unknown[] | null | undefined} sourceList
36
- * @param {number | null} limit - ilk N (panel load: 5); `null` = tüm liste (WS yenilemesi)
36
+ * @param {number | null} limit - first N (panel load: 5); `null` = full list (WS refresh)
37
37
  */
38
38
  export function scheduleMarkReadVisualEffects(notificationsStore, sourceList, limit) {
39
39
  if (!browser || !sourceList?.length) {
@@ -54,7 +54,7 @@
54
54
  {/if}
55
55
 
56
56
 
57
- <!-- Kapak görseli + gradient + başlık + footer -->
57
+ <!-- Cover image + gradient + title + footer -->
58
58
  {#if (typeof themeSettings.postCoverImageEnabled === "undefined" ? true : themeSettings.postCoverImageEnabled) && data.post.thumbnailUrl}
59
59
  <div class="post-detail-cover rounded shadow-sm">
60
60
  <div class="ratio ratio-16x9">
@@ -66,9 +66,9 @@
66
66
  title={data.post.title} />
67
67
  </div>
68
68
 
69
- <!-- Başlık + footer -->
69
+ <!-- Title + footer -->
70
70
  <div class="post-detail-cover__overlay rounded">
71
- <!-- Footer bilgileri -->
71
+ <!-- Footer info -->
72
72
  <div class="d-flex flex-lg-row align-items-end justify-content-between">
73
73
  <div
74
74
  class="col-lg-3 d-flex align-items-end justify-content-start h-100">
@@ -52,7 +52,7 @@
52
52
  </div>
53
53
  {/if}
54
54
 
55
- <!-- Kapak görseli + gradient + footer -->
55
+ <!-- Cover image + gradient + footer -->
56
56
  {#if (typeof themeSettings.postCoverImageEnabled === "undefined" ? true : themeSettings.postCoverImageEnabled) && post.thumbnailUrl}
57
57
  <div class="post-detail-cover rounded shadow-sm">
58
58
  <div class="ratio ratio-16x9">
@@ -64,7 +64,7 @@
64
64
  title={post.title} />
65
65
  </div>
66
66
 
67
- <!-- Footer bilgileri -->
67
+ <!-- Footer info -->
68
68
  <div class="post-detail-cover__overlay rounded">
69
69
  <div class="d-flex flex-lg-row align-items-end justify-content-between">
70
70
  <div
@@ -40,7 +40,7 @@
40
40
  Override from a theme:
41
41
  theme.config.js → views: { ThemeSettingsView: () => import("./src/views/ThemeSettingsView.svelte") }
42
42
  -->
43
- <!-- Tema ayarları -->
43
+ <!-- Theme settings -->
44
44
  <div class="card">
45
45
  <div class="card-header">
46
46
  <ul