Skip to content

Releases: templatical/sdk

@templatical/types@0.8.1

16 May 10:54
494ea91

Choose a tag to compare

@templatical/types@0.8.1

@templatical/types@0.8.0

16 May 09:08
130aedc

Choose a tag to compare

@templatical/types@0.8.0

@templatical/renderer@0.8.1

16 May 10:54
494ea91

Choose a tag to compare

Patch Changes

  • @templatical/types@0.8.1

@templatical/renderer@0.8.0

16 May 09:08
130aedc

Choose a tag to compare

Patch Changes

  • @templatical/types@0.8.0

@templatical/quality@0.8.1

16 May 10:53
494ea91

Choose a tag to compare

Patch Changes

  • 75bfd29: Reshape LintOptions around 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/quality

    • LintOptions.rules and LintOptions.thresholds moved into their owning linter namespace: accessibility.rules, accessibility.thresholds, structure.rules, links.rules. LintOptions.links keeps nonProductionHosts but now also accepts links.rules.
    • Each tool key (accessibility, structure, links) accepts false to disable that linter entirely without enumerating its rules — e.g. lintLinks(content, { links: false }) returns [].
    • New isLintFullyDisabled(options) helper returns true when no linter would run — either disabled: true or all three tool keys set to false. 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 old LintLinksOptions type is removed (replaced by LinksLintOptions).
    • Severity override keys still use the full prefixed rule ID (a11y.*, structure.*, link.*) — the same ID emitted on LintIssue.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/editor

    • init({ lint }) and initCloud({ lint }) consume the new shape verbatim. When every per-tool key is set to false the editor behaves as if lint.disabled === true: no chunk download for @templatical/quality, no Issues sidebar tab, no inline canvas badges.
    • useTemplateLint re-exports the new isLintFullyDisabled helper.
    • @templatical/types@0.8.1

@templatical/quality@0.8.0

16 May 09:08
130aedc

Choose a tag to compare

Minor Changes

  • 6705a64: Add lintStructure + lintLinks and 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) — flags javascript: hrefs that the render-time sanitizer would silently strip.
      • link.unsupported-protocol (warning) — flags explicit schemes outside http, https, mailto, tel, sms.
      • link.malformed-mailto (warning) — sanity-checks mailto: recipient + domain shape.
      • link.malformed-tel (warning) — rejects letters in tel: URIs.
      • link.localhost-or-staging (warning) — flags URL hosts matching options.links.nonProductionHosts (default catches localhost, 127.0.0.1, 0.0.0.0, *.local, *.staging.*, *.dev.*).
    • New walkUrls(content) → UrlOccurrence[] helper for headless callers building URL-scoped rules.
    • LintOptions gains links?: { nonProductionHosts?: string[] } for link.localhost-or-staging configuration. DEFAULT_NON_PRODUCTION_HOSTS is exported as the baseline.
    • Rule IDs are now namespaced. Every accessibility rule is prefixed with a11y. (e.g. img-missing-alta11y.img-missing-alt); structure rules use structure.; link rules use link.. Severity overrides and message-map keys must use the prefixed form.
    • Type names renamed for cross-linter reuse: A11yIssueLintIssue, A11yOptionsLintOptions, A11yPatchLintPatch, A11yPatchContextLintPatchContext (now also exposes removeBlock), A11yThresholdsLintThresholds, DEFAULT_THRESHOLDSDEFAULT_A11Y_THRESHOLDS. The RULES export is now ACCESSIBILITY_RULES; new STRUCTURE_RULES and LINK_RULES exports 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/editor

    • init({ accessibility }) is renamed to init({ 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 (was useAccessibilityLint); the inject key is TEMPLATE_LINT_KEY; the components are IssuesPanel.vue and BlockIssueBadge.vue.
    • Section toolbar now rebalances children when 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 the structure.section-column-mismatch error 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.

Patch Changes

  • @templatical/types@0.8.0

@templatical/media-library@0.8.1

16 May 10:54
494ea91

Choose a tag to compare

Patch Changes

  • @templatical/types@0.8.1
  • @templatical/core@0.8.1

@templatical/media-library@0.8.0

16 May 09:09
130aedc

Choose a tag to compare

Patch Changes

  • @templatical/types@0.8.0
  • @templatical/core@0.8.0

@templatical/import-unlayer@0.8.1

16 May 10:54
494ea91

Choose a tag to compare

Patch Changes

  • @templatical/types@0.8.1

@templatical/import-unlayer@0.8.0

16 May 09:08
130aedc

Choose a tag to compare

Patch Changes

  • @templatical/types@0.8.0