@onlyworlds/sdk 4.146.0 → 4.147.0

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/AGENTS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # For AI agents using @onlyworlds/sdk
2
2
 
3
- **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.112** (canonical 00.34.00).
3
+ **Current as of**: SDK **4.x** · schema-dist **v0.34.0-dist.113** (canonical 00.34.00).
4
4
  This line is asserted by `codegen:check` in CI — if the pin moves and this file is not
5
5
  re-read against it, the check fails rather than letting this document rot quietly.
6
6
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ earlier history lives in git log only.
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [4.147.0] - 2026-11-10
9
+
10
+ ### Added
11
+
12
+ - **`viewOf(element)` and `VIEWS`: how an element is shown by its kind**, from the distribution's new `views.json` (presentation, not the standard). `viewOf` returns the row that matches (a profile's pair with its mark, by that profile's own reader, then a type with a supertype, then a type alone; types and supertypes trimmed and folded as the room profile defines), the one sentence for a card, a list row or a hover (the first field the row names whose value is a string with something in it, trimmed, cut at its first line break, trimmed again), and the marks to show at the head of its page, in order (`known_of` and `hidden` when true, `x_served_trimmed` when it names a field, the review marks when an object with something in it, then the row's own). An element no row matches has no row and draws as its type; the banners still show. Today's rows: a report, a charter, a message and a line in a room. `VIEWS` is the table baked at this release, frozen; codegen refuses a row column this reader does not read, a pair its profile's reader does not match, a field its type lacks, an unknown layout and two rows holding one kind. The fixture's 28 cases are replayed.
13
+
14
+ ### Changed
15
+
16
+ - **Schema repinned to schema-dist v0.34.0-dist.113** (from dist.112; same canonical 00.34.00, no schema file moved): `views.json` and `views.fixture.json` new; the room profile says its pairs' order carries no meaning (no pair moved); two examples reworded. The room and checks fixtures are replayed unchanged.
17
+ - `lensesInUse`'s notes say what a null membership means, in the lens profile's words since serial 112: there is no membership (a folder world), and then the Character's `x_lens_uses` is read. Behaviour unchanged.
18
+
8
19
  ## [4.146.0] - 2026-11-10
9
20
 
10
21
  ### Changed
package/SCHEMA.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OnlyWorlds Schema Reference
2
2
 
3
- **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.112** — canonical schema **00.34.00**, published 2026-11-10.
3
+ **Source**: https://github.com/OnlyWorlds/schema-dist @ **v0.34.0-dist.113** — canonical schema **00.34.00**, published 2026-11-10.
4
4
 
5
5
  GENERATED from the canonical schema YAML — do not hand-edit (regenerate: `python codegen/generate_types.py`).
6
6
  Written for both humans and AI agents reading this package locally.
@@ -336,6 +336,120 @@ var CHARTER_PAIRS = [
336
336
  { type: "construct", supertype: "Guide", aid: "guide" },
337
337
  { type: "construct", supertype: "Domain", aid: "domain" }
338
338
  ];
339
+ var VIEWS_TABLE = {
340
+ "version": 1,
341
+ "banners": [
342
+ {
343
+ "mark": "known_of",
344
+ "defined_by": "onlyworlds.com, not the standard: a known-of stub, known_of: true (the API document, https://www.onlyworlds.com/api/v2/openapi.json)"
345
+ },
346
+ {
347
+ "mark": "hidden",
348
+ "defined_by": "onlyworlds.com, not the standard: hidden: true, served only to readers who still see the element (the API document, https://www.onlyworlds.com/api/v2/openapi.json)"
349
+ },
350
+ {
351
+ "mark": "x_review_proposed",
352
+ "defined_by": "profiles/review.md"
353
+ },
354
+ {
355
+ "mark": "x_review_checked",
356
+ "defined_by": "profiles/review.md"
357
+ },
358
+ {
359
+ "mark": "x_served_trimmed",
360
+ "defined_by": "onlyworlds.com, not the standard: ids the server left out of a list, the field named (the API document, https://www.onlyworlds.com/api/v2/openapi.json; profiles/message.md reads it)"
361
+ }
362
+ ],
363
+ "layouts": {
364
+ "document": "the fields in the row's order: lead open, then the rest in the standard's sections, then fold; a kind with no row is a document",
365
+ "conversation": "the element within its chain by the named link, oldest first by created_at, stopping at an id already visited"
366
+ },
367
+ "rows": [
368
+ {
369
+ "id": "report",
370
+ "kind": {
371
+ "profile": "room",
372
+ "pair": "narrative/Report"
373
+ },
374
+ "from": "profiles/report.md (serial 112)",
375
+ "sentence": [
376
+ "description",
377
+ "story"
378
+ ],
379
+ "lead": [
380
+ "description",
381
+ "consequences"
382
+ ],
383
+ "fold": [
384
+ {
385
+ "field": "story",
386
+ "label": "The full report"
387
+ }
388
+ ],
389
+ "layout": {
390
+ "name": "document"
391
+ }
392
+ },
393
+ {
394
+ "id": "charter",
395
+ "kind": {
396
+ "profile": "charter",
397
+ "pair": "law/Charter"
398
+ },
399
+ "from": "profiles/charter.md",
400
+ "sentence": [
401
+ "description"
402
+ ],
403
+ "lead": [
404
+ "description"
405
+ ],
406
+ "layout": {
407
+ "name": "document"
408
+ }
409
+ },
410
+ {
411
+ "id": "message",
412
+ "kind": {
413
+ "type": "narrative",
414
+ "supertype": "Message"
415
+ },
416
+ "from": "profiles/message.md",
417
+ "sentence": [
418
+ "description",
419
+ "story"
420
+ ],
421
+ "lead": [
422
+ "story"
423
+ ],
424
+ "layout": {
425
+ "name": "conversation",
426
+ "by": "parent_narrative"
427
+ }
428
+ },
429
+ {
430
+ "id": "room-line",
431
+ "kind": {
432
+ "profile": "room",
433
+ "pair": "narrative/Message"
434
+ },
435
+ "from": "profiles/room.md, profiles/message.md",
436
+ "sentence": [
437
+ "description",
438
+ "story"
439
+ ],
440
+ "lead": [
441
+ "story"
442
+ ],
443
+ "layout": {
444
+ "name": "conversation",
445
+ "by": "parent_narrative"
446
+ },
447
+ "banner": [
448
+ "x_room_of"
449
+ ]
450
+ }
451
+ ]
452
+ };
339
453
  var REVIEW_PROPOSED_LABEL = "proposed, not yet reviewed";
340
454
  var MESSAGE_PAIR = { type: "narrative", supertype: "Message" };
341
455
  var MESSAGE_READ_MARK = {
@@ -1568,6 +1682,7 @@ export {
1568
1682
  DRAG_PAIRS,
1569
1683
  ROOM_PAIRS,
1570
1684
  CHARTER_PAIRS,
1685
+ VIEWS_TABLE,
1571
1686
  REVIEW_PROPOSED_LABEL,
1572
1687
  MESSAGE_PAIR,
1573
1688
  MESSAGE_READ_MARK,
@@ -1580,6 +1695,7 @@ export {
1580
1695
  simpleCaseFold,
1581
1696
  trimWhiteSpace,
1582
1697
  fold,
1698
+ hasMark,
1583
1699
  isRoomElement,
1584
1700
  READING_AID_KEYS,
1585
1701
  readingAidKey,
package/dist/index.d.ts CHANGED
@@ -128,6 +128,50 @@ declare const CHARTER_PAIRS: ReadonlyArray<{
128
128
  readonly supertype: string;
129
129
  readonly aid: 'charter' | 'guide' | 'domain';
130
130
  }>;
131
+ /** A row of views.json: how elements of one kind are shown. */
132
+ interface OwViewRow {
133
+ /** The row's own name, distinct in the table. */
134
+ readonly id: string;
135
+ /** What the row matches: a type, a type with a supertype, or a profile's pair (`type/Supertype`), which
136
+ * matches only with that profile's mark, by its own reader (room: isRoomElement; charter: isCharterElement). */
137
+ readonly kind: {
138
+ readonly type: string;
139
+ readonly supertype?: string;
140
+ } | {
141
+ readonly profile: string;
142
+ readonly pair: string;
143
+ };
144
+ /** The page that defines the kind. */
145
+ readonly from: string;
146
+ /** The fields that give the one sentence, the first that holds something winning. */
147
+ readonly sentence?: readonly string[];
148
+ /** The fields shown open first, in order. */
149
+ readonly lead?: readonly string[];
150
+ /** The fields shown folded, each under its label. */
151
+ readonly fold?: readonly {
152
+ readonly field: string;
153
+ readonly label: string;
154
+ }[];
155
+ /** The layout, one of the table's `layouts`; `by` the link a conversation follows. */
156
+ readonly layout: {
157
+ readonly name: string;
158
+ readonly by?: string;
159
+ };
160
+ /** Marks this kind's page shows at its head after the table's own banners. */
161
+ readonly banner?: readonly string[];
162
+ }
163
+ /** views.json without its `_meta`: the banners every page shows, the layouts, the rows. */
164
+ interface OwViewsTable {
165
+ readonly version: 1;
166
+ readonly banners: readonly {
167
+ readonly mark: string;
168
+ readonly defined_by: string;
169
+ }[];
170
+ readonly layouts: {
171
+ readonly [name: string]: string;
172
+ };
173
+ readonly rows: readonly OwViewRow[];
174
+ }
131
175
  /** The review profile's label (schema-dist `profiles/review.md`, rule 1): the words a reader that
132
176
  * hands a world on (a context for an AI, a pack, a share) puts on each proposed element it keeps,
133
177
  * one whose `x_review_proposed` is present (a doubt, rule 4, included; an empty mark is settled).
@@ -2215,10 +2259,12 @@ declare function isLens(element: object | null | undefined): boolean;
2215
2259
  */
2216
2260
  declare function isTemplate(element: object | null | undefined): boolean;
2217
2261
  /**
2218
- * The lenses a seat reads, by id: its membership's choice when it has made one (a list, an empty list
2219
- * included: a membership that chose no lenses has made a choice), otherwise its Character's
2220
- * `x_lens_uses` (a folder world has no membership). Never both: the membership wins. Strings only, each
2221
- * once, in the order given; anything that is not a list is no choice.
2262
+ * The lenses a seat reads, by id: its membership's choice (a list, an empty list included: a membership
2263
+ * that chose no lenses has made a choice), or, when `membership` is null, its Character's `x_lens_uses`.
2264
+ * Null means there is no membership, as in a folder world. A membership that exists and never chose is
2265
+ * not this reading's case: onlyworlds.com gives that seat its Titles' lenses and never reads
2266
+ * `x_lens_uses`. Never both: the membership wins. Strings only, each once, in the order given; anything
2267
+ * that is not a list is no choice.
2222
2268
  */
2223
2269
  declare function lensesInUse(membership: readonly string[] | null | undefined, xLensUses: unknown): string[];
2224
2270
  /**
@@ -6551,6 +6597,35 @@ interface OwDragField {
6551
6597
  */
6552
6598
  declare function dragField(a: string, b: string): OwDragField | null;
6553
6599
 
6600
+ /** viewOf's answer for one element. */
6601
+ interface OwView {
6602
+ /** The row that shows it, the table's own (frozen) row; null when no row matches and the element draws as its type. */
6603
+ row: OwViewRow | null;
6604
+ /** The one sentence for a card, a list row or a hover; null when there is no row or no named field holds anything. */
6605
+ sentence: string | null;
6606
+ /** The marks to show at the head of its page, in order: the table's banners the element carries, then the row's own. */
6607
+ banners: string[];
6608
+ }
6609
+ /** views.json as baked at this release, without its `_meta`, frozen throughout. Read one element's view with viewOf. */
6610
+ declare const VIEWS: OwViewsTable;
6611
+ /**
6612
+ * How an element is shown, by the views table baked at this release (`views.json`): the row that matches
6613
+ * it, its one sentence, and the marks to show at the head of its page.
6614
+ *
6615
+ * A row matches by its kind: a profile's pair only with that profile's mark, by the profile's own reader;
6616
+ * a type with a supertype; a type alone; types and supertypes trimmed and folded as the room profile
6617
+ * defines. The most specific row wins. The sentence is the first field the row names in `sentence` that
6618
+ * holds text after trimming, cut at its first line break and trimmed. Pass the element as the reader is
6619
+ * served it: the banners read what was served (a known-of stub, the hidden mark, a trimmed list).
6620
+ *
6621
+ * ```ts
6622
+ * viewOf({ type: 'narrative', supertype: 'Message', story: 'See you at the gate.\nBring the map.' });
6623
+ * // { row: <the message row>, sentence: 'See you at the gate.', banners: [] }
6624
+ * viewOf({ type: 'character', name: 'Ilse' }); // { row: null, sentence: null, banners: [] }
6625
+ * ```
6626
+ */
6627
+ declare function viewOf(element: unknown): OwView;
6628
+
6554
6629
  /**
6555
6630
  * The world file, `.owworld` (Folder Format spec §4.7; a `.zip` by another
6556
6631
  * name): one archive holding one whole world as a portable copy (§4.1), and
@@ -7622,4 +7697,4 @@ declare class TokenResource {
7622
7697
  getEncryptionInfo(): Promise<EncryptionInfo>;
7623
7698
  }
7624
7699
 
7625
- export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, type ElementFamily, type ElementGroup, type ElementType, type EncryptionInfo, type EraDomain, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, type FieldInfo, type FieldType, GROUP_COLORS, GROUP_ORDER, GameTier, type ListParams, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, type OwAccountToken, type OwAccountWorld, type OwAddress, OwAddressError, type OwAddressForm, type OwAddressReading, type OwAddressReason, type OwAddressingOptions, type OwAgentJoined, type OwAiAskAnswer, type OwAiAskBody, type OwAiMeter, type OwAiRefusal, type OwAiSortAnswer, type OwAiSortBody, type OwAiToken, type OwAiUse, type OwAllowance, OwApiError, type OwAskAnswer, type OwAskContext, type OwAskContextOptions, type OwAskLeftOut, type OwAuthErrorCode, type OwBulkItem, type OwBulkItemResult, type OwBulkResponse, type OwCalendarElement, type OwChange, type OwChangeDelete, type OwChangeUpsert, type OwChangesPage, type OwCharterWorld, type OwClientConfig, type OwCreateAccountWorldInput, type OwCreatedAccountWorld, type OwCreatedWorldLink, type OwDeleteReason, type OwDoor, type OwDragField, type OwDraught, type OwDraughtCompact, type OwDraughtComponent, type OwDraughtItem, type OwDraughtLens, type OwDraughtPolicy, type OwEdited, type OwElement, type OwElementBase, type OwElementMark, type OwErrorBody, type OwFileAddedBy, type OwFileDownload, type OwFileKind, type OwFileRow, type OwFileTicket, type OwFrontDoor, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLanding, type OwLandingCluster, type OwLandingGap, type OwLandingGapKind, type OwLandingMember, type OwLandingMode, type OwLandingOptions, type OwLayoutOf, type OwLensCutReason, type OwLensMail, type OwLensOptions, type OwLensReader, type OwLensReading, type OwLensWorld, type OwLinkEdit, type OwLookupElement, type OwLookupHit, type OwLookupLink, type OwLookupOptions, type OwLookupReason, type OwMapSpace, type OwMapSpaceMap, type OwMapSpaceOutReason, type OwMapSpaceOutline, type OwMapSpacePin, type OwMapSpacePoint, type OwMe, type OwMediaTicket, type OwMember, type OwMemberLenses, type OwMemberRole, type OwMessageMember, type OwMintedAiToken, type OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwOpenersOptions, type OwPage, type OwPaidBy, type OwPhotoOptions, type OwPhotoPlan, type OwPlayerJoined, OwPreconditionFailedError, type OwPreparedPhoto, type OwProposal, type OwProposalAccepted, type OwProposalConflict, type OwProposalList, type OwProposalQuery, type OwProposalState, type OwProposeInput, type OwProposed, OwProposedError, type OwProposedMark, type OwProposedNewElement, type OwReadWorldFile, type OwReadWorldFileOptions, type OwReadingAids, type OwReadingAidsCharter, type OwReadingAidsDomain, type OwReadingAidsGuide, type OwReadingAidsHub, type OwRecord, type OwRecordMark, type OwRecordStory, type OwRemovalTicket, type OwRemovedImage, type OwRenderOptions, type OwResyncReason, type OwReviewInput, type OwReviewed, type OwSeat, type OwSeatCreated, type OwSender, type OwSenderStatus, type OwServedReadingAids, type OwSignInBegin, type OwSignInBegun, type OwSignInComplete, OwSignInError, type OwSignInReason, type OwSignInResult, type OwSignInStorage, type OwSignedIn, type OwSortAddToRow, type OwSortAnswer, type OwSortAskRow, type OwSortLinkRow, type OwSortMakeRow, type OwSortNote, type OwSortRef, type OwSortRow, OwStaleProposalError, type OwStrand, type OwStrandSlot, type OwStrandWorld, type OwTool, type OwToolNeeds, type OwToolOpen, type OwTrailGround, type OwTrailHanger, type OwTrailInput, type OwTrailLayout, type OwTrailPin, type OwTrailPlace, type OwTrailSettings, type OwTrailSpiral, type OwTrailTier, type OwUploadedFile, type OwUploadedImage, OwV2Client, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, type OwWorldKeyMember, type OwWorldKeyRow, type OwWorldLens, type OwWorldLensReading, type OwWorldLenses, type OwWorldLink, type OwWorldMeta, type OwWorldOrigin, type OwWorldProducer, type OwWorldProposalList, type OwWorldProposalQuery, type OwWorldProposalRow, type OwWorldPublicPage, type OwWorldSource, type OwWriteDoor, type OwWriteWorldFileOptions, type OwWriteWorldFileReport, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, type ParseError, type ParseOptions, type ParseResult, RECORD_FIELD, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, type RevokeAllSessionsResponse, type RevokeSessionResponse, SPATIAL_TYPES, STRAND_FIELD, type SectionInfo, type StepBreakdown, TOOLS, TRAIL_TIERS, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, type WorldCalendar, absYearForEraYear, absoluteYear, approxYearLength, base64url, breakdownStep, buildAskContext, buildWorldIndex, charterOf, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, threadOf, trailByPlace, typeWord, unreadFor, validateCalendarConfig, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
7700
+ export { AGENT_DOORS, ASK_LIMITS, type AccessKeyResponse, CALENDAR_FIELD, CALENDAR_SUPERTYPE, CHARTER_PAIRS, type CalendarConfig, type CalendarEra, type CalendarIntercalary, type CalendarMonths, type CalendarWeek, DATE_FIELD, ELEMENT_FAMILIES, ELEMENT_GROUPS, ELEMENT_ICONS, ELEMENT_LABELS, ELEMENT_SECTIONS, ELEMENT_TYPES, type ElementFamily, type ElementGroup, type ElementType, type EncryptionInfo, type EraDomain, FAMILY_COLORS, FAMILY_ORDER, FIELD_ACRONYMS, FIELD_SCHEMA, FILE_EXTENSIONS, type FieldInfo, type FieldType, GROUP_COLORS, GROUP_ORDER, GameTier, type ListParams, MESSAGE_PAIR, NOTE_PAIR, ONLYWORLDS_VERSION, type OwAccountToken, type OwAccountWorld, type OwAddress, OwAddressError, type OwAddressForm, type OwAddressReading, type OwAddressReason, type OwAddressingOptions, type OwAgentJoined, type OwAiAskAnswer, type OwAiAskBody, type OwAiMeter, type OwAiRefusal, type OwAiSortAnswer, type OwAiSortBody, type OwAiToken, type OwAiUse, type OwAllowance, OwApiError, type OwAskAnswer, type OwAskContext, type OwAskContextOptions, type OwAskLeftOut, type OwAuthErrorCode, type OwBulkItem, type OwBulkItemResult, type OwBulkResponse, type OwCalendarElement, type OwChange, type OwChangeDelete, type OwChangeUpsert, type OwChangesPage, type OwCharterWorld, type OwClientConfig, type OwCreateAccountWorldInput, type OwCreatedAccountWorld, type OwCreatedWorldLink, type OwDeleteReason, type OwDoor, type OwDragField, type OwDraught, type OwDraughtCompact, type OwDraughtComponent, type OwDraughtItem, type OwDraughtLens, type OwDraughtPolicy, type OwEdited, type OwElement, type OwElementBase, type OwElementMark, type OwErrorBody, type OwFileAddedBy, type OwFileDownload, type OwFileKind, type OwFileRow, type OwFileTicket, type OwFrontDoor, type OwGraphCutReason, type OwGraphEdge, type OwGraphMark, type OwGraphNode, type OwGraphOptions, type OwHiddenRow, type OwJoinPreview, type OwJoined, type OwJoinedMembership, type OwKeyKind, type OwLanding, type OwLandingCluster, type OwLandingGap, type OwLandingGapKind, type OwLandingMember, type OwLandingMode, type OwLandingOptions, type OwLayoutOf, type OwLensCutReason, type OwLensMail, type OwLensOptions, type OwLensReader, type OwLensReading, type OwLensWorld, type OwLinkEdit, type OwLookupElement, type OwLookupHit, type OwLookupLink, type OwLookupOptions, type OwLookupReason, type OwMapSpace, type OwMapSpaceMap, type OwMapSpaceOutReason, type OwMapSpaceOutline, type OwMapSpacePin, type OwMapSpacePoint, type OwMe, type OwMediaTicket, type OwMember, type OwMemberLenses, type OwMemberRole, type OwMessageMember, type OwMintedAiToken, type OwMintedKey, type OwMySeat, type OwNamesMap, OwNetworkError, type OwOpener, type OwOpenerKind, type OwOpenerState, type OwOpenerSurface, type OwOpenersOptions, type OwPage, type OwPaidBy, type OwPhotoOptions, type OwPhotoPlan, type OwPlayerJoined, OwPreconditionFailedError, type OwPreparedPhoto, type OwProposal, type OwProposalAccepted, type OwProposalConflict, type OwProposalList, type OwProposalQuery, type OwProposalState, type OwProposeInput, type OwProposed, OwProposedError, type OwProposedMark, type OwProposedNewElement, type OwReadWorldFile, type OwReadWorldFileOptions, type OwReadingAids, type OwReadingAidsCharter, type OwReadingAidsDomain, type OwReadingAidsGuide, type OwReadingAidsHub, type OwRecord, type OwRecordMark, type OwRecordStory, type OwRemovalTicket, type OwRemovedImage, type OwRenderOptions, type OwResyncReason, type OwReviewInput, type OwReviewed, type OwSeat, type OwSeatCreated, type OwSender, type OwSenderStatus, type OwServedReadingAids, type OwSignInBegin, type OwSignInBegun, type OwSignInComplete, OwSignInError, type OwSignInReason, type OwSignInResult, type OwSignInStorage, type OwSignedIn, type OwSortAddToRow, type OwSortAnswer, type OwSortAskRow, type OwSortLinkRow, type OwSortMakeRow, type OwSortNote, type OwSortRef, type OwSortRow, OwStaleProposalError, type OwStrand, type OwStrandSlot, type OwStrandWorld, type OwTool, type OwToolNeeds, type OwToolOpen, type OwTrailGround, type OwTrailHanger, type OwTrailInput, type OwTrailLayout, type OwTrailPin, type OwTrailPlace, type OwTrailSettings, type OwTrailSpiral, type OwTrailTier, type OwUploadedFile, type OwUploadedImage, OwV2Client, type OwView, type OwViewRow, type OwViewsTable, type OwWordPair, type OwWorldFileEntry, OwWorldFileError, type OwWorldFileReason, type OwWorldFileRow, type OwWorldFiles, type OwWorldGraph, type OwWorldIndex, type OwWorldKeyMember, type OwWorldKeyRow, type OwWorldLens, type OwWorldLensReading, type OwWorldLenses, type OwWorldLink, type OwWorldMeta, type OwWorldOrigin, type OwWorldProducer, type OwWorldProposalList, type OwWorldProposalQuery, type OwWorldProposalRow, type OwWorldPublicPage, type OwWorldSource, type OwWriteDoor, type OwWriteWorldFileOptions, type OwWriteWorldFileReport, PHOTO_MAX_BYTES, PHOTO_TYPES, PROPOSED_MARK, PUBLIC_FIELDS, type ParseError, type ParseOptions, type ParseResult, RECORD_FIELD, REVIEW_PROPOSED_LABEL, ROOM_PAIRS, type RevokeAllSessionsResponse, type RevokeSessionResponse, SPATIAL_TYPES, STRAND_FIELD, type SectionInfo, type StepBreakdown, TOOLS, TRAIL_TIERS, type TokenConsumeParams, type TokenConsumeResponse, TokenResource, type TokenStatus, type TokenTransport, VIEWS, WORLD_FILE_MAX_BYTES, WORLD_FILE_MAX_ENTRIES, WORLD_FILE_MEDIA_TYPE, type WorldCalendar, absYearForEraYear, absoluteYear, approxYearLength, base64url, breakdownStep, buildAskContext, buildWorldIndex, charterOf, dateOf, degreeOf, detectKeyKind, displayYear, domainsOf, doorWhere, doorsOf, dragField, draughtText, editedBy, elementAddress, elementColor, eraForStep, errorFromResponse, familyOf, fieldLabel, fileKindOf, floorDiv, floorMod, formatDuration, formatMidLabel, formatStep, formatYearLabel, getElementIcon, getElementLabel, groupOf, handsOnAsProposed, hasUnseenRecipients, intercalaryInYear, isAddressedTo, isAgentDoor, isCharterElement, isDemoKey, isKnownOf, isLeapYear, isLens, isMessage, isNote, isParseError, isRoomElement, isSentBy, isTemplate, isToEveryone, kindCanWrite, landingOf, layoutOf, lensesInUse, lookupWorld, mapSpace, monthStartSteps, nfc, noteOf, openersFor, outDegreeOf, parseDate, parseErrorEnvelope, parseOwLink, pinExpectation, pkceChallenge, planPhoto, preparePhoto, proposedMarkOf, readCalendarConfig, readCalendarValue, readMarkOf, readWorldFile, readingAidOf, recipientsOf, recordMarkOf, recordsOf, renderElement, resolveCalendar, resolveCalendarLens, resolveEraDomains, resolveLens, roundHalfEven, senderStatus, simpleCaseFold, strandOf, threadOf, trailByPlace, typeWord, unreadFor, validateCalendarConfig, viewOf, weekdayForStep, worldCalendars, worldGraph, writeWorldFile, yearLength, yearStartStep };
package/dist/index.js CHANGED
@@ -22,11 +22,13 @@ import {
22
22
  ROOM_PAIRS,
23
23
  SPATIAL_TYPES,
24
24
  TOOLS,
25
+ VIEWS_TABLE,
25
26
  doorWhere,
26
27
  doorsOf,
27
28
  elementAddress,
28
29
  fold,
29
30
  handsOnAsProposed,
31
+ hasMark,
30
32
  isAgentDoor,
31
33
  isCharterElement,
32
34
  isHiddenMark,
@@ -42,7 +44,7 @@ import {
42
44
  trimWhiteSpace,
43
45
  typeWord,
44
46
  unknownKey
45
- } from "./chunk-CV2C2PIW.js";
47
+ } from "./chunk-GWJ3SOZQ.js";
46
48
 
47
49
  // src/v2/keyed-id.ts
48
50
  var KEYED_IDS = "0199b6a0-6f0e-7c2a-9d1e-3b5c7a8e4f21";
@@ -4169,15 +4171,15 @@ function mapSpace(elements) {
4169
4171
  const mapRows = [];
4170
4172
  for (const mid of [...maps.keys()].sort(byId)) {
4171
4173
  const mp = maps.get(mid);
4172
- const own3 = [];
4173
- for (const o of outlines) if (o.map === mid) own3.push(...o.points);
4174
- for (const q of pins) if (q.map === mid) own3.push([q.x, q.y, q.z]);
4174
+ const own4 = [];
4175
+ for (const o of outlines) if (o.map === mid) own4.push(...o.points);
4176
+ for (const q of pins) if (q.map === mid) own4.push([q.x, q.y, q.z]);
4175
4177
  let measured = false;
4176
4178
  const slot = (key, i) => {
4177
4179
  const v = mp[key];
4178
4180
  if (whole3(v)) return v;
4179
4181
  measured = true;
4180
- return largest(own3, i);
4182
+ return largest(own4, i);
4181
4183
  };
4182
4184
  const width = slot("width", 0);
4183
4185
  const height = slot("height", 1);
@@ -4187,7 +4189,7 @@ function mapSpace(elements) {
4187
4189
  width,
4188
4190
  height,
4189
4191
  depth: whole3(mp.depth) ? mp.depth : null,
4190
- z_max: largest(own3, 2),
4192
+ z_max: largest(own4, 2),
4191
4193
  scale: typeof sc === "number" && sc > 0 ? sc : null,
4192
4194
  location: idOf2(mp.location),
4193
4195
  parent_map: idOf2(mp.parent_map)
@@ -4446,6 +4448,73 @@ function dragField(a, b) {
4446
4448
  return { on: row.on, field: row.field, holds: row.holds };
4447
4449
  }
4448
4450
 
4451
+ // src/views.ts
4452
+ function deepFreeze(value) {
4453
+ if (value !== null && typeof value === "object") {
4454
+ for (const v of Object.values(value)) deepFreeze(v);
4455
+ Object.freeze(value);
4456
+ }
4457
+ return value;
4458
+ }
4459
+ var VIEWS = /* @__PURE__ */ deepFreeze(VIEWS_TABLE);
4460
+ var own2 = (el, key) => Object.prototype.hasOwnProperty.call(el, key) ? el[key] : void 0;
4461
+ var PROFILE_READERS = {
4462
+ room: (el) => isRoomElement(el),
4463
+ charter: (el) => isCharterElement(el)
4464
+ };
4465
+ function score(row, el) {
4466
+ const type = own2(el, "type");
4467
+ if (typeof type !== "string") return 0;
4468
+ const supertype = own2(el, "supertype");
4469
+ const sameSupertype = (want) => typeof supertype === "string" && fold(supertype) === fold(want);
4470
+ const kind = row.kind;
4471
+ if ("profile" in kind) {
4472
+ const slash = kind.pair.indexOf("/");
4473
+ const reader = PROFILE_READERS[kind.profile];
4474
+ if (!reader || fold(type) !== fold(kind.pair.slice(0, slash)) || !sameSupertype(kind.pair.slice(slash + 1))) return 0;
4475
+ return reader(el) ? 3 : 0;
4476
+ }
4477
+ if (fold(type) !== fold(kind.type)) return 0;
4478
+ if (kind.supertype === void 0) return 1;
4479
+ return sameSupertype(kind.supertype) ? 2 : 0;
4480
+ }
4481
+ function carries2(el, mark) {
4482
+ const v = own2(el, mark);
4483
+ if (mark === "hidden" || mark === "known_of") return v === true;
4484
+ if (mark === "x_served_trimmed") return Array.isArray(v) && v.length > 0;
4485
+ if (mark === "x_review_proposed" || mark === "x_review_checked") {
4486
+ return v !== null && typeof v === "object" && !Array.isArray(v) && Object.keys(v).length > 0;
4487
+ }
4488
+ return hasMark(el, mark);
4489
+ }
4490
+ function viewOf(element) {
4491
+ if (element === null || typeof element !== "object" || Array.isArray(element)) return { row: null, sentence: null, banners: [] };
4492
+ const el = element;
4493
+ let row = null;
4494
+ let best = 0;
4495
+ for (const r of VIEWS.rows) {
4496
+ const s = score(r, el);
4497
+ if (s > best) {
4498
+ best = s;
4499
+ row = r;
4500
+ }
4501
+ }
4502
+ const banners = VIEWS.banners.map((b) => b.mark).filter((m) => carries2(el, m));
4503
+ if (!row) return { row: null, sentence: null, banners };
4504
+ for (const m of row.banner ?? []) if (carries2(el, m)) banners.push(m);
4505
+ let sentence = null;
4506
+ for (const f of row.sentence ?? []) {
4507
+ const v = own2(el, f);
4508
+ if (typeof v !== "string") continue;
4509
+ const text2 = trimWhiteSpace(v);
4510
+ if (text2 === "") continue;
4511
+ const cut2 = text2.search(/[\n\r]/);
4512
+ sentence = trimWhiteSpace(cut2 < 0 ? text2 : text2.slice(0, cut2));
4513
+ break;
4514
+ }
4515
+ return { row, sentence, banners };
4516
+ }
4517
+
4449
4518
  // src/world-file.ts
4450
4519
  import { Inflate, inflateSync, zipSync } from "fflate";
4451
4520
 
@@ -5392,11 +5461,11 @@ function lookupWorld(index, question, opts = {}) {
5392
5461
  const q = words(normalize(question));
5393
5462
  const qSet = new Set(q);
5394
5463
  const cand = /* @__PURE__ */ new Map();
5395
- const bump = (id, score, reason, direct) => {
5464
+ const bump = (id, score2, reason, direct) => {
5396
5465
  const c = cand.get(id) || { score: 0, direct: 0, reasons: [] };
5397
5466
  c.reasons.push(reason);
5398
- if (score > c.score) c.score = score;
5399
- if (direct && score > c.direct) c.direct = score;
5467
+ if (score2 > c.score) c.score = score2;
5468
+ if (direct && score2 > c.direct) c.direct = score2;
5400
5469
  cand.set(id, c);
5401
5470
  };
5402
5471
  const qUsed = /* @__PURE__ */ new Map();
@@ -5432,9 +5501,9 @@ function lookupWorld(index, question, opts = {}) {
5432
5501
  const nw = index.nameWords.get(id) || [];
5433
5502
  const tot = nw.reduce((s, w) => s + index.idf.get(w), 0) || 1;
5434
5503
  const got = [...ws].reduce((s, w) => s + index.idf.get(w), 0);
5435
- const score = 20 + 40 * (got / tot);
5504
+ const score2 = 20 + 40 * (got / tot);
5436
5505
  const c = cand.get(id);
5437
- if (!c || c.direct < score) bump(id, score, { kind: "word", text: [...ws].join(" ") }, true);
5506
+ if (!c || c.direct < score2) bump(id, score2, { kind: "word", text: [...ws].join(" ") }, true);
5438
5507
  }
5439
5508
  const kindBonus = (id) => {
5440
5509
  const el = index.byId.get(id);
@@ -5667,7 +5736,7 @@ var UNPRINTED = /* @__PURE__ */ new Set([
5667
5736
  var UNPRINTED_PREFIXES = ["x_", "atlas_", "shadow_"];
5668
5737
  var isObj = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
5669
5738
  var isInt = (v) => typeof v === "number" && Number.isInteger(v);
5670
- var own2 = (o, k) => Object.prototype.hasOwnProperty.call(o, k) ? o[k] : void 0;
5739
+ var own3 = (o, k) => Object.prototype.hasOwnProperty.call(o, k) ? o[k] : void 0;
5671
5740
  function isSet(v) {
5672
5741
  if (v === null || v === void 0 || v === "") return false;
5673
5742
  if (Array.isArray(v)) return v.length > 0;
@@ -5687,21 +5756,21 @@ function fieldsOf(t) {
5687
5756
  return typeof t === "string" && Object.prototype.hasOwnProperty.call(FIELD_SCHEMA, t) ? FIELD_SCHEMA[t] : {};
5688
5757
  }
5689
5758
  function isLinkField(t, field) {
5690
- const info = own2(fieldsOf(t), field);
5759
+ const info = own3(fieldsOf(t), field);
5691
5760
  return isObj(info) && (info.type === "single_link" || info.type === "multi_link");
5692
5761
  }
5693
- var isDatedType = (t) => own2(fieldsOf(t), "start_date") !== void 0;
5762
+ var isDatedType = (t) => own3(fieldsOf(t), "start_date") !== void 0;
5694
5763
  function kindOf(el) {
5695
- const sup = text(own2(el, "supertype"));
5696
- const sub = text(own2(el, "subtype"));
5764
+ const sup = text(own3(el, "supertype"));
5765
+ const sub = text(own3(el, "subtype"));
5697
5766
  if (sup !== null && sub !== null) return `${sup} / ${sub}`;
5698
5767
  return sup ?? sub;
5699
5768
  }
5700
5769
  function marks(el) {
5701
- return (own2(el, "hidden") === true ? " \xB7 hidden" : "") + (handsOnAsProposed(el) ? " \xB7 proposed" : "");
5770
+ return (own3(el, "hidden") === true ? " \xB7 hidden" : "") + (handsOnAsProposed(el) ? " \xB7 proposed" : "");
5702
5771
  }
5703
5772
  function descriptionLines(el) {
5704
- const d = text(own2(el, "description"));
5773
+ const d = text(own3(el, "description"));
5705
5774
  return d === null ? [] : d.split("\n").map((l) => ` ${l}`);
5706
5775
  }
5707
5776
  function rowsOf(key, v) {
@@ -5715,35 +5784,35 @@ function rowsOf(key, v) {
5715
5784
  function draughtText(draught) {
5716
5785
  const d = draught;
5717
5786
  if (!isObj(d)) throw new TypeError("draughtText: the draught is an object, as draught() returns it.");
5718
- const world = own2(d, "world");
5787
+ const world = own3(d, "world");
5719
5788
  if (!isObj(world)) throw new TypeError("draughtText: the draught has no world object.");
5720
5789
  const names = /* @__PURE__ */ new Map();
5721
5790
  const hold = (el) => {
5722
5791
  if (!isObj(el)) return;
5723
- const id = own2(el, "id");
5724
- if (typeof id === "string" && !names.has(id)) names.set(id, text(own2(el, "name")) ?? "(unnamed)");
5792
+ const id = own3(el, "id");
5793
+ if (typeof id === "string" && !names.has(id)) names.set(id, text(own3(el, "name")) ?? "(unnamed)");
5725
5794
  };
5726
5795
  const asked = Object.prototype.hasOwnProperty.call(d, "character");
5727
- const character = own2(d, "character");
5728
- const her = isObj(character) && isObj(own2(character, "element")) ? own2(character, "element") : null;
5796
+ const character = own3(d, "character");
5797
+ const her = isObj(character) && isObj(own3(character, "element")) ? own3(character, "element") : null;
5729
5798
  hold(her);
5730
5799
  for (const key of ELEMENT_SECTIONS2) {
5731
- for (const row of rowsOf(key, own2(d, key))) if (isObj(row)) hold(own2(row, "element"));
5800
+ for (const row of rowsOf(key, own3(d, key))) if (isObj(row)) hold(own3(row, "element"));
5732
5801
  }
5733
- const calendar = own2(d, "calendar");
5734
- const unit = isObj(calendar) ? text(own2(calendar, "time_basic_unit")) : null;
5802
+ const calendar = own3(d, "calendar");
5803
+ const unit = isObj(calendar) ? text(own3(calendar, "time_basic_unit")) : null;
5735
5804
  const moment = (n) => unit === null ? BigInt(n).toString() : `${unit} ${BigInt(n).toString()}`;
5736
- const herName = her === null ? "the Character" : text(own2(her, "name")) ?? "(unnamed)";
5805
+ const herName = her === null ? "the Character" : text(own3(her, "name")) ?? "(unnamed)";
5737
5806
  const out = [];
5738
5807
  const put = (line, cont = " ") => {
5739
5808
  const [first, ...rest] = line.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
5740
5809
  out.push(first, ...rest.map((l) => cont + l));
5741
5810
  };
5742
- put(`# ${herName}, in ${text(own2(world, "name")) ?? "(unnamed)"}`);
5743
- const asOf = own2(d, "as_of");
5744
- const now = own2(d, "now");
5745
- const mode = own2(d, "mode");
5746
- const public_ = own2(d, "reader") === "public";
5811
+ put(`# ${herName}, in ${text(own3(world, "name")) ?? "(unnamed)"}`);
5812
+ const asOf = own3(d, "as_of");
5813
+ const now = own3(d, "now");
5814
+ const mode = own3(d, "mode");
5815
+ const public_ = own3(d, "reader") === "public";
5747
5816
  put(
5748
5817
  `What the record holds around ${herName}` + (isInt(asOf) ? `, dated up to ${moment(asOf)}` : "") + (isInt(now) ? ` (the world's now: ${moment(now)})` : "") + "." + (public_ ? " Read as the public reader." : mode === "voice" ? " Read as the Character's own view." : mode === "act" ? " Read as the caller's view." : "")
5749
5818
  );
@@ -5754,7 +5823,7 @@ function draughtText(draught) {
5754
5823
  if (asked && her === null) {
5755
5824
  out.push("Hidden from this reader.");
5756
5825
  } else if (her !== null) {
5757
- const type = own2(her, "type");
5826
+ const type = own3(her, "type");
5758
5827
  const kind = kindOf(her);
5759
5828
  put(typeWordOf(type) + (kind === null ? "" : ` \xB7 ${kind}`) + marks(her));
5760
5829
  for (const l of descriptionLines(her)) put(l);
@@ -5783,54 +5852,54 @@ function draughtText(draught) {
5783
5852
  if (value !== null) put(` ${key.replace(/_/g, " ")}: ${value}`, " ");
5784
5853
  }
5785
5854
  }
5786
- const roster = own2(d, "roster");
5855
+ const roster = own3(d, "roster");
5787
5856
  const memberName = (id) => {
5788
5857
  if (!Array.isArray(roster) || typeof id !== "string") return null;
5789
- for (const r of roster) if (isObj(r) && own2(r, "id") === id) return text(own2(r, "name"));
5858
+ for (const r of roster) if (isObj(r) && own3(r, "id") === id) return text(own3(r, "name"));
5790
5859
  return null;
5791
5860
  };
5792
5861
  const elementRow = (row) => {
5793
- const el = isObj(own2(row, "element")) ? own2(row, "element") : {};
5794
- const type = own2(el, "type");
5862
+ const el = isObj(own3(row, "element")) ? own3(row, "element") : {};
5863
+ const type = own3(el, "type");
5795
5864
  const kind = kindOf(el);
5796
- let line = `- ${text(own2(el, "name")) ?? "(unnamed)"} (${typeWordOf(type)}${kind === null ? "" : ` \xB7 ${kind}`})`;
5797
- const viaRaw = own2(row, "via");
5865
+ let line = `- ${text(own3(el, "name")) ?? "(unnamed)"} (${typeWordOf(type)}${kind === null ? "" : ` \xB7 ${kind}`})`;
5866
+ const viaRaw = own3(row, "via");
5798
5867
  const via = (Array.isArray(viaRaw) ? viaRaw : []).map(text).filter((f) => f !== null);
5799
5868
  if (via.length) line += ` \xB7 via ${via.map((f) => f.replace(/_/g, " ")).join(", ")}`;
5800
- const start = own2(el, "start_date");
5801
- if (own2(row, "grade") === "known_of") line += " \xB7 known of";
5869
+ const start = own3(el, "start_date");
5870
+ if (own3(row, "grade") === "known_of") line += " \xB7 known of";
5802
5871
  else if (isInt(start)) line += ` \xB7 ${moment(start)}`;
5803
5872
  else if (isDatedType(type)) line += " \xB7 undated";
5804
5873
  line += marks(el);
5805
5874
  return [line, ...descriptionLines(el)];
5806
5875
  };
5807
5876
  const recentRow = (row) => {
5808
- const op = own2(row, "op");
5877
+ const op = own3(row, "op");
5809
5878
  const verb = op === "upsert" ? "changed" : op === "delete" ? "deleted" : text(op) ?? "";
5810
- const id = own2(row, "id");
5879
+ const id = own3(row, "id");
5811
5880
  const target = (typeof id === "string" ? names.get(id) : void 0) ?? text(id) ?? "";
5812
- const who = own2(row, "who");
5881
+ const who = own3(row, "who");
5813
5882
  const writer = !isSet(who) ? "an unrecorded writer" : who === "owner" ? "the owner" : memberName(who) ?? "a member";
5814
- const when = text(own2(row, "when"));
5815
- const door = text(own2(row, "door"));
5816
- return `- ${when === null ? "" : `${when} \xB7 `}${verb} ${typeWordOf(own2(row, "type"))} ${target} \xB7 by ${writer}` + (door === null ? "" : ` \xB7 through ${door}`);
5883
+ const when = text(own3(row, "when"));
5884
+ const door = text(own3(row, "door"));
5885
+ return `- ${when === null ? "" : `${when} \xB7 `}${verb} ${typeWordOf(own3(row, "type"))} ${target} \xB7 by ${writer}` + (door === null ? "" : ` \xB7 through ${door}`);
5817
5886
  };
5818
5887
  const memberRow = (row) => {
5819
- let line = `- ${text(own2(row, "role")) ?? ""}`;
5820
- const name = text(own2(row, "name"));
5888
+ let line = `- ${text(own3(row, "role")) ?? ""}`;
5889
+ const name = text(own3(row, "name"));
5821
5890
  if (name !== null) line += ` \xB7 ${name}`;
5822
- const plays = own2(row, "character");
5891
+ const plays = own3(row, "character");
5823
5892
  if (isSet(plays)) {
5824
5893
  const n = typeof plays === "string" ? names.get(plays) : void 0;
5825
5894
  line += n === void 0 ? " \xB7 plays a Character not in this draught" : ` \xB7 plays ${n}`;
5826
5895
  }
5827
- if (own2(row, "status") === "removed") line += " \xB7 removed from the world";
5896
+ if (own3(row, "status") === "removed") line += " \xB7 removed from the world";
5828
5897
  return line;
5829
5898
  };
5830
- const recentMore = own2(d, "recent_more") === true;
5831
- const sectionSet = (key) => isSet(own2(d, key)) || key === "recent" && recentMore;
5899
+ const recentMore = own3(d, "recent_more") === true;
5900
+ const sectionSet = (key) => isSet(own3(d, key)) || key === "recent" && recentMore;
5832
5901
  for (const [key, heading] of SECTIONS) {
5833
- const v = own2(d, key);
5902
+ const v = own3(d, key);
5834
5903
  if (!sectionSet(key)) continue;
5835
5904
  out.push("", `## ${heading}`);
5836
5905
  for (const row of rowsOf(key, v)) {
@@ -5841,8 +5910,8 @@ function draughtText(draught) {
5841
5910
  }
5842
5911
  if (key === "recent" && recentMore) out.push("More changes than these; read on from recent_cursor.");
5843
5912
  }
5844
- const policy = own2(d, "policy");
5845
- const components = isObj(policy) ? own2(policy, "components") : void 0;
5913
+ const policy = own3(d, "policy");
5914
+ const components = isObj(policy) ? own3(policy, "components") : void 0;
5846
5915
  if (Array.isArray(components)) {
5847
5916
  const empty = components.filter((c) => typeof c === "string" && c !== "self" && !sectionSet(c));
5848
5917
  if (empty.length) {
@@ -5850,7 +5919,7 @@ function draughtText(draught) {
5850
5919
  put(`Nothing in: ${empty.join(", ")}.`);
5851
5920
  }
5852
5921
  }
5853
- const cut2 = own2(d, "cut");
5922
+ const cut2 = own3(d, "cut");
5854
5923
  const left = isObj(cut2) ? Object.keys(cut2).filter((k) => isInt(cut2[k])).map((k) => `${BigInt(cut2[k]).toString()} ${k}`) : [];
5855
5924
  out.push("");
5856
5925
  if (isInt(asOf) && mode === "voice") put(`Not listed: rows dated after ${moment(asOf)}.`);
@@ -6684,6 +6753,7 @@ export {
6684
6753
  TOOLS,
6685
6754
  TRAIL_TIERS,
6686
6755
  TokenResource,
6756
+ VIEWS,
6687
6757
  WORLD_FILE_MAX_BYTES,
6688
6758
  WORLD_FILE_MAX_ENTRIES,
6689
6759
  WORLD_FILE_MEDIA_TYPE,
@@ -6779,6 +6849,7 @@ export {
6779
6849
  typeWord,
6780
6850
  unreadFor,
6781
6851
  validateCalendarConfig,
6852
+ viewOf,
6782
6853
  weekdayForStep,
6783
6854
  worldCalendars,
6784
6855
  worldGraph,
package/dist/waymark.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  openersFor,
7
7
  refuseUnknownOptions,
8
8
  typeWord
9
- } from "./chunk-CV2C2PIW.js";
9
+ } from "./chunk-GWJ3SOZQ.js";
10
10
 
11
11
  // src/waymark/glyphs.ts
12
12
  var MARK_PATH = "M48.8 0.0 43.8 0.4 39.0 1.2 36.0 2.0 33.2 2.9 29.3 4.5 24.8 6.8 20.6 9.5 17.0 12.4 13.6 15.7 10.4 19.4 7.8 23.1 5.8 26.6 4.5 29.3 3.3 32.1 1.8 36.8 0.8 41.2 0.1 46.3 0.0 51.1 0.4 56.2 1.2 61.0 2.0 63.9 2.9 66.8 4.5 70.7 6.8 75.2 9.5 79.4 12.4 82.9 15.7 86.3 19.4 89.5 23.1 92.1 26.6 94.2 29.3 95.5 32.1 96.7 36.8 98.2 41.2 99.2 46.3 99.8 51.1 100.0 56.2 99.6 61.0 98.8 63.9 98.0 66.8 97.1 70.7 95.5 75.2 93.2 79.4 90.4 82.9 87.6 86.3 84.3 89.5 80.5 92.1 76.9 94.2 73.4 95.5 70.7 96.7 67.9 98.2 63.2 99.2 58.7 99.8 53.7 100.0 48.8 99.6 43.8 98.6 38.4 97.1 33.2 95.5 29.3 93.2 24.8 90.4 20.6 87.6 17.0 84.3 13.6 80.5 10.4 76.9 7.8 73.4 5.8 70.7 4.5 67.9 3.3 63.2 1.8 58.7 0.8 53.7 0.1ZM77.5 80.7 74.1 83.4 70.7 85.7 67.0 87.5 64.5 88.6 64.1 88.7 65.7 86.3 67.1 83.9 68.7 80.7 69.9 77.6 72.7 78.5 73.0 78.4ZM22.5 80.7 25.6 79.0 27.3 78.3 30.0 77.6 31.3 80.7 32.8 83.9 34.2 86.3 35.9 88.7 32.9 87.5 29.3 85.7 25.8 83.4ZM51.2 74.5 55.1 74.7 59.9 75.2 64.2 76.0 67.5 76.9 66.0 80.5 64.2 84.0 62.0 87.4 59.6 90.1 55.1 90.9 52.2 91.2 51.2 91.1ZM48.7 74.5 48.8 91.1 47.7 91.2 44.9 90.9 40.3 90.1 38.2 87.8 36.3 85.0 34.2 81.2 32.5 77.0 35.8 76.0 40.5 75.2 44.5 74.7ZM91.1 51.2 91.1 52.9 90.8 56.3 90.1 59.7 89.3 62.5 88.5 64.8 87.2 67.7 85.7 70.7 83.9 73.4 82.0 75.9 79.4 78.9 76.3 77.2 73.8 76.1 76.2 68.8 77.8 62.7 78.7 56.8 79.0 51.2ZM55.8 51.2 67.7 51.2 67.6 55.1 67.2 59.0 66.7 61.5 65.7 65.0 61.0 64.2 55.7 63.6ZM32.5 51.2 44.5 51.2 44.4 63.6 39.7 64.1 34.5 65.0 33.5 61.3 32.9 58.1 32.5 54.2ZM8.8 51.2 21.0 51.2 21.0 53.3 21.4 56.6 22.7 64.0 23.8 68.4 25.0 72.1 26.6 75.9 23.7 77.2 20.6 78.9 18.5 76.7 16.5 74.1 14.8 71.5 13.4 69.1 12.1 66.3 11.0 63.6 10.1 60.5 9.4 57.3 8.9 53.5 8.8 51.3ZM36.2 27.0 39.5 27.5 44.5 28.2 44.4 48.8 32.4 48.7 32.8 44.5 33.6 39.1 35.0 32.0ZM63.9 26.9 65.2 32.1 66.6 39.2 67.4 44.8 67.7 48.7 55.8 48.8 55.7 28.1 60.5 27.5ZM74.8 23.4 76.9 22.5 79.4 21.1 82.0 24.0 84.8 27.8 86.2 30.3 87.5 32.9 88.6 35.4 89.5 38.1 90.3 41.2 90.8 44.0 91.1 47.0 91.1 48.8 79.0 48.7 78.7 44.6 78.0 39.3 76.5 31.2 74.7 23.5ZM25.5 23.5 25.5 23.7 24.5 26.8 23.7 30.2 22.4 36.6 21.5 42.5 21.1 48.7 8.8 48.8 8.8 47.0 9.2 43.7 9.8 40.8 10.5 38.1 11.5 35.2 12.4 32.9 13.8 30.2 15.2 27.8 17.9 24.0 20.6 21.1 23.1 22.5ZM64.1 11.3 67.0 12.4 70.7 14.3 74.1 16.5 77.5 19.3 75.6 20.3 73.2 21.5 70.0 22.6 68.7 19.2 67.1 16.1 65.7 13.6ZM35.9 11.3 34.2 13.6 32.8 16.1 31.3 19.2 30.0 22.5 27.9 21.9 26.4 21.3 22.5 19.3 25.8 16.5 29.3 14.3 32.9 12.4 35.4 11.4ZM51.2 8.8 52.2 8.8 55.1 9.0 59.6 9.9 61.7 12.2 64.2 16.0 66.0 19.5 67.6 23.3 64.3 24.3 59.4 25.2 56.2 25.6 51.2 25.5ZM48.8 8.8 48.7 25.5 44.2 25.6 40.6 25.2 36.4 24.5 32.4 23.2 33.9 19.5 35.7 16.0 38.2 12.2 40.3 9.9 44.9 9.0 47.7 8.8Z";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlyworlds/sdk",
3
- "version": "4.146.0",
3
+ "version": "4.147.0",
4
4
  "description": "TypeScript SDK for the OnlyWorlds API - build world-building applications with type safety",
5
5
  "type": "module",
6
6
  "exports": {