Skip to content

cupertino-files / OwnerKind

Variable: OwnerKind ​

const OwnerKind: object

Defined in: src/tsce/owners.ts:141

owner_kind — what a derived owner belongs to.

Apple publishes no enum for this, but it does not need to: every derived owner is used by a field somewhere, and matching each field's UUID back to its owner entry names the kind. Nine of the thirteen values in the corpus were established that way, each unanimous across every file that exercises it. The counts below are the evidence.

kindmeaninghow it was established
1the table itselfthe only entries carrying formula_owner; every other kind's base
3conditional-style formulasTableModelArchive.conditional_style_formula_owner_id ×44
4hidden-state formulas, rowshidden_state_formula_owner_for_rows ×44, and the archive's own id ×49
5merge formulasthe inline merge_owner's id ×18 — and it names the table it sits on
8categories (group-by)GroupByArchive.group_by_uid ×32
9summary aggregatesSummaryModelArchive.aggregate_formula_owner_uuid ×44
11hidden-state formulas, columnshidden_state_formula_owner_for_columns ×39
35the "haunted" ownerTableModelArchive.haunted_owner ×34
200the documentfixed sentinel uid = 666, in all 23 files that have one

Kinds 6, 7, 10 and 12 occur (32, 41, 44 and 28 times) with no field in this repository's protos pointing at them. They are left unnamed rather than guessed; naming one means finding the field that uses it, the same way the others were found.

Type Declaration ​

CATEGORIES ​

readonly CATEGORIES: 8 = 8

Formulas backing categories (row grouping).

CONDITIONAL_STYLE ​

readonly CONDITIONAL_STYLE: 3 = 3

Formulas backing conditional-formatting rules.

DOCUMENT ​

readonly DOCUMENT: 200 = 200

The document as a whole, not any table.

Recognisable without knowing the enum: every kind-200 owner in every corpus file — 23 of them, across all three apps and every era — has the same identity, uid = 666 derived from base = 466. Real owners get random 128-bit UUIDs; this is a hardcoded sentinel, which is why it names no table and should not be reported as an unresolved one.

HAUNTED ​

readonly HAUNTED: 35 = 35

Apple's "haunted owner" for the table.

HIDDEN_STATE_COLUMNS ​

readonly HIDDEN_STATE_COLUMNS: 11 = 11

Formulas backing column hiding.

HIDDEN_STATE_ROWS ​

readonly HIDDEN_STATE_ROWS: 4 = 4

Formulas backing row hiding — filters and manual hides.

MERGE ​

readonly MERGE: 5 = 5

Formulas backing merged cell ranges.

SUMMARY_AGGREGATES ​

readonly SUMMARY_AGGREGATES: 9 = 9

Formulas backing a category's summary aggregates.

TABLE ​

readonly TABLE: 1 = 1

The table itself. Carries the formula_owner reference.

TOMBSTONE ​

readonly TOMBSTONE: 0 = 0

The owner Numbers mints for a uid it cannot resolve while opening a document: the uid keeps an internal id, parked on the owner map's unregistered_internal_owner_id list, and every formula referencing it opens as a ref error. Two review rounds produced one each, both for cross-table references to a clone whose written identity the app had discarded.

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.