@picloom/create-theme 0.1.1 → 0.1.2

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
@@ -1,37 +1,22 @@
1
1
  # @picloom/create-theme
2
2
 
3
- Create a standalone Vue 3 Picloom theme with Bun 1.4.3+, simulated preview,
4
- component/style HMR and ZIP packaging. No application checkout, Node/npm CLI or
5
- system `zip` is required.
6
-
7
- Create a project:
3
+ Create a standalone Picloom Vue 3 theme with Bun 1.4.3+.
8
4
 
9
5
  ```sh
10
- bun create @picloom/theme@0.1.1 ./my-theme
6
+ bun create @picloom/theme@0.1.2 ./my-theme
11
7
  cd my-theme
12
8
  bun install
13
9
  bun run dev
10
+ bun run typecheck
14
11
  bun run build
15
- bun run preview
16
12
  ```
17
13
 
18
- The target must not exist; its parent must exist. The creator copies files only;
19
- it does not install dependencies, initialize Git or publish. Both home and login
20
- pages start from the template maintained in this package.
21
- `--help` prints usage.
14
+ The target directory must not exist and its parent must exist. Follow the generated README to edit and install the ZIP. The dev server provides a simulated preview. Type checking and building are separate commands.
22
15
 
23
- To test local packages, use the `.tgz` workflow in
24
- [theme tooling](https://llleixx.github.io/picloom/development/theme-tooling.html).
25
- Maintainers run `bun run build:create-theme` before `bun pm pack --ignore-scripts`.
26
- The build copies `template/` into `dist/template/` without reading the host repository. Preview and ZIP builds are provided
27
- by `@picloom/theme-tools`; generated projects do not contain a copy of the preview host.
28
- Do not edit `dist/template/`. Use exact npm version 0.1.1.
16
+ [Theme tutorial](https://llleixx.github.io/picloom/development/theme-tooling.html)
29
17
 
30
18
  ## 中文
31
19
 
32
- 基于工具链仓库独立维护的模板创建 Vue 3 主题。提供模拟预览、热更新、生产产物预览与 ZIP 打包。
33
- 创建工具只复制文件,不覆盖已有目录、不安装依赖、不初始化 Git、不发布。
34
- 模拟预览不连接真实服务;上传、登录与权限必须在隔离测试实例安装后验证。
35
- 通过 npm 创建项目,也可按文档使用本地 `.tgz` 验证开发版本。编辑 `template/` 维护模板,构建时复制到 `dist/template/`,不依赖主仓库默认主题源码。
20
+ 使用 Bun 1.4.3+ 创建独立 Vue 3 主题。按上方命令创建工程、安装依赖、检查类型并构建。目标目录必须不存在,父目录必须存在。
36
21
 
37
- 协议类型来自 `@picloom/theme-sdk`,预览与构建调用 `@picloom/theme-tools`;生成项目不复制通用工具代码。
22
+ 开发服务器提供模拟预览。类型检查与构建分别执行;修改文件和安装 ZIP 的步骤见生成项目中的 README。
@@ -1,60 +1,50 @@
1
1
  # Picloom theme / 主题开发
2
2
 
3
- Requires Bun 1.4.3+. This project starts from Picloom's built-in default theme,
4
- uses only the public Theme SDK, and bundles its own Vue runtime.
3
+ A Vue 3 theme for Picloom home and login pages. Requires Bun 1.4.3+.
4
+
5
+ ## Develop
5
6
 
6
7
  ```sh
7
8
  bun install
8
9
  bun run dev
10
+ ```
11
+
12
+ Open `http://127.0.0.1:5173/`; use `bun run dev --port 5174` to change the port. The preview panel simulates pages, languages, appearance, login and upload states.
13
+
14
+ - `theme.json`: theme ID, version, localized text and configuration schema.
15
+ - `src/Page.vue`, `src/style.css`: pages and styles, with hot updates.
16
+ - `src/entry.ts`: mounts the theme and disposes it on unmount.
17
+ - `public/assets/`: package resources, read with `context.asset("assets/...")`.
18
+ - `dev/config.json`: created on first preview from schema defaults; edit it to try configuration values. New defaults do not replace existing values.
19
+
20
+ Keep `style.css` in the manifest's global `styles`; it contains CSS imported by the entry. Configuration and packaged resources are public.
21
+
22
+ ## Build and install
23
+
24
+ ```sh
9
25
  bun run typecheck
10
26
  bun run build
11
27
  bun run preview
12
28
  ```
13
29
 
14
- `dev` listens on http://127.0.0.1:5173; use `bun run dev --port 5174` if occupied.
15
- The collapsible preview panel switches pages, languages, appearance, identity and
16
- simulated states. Uploads and login are **simulations**, never real API calls.
17
- Do not use preview success as evidence that a storage service or authentication works.
18
-
19
- Edit `src/Page.vue`, `src/style.css` and `theme.json`. All pages use `src/entry.ts`
20
- (`entry.js` in the package). Put static package resources in `public/assets/` and
21
- resolve them with `context.asset("assets/...")`. Imported image/CSS resources are
22
- also processed by Vite. Keep `style.css` in the manifest's global `styles`: it
23
- contains all CSS imported by the source entry. Additional page-only styles belong
24
- in `public/assets/` and the corresponding page's `styles`; preview loads and
25
- unloads them when changing pages. Arbitrary files outside these inputs are not packaged.
26
-
27
- Vue components and CSS support HMR. Entry changes reload the preview. Manifest
28
- and `dev/config.json` changes reload and remount the theme. Invalid JSON shows a
29
- development error and is never overwritten. The first preview initializes a
30
- missing config from schema defaults; later edits never restore removed values.
31
- There is initially no custom config schema, so the generated config is `{}`.
32
-
33
- `preview` loads the existing `dist/package/` JavaScript and styles through the
34
- same simulated host, without theme source HMR. Build first; source edits are not
35
- visible until you rebuild. The preview toolbar itself is still a local tool.
36
-
37
- The distributable is `dist/<theme-id>-<version>.zip`. Upload it to Picloom's Themes
38
- page, confirm trust, preview and apply. Test real uploads, login and permissions
39
- there. Increase `theme.json.version` before distributing changed content; package
40
- versions are immutable on the host. The package builder checks structure and
41
- resources; full configuration/manifest validation still runs on installation.
42
-
43
- SDK and tool dependencies use exact versions after publication. During local validation, install the matching local tarballs; the current development versions are not yet published.
44
- Commit your generated `bun.lock` to your own repository after installation.
30
+ Type checking is separate. `preview` displays the existing `dist/package/` through the simulated host; rebuild to see source changes.
31
+
32
+ Install `dist/<theme-id>-<version>.zip` as Owner in Picloom's Themes page, configure, preview and apply. Check uploads and login there. Increment `theme.json.version` before installing changed content; an installed ID/version cannot be overwritten.
33
+
34
+ [Theme tutorial](https://llleixx.github.io/picloom/development/theme-tooling.html) · [Theme protocol](https://llleixx.github.io/picloom/development/themes.html)
45
35
 
46
36
  ## 中文
47
37
 
48
- - 使用 Bun 1.4.3+,无需 Node/npm CLI、主仓库或系统 `zip`。
49
- - `bun run dev` 提供模拟首页、登录页、上传状态、语言和明暗模式;只用于界面开发。
50
- - 修改 Vue 组件及样式会热更新;入口、清单和本地配置修改后刷新预览。
51
- - 首次启动时按 Schema 默认值创建 `dev/config.json`,之后清空或删除值不会自动补回。
52
- - `bun run typecheck` 单独检查类型;`bun run build` 构建并生成可安装 ZIP;`bun run preview` 检查已有构建产物。
53
- - 修改主题 ID、显示名称和版本均以 `theme.json` 为准,静态资源放入 `public/assets/`。
54
- - 入口导入的样式合并为 `style.css`,须保留清单全局样式声明;页面专属样式通过各页面的 `styles` 引用,切页时分别加载和卸载。
55
- - 主题包不包含开发面板、本地配置、凭据或源码映射。所有主题配置可能公开,不要保存密钥。
56
- - 在隔离 Picloom 测试实例安装 ZIP 后验证真实上传和登录;模拟成功不代表真实服务已验证。
57
- - SDK 和开发工具在发布后使用 npm 精确版本;当前未发布版本使用本地包验证,安装时同步更新锁文件。
58
-
59
- Local preview and ZIP builds are provided by `@picloom/theme-tools` using this theme’s Vite configuration.
60
- 本地预览和 ZIP 构建由 `@picloom/theme-tools` 统一提供,使用本主题的 Vite 配置,不复制预览宿主源码。
38
+ 使用 Bun 1.4.3+。运行 `bun install` 和 `bun run dev`,打开 `http://127.0.0.1:5173/`;可用 `--port 5174` 更换端口。面板模拟页面、语言、外观、登录与上传状态。
39
+
40
+ - `theme.json`:主题 ID、版本、多语言文案与配置 Schema。
41
+ - `src/Page.vue`、`src/style.css`:页面与样式,支持热更新。
42
+ - `src/entry.ts`:挂载主题并在卸载时清理资源。
43
+ - `public/assets/`:包内资源,通过 `context.asset("assets/...")` 读取。
44
+ - `dev/config.json`:首次预览按 Schema 默认值创建,之后手动修改;新默认值不会覆盖已有配置。
45
+
46
+ 入口导入的 CSS 合并到 `style.css`,需保留清单中的全局样式声明。主题配置与包内资源可公开访问。
47
+
48
+ 分别执行 `bun run typecheck`、`bun run build`。`bun run preview` 模拟预览已有构建产物,修改源码后需重新构建。
49
+
50
+ 以 Owner 在 Picloom 主题管理中安装 `dist/<主题ID>-<版本>.zip`,配置、预览并应用,再检查上传和登录。更新时增加 `theme.json.version`;同 ID、同版本不能覆盖。
@@ -13,7 +13,7 @@
13
13
  "preview": "bun --bun picloom-theme preview"
14
14
  },
15
15
  "devDependencies": {
16
- "@picloom/theme-sdk": "0.1.1",
16
+ "@picloom/theme-sdk": "0.1.2",
17
17
  "@tailwindcss/vite": "4.3.3",
18
18
  "@types/bun": "1.3.10",
19
19
  "@vitejs/plugin-vue": "6.0.10",
@@ -22,6 +22,6 @@
22
22
  "vite": "8.3.4",
23
23
  "vue": "3.5.44",
24
24
  "vue-tsc": "3.3.13",
25
- "@picloom/theme-tools": "0.1.0"
25
+ "@picloom/theme-tools": "0.1.1"
26
26
  }
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@picloom/create-theme",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Create a standalone Picloom Vue theme with local preview and ZIP packaging",
5
5
  "type": "module",
6
6
  "license": "MIT",