@onlyworlds/sdk 4.135.1 → 4.136.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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +12 -10
- package/dist/index.js +13 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.136.0] - 2026-11-09
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `trailByPlace`: the ground Map's element id, `ground.map`, travels in the recipe: given in the input, the recipe's `settings.ground` carries it back as `{map, width, height}`, so a tool reading a laid-out Map finds the picture its pins stand on. Optional; a ground given without it carries none. A `map` that is not a non-empty string is refused. The shared fixture's whole-world case now names its ground map. The type is `OwTrailGround`.
|
|
13
|
+
|
|
14
|
+
## [4.135.2] - 2026-11-09
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- A tool that never calls `trailByPlace` no longer carries its default floors. `TRAIL_TIERS` was built by a top-level call a bundler could not drop, so 4.135.0 and 4.135.1 added about 450 bytes to every bundle. Its freezes are now marked pure, and a bundle that imports only `mapSpace`, `worldGraph` or `OwV2Client` comes out the size it was on 4.134.1. The table is the same, frozen as before.
|
|
19
|
+
|
|
8
20
|
## [4.135.1] - 2026-11-09
|
|
9
21
|
|
|
10
22
|
### Fixed
|
package/dist/index.d.ts
CHANGED
|
@@ -5909,11 +5909,11 @@ interface OwTrailSpiral {
|
|
|
5909
5909
|
}
|
|
5910
5910
|
/** The method's settings: what a Map's recipe carries, so the layout can be run again from the Map alone. */
|
|
5911
5911
|
interface OwTrailSettings {
|
|
5912
|
-
/**
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5912
|
+
/**
|
|
5913
|
+
* The ground map's own frame; the layout's frame is it plus `margin` on every side. `map` is the ground Map's element
|
|
5914
|
+
* id in the same world, so a tool reading the recipe finds its picture (left out when the caller gives none).
|
|
5915
|
+
*/
|
|
5916
|
+
ground: OwTrailGround;
|
|
5917
5917
|
margin: number;
|
|
5918
5918
|
depth: number;
|
|
5919
5919
|
tiers: OwTrailTier[];
|
|
@@ -5921,11 +5921,13 @@ interface OwTrailSettings {
|
|
|
5921
5921
|
/** How far a place sits from the place it is inside. */
|
|
5922
5922
|
parentRing: number;
|
|
5923
5923
|
}
|
|
5924
|
+
interface OwTrailGround {
|
|
5925
|
+
map?: string;
|
|
5926
|
+
width: number;
|
|
5927
|
+
height: number;
|
|
5928
|
+
}
|
|
5924
5929
|
interface OwTrailInput extends Partial<Omit<OwTrailSettings, 'ground' | 'depth'>> {
|
|
5925
|
-
ground:
|
|
5926
|
-
width: number;
|
|
5927
|
-
height: number;
|
|
5928
|
-
};
|
|
5930
|
+
ground: OwTrailGround;
|
|
5929
5931
|
depth: number;
|
|
5930
5932
|
places: OwTrailPlace[];
|
|
5931
5933
|
hangers: OwTrailHanger[];
|
|
@@ -7341,4 +7343,4 @@ declare class TokenResource {
|
|
|
7341
7343
|
getEncryptionInfo(): Promise<EncryptionInfo>;
|
|
7342
7344
|
}
|
|
7343
7345
|
|
|
7344
|
-
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 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 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 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 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, 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 };
|
|
7346
|
+
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 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 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 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, 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 };
|
package/dist/index.js
CHANGED
|
@@ -4036,12 +4036,13 @@ function mapSpace(elements) {
|
|
|
4036
4036
|
}
|
|
4037
4037
|
|
|
4038
4038
|
// src/layout-trail.ts
|
|
4039
|
-
var
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4039
|
+
var tier = (name, z, kinds) => /* @__PURE__ */ Object.freeze({ name, z, kinds: /* @__PURE__ */ Object.freeze(kinds) });
|
|
4040
|
+
var TRAIL_TIERS = /* @__PURE__ */ Object.freeze([
|
|
4041
|
+
/* @__PURE__ */ tier("ground: places and things", 0, ["location", "object", "zone"]),
|
|
4042
|
+
/* @__PURE__ */ tier("people and the living", 240, ["character", "collective", "creature", "species"]),
|
|
4043
|
+
/* @__PURE__ */ tier("what happened", 480, ["event"]),
|
|
4044
|
+
/* @__PURE__ */ tier("told or abstract", 720, ["ability", "construct", "family", "institution", "language", "law", "narrative", "phenomenon", "relation", "title", "trait"])
|
|
4045
|
+
]);
|
|
4045
4046
|
var DEFAULT_SPIRAL = { r0: 140, c: 20, angle: 2.399963 };
|
|
4046
4047
|
var DEFAULT_PARENT_RING = 140;
|
|
4047
4048
|
function roundHalfEven(v) {
|
|
@@ -4074,7 +4075,8 @@ function trailByPlace(input) {
|
|
|
4074
4075
|
const { places, hangers, hero } = input;
|
|
4075
4076
|
const g = input.ground;
|
|
4076
4077
|
if (!g || typeof g !== "object") fail("no ground");
|
|
4077
|
-
refuseUnknownOptions("trailByPlace: ground", g, ["width", "height"]);
|
|
4078
|
+
refuseUnknownOptions("trailByPlace: ground", g, ["map", "width", "height"]);
|
|
4079
|
+
if (g.map !== void 0 && (typeof g.map !== "string" || !g.map)) fail("ground.map is the ground Map's element id, a non-empty string");
|
|
4078
4080
|
if (!wholeAbove(g.width, 0) || !wholeAbove(g.height, 0)) fail("the ground's width and height are whole numbers above 0");
|
|
4079
4081
|
const margin = input.margin ?? 0;
|
|
4080
4082
|
if (!Number.isSafeInteger(margin) || margin < 0) fail("margin is a whole number, 0 or more");
|
|
@@ -4189,11 +4191,11 @@ function trailByPlace(input) {
|
|
|
4189
4191
|
const heroId = hero?.id;
|
|
4190
4192
|
for (const { cx, cy, hs } of clusters.values()) {
|
|
4191
4193
|
hs.sort((p, q) => Number(p.h.id !== heroId) - Number(q.h.id !== heroId) || p.tier - q.tier || byCodePoint(p.h.id, q.h.id));
|
|
4192
|
-
hs.forEach(({ h, tier }, n) => {
|
|
4194
|
+
hs.forEach(({ h, tier: tier2 }, n) => {
|
|
4193
4195
|
const r = spiral.r0 + spiral.c * Math.sqrt(n);
|
|
4194
4196
|
const a = n * spiral.angle;
|
|
4195
|
-
const where = `tier ${tiers[
|
|
4196
|
-
raw.push({ element_type: h.type, element_id: h.id, name: h.name, x: cx + r * Math.cos(a), y: cy + r * Math.sin(a), z: tiers[
|
|
4197
|
+
const where = `tier ${tiers[tier2].name}; ${n + 1} of ${hs.length} on the spiral round it`;
|
|
4198
|
+
raw.push({ element_type: h.type, element_id: h.id, name: h.name, x: cx + r * Math.cos(a), y: cy + r * Math.sin(a), z: tiers[tier2].z, by: h.by ? `${h.by}; ${where}` : where });
|
|
4197
4199
|
});
|
|
4198
4200
|
}
|
|
4199
4201
|
raw.sort((p, q) => byCodePoint(p.element_id, q.element_id));
|
|
@@ -4222,7 +4224,7 @@ function trailByPlace(input) {
|
|
|
4222
4224
|
recipe: {
|
|
4223
4225
|
method: "trail-by-place",
|
|
4224
4226
|
settings: {
|
|
4225
|
-
ground: { width: g.width, height: g.height },
|
|
4227
|
+
ground: g.map !== void 0 ? { map: g.map, width: g.width, height: g.height } : { width: g.width, height: g.height },
|
|
4226
4228
|
margin: M,
|
|
4227
4229
|
depth: D,
|
|
4228
4230
|
tiers: tiers.map((t) => ({ name: t.name, z: t.z, kinds: [...t.kinds] })),
|