owndesign 0.1.8 → 0.1.9

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
@@ -15,7 +15,7 @@ async function main(argv) {
15
15
  return;
16
16
  }
17
17
  if (options === "version") {
18
- console.log("0.1.8");
18
+ console.log("0.1.9");
19
19
  return;
20
20
  }
21
21
  const cliRoot = path.dirname(fileURLToPath(import.meta.url));
@@ -57383,25 +57383,15 @@ function buildToolWorkflowPrompt() {
57383
57383
  "Choose tools by intent:",
57384
57384
  "- Use `createHtml` only to create a missing `index.html` file.",
57385
57385
  "- Use `edit` for small, focused replacements in one existing file.",
57386
- "- Use `patch` for coordinated changes, repeated replacements, or multi-file edits.",
57387
- "- Use `write` only for deliberate full-file replacement or non-preview support files.",
57386
+ "- Use `patch` for coordinated changes or repeated replacements.",
57387
+ "- Use `write` only for deliberate full-file replacement of `index.html`.",
57388
57388
  "- Do not use `write` to create the initial `index.html`; use `createHtml` first.",
57389
57389
  "- Use `copyFile` only when the current user message explicitly asks you to duplicate an existing file.",
57390
57390
  "- Use `delete` only after confirming the file is not referenced.",
57391
57391
  "",
57392
- "For Single HTML creation:",
57393
- '- Call `createHtml({ path: "index.html" })` when `index.html` is missing.',
57394
- "- After `createHtml`, read `index.html`.",
57395
- "- Replace the default placeholder markup, CSS, and script with a complete designed prototype.",
57396
- "",
57397
- "For Single HTML updates:",
57398
- "- If `index.html` exists, read it before editing and do not call `createHtml`.",
57399
- "- Keep visible page structure, styling, and local interactions in `index.html`.",
57400
- "- Use internal views for multi-screen workflows instead of additional HTML files.",
57401
- "",
57402
- "After page changes:",
57403
- "- Use `previewRefresh` when the current preview page changed and should reload.",
57404
- "- Call exactly one `previewRefresh` after successful previewable changes.",
57392
+ "Single HTML create vs update flow:",
57393
+ '- When `index.html` is missing, call `createHtml({ path: "index.html" })`, then read it and replace the default placeholder markup, CSS, and script with a complete designed prototype.',
57394
+ "- When `index.html` exists, read it before editing and do not call `createHtml`.",
57405
57395
  "",
57406
57396
  "Recover from tool failures:",
57407
57397
  "- If an edit fails, read the file again and retry with a smaller edit or patch.",
@@ -19,7 +19,7 @@ Before editing, make the design decision first:
19
19
  1. Identify the interface purpose, target user, primary task, and product tone.
20
20
  2. Choose one clear visual direction that fits the domain and makes the page memorable.
21
21
  3. Plan the first viewport, key workflow, primary actions, supporting content, and interaction states.
22
- 4. Plan the mobile structure as a real responsive layout, not as a device mockup.
22
+ 4. When the product needs mobile support, plan the mobile structure as a real responsive layout, not as a device mockup.
23
23
  5. Then implement the design in `index.html`.
24
24
 
25
25
  Prefer finishing the visible page over maintaining abstractions. One coherent single file is the intended architecture.
@@ -42,7 +42,7 @@ Every rendered `index.html` should feel like a complete product-quality prototyp
42
42
  - Use CSS variables or clear repeated values for the page's color, spacing, radius, shadow, and motion system.
43
43
  - Build realistic labels, concise content, minimal mock data, and useful interface states. Avoid lorem ipsum, vague placeholder copy, and empty marketing filler.
44
44
  - Make common workflows visible and understandable, including relevant hover, focus, active, selected, empty, loading, or error states.
45
- - Design responsive layouts for desktop and mobile; mobile should reorganize navigation, actions, and dense content instead of only shrinking columns.
45
+ - Adapt to mobile when the interface calls for it (for example consumer-facing or touch-first products); when you do, reorganize navigation, actions, and dense content for small screens instead of only shrinking columns. Desktop-only tools do not need a mobile layout.
46
46
  - For mobile interfaces, design the real app/page layout only. Do not add simulated system status bars, notches, home indicators, phone frames, device chrome, browser chrome, or screenshot containers unless the user explicitly asks for a device mockup or app-store-style screenshot.
47
47
  - Keep text readable and prevent overflow, clipping, and accidental overlap.
48
48
  - Prefer polished, domain-specific UI over generic sections.
@@ -95,15 +95,19 @@ Forms may validate required fields, show error/success states, and update local
95
95
 
96
96
  ## Resource Rules
97
97
 
98
- The default `index.html` template already configures the Inter and Noto Sans SC web fonts on the `html` element. Unless the user explicitly asks for a different typeface, do not change `font-family`; design typography through size, weight, line-height, spacing, and hierarchy instead.
98
+ Fonts, icons, and external dependencies follow the `resource_policy` section provided with these instructions. In short: keep the configured fonts and design typography through size, weight, line-height, spacing, and hierarchy; use the configured icon set (Lucide by default) rather than other icon systems or emoji; and keep external dependencies minimal and purposeful. Prefer code that works directly when `index.html` is loaded by the Preview Pane.
99
99
 
100
- Lucide icons are already configured by the default template. Use Lucide icon elements with the syntax `<i data-lucide="menu"></i>` and choose the icon name that matches the UI action. Do not use other icon systems, inline SVG icons, emoji icons, or decorative emoji as UI icons.
100
+ ## Pre-Output Checklist
101
101
 
102
- When styling Lucide icons, do not target `i`, `i[data-lucide]`, or tag selectors. Lucide replaces `<i data-lucide="..."></i>` with inline `<svg>` elements. Give the icon a semantic class or wrap it in a classed element, then style the class and its child `svg`, such as `.nav-icon svg { width: 18px; height: 18px; stroke-width: 2; }`.
102
+ Before calling `previewRefresh`, re-read the rendered `index.html` and verify every item below. If any item fails, fix it first; do not refresh on a page that fails the checklist.
103
103
 
104
- If JavaScript dynamically inserts markup that contains Lucide placeholders, call `lucide.createIcons()` after updating the DOM.
105
-
106
- Use local CSS and configured assets first. Keep external dependencies minimal and purposeful; add an extra external resource only when the user explicitly requests it or when it is necessary for the prototype quality. Prefer code that works directly when `index.html` is loaded by the Preview Pane.
104
+ - First viewport: at least one clear primary action or workflow entry point is visible without scrolling.
105
+ - Readability: body text is at least 14px and has enough contrast against its background to read comfortably; no low-contrast gray-on-gray text.
106
+ - Design tokens: every color, spacing, radius, and shadow value comes from a CSS variable or a consistent repeated value, with no one-off magic numbers.
107
+ - Icons: each Lucide icon is vertically centered with its adjacent text or control.
108
+ - No dead ends: every nav item, filter, tab, button, modal, and drawer produces a visible response; there are no placeholder sections, unfinished scripts, or controls that do nothing.
109
+ - States: interactive elements show the relevant hover, focus, active, or selected states.
110
+ - Content: labels and copy are specific to the product domain, with no lorem ipsum or vague placeholder text.
107
111
 
108
112
  ## Final Reply
109
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "owndesign",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "owndesign": "./dist/index.js"