@p11-core/cli 0.0.11 → 0.0.12

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.
@@ -76,7 +76,7 @@ Supported languages include TypeScript, JavaScript, Python, Rust, HTML/XML, CSS,
76
76
 
77
77
  ## Validation
78
78
 
79
- `p11 share` validates the document before build and upload.
79
+ Before sharing, `p11 share` validates the document.
80
80
 
81
81
  Do not import or render app/control components such as:
82
82
 
package/docs/index.md CHANGED
@@ -14,7 +14,7 @@ p11 comments <readUrl|editUrl|readId|editId>
14
14
  p11 delete <editUrl|editId>
15
15
  ```
16
16
 
17
- Add `--json` when scripting or when exact structured fields are needed.
17
+ For `share`, `history`, `comments`, and `delete`, add `--json` when scripting or when exact structured fields are needed.
18
18
 
19
19
  ## Docs Topics
20
20
 
package/docs/sharing.md CHANGED
@@ -35,6 +35,6 @@ p11 delete <editUrl|editId>
35
35
  Add `--json` when scripting or when exact structured fields are needed.
36
36
 
37
37
  `P11_API_URL` overrides the default API URL. `--api-url <url>` can override it per command.
38
- Temporary share builds are created under the OS temp directory by default. Use `P11_BUILD_DIR` or `--build-dir <dir>` only when you need to inspect or redirect the transient build workspace.
38
+ Use `P11_BUILD_DIR` or `--build-dir <dir>` only when you need a custom working directory while sharing.
39
39
 
40
40
  Edit URLs are bearer credentials for updating or deleting a document. Keep them private.
@@ -26,7 +26,7 @@ import {
26
26
  } from "@p11-core/components";
27
27
 
28
28
  const figureSrc =
29
- "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 240'%3E%3Crect width='720' height='240' fill='%23f8fafc'/%3E%3Cpath d='M80 172h560' stroke='%23d4d4d8' stroke-width='2'/%3E%3Ccircle cx='160' cy='132' r='42' fill='%2318181b'/%3E%3Crect x='260' y='92' width='120' height='80' rx='8' fill='%2352525b'/%3E%3Cpath d='M460 172 540 72l80 100z' fill='%2371717a'/%3E%3Ctext x='80' y='52' font-family='Inter, Arial' font-size='28' font-weight='700' fill='%2318181b'%3Ep11 document figure%3C/text%3E%3C/svg%3E";
29
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 240'%3E%3Crect width='720' height='240' fill='%23f8fafc'/%3E%3Cpath d='M80 172h560' stroke='%23d4d4d8' stroke-width='2'/%3E%3Ccircle cx='160' cy='132' r='42' fill='%2318181b'/%3E%3Crect x='260' y='92' width='120' height='80' rx='8' fill='%2352525b'/%3E%3Cpath d='M460 172 540 72l80 100z' fill='%2371717a'/%3E%3Ctext x='80' y='52' font-family='Inter, Arial' font-size='28' font-weight='700' fill='%2318181b'%3ESample document figure%3C/text%3E%3C/svg%3E";
30
30
 
31
31
  export default function All() {
32
32
  return (
@@ -35,26 +35,25 @@ export default function All() {
35
35
  <Section>
36
36
  <Heading level={1}>All Components Showcase</Heading>
37
37
  <Text>
38
- This example replaces the original decision brief with a compact
39
- tour of every document-safe component exported by{" "}
40
- <code>@p11-core/components</code>. It also includes safe inline markup
41
- such as <strong>strong text</strong>, <em>emphasis</em>,{" "}
38
+ This example is a compact tour of every available document
39
+ component. It also includes common inline markup such as{" "}
40
+ <strong>strong text</strong>, <em>emphasis</em>,{" "}
42
41
  <code>inline code</code>,{" "}
43
42
  <Strikethrough>obsolete wording</Strikethrough>, and a{" "}
44
- <a href="https://example.com">print-safe link</a>.
43
+ <a href="https://example.com">sample link</a>.
45
44
  </Text>
46
45
  <Quote>
47
- The page is intentionally broad: authors can use it to inspect
48
- screen layout, print pagination, source-line anchors, tables,
49
- figures, and syntax highlighting in one shared document.
46
+ The page is intentionally broad: authors can inspect text hierarchy,
47
+ lists, tables, figures, page breaks, and syntax highlighting in one
48
+ sample document.
50
49
  </Quote>
51
50
  </Section>
52
51
 
53
52
  <Section>
54
53
  <Heading>1. Text Hierarchy</Heading>
55
54
  <Text>
56
- The heading component supports levels one through six while keeping
57
- the document printable and commentable.
55
+ The heading component supports levels one through six for clear
56
+ document structure.
58
57
  </Text>
59
58
  <Heading level={2}>Level Two Heading</Heading>
60
59
  <Text>
@@ -73,21 +72,21 @@ export default function All() {
73
72
  <Section>
74
73
  <Heading>2. Lists</Heading>
75
74
  <Text>
76
- Unordered lists work for parallel facts and short capabilities.
75
+ Unordered lists work for parallel facts and concise observations.
77
76
  </Text>
78
77
  <List>
79
- <ListItem>Share static React-authored documents.</ListItem>
80
- <ListItem>Allow anonymous comments on text selections.</ListItem>
78
+ <ListItem>Summarize goals and outcomes.</ListItem>
79
+ <ListItem>Group related facts into scannable entries.</ListItem>
81
80
  <ListItem>
82
- Export comments with source file and line anchors.
81
+ Keep supporting details close to the relevant topic.
83
82
  </ListItem>
84
83
  </List>
85
84
  <Text>Ordered lists work for procedural steps.</Text>
86
85
  <List ordered>
87
- <ListItem>Author a document file.</ListItem>
88
- <ListItem>Share it with the CLI.</ListItem>
86
+ <ListItem>Draft the initial material.</ListItem>
87
+ <ListItem>Review the structure and supporting evidence.</ListItem>
89
88
  <ListItem>
90
- Review the screen view and browser print output.
89
+ Prepare the final version for its audience.
91
90
  </ListItem>
92
91
  </List>
93
92
  </Section>
@@ -102,12 +101,12 @@ export default function All() {
102
101
  <DefinitionList>
103
102
  <DefinitionTerm>Page</DefinitionTerm>
104
103
  <DefinitionDescription>
105
- A printable document surface with fixed letter-sized dimensions.
104
+ A bounded document surface used to organize related sections.
106
105
  </DefinitionDescription>
107
- <DefinitionTerm>Comment anchor</DefinitionTerm>
106
+ <DefinitionTerm>Margin note</DefinitionTerm>
108
107
  <DefinitionDescription>
109
- Source metadata attached to document text so reviewer feedback can
110
- point back to authored content.
108
+ A short observation that adds context without interrupting the
109
+ main flow.
111
110
  </DefinitionDescription>
112
111
  </DefinitionList>
113
112
  </Section>
@@ -118,27 +117,27 @@ export default function All() {
118
117
  <TableHeader>
119
118
  <TableRow>
120
119
  <TableHead>Component</TableHead>
121
- <TableHead>Rendered Tag</TableHead>
120
+ <TableHead>Example Use</TableHead>
122
121
  <TableHead>Purpose</TableHead>
123
122
  </TableRow>
124
123
  </TableHeader>
125
124
  <TableBody>
126
125
  <TableRow>
127
126
  <TableCell>TableHeader</TableCell>
128
- <TableCell>thead</TableCell>
127
+ <TableCell>Column labels</TableCell>
129
128
  <TableCell>
130
- Groups the header rows for print-safe tables.
129
+ Groups the header rows for structured data.
131
130
  </TableCell>
132
131
  </TableRow>
133
132
  <TableRow>
134
133
  <TableCell>TableBody</TableCell>
135
- <TableCell>tbody</TableCell>
134
+ <TableCell>Table content</TableCell>
136
135
  <TableCell>Groups the body rows and cells.</TableCell>
137
136
  </TableRow>
138
137
  <TableRow>
139
138
  <TableCell>TableHead and TableCell</TableCell>
140
- <TableCell>th and td</TableCell>
141
- <TableCell>Provide commentable table content.</TableCell>
139
+ <TableCell>Labels and values</TableCell>
140
+ <TableCell>Present comparable table content.</TableCell>
142
141
  </TableRow>
143
142
  </TableBody>
144
143
  </Table>
@@ -149,11 +148,11 @@ export default function All() {
149
148
  <Figure>
150
149
  <img
151
150
  src={figureSrc}
152
- alt="Abstract p11 document figure with simple geometric marks"
151
+ alt="Abstract sample document figure with simple geometric marks"
153
152
  />
154
153
  <Caption>
155
- Figure 1. Figure and Caption components keep visual evidence with
156
- its explanatory text.
154
+ Figure 1. Figure and Caption components keep visual material with
155
+ its explanation.
157
156
  </Caption>
158
157
  </Figure>
159
158
  </Section>
@@ -166,18 +165,18 @@ export default function All() {
166
165
  <Heading>6. TypeScript</Heading>
167
166
  <CodeBlock language="typescript">
168
167
  {code`
169
- type ShareOptions = {
170
- input: string;
171
- comments?: boolean;
168
+ type BriefOptions = {
169
+ title: string;
170
+ includeSummary?: boolean;
172
171
  };
173
172
 
174
- export async function share(options: ShareOptions) {
175
- const response = await fetch("/api/pages", {
173
+ export async function createBrief(options: BriefOptions) {
174
+ const response = await fetch("/api/briefs", {
176
175
  method: "POST",
177
176
  body: JSON.stringify(options)
178
177
  });
179
178
 
180
- return response.json() as Promise<{ docId: string; readUrl: string; editUrl: string; version: number }>;
179
+ return response.json() as Promise<{ id: string; title: string; updatedAt: string }>;
181
180
  }
182
181
  `}
183
182
  </CodeBlock>
@@ -187,11 +186,11 @@ export default function All() {
187
186
  <Heading>7. JavaScript</Heading>
188
187
  <CodeBlock language="javascript">
189
188
  {code`
190
- const pages = new Map();
189
+ const notes = new Map();
191
190
 
192
- export function rememberPage(page) {
193
- pages.set(page.id, {
194
- ...page,
191
+ export function rememberNote(note) {
192
+ notes.set(note.id, {
193
+ ...note,
195
194
  updatedAt: new Date().toISOString()
196
195
  });
197
196
  }
@@ -206,12 +205,12 @@ export default function All() {
206
205
  from dataclasses import dataclass
207
206
 
208
207
  @dataclass
209
- class Comment:
210
- author: str
211
- body: str
208
+ class Task:
209
+ owner: str
210
+ title: str
212
211
 
213
- def preview(comment: Comment) -> str:
214
- return f"{comment.author}: {comment.body[:48]}"
212
+ def preview(task: Task) -> str:
213
+ return f"{task.owner}: {task.title[:48]}"
215
214
  `}
216
215
  </CodeBlock>
217
216
  </Section>
@@ -221,13 +220,13 @@ export default function All() {
221
220
  <CodeBlock language="rust">
222
221
  {code`
223
222
  #[derive(Debug)]
224
- struct Page<'a> {
223
+ struct Milestone<'a> {
225
224
  id: &'a str,
226
- comments_enabled: bool,
225
+ complete: bool,
227
226
  }
228
227
 
229
- fn describe(page: &Page) -> String {
230
- format!("{} comments={}", page.id, page.comments_enabled)
228
+ fn describe(milestone: &Milestone) -> String {
229
+ format!("{} complete={}", milestone.id, milestone.complete)
231
230
  }
232
231
  `}
233
232
  </CodeBlock>
@@ -237,9 +236,9 @@ export default function All() {
237
236
  <Heading>10. HTML And XML</Heading>
238
237
  <CodeBlock language="html">
239
238
  {code`
240
- <article class="p11-page">
239
+ <article class="sample-page">
241
240
  <h1>All Components Showcase</h1>
242
- <p data-p11-block>Reviewers can comment on document text.</p>
241
+ <p>Each section demonstrates a different document pattern.</p>
243
242
  </article>
244
243
  `}
245
244
  </CodeBlock>
@@ -253,13 +252,13 @@ export default function All() {
253
252
  <Heading>11. CSS</Heading>
254
253
  <CodeBlock language="css">
255
254
  {code`
256
- .p11-page {
255
+ .sample-page {
257
256
  color: #27272a;
258
- font-family: var(--p11-font-body);
257
+ font-family: ui-serif, Georgia, serif;
259
258
  line-height: 1.62;
260
259
  }
261
260
 
262
- .p11-code-block code.hljs {
261
+ .sample-code-block code {
263
262
  background: transparent;
264
263
  }
265
264
  `}
@@ -271,9 +270,8 @@ export default function All() {
271
270
  <CodeBlock language="json">
272
271
  {code`
273
272
  {
274
- "docId": "all",
273
+ "title": "All Components Showcase",
275
274
  "version": 2,
276
- "comments": true,
277
275
  "languages": ["typescript", "javascript", "python", "rust", "html", "css", "json", "yaml", "bash"]
278
276
  }
279
277
  `}
@@ -285,10 +283,8 @@ export default function All() {
285
283
  <CodeBlock language="yaml">
286
284
  {code`
287
285
  document:
288
- id: all
286
+ title: All Components Showcase
289
287
  version: 2
290
- comments: true
291
- retentionDays: 7
292
288
  languages:
293
289
  - typescript
294
290
  - javascript
@@ -307,8 +303,8 @@ export default function All() {
307
303
  <Heading>14. Bash</Heading>
308
304
  <CodeBlock language="bash">
309
305
  {code`
310
- p11 share ./all.tsx
311
- p11 comments <readUrl> --version 1
306
+ mkdir -p notes
307
+ printf "Summary ready\n" > notes/summary.txt
312
308
  `}
313
309
  </CodeBlock>
314
310
  </Section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@p11-core/cli",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "bin": {