Releases: templatical/sdk
Releases · templatical/sdk
@templatical/types@0.8.1
@templatical/types@0.8.1
@templatical/types@0.8.0
@templatical/types@0.8.0
@templatical/renderer@0.8.1
Patch Changes
- @templatical/types@0.8.1
@templatical/renderer@0.8.0
Patch Changes
- @templatical/types@0.8.0
@templatical/quality@0.8.1
Patch Changes
-
75bfd29: Reshape
LintOptionsaround per-tool config namespaces. Each linter's severity overrides and tool-specific knobs now live under its own key, and each linter can be disabled individually.@templatical/qualityLintOptions.rulesandLintOptions.thresholdsmoved into their owning linter namespace:accessibility.rules,accessibility.thresholds,structure.rules,links.rules.LintOptions.linkskeepsnonProductionHostsbut now also acceptslinks.rules.- Each tool key (
accessibility,structure,links) acceptsfalseto disable that linter entirely without enumerating its rules — e.g.lintLinks(content, { links: false })returns[]. - New
isLintFullyDisabled(options)helper returnstruewhen no linter would run — eitherdisabled: trueor all three tool keys set tofalse. The editor uses this gate to skip lazy-loading the package, hide the Issues sidebar tab, and suppress canvas badges. Headless consumers can use it to short-circuit before any linter call. - New exported option types:
AccessibilityLintOptions,StructureLintOptions,LinksLintOptions,RuleOverrides. The oldLintLinksOptionstype is removed (replaced byLinksLintOptions). - Severity override keys still use the full prefixed rule ID (
a11y.*,structure.*,link.*) — the same ID emitted onLintIssue.ruleId, so values copied from an issue paste straight into config.
- lintAccessibility(content, { - rules: { "a11y.img-missing-alt": "warning" }, - thresholds: { minFontSize: 16 }, - }); + lintAccessibility(content, { + accessibility: { + rules: { "a11y.img-missing-alt": "warning" }, + thresholds: { minFontSize: 16 }, + }, + }); - lintLinks(content, { - rules: { "link.localhost-or-staging": "error" }, - links: { nonProductionHosts: ["*.preview.*"] }, - }); + lintLinks(content, { + links: { + rules: { "link.localhost-or-staging": "error" }, + nonProductionHosts: ["*.preview.*"], + }, + });
@templatical/editorinit({ lint })andinitCloud({ lint })consume the new shape verbatim. When every per-tool key is set tofalsethe editor behaves as iflint.disabled === true: no chunk download for@templatical/quality, no Issues sidebar tab, no inline canvas badges.useTemplateLintre-exports the newisLintFullyDisabledhelper.- @templatical/types@0.8.1
@templatical/quality@0.8.0
Minor Changes
-
6705a64: Add
lintStructure+lintLinksand reshape the quality package around a shared linting surface.@templatical/quality- New
lintStructure(content, options?)linter — 5 rules:structure.duplicate-block-id,structure.section-column-mismatch,structure.nested-section,structure.empty-section(auto-fix removes the section),structure.empty-column. - New
lintLinks(content, options?)linter — 5 rules covering URL hygiene across every URL-bearing field in the template (anchors in rich text +button.url,image.linkUrl,video.url,menu.items[].url,social.icons[].url):link.javascript-protocol(error) — flagsjavascript:hrefs that the render-time sanitizer would silently strip.link.unsupported-protocol(warning) — flags explicit schemes outsidehttp,https,mailto,tel,sms.link.malformed-mailto(warning) — sanity-checksmailto:recipient + domain shape.link.malformed-tel(warning) — rejects letters intel:URIs.link.localhost-or-staging(warning) — flags URL hosts matchingoptions.links.nonProductionHosts(default catcheslocalhost,127.0.0.1,0.0.0.0,*.local,*.staging.*,*.dev.*).
- New
walkUrls(content) → UrlOccurrence[]helper for headless callers building URL-scoped rules. LintOptionsgainslinks?: { nonProductionHosts?: string[] }forlink.localhost-or-stagingconfiguration.DEFAULT_NON_PRODUCTION_HOSTSis exported as the baseline.- Rule IDs are now namespaced. Every accessibility rule is prefixed with
a11y.(e.g.img-missing-alt→a11y.img-missing-alt); structure rules usestructure.; link rules uselink.. Severity overrides and message-map keys must use the prefixed form. - Type names renamed for cross-linter reuse:
A11yIssue→LintIssue,A11yOptions→LintOptions,A11yPatch→LintPatch,A11yPatchContext→LintPatchContext(now also exposesremoveBlock),A11yThresholds→LintThresholds,DEFAULT_THRESHOLDS→DEFAULT_A11Y_THRESHOLDS. TheRULESexport is nowACCESSIBILITY_RULES; newSTRUCTURE_RULESandLINK_RULESexports sit alongside it. - New exports:
lintStructure,STRUCTURE_RULES,formatStructureMessage,getStructureMessages,SUPPORTED_STRUCTURE_MESSAGE_LOCALES,StructureMessageMap,StructureRuleMessageId,lintLinks,LINK_RULES,walkUrls,UrlOccurrence,UrlSource,formatLinkMessage,getLinkMessages,SUPPORTED_LINK_MESSAGE_LOCALES,LinkMessageMap,LinkRuleMessageId,LintLinksOptions,ResolvedLinksOptions,DEFAULT_NON_PRODUCTION_HOSTS.
@templatical/editorinit({ accessibility })is renamed toinit({ lint })— the same option object now drives every linter exported by@templatical/quality(accessibility + structure + links).- Sidebar tab renamed from "Accessibility" to "Issues" and now shows all three linter families. The composable is
useTemplateLint(wasuseAccessibilityLint); the inject key isTEMPLATE_LINT_KEY; the components areIssuesPanel.vueandBlockIssueBadge.vue. - Section toolbar now rebalances
childrenwhen the columns layout changes (1↔2↔3 / 1-2 / 2-1) — grows pad with empty columns, shrinks merge trailing columns into the last kept column so blocks are never silently dropped. Eliminates thestructure.section-column-mismatcherror that previously fired on every layout change. - Editor button reset (
.tpl button { background: none }) now wrapped in:where()so its specificity drops to (0,0,1) and per-button utility classes (e.g.tpl:bg-[var(--tpl-primary)]) win. Fixes the Fix-button-renders-transparent bug introduced by the canvas reset; affects every primary-bg button in the editor.
- New
Patch Changes
- @templatical/types@0.8.0
@templatical/media-library@0.8.1
Patch Changes
- @templatical/types@0.8.1
- @templatical/core@0.8.1
@templatical/media-library@0.8.0
Patch Changes
- @templatical/types@0.8.0
- @templatical/core@0.8.0
@templatical/import-unlayer@0.8.1
Patch Changes
- @templatical/types@0.8.1
@templatical/import-unlayer@0.8.0
Patch Changes
- @templatical/types@0.8.0