ezship 0.1.17 → 0.1.18

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/commands.d.mts CHANGED
@@ -442,6 +442,7 @@ export {
442
442
  ATTACHMENT_TYPES,
443
443
  attachmentContentType,
444
444
  DOCUMENT_BASE_PATH,
445
+ FIRST_SCREEN_EVENT,
445
446
  FUNCTION_BASE_PATH,
446
447
  LIVE_STREAM_PATH,
447
448
  LIVE_VERSIONS_PATH,
package/commands.mjs CHANGED
@@ -37,6 +37,7 @@ export {
37
37
  ATTACHMENT_TYPES,
38
38
  attachmentContentType,
39
39
  DOCUMENT_BASE_PATH,
40
+ FIRST_SCREEN_EVENT,
40
41
  FUNCTION_BASE_PATH,
41
42
  LIVE_STREAM_PATH,
42
43
  LIVE_VERSIONS_PATH,
@@ -1329,9 +1330,9 @@ a.card:hover { background: var(--hover); border-color: var(--line-strong); }
1329
1330
  .tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
1330
1331
  .tabs .tab { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; }
1331
1332
  .tabs .tab:hover { color: var(--text); }
1332
- .tabs .tab[aria-current] { color: var(--text); border-bottom-color: var(--primary); }
1333
+ .tabs .tab:is(button[aria-current], [aria-current="page"]) { color: var(--text); border-bottom-color: var(--primary); }
1333
1334
  .tabs .count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.75rem; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
1334
- .tabs .tab[aria-current] .count { background: var(--primary-soft); color: var(--primary); }
1335
+ .tabs .tab:is(button[aria-current], [aria-current="page"]) .count { background: var(--primary-soft); color: var(--primary); }
1335
1336
 
1336
1337
  /* ---- FilterChips ---- */
1337
1338
  .chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@@ -2165,8 +2166,9 @@ export default function StateBadge({
2165
2166
  "components/Tabs.tsx": `import { Link } from "@ezship/react";
2166
2167
 
2167
2168
  /**
2168
- * A row of tabs. A tab with \`to\` is a link to that route and is current when the route is; the others are
2169
- * buttons, current when their \`value\` is \`value\`, and call \`onChange\`. \`count\` draws a number beside it.
2169
+ * A row of tabs. A tab with \`to\` is a link, current on exactly its route and query (\`/?status=open\`; \`/\` is
2170
+ * the unfiltered one); the others are buttons, current when their \`value\` is \`value\`, and call \`onChange\`.
2171
+ * \`count\` draws a number beside it.
2170
2172
  */
2171
2173
  export default function Tabs({
2172
2174
  tabs,
@@ -3571,7 +3573,7 @@ export const CHECK_RULES = Object.freeze(
3571
3573
  "table-cast",
3572
3574
  "warning",
3573
3575
  'a cast in a Table argument (name as "orders") or to Query, Insert, Update, Where or Row (docs/adr/0222)',
3574
- "a Table named at run time: db.table(name) or useLive.table(name, query); otherwise a literal name and no cast",
3576
+ "a Table or History named at run time: db.table(name) or useLive.table(name, query); otherwise a literal name and no cast",
3575
3577
  ],
3576
3578
  [
3577
3579
  "query-sentinel",
@@ -4937,6 +4939,8 @@ Routes: the page file name is the route. index.tsx is /, orders.tsx is /orders,
4937
4939
  /orders/:id (useParams().id), orders.new.tsx is /orders/new. <Link to="/orders/42">, <Link to="/orders"
4938
4940
  site="kitchen"> (another Site of the Instance), useNavigate()(path), useSites() -> [{ id, name, url, current }].
4939
4941
  A Link to the open route has aria-current="page", to its section aria-current="true": style a[aria-current].
4942
+ A Link whose to names a query (/orders?state=open) is "page" only while the route's query has those values,
4943
+ so link tabs tell views of one route apart; /orders is then "true".
4940
4944
  Styling: className and the Site's style.css, which loads after the Theme (global/style.css). The Theme owns
4941
4945
  the look of every Site, with its tokens:
4942
4946
  ${THEME_TOKENS}
@@ -5204,7 +5208,7 @@ ${snippet("chart")}
5204
5208
  db.insert("orders", { customer, status: "new" }); db.update("orders", id, { status: "ready" }); db.delete("orders", id)
5205
5209
  db.update("orders", id, { status: "paid" }, { why: "Invoice paid by card" }) -> the reason lands in that write's History row
5206
5210
  db.settings("company_settings") -> a SINGLETON Table's row or null
5207
- db.table(name) / useLive.table(name, query | null) / useLive.tableCount(name, query) -> a Table named at run time (no casts)
5211
+ db.table(name) / useLive.table(name, query | null) / useLive.tableCount(name, query) -> a Table or a History (\`\${table}_history\`) named at run time (no casts)
5208
5212
  db.upload("expenses", "receipt", file) -> a FileId for a FILE column (file from <input type="file">); then insert or update with it
5209
5213
  attachment(id) -> that file's URL for <img>, <video> or a download link
5210
5214
  useLive("actors", { where: { id: { in: actorIds } } }) -> { id, kind, name, email }[]: current names for History actor ids
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezship",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "ez, the ezship command line. The same files as @ezship/cli.",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
package/paths.d.mts CHANGED
@@ -11,6 +11,8 @@ export const ACCESS_RULES_PATH: "/_ez/access";
11
11
  /** The active scope's values for the Framework's switcher (docs/adr/0225). */
12
12
  export const SCOPE_PATH: "/_ez/scope";
13
13
  export const VERSIONS_HEADER: "ez-versions";
14
+ /** A Preview page's first screen is complete (docs/adr/0212): the app host's swap shows it then. */
15
+ export const FIRST_SCREEN_EVENT: "ez:first-screen";
14
16
  /** Session State (docs/adr/0214): the page's path and the viewer's own counter in the live version map. */
15
17
  export const SESSION_PATH: "/_ez/session";
16
18
  export const SESSION_VERSION_KEY: "~session";
package/paths.mjs CHANGED
@@ -37,6 +37,14 @@ export const SCOPE_PATH = "/_ez/scope";
37
37
  */
38
38
  export const VERSIONS_HEADER = "ez-versions";
39
39
 
40
+ /**
41
+ * The window event a Preview page's Framework dispatches once, when its first screen is complete (docs/adr/0212):
42
+ * the Shell and the page have committed and no request of the Framework's has been in flight for a moment. The
43
+ * app host's swap holds the last build's screen over the page until it.
44
+ * @type {typeof import("./paths.d.mts").FIRST_SCREEN_EVENT}
45
+ */
46
+ export const FIRST_SCREEN_EVENT = "ez:first-screen";
47
+
40
48
  /** Where a page reads (GET) and writes (PUT `/<key>`) its viewer's Session State, under the Site's prefix. */
41
49
  export const SESSION_PATH = "/_ez/session";
42
50
  /** The viewer's own counter in the live version map (docs/adr/0220); no Table can have this name. */