The trimmed Name field value ("" when left at its default).
The trimmed Shortcode field value ("" when defaulted).
The chosen archetype's identity, or undefined for (none).
The document class's defaultName for the type.
The document type token, used as the last-resort base.
The resolved name and the pre-uniqueness shortcodeBase.
Resolve the final Name and (pre-uniqueness) Shortcode base for a Create-dialog confirmation, honoring the archetype-first defaulting rules (issue #643):
typedName/typedShortcode).name/shortcodeare the defaults — leaving both fields blank creates a document that matches the archetype (subject only to later uniqueness bumping).defaultNameand the Shortcode is derived from the resolved name.typetoken, so the key is never empty.Both the typed and archetype shortcodes are run through slugifyShortcode, so the returned
shortcodeBaseis always a clean token. The caller applies sohl.utils.uniqueShortcode against the taken set.