@bitcobblers/wod-wiki-ui 0.56.2210 → 0.58.2220

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.
@@ -1,4 +1,4 @@
1
- export { A as AttachmentUrlResolver, B as ButtonAction, a as CursorFocusState, b as CustomCompletionSource, d as DefaultFrontmatterWidget, E as EditorDialect, e as EditorPresetOptions, f as EditorSection, g as EditorSectionSubtype, h as EditorSectionType, i as EmbedType, F as FrontmatterCatalogEntry, j as FrontmatterRefDiagnostic, k as FrontmatterReferenceProvider, l as FrontmatterReferenceRef, m as FrontmatterReferenceResolution, n as FrontmatterSuggestionCatalog, G as GeometryListener, o as INTERNAL_FRONTMATTER_KEYS, N as NavigationHook, p as NestedCompletionOptions, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, W as WidgetConfig, L as WidgetProps, P as WidgetRegistry, U as activeCursorSection, V as addRuntimePanel, X as attachmentUrlFacet, Y as autocompleteTooltipTheme, Z as configureOverlayActions, _ as cursorFocusExtension, $ as customCompletionSources, a0 as dispatchAddRuntimePanel, a1 as dispatchExpandRuntimePanel, a2 as dispatchGutterHighlights, a3 as dispatchRemoveRuntimePanel, a4 as editingQuerySectionsField, a5 as editingWidgetsField, a6 as editorFocusField, a7 as editorFocusTracker, a8 as editorPreset, a9 as editorTheme, aa as embedPreviewDecorations, ab as expandRuntimePanel, ad as fenceCompletion, ae as findQueryBlockSection, af as findWorkoutErrors, ag as forceSectionParse, aj as frontmatterDebugMode, ak as frontmatterDetailed, al as frontmatterKeymap, am as frontmatterPreview, an as frontmatterPreviewField, ao as frontmatterReferenceIndex, ap as frontmatterSource, aq as frontmatterSuggestions, ar as frontmatterVisibility, as as getCursorFocusState, at as getOverlayActions, au as gutterHighlightsField, av as gutterUnified, aw as handleFenceAutoWrap, ax as handleSmartUrlPaste, ay as inlineButtonDecoration, az as insertMarkdownLinkCommand, aA as isEditorFocused, aB as isInternalFrontmatterKey, aC as isNavigableUrl, aD as lineIdsExtension, aE as linkOpen, aF as linkPreview, aG as markdownSyntaxHiding, aH as markdownTablePreview, aI as navigationFacet, aJ as nestedCompletion, aK as nestedCompletionOptions, aN as previewDecorations, aO as queryBlockPreview, aP as referenceIndexReload, aQ as registeredSectionWidgets, aR as removeRuntimePanel, aS as resolveCodeLanguage, aT as runtimePanelField, aU as saveBlockQuerySource, aV as sectionAtPos, aW as sectionField, aX as sectionGeometry, aY as sectionIdentity, aZ as sectionIdentityHistory, a_ as sectionMove, a$ as sectionRestore, b0 as sectionSaved, b1 as sessionQueryFence, b2 as sessionQueryInsert, b3 as sessionQueryWql, b4 as setEditorFocused, b5 as setFrontmatterDetailed, b6 as setFrontmatterSource, b7 as setGutterHighlights, b8 as setQuerySourceEditing, b9 as slashBlockCompletion, ba as smartIncrement, bb as toggleInlineMarkdown, bc as toggleWidgetEdit, bd as urlAtPos, be as widgetBlockPreview, bf as wodAutoWrap, bg as wodAutocompletion, bh as wodCompletionSource, bi as wodEditorKeymap, bj as wodLinter, bk as wodOverlayPanel, bl as workoutLintSource, bm as wrapInTimeFence } from '../index-CfljPEK3.cjs';
1
+ export { A as AttachmentUrlResolver, B as ButtonAction, a as CursorFocusState, b as CustomCompletionSource, d as DefaultFrontmatterWidget, E as EditorDialect, e as EditorPresetOptions, f as EditorSection, g as EditorSectionSubtype, h as EditorSectionType, i as EmbedType, F as FrontmatterCatalogEntry, j as FrontmatterRefDiagnostic, k as FrontmatterReferenceProvider, l as FrontmatterReferenceRef, m as FrontmatterReferenceResolution, n as FrontmatterSuggestionCatalog, G as GeometryListener, o as INTERNAL_FRONTMATTER_KEYS, N as NavigationHook, p as NestedCompletionOptions, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, W as WidgetConfig, L as WidgetProps, P as WidgetRegistry, U as activeCursorSection, V as addRuntimePanel, X as affiliateTagFacet, Y as applyAmazonAffiliateTag, Z as attachmentUrlFacet, _ as autocompleteTooltipTheme, $ as configureOverlayActions, a0 as cursorFocusExtension, a1 as customCompletionSources, a2 as dispatchAddRuntimePanel, a3 as dispatchExpandRuntimePanel, a4 as dispatchGutterHighlights, a5 as dispatchRemoveRuntimePanel, a6 as editingQuerySectionsField, a7 as editingWidgetsField, a8 as editorFocusField, a9 as editorFocusTracker, aa as editorPreset, ab as editorTheme, ac as embedPreviewDecorations, ad as expandRuntimePanel, af as fenceCompletion, ag as findQueryBlockSection, ah as findWorkoutErrors, ai as forceSectionParse, al as frontmatterDebugMode, am as frontmatterDetailed, an as frontmatterKeymap, ao as frontmatterPreview, ap as frontmatterPreviewField, aq as frontmatterReferenceIndex, ar as frontmatterSource, as as frontmatterSuggestions, at as frontmatterVisibility, au as getCursorFocusState, av as getOverlayActions, aw as gutterHighlightsField, ax as gutterUnified, ay as handleFenceAutoWrap, az as handleSmartUrlPaste, aA as inlineButtonDecoration, aB as insertMarkdownLinkCommand, aC as isAmazonRetailHost, aD as isEditorFocused, aE as isInternalFrontmatterKey, aF as isNavigableUrl, aG as lineIdsExtension, aH as linkOpen, aI as linkPreview, aJ as markdownSyntaxHiding, aK as markdownTablePreview, aL as navigationFacet, aM as nestedCompletion, aN as nestedCompletionOptions, aQ as previewDecorations, aR as queryBlockPreview, aS as referenceIndexReload, aT as registeredSectionWidgets, aU as removeRuntimePanel, aV as resolveCodeLanguage, aW as runtimePanelField, aX as saveBlockQuerySource, aY as sectionAtPos, aZ as sectionField, a_ as sectionGeometry, a$ as sectionIdentity, b0 as sectionIdentityHistory, b1 as sectionMove, b2 as sectionRestore, b3 as sectionSaved, b4 as sessionQueryFence, b5 as sessionQueryInsert, b6 as sessionQueryWql, b7 as setEditorFocused, b8 as setFrontmatterDetailed, b9 as setFrontmatterSource, ba as setGutterHighlights, bb as setQuerySourceEditing, bc as slashBlockCompletion, bd as smartIncrement, be as toggleInlineMarkdown, bf as toggleWidgetEdit, bg as urlAtPos, bh as widgetBlockPreview, bi as wodAutoWrap, bj as wodAutocompletion, bk as wodCompletionSource, bl as wodEditorKeymap, bm as wodLinter, bn as wodOverlayPanel, bo as workoutLintSource, bp as wrapInTimeFence } from '../index-eCc_R4QK.cjs';
2
2
  export { blockContentId } from '@bitcobblers/wod-wiki-core';
3
3
  import '@codemirror/state';
4
4
  import '@codemirror/view';
@@ -1,4 +1,4 @@
1
- export { A as AttachmentUrlResolver, B as ButtonAction, a as CursorFocusState, b as CustomCompletionSource, d as DefaultFrontmatterWidget, E as EditorDialect, e as EditorPresetOptions, f as EditorSection, g as EditorSectionSubtype, h as EditorSectionType, i as EmbedType, F as FrontmatterCatalogEntry, j as FrontmatterRefDiagnostic, k as FrontmatterReferenceProvider, l as FrontmatterReferenceRef, m as FrontmatterReferenceResolution, n as FrontmatterSuggestionCatalog, G as GeometryListener, o as INTERNAL_FRONTMATTER_KEYS, N as NavigationHook, p as NestedCompletionOptions, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, W as WidgetConfig, L as WidgetProps, P as WidgetRegistry, U as activeCursorSection, V as addRuntimePanel, X as attachmentUrlFacet, Y as autocompleteTooltipTheme, Z as configureOverlayActions, _ as cursorFocusExtension, $ as customCompletionSources, a0 as dispatchAddRuntimePanel, a1 as dispatchExpandRuntimePanel, a2 as dispatchGutterHighlights, a3 as dispatchRemoveRuntimePanel, a4 as editingQuerySectionsField, a5 as editingWidgetsField, a6 as editorFocusField, a7 as editorFocusTracker, a8 as editorPreset, a9 as editorTheme, aa as embedPreviewDecorations, ab as expandRuntimePanel, ad as fenceCompletion, ae as findQueryBlockSection, af as findWorkoutErrors, ag as forceSectionParse, aj as frontmatterDebugMode, ak as frontmatterDetailed, al as frontmatterKeymap, am as frontmatterPreview, an as frontmatterPreviewField, ao as frontmatterReferenceIndex, ap as frontmatterSource, aq as frontmatterSuggestions, ar as frontmatterVisibility, as as getCursorFocusState, at as getOverlayActions, au as gutterHighlightsField, av as gutterUnified, aw as handleFenceAutoWrap, ax as handleSmartUrlPaste, ay as inlineButtonDecoration, az as insertMarkdownLinkCommand, aA as isEditorFocused, aB as isInternalFrontmatterKey, aC as isNavigableUrl, aD as lineIdsExtension, aE as linkOpen, aF as linkPreview, aG as markdownSyntaxHiding, aH as markdownTablePreview, aI as navigationFacet, aJ as nestedCompletion, aK as nestedCompletionOptions, aN as previewDecorations, aO as queryBlockPreview, aP as referenceIndexReload, aQ as registeredSectionWidgets, aR as removeRuntimePanel, aS as resolveCodeLanguage, aT as runtimePanelField, aU as saveBlockQuerySource, aV as sectionAtPos, aW as sectionField, aX as sectionGeometry, aY as sectionIdentity, aZ as sectionIdentityHistory, a_ as sectionMove, a$ as sectionRestore, b0 as sectionSaved, b1 as sessionQueryFence, b2 as sessionQueryInsert, b3 as sessionQueryWql, b4 as setEditorFocused, b5 as setFrontmatterDetailed, b6 as setFrontmatterSource, b7 as setGutterHighlights, b8 as setQuerySourceEditing, b9 as slashBlockCompletion, ba as smartIncrement, bb as toggleInlineMarkdown, bc as toggleWidgetEdit, bd as urlAtPos, be as widgetBlockPreview, bf as wodAutoWrap, bg as wodAutocompletion, bh as wodCompletionSource, bi as wodEditorKeymap, bj as wodLinter, bk as wodOverlayPanel, bl as workoutLintSource, bm as wrapInTimeFence } from '../index-CfljPEK3.js';
1
+ export { A as AttachmentUrlResolver, B as ButtonAction, a as CursorFocusState, b as CustomCompletionSource, d as DefaultFrontmatterWidget, E as EditorDialect, e as EditorPresetOptions, f as EditorSection, g as EditorSectionSubtype, h as EditorSectionType, i as EmbedType, F as FrontmatterCatalogEntry, j as FrontmatterRefDiagnostic, k as FrontmatterReferenceProvider, l as FrontmatterReferenceRef, m as FrontmatterReferenceResolution, n as FrontmatterSuggestionCatalog, G as GeometryListener, o as INTERNAL_FRONTMATTER_KEYS, N as NavigationHook, p as NestedCompletionOptions, x as OverlayAction, y as QueryBlockPreviewOptions, z as RuntimePanelEntry, H as SectionIdentity, J as SectionRect, K as SectionState, W as WidgetConfig, L as WidgetProps, P as WidgetRegistry, U as activeCursorSection, V as addRuntimePanel, X as affiliateTagFacet, Y as applyAmazonAffiliateTag, Z as attachmentUrlFacet, _ as autocompleteTooltipTheme, $ as configureOverlayActions, a0 as cursorFocusExtension, a1 as customCompletionSources, a2 as dispatchAddRuntimePanel, a3 as dispatchExpandRuntimePanel, a4 as dispatchGutterHighlights, a5 as dispatchRemoveRuntimePanel, a6 as editingQuerySectionsField, a7 as editingWidgetsField, a8 as editorFocusField, a9 as editorFocusTracker, aa as editorPreset, ab as editorTheme, ac as embedPreviewDecorations, ad as expandRuntimePanel, af as fenceCompletion, ag as findQueryBlockSection, ah as findWorkoutErrors, ai as forceSectionParse, al as frontmatterDebugMode, am as frontmatterDetailed, an as frontmatterKeymap, ao as frontmatterPreview, ap as frontmatterPreviewField, aq as frontmatterReferenceIndex, ar as frontmatterSource, as as frontmatterSuggestions, at as frontmatterVisibility, au as getCursorFocusState, av as getOverlayActions, aw as gutterHighlightsField, ax as gutterUnified, ay as handleFenceAutoWrap, az as handleSmartUrlPaste, aA as inlineButtonDecoration, aB as insertMarkdownLinkCommand, aC as isAmazonRetailHost, aD as isEditorFocused, aE as isInternalFrontmatterKey, aF as isNavigableUrl, aG as lineIdsExtension, aH as linkOpen, aI as linkPreview, aJ as markdownSyntaxHiding, aK as markdownTablePreview, aL as navigationFacet, aM as nestedCompletion, aN as nestedCompletionOptions, aQ as previewDecorations, aR as queryBlockPreview, aS as referenceIndexReload, aT as registeredSectionWidgets, aU as removeRuntimePanel, aV as resolveCodeLanguage, aW as runtimePanelField, aX as saveBlockQuerySource, aY as sectionAtPos, aZ as sectionField, a_ as sectionGeometry, a$ as sectionIdentity, b0 as sectionIdentityHistory, b1 as sectionMove, b2 as sectionRestore, b3 as sectionSaved, b4 as sessionQueryFence, b5 as sessionQueryInsert, b6 as sessionQueryWql, b7 as setEditorFocused, b8 as setFrontmatterDetailed, b9 as setFrontmatterSource, ba as setGutterHighlights, bb as setQuerySourceEditing, bc as slashBlockCompletion, bd as smartIncrement, be as toggleInlineMarkdown, bf as toggleWidgetEdit, bg as urlAtPos, bh as widgetBlockPreview, bi as wodAutoWrap, bj as wodAutocompletion, bk as wodCompletionSource, bl as wodEditorKeymap, bm as wodLinter, bn as wodOverlayPanel, bo as workoutLintSource, bp as wrapInTimeFence } from '../index-eCc_R4QK.js';
2
2
  export { blockContentId } from '@bitcobblers/wod-wiki-core';
3
3
  import '@codemirror/state';
4
4
  import '@codemirror/view';
@@ -1,3 +1,3 @@
1
- export { DefaultFrontmatterWidget, INTERNAL_FRONTMATTER_KEYS, activeCursorSection, addRuntimePanel, attachmentUrlFacet, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, inlineButtonDecoration, insertMarkdownLinkCommand, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, nestedCompletion, nestedCompletionOptions, previewDecorations, queryBlockPreview, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setQuerySourceEditing, slashBlockCompletion, smartIncrement, toggleInlineMarkdown, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-VYFKXF46.mjs';
1
+ export { DefaultFrontmatterWidget, INTERNAL_FRONTMATTER_KEYS, activeCursorSection, addRuntimePanel, affiliateTagFacet, applyAmazonAffiliateTag, attachmentUrlFacet, autocompleteTooltipTheme, blockContentId, configureOverlayActions, cursorFocusExtension, customCompletionSources, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editingQuerySectionsField, editingWidgetsField, editorFocusField, editorFocusTracker, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, frontmatterDebugMode, frontmatterDetailed, frontmatterKeymap, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getCursorFocusState, getOverlayActions, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, handleSmartUrlPaste, inlineButtonDecoration, insertMarkdownLinkCommand, isAmazonRetailHost, isEditorFocused, isInternalFrontmatterKey, isNavigableUrl, lineIdsExtension, linkOpen, linkPreview, markdownSyntaxHiding, markdownTablePreview, navigationFacet, nestedCompletion, nestedCompletionOptions, previewDecorations, queryBlockPreview, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryFence, sessionQueryInsert, sessionQueryWql, setEditorFocused, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setQuerySourceEditing, slashBlockCompletion, smartIncrement, toggleInlineMarkdown, toggleWidgetEdit, urlAtPos, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wrapInTimeFence } from '../chunk-Y7FAKA4S.mjs';
2
2
  //# sourceMappingURL=index.mjs.map
3
3
  //# sourceMappingURL=index.mjs.map
@@ -44,6 +44,27 @@ declare function isNavigableUrl(url: string): boolean;
44
44
  declare function urlAtPos(view: EditorView, pos: number): string | null;
45
45
  declare const linkOpen: Extension;
46
46
 
47
+ /**
48
+ * Optional Amazon Associates tag injected into outbound Amazon retail links
49
+ * rendered by editor link pills, tables, and Ctrl+Click navigation.
50
+ * When unset or empty, link URLs are left untouched.
51
+ */
52
+ declare const affiliateTagFacet: Facet<string | null | undefined, string | null>;
53
+ /**
54
+ * Returns `true` for Amazon retail hostnames (e.g. `amazon.com`,
55
+ * `www.amazon.co.uk`, `smile.amazon.de`), excluding shortlink domains
56
+ * (`amzn.to`, `a.co`) and non-retail subdomains (`aws.amazon.com`).
57
+ */
58
+ declare function isAmazonRetailHost(hostname: string): boolean;
59
+ /**
60
+ * Injects or replaces the Amazon Associates `tag` query parameter on outbound
61
+ * Amazon retail URLs when `associateTag` is non-empty.
62
+ *
63
+ * Shortlinks (e.g. `amzn.to`) and non-Amazon URLs are returned unchanged.
64
+ * Never mutates the underlying Markdown source.
65
+ */
66
+ declare function applyAmazonAffiliateTag(url: string, associateTag?: string | null): string;
67
+
47
68
  declare function findWorkoutErrors(content: string, offsetInDoc: number): Diagnostic[];
48
69
  declare function workoutLintSource(view: EditorView): Diagnostic[];
49
70
  declare const wodLinter: _codemirror_state.Extension;
@@ -177,6 +198,7 @@ declare class SectionGeometryPlugin {
177
198
  docVersion: number;
178
199
  private listeners;
179
200
  private pendingNotify;
201
+ private resizeObserver;
180
202
  constructor(view: EditorView);
181
203
  update(update: ViewUpdate): void;
182
204
  addListener(fn: GeometryListener): () => void;
@@ -551,4 +573,4 @@ interface EditorPresetOptions {
551
573
  }
552
574
  declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
553
575
 
554
- export { customCompletionSources as $, type AttachmentUrlResolver as A, type ButtonAction as B, type CategorizedMetrics as C, DEFAULT_OUTPUT_FILTERS as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, type SectionIdentity as H, type InlineMetricEditPayload as I, type SectionRect as J, type SectionState as K, type WidgetProps as L, MetricBadge as M, type NavigationHook as N, type OutputFilterInput as O, type WidgetRegistry as P, type QueryExecutor as Q, type RowPrHighlight as R, type SessionTableSortSpec as S, TONE_CLASS as T, activeCursorSection as U, addRuntimePanel as V, type WidgetConfig as W, attachmentUrlFacet as X, autocompleteTooltipTheme as Y, configureOverlayActions as Z, cursorFocusExtension as _, type CursorFocusState as a, sectionRestore as a$, dispatchAddRuntimePanel as a0, dispatchExpandRuntimePanel as a1, dispatchGutterHighlights as a2, dispatchRemoveRuntimePanel as a3, editingQuerySectionsField as a4, editingWidgetsField as a5, editorFocusField as a6, editorFocusTracker as a7, editorPreset as a8, editorTheme as a9, isEditorFocused as aA, isInternalFrontmatterKey as aB, isNavigableUrl as aC, lineIdsExtension as aD, linkOpen as aE, linkPreview as aF, markdownSyntaxHiding as aG, markdownTablePreview as aH, navigationFacet as aI, nestedCompletion as aJ, nestedCompletionOptions as aK, normalizeOutputFilter as aL, presentBadges as aM, previewDecorations as aN, queryBlockPreview as aO, referenceIndexReload as aP, registeredSectionWidgets as aQ, removeRuntimePanel as aR, resolveCodeLanguage as aS, runtimePanelField as aT, saveBlockQuerySource as aU, sectionAtPos as aV, sectionField as aW, sectionGeometry as aX, sectionIdentity as aY, sectionIdentityHistory as aZ, sectionMove as a_, embedPreviewDecorations as aa, expandRuntimePanel as ab, extractMetricsByCategory as ac, fenceCompletion as ad, findQueryBlockSection as ae, findWorkoutErrors as af, forceSectionParse as ag, formatClockTime as ah, formatMMSS as ai, frontmatterDebugMode as aj, frontmatterDetailed as ak, frontmatterKeymap as al, frontmatterPreview as am, frontmatterPreviewField as an, frontmatterReferenceIndex as ao, frontmatterSource as ap, frontmatterSuggestions as aq, frontmatterVisibility as ar, getCursorFocusState as as, getOverlayActions as at, gutterHighlightsField as au, gutterUnified as av, handleFenceAutoWrap as aw, handleSmartUrlPaste as ax, inlineButtonDecoration as ay, insertMarkdownLinkCommand as az, type CustomCompletionSource as b, sectionSaved as b0, sessionQueryFence as b1, sessionQueryInsert as b2, sessionQueryWql as b3, setEditorFocused as b4, setFrontmatterDetailed as b5, setFrontmatterSource as b6, setGutterHighlights as b7, setQuerySourceEditing as b8, slashBlockCompletion as b9, smartIncrement as ba, toggleInlineMarkdown as bb, toggleWidgetEdit as bc, urlAtPos as bd, widgetBlockPreview as be, wodAutoWrap as bf, wodAutocompletion as bg, wodCompletionSource as bh, wodEditorKeymap as bi, wodLinter as bj, wodOverlayPanel as bk, workoutLintSource as bl, wrapInTimeFence as bm, DEFAULT_PRIMARY_FILTER as c, DefaultFrontmatterWidget as d, type EditorPresetOptions as e, type EditorSection as f, type EditorSectionSubtype as g, type EditorSectionType as h, type EmbedType as i, type FrontmatterRefDiagnostic as j, type FrontmatterReferenceProvider as k, type FrontmatterReferenceRef as l, type FrontmatterReferenceResolution as m, type FrontmatterSuggestionCatalog as n, INTERNAL_FRONTMATTER_KEYS as o, type NestedCompletionOptions as p, OUTPUT_TYPE_CLASS as q, OUTPUT_TYPE_DOT as r, OutputFilterPills as s, type OutputFilterPreset as t, type OutputStatementRow as u, OutputStatementsTable as v, type OutputStatementsTableProps as w, type OverlayAction as x, type QueryBlockPreviewOptions as y, type RuntimePanelEntry as z };
576
+ export { configureOverlayActions as $, type AttachmentUrlResolver as A, type ButtonAction as B, type CategorizedMetrics as C, DEFAULT_OUTPUT_FILTERS as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, type SectionIdentity as H, type InlineMetricEditPayload as I, type SectionRect as J, type SectionState as K, type WidgetProps as L, MetricBadge as M, type NavigationHook as N, type OutputFilterInput as O, type WidgetRegistry as P, type QueryExecutor as Q, type RowPrHighlight as R, type SessionTableSortSpec as S, TONE_CLASS as T, activeCursorSection as U, addRuntimePanel as V, type WidgetConfig as W, affiliateTagFacet as X, applyAmazonAffiliateTag as Y, attachmentUrlFacet as Z, autocompleteTooltipTheme as _, type CursorFocusState as a, sectionIdentity as a$, cursorFocusExtension as a0, customCompletionSources as a1, dispatchAddRuntimePanel as a2, dispatchExpandRuntimePanel as a3, dispatchGutterHighlights as a4, dispatchRemoveRuntimePanel as a5, editingQuerySectionsField as a6, editingWidgetsField as a7, editorFocusField as a8, editorFocusTracker as a9, inlineButtonDecoration as aA, insertMarkdownLinkCommand as aB, isAmazonRetailHost as aC, isEditorFocused as aD, isInternalFrontmatterKey as aE, isNavigableUrl as aF, lineIdsExtension as aG, linkOpen as aH, linkPreview as aI, markdownSyntaxHiding as aJ, markdownTablePreview as aK, navigationFacet as aL, nestedCompletion as aM, nestedCompletionOptions as aN, normalizeOutputFilter as aO, presentBadges as aP, previewDecorations as aQ, queryBlockPreview as aR, referenceIndexReload as aS, registeredSectionWidgets as aT, removeRuntimePanel as aU, resolveCodeLanguage as aV, runtimePanelField as aW, saveBlockQuerySource as aX, sectionAtPos as aY, sectionField as aZ, sectionGeometry as a_, editorPreset as aa, editorTheme as ab, embedPreviewDecorations as ac, expandRuntimePanel as ad, extractMetricsByCategory as ae, fenceCompletion as af, findQueryBlockSection as ag, findWorkoutErrors as ah, forceSectionParse as ai, formatClockTime as aj, formatMMSS as ak, frontmatterDebugMode as al, frontmatterDetailed as am, frontmatterKeymap as an, frontmatterPreview as ao, frontmatterPreviewField as ap, frontmatterReferenceIndex as aq, frontmatterSource as ar, frontmatterSuggestions as as, frontmatterVisibility as at, getCursorFocusState as au, getOverlayActions as av, gutterHighlightsField as aw, gutterUnified as ax, handleFenceAutoWrap as ay, handleSmartUrlPaste as az, type CustomCompletionSource as b, sectionIdentityHistory as b0, sectionMove as b1, sectionRestore as b2, sectionSaved as b3, sessionQueryFence as b4, sessionQueryInsert as b5, sessionQueryWql as b6, setEditorFocused as b7, setFrontmatterDetailed as b8, setFrontmatterSource as b9, setGutterHighlights as ba, setQuerySourceEditing as bb, slashBlockCompletion as bc, smartIncrement as bd, toggleInlineMarkdown as be, toggleWidgetEdit as bf, urlAtPos as bg, widgetBlockPreview as bh, wodAutoWrap as bi, wodAutocompletion as bj, wodCompletionSource as bk, wodEditorKeymap as bl, wodLinter as bm, wodOverlayPanel as bn, workoutLintSource as bo, wrapInTimeFence as bp, DEFAULT_PRIMARY_FILTER as c, DefaultFrontmatterWidget as d, type EditorPresetOptions as e, type EditorSection as f, type EditorSectionSubtype as g, type EditorSectionType as h, type EmbedType as i, type FrontmatterRefDiagnostic as j, type FrontmatterReferenceProvider as k, type FrontmatterReferenceRef as l, type FrontmatterReferenceResolution as m, type FrontmatterSuggestionCatalog as n, INTERNAL_FRONTMATTER_KEYS as o, type NestedCompletionOptions as p, OUTPUT_TYPE_CLASS as q, OUTPUT_TYPE_DOT as r, OutputFilterPills as s, type OutputFilterPreset as t, type OutputStatementRow as u, OutputStatementsTable as v, type OutputStatementsTableProps as w, type OverlayAction as x, type QueryBlockPreviewOptions as y, type RuntimePanelEntry as z };
@@ -44,6 +44,27 @@ declare function isNavigableUrl(url: string): boolean;
44
44
  declare function urlAtPos(view: EditorView, pos: number): string | null;
45
45
  declare const linkOpen: Extension;
46
46
 
47
+ /**
48
+ * Optional Amazon Associates tag injected into outbound Amazon retail links
49
+ * rendered by editor link pills, tables, and Ctrl+Click navigation.
50
+ * When unset or empty, link URLs are left untouched.
51
+ */
52
+ declare const affiliateTagFacet: Facet<string | null | undefined, string | null>;
53
+ /**
54
+ * Returns `true` for Amazon retail hostnames (e.g. `amazon.com`,
55
+ * `www.amazon.co.uk`, `smile.amazon.de`), excluding shortlink domains
56
+ * (`amzn.to`, `a.co`) and non-retail subdomains (`aws.amazon.com`).
57
+ */
58
+ declare function isAmazonRetailHost(hostname: string): boolean;
59
+ /**
60
+ * Injects or replaces the Amazon Associates `tag` query parameter on outbound
61
+ * Amazon retail URLs when `associateTag` is non-empty.
62
+ *
63
+ * Shortlinks (e.g. `amzn.to`) and non-Amazon URLs are returned unchanged.
64
+ * Never mutates the underlying Markdown source.
65
+ */
66
+ declare function applyAmazonAffiliateTag(url: string, associateTag?: string | null): string;
67
+
47
68
  declare function findWorkoutErrors(content: string, offsetInDoc: number): Diagnostic[];
48
69
  declare function workoutLintSource(view: EditorView): Diagnostic[];
49
70
  declare const wodLinter: _codemirror_state.Extension;
@@ -177,6 +198,7 @@ declare class SectionGeometryPlugin {
177
198
  docVersion: number;
178
199
  private listeners;
179
200
  private pendingNotify;
201
+ private resizeObserver;
180
202
  constructor(view: EditorView);
181
203
  update(update: ViewUpdate): void;
182
204
  addListener(fn: GeometryListener): () => void;
@@ -551,4 +573,4 @@ interface EditorPresetOptions {
551
573
  }
552
574
  declare function editorPreset(optionsOrDialect?: string | EditorPresetOptions): Extension[];
553
575
 
554
- export { customCompletionSources as $, type AttachmentUrlResolver as A, type ButtonAction as B, type CategorizedMetrics as C, DEFAULT_OUTPUT_FILTERS as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, type SectionIdentity as H, type InlineMetricEditPayload as I, type SectionRect as J, type SectionState as K, type WidgetProps as L, MetricBadge as M, type NavigationHook as N, type OutputFilterInput as O, type WidgetRegistry as P, type QueryExecutor as Q, type RowPrHighlight as R, type SessionTableSortSpec as S, TONE_CLASS as T, activeCursorSection as U, addRuntimePanel as V, type WidgetConfig as W, attachmentUrlFacet as X, autocompleteTooltipTheme as Y, configureOverlayActions as Z, cursorFocusExtension as _, type CursorFocusState as a, sectionRestore as a$, dispatchAddRuntimePanel as a0, dispatchExpandRuntimePanel as a1, dispatchGutterHighlights as a2, dispatchRemoveRuntimePanel as a3, editingQuerySectionsField as a4, editingWidgetsField as a5, editorFocusField as a6, editorFocusTracker as a7, editorPreset as a8, editorTheme as a9, isEditorFocused as aA, isInternalFrontmatterKey as aB, isNavigableUrl as aC, lineIdsExtension as aD, linkOpen as aE, linkPreview as aF, markdownSyntaxHiding as aG, markdownTablePreview as aH, navigationFacet as aI, nestedCompletion as aJ, nestedCompletionOptions as aK, normalizeOutputFilter as aL, presentBadges as aM, previewDecorations as aN, queryBlockPreview as aO, referenceIndexReload as aP, registeredSectionWidgets as aQ, removeRuntimePanel as aR, resolveCodeLanguage as aS, runtimePanelField as aT, saveBlockQuerySource as aU, sectionAtPos as aV, sectionField as aW, sectionGeometry as aX, sectionIdentity as aY, sectionIdentityHistory as aZ, sectionMove as a_, embedPreviewDecorations as aa, expandRuntimePanel as ab, extractMetricsByCategory as ac, fenceCompletion as ad, findQueryBlockSection as ae, findWorkoutErrors as af, forceSectionParse as ag, formatClockTime as ah, formatMMSS as ai, frontmatterDebugMode as aj, frontmatterDetailed as ak, frontmatterKeymap as al, frontmatterPreview as am, frontmatterPreviewField as an, frontmatterReferenceIndex as ao, frontmatterSource as ap, frontmatterSuggestions as aq, frontmatterVisibility as ar, getCursorFocusState as as, getOverlayActions as at, gutterHighlightsField as au, gutterUnified as av, handleFenceAutoWrap as aw, handleSmartUrlPaste as ax, inlineButtonDecoration as ay, insertMarkdownLinkCommand as az, type CustomCompletionSource as b, sectionSaved as b0, sessionQueryFence as b1, sessionQueryInsert as b2, sessionQueryWql as b3, setEditorFocused as b4, setFrontmatterDetailed as b5, setFrontmatterSource as b6, setGutterHighlights as b7, setQuerySourceEditing as b8, slashBlockCompletion as b9, smartIncrement as ba, toggleInlineMarkdown as bb, toggleWidgetEdit as bc, urlAtPos as bd, widgetBlockPreview as be, wodAutoWrap as bf, wodAutocompletion as bg, wodCompletionSource as bh, wodEditorKeymap as bi, wodLinter as bj, wodOverlayPanel as bk, workoutLintSource as bl, wrapInTimeFence as bm, DEFAULT_PRIMARY_FILTER as c, DefaultFrontmatterWidget as d, type EditorPresetOptions as e, type EditorSection as f, type EditorSectionSubtype as g, type EditorSectionType as h, type EmbedType as i, type FrontmatterRefDiagnostic as j, type FrontmatterReferenceProvider as k, type FrontmatterReferenceRef as l, type FrontmatterReferenceResolution as m, type FrontmatterSuggestionCatalog as n, INTERNAL_FRONTMATTER_KEYS as o, type NestedCompletionOptions as p, OUTPUT_TYPE_CLASS as q, OUTPUT_TYPE_DOT as r, OutputFilterPills as s, type OutputFilterPreset as t, type OutputStatementRow as u, OutputStatementsTable as v, type OutputStatementsTableProps as w, type OverlayAction as x, type QueryBlockPreviewOptions as y, type RuntimePanelEntry as z };
576
+ export { configureOverlayActions as $, type AttachmentUrlResolver as A, type ButtonAction as B, type CategorizedMetrics as C, DEFAULT_OUTPUT_FILTERS as D, type EditorDialect as E, type FrontmatterCatalogEntry as F, type GeometryListener as G, type SectionIdentity as H, type InlineMetricEditPayload as I, type SectionRect as J, type SectionState as K, type WidgetProps as L, MetricBadge as M, type NavigationHook as N, type OutputFilterInput as O, type WidgetRegistry as P, type QueryExecutor as Q, type RowPrHighlight as R, type SessionTableSortSpec as S, TONE_CLASS as T, activeCursorSection as U, addRuntimePanel as V, type WidgetConfig as W, affiliateTagFacet as X, applyAmazonAffiliateTag as Y, attachmentUrlFacet as Z, autocompleteTooltipTheme as _, type CursorFocusState as a, sectionIdentity as a$, cursorFocusExtension as a0, customCompletionSources as a1, dispatchAddRuntimePanel as a2, dispatchExpandRuntimePanel as a3, dispatchGutterHighlights as a4, dispatchRemoveRuntimePanel as a5, editingQuerySectionsField as a6, editingWidgetsField as a7, editorFocusField as a8, editorFocusTracker as a9, inlineButtonDecoration as aA, insertMarkdownLinkCommand as aB, isAmazonRetailHost as aC, isEditorFocused as aD, isInternalFrontmatterKey as aE, isNavigableUrl as aF, lineIdsExtension as aG, linkOpen as aH, linkPreview as aI, markdownSyntaxHiding as aJ, markdownTablePreview as aK, navigationFacet as aL, nestedCompletion as aM, nestedCompletionOptions as aN, normalizeOutputFilter as aO, presentBadges as aP, previewDecorations as aQ, queryBlockPreview as aR, referenceIndexReload as aS, registeredSectionWidgets as aT, removeRuntimePanel as aU, resolveCodeLanguage as aV, runtimePanelField as aW, saveBlockQuerySource as aX, sectionAtPos as aY, sectionField as aZ, sectionGeometry as a_, editorPreset as aa, editorTheme as ab, embedPreviewDecorations as ac, expandRuntimePanel as ad, extractMetricsByCategory as ae, fenceCompletion as af, findQueryBlockSection as ag, findWorkoutErrors as ah, forceSectionParse as ai, formatClockTime as aj, formatMMSS as ak, frontmatterDebugMode as al, frontmatterDetailed as am, frontmatterKeymap as an, frontmatterPreview as ao, frontmatterPreviewField as ap, frontmatterReferenceIndex as aq, frontmatterSource as ar, frontmatterSuggestions as as, frontmatterVisibility as at, getCursorFocusState as au, getOverlayActions as av, gutterHighlightsField as aw, gutterUnified as ax, handleFenceAutoWrap as ay, handleSmartUrlPaste as az, type CustomCompletionSource as b, sectionIdentityHistory as b0, sectionMove as b1, sectionRestore as b2, sectionSaved as b3, sessionQueryFence as b4, sessionQueryInsert as b5, sessionQueryWql as b6, setEditorFocused as b7, setFrontmatterDetailed as b8, setFrontmatterSource as b9, setGutterHighlights as ba, setQuerySourceEditing as bb, slashBlockCompletion as bc, smartIncrement as bd, toggleInlineMarkdown as be, toggleWidgetEdit as bf, urlAtPos as bg, widgetBlockPreview as bh, wodAutoWrap as bi, wodAutocompletion as bj, wodCompletionSource as bk, wodEditorKeymap as bl, wodLinter as bm, wodOverlayPanel as bn, workoutLintSource as bo, wrapInTimeFence as bp, DEFAULT_PRIMARY_FILTER as c, DefaultFrontmatterWidget as d, type EditorPresetOptions as e, type EditorSection as f, type EditorSectionSubtype as g, type EditorSectionType as h, type EmbedType as i, type FrontmatterRefDiagnostic as j, type FrontmatterReferenceProvider as k, type FrontmatterReferenceRef as l, type FrontmatterReferenceResolution as m, type FrontmatterSuggestionCatalog as n, INTERNAL_FRONTMATTER_KEYS as o, type NestedCompletionOptions as p, OUTPUT_TYPE_CLASS as q, OUTPUT_TYPE_DOT as r, OutputFilterPills as s, type OutputFilterPreset as t, type OutputStatementRow as u, OutputStatementsTable as v, type OutputStatementsTableProps as w, type OverlayAction as x, type QueryBlockPreviewOptions as y, type RuntimePanelEntry as z };
package/dist/index.cjs CHANGED
@@ -1275,6 +1275,7 @@ function ScalarTokenInput({
1275
1275
  onChange: (e) => setDraft(e.target.value),
1276
1276
  onBlur: commit,
1277
1277
  onKeyDown: (e) => {
1278
+ if (e.nativeEvent.isComposing || e.keyCode === 229) return;
1278
1279
  if (e.key === "Enter") {
1279
1280
  commit();
1280
1281
  e.currentTarget.blur();
@@ -7176,6 +7177,33 @@ var lineIdsExtension = view.ViewPlugin.fromClass(
7176
7177
  decorations: (v) => v.decorations
7177
7178
  }
7178
7179
  );
7180
+ var affiliateTagFacet = state.Facet.define({
7181
+ combine(values2) {
7182
+ for (let i = values2.length - 1; i >= 0; i--) {
7183
+ const trimmed = values2[i]?.trim();
7184
+ if (trimmed) return trimmed;
7185
+ }
7186
+ return null;
7187
+ }
7188
+ });
7189
+ var AMAZON_RETAIL_HOST_RE = /^(?:www\.|smile\.|m\.)?amazon\.[a-z]{2,3}(?:\.[a-z]{2})?$/i;
7190
+ function isAmazonRetailHost(hostname) {
7191
+ return AMAZON_RETAIL_HOST_RE.test(hostname);
7192
+ }
7193
+ function applyAmazonAffiliateTag(url, associateTag) {
7194
+ const tag = associateTag?.trim();
7195
+ if (!tag || !/^https?:\/\//i.test(url)) return url;
7196
+ try {
7197
+ const parsed = new URL(url);
7198
+ if (!isAmazonRetailHost(parsed.hostname)) return url;
7199
+ parsed.searchParams.set("tag", tag);
7200
+ return parsed.toString();
7201
+ } catch {
7202
+ return url;
7203
+ }
7204
+ }
7205
+
7206
+ // src/extensions/link-open.ts
7179
7207
  var navigationFacet = state.Facet.define({
7180
7208
  combine(values2) {
7181
7209
  return values2.length > 0 ? values2[values2.length - 1] : null;
@@ -7266,12 +7294,13 @@ var ctrlClickPlugin = view.ViewPlugin.fromClass(
7266
7294
  if (!url) return;
7267
7295
  e.preventDefault();
7268
7296
  e.stopPropagation();
7297
+ const resolvedUrl = applyAmazonAffiliateTag(url, view.state.facet(affiliateTagFacet));
7269
7298
  const navHook = view.state.facet(navigationFacet);
7270
7299
  if (navHook) {
7271
- navHook(url, view);
7300
+ navHook(resolvedUrl, view);
7272
7301
  } else if (typeof window !== "undefined") {
7273
- const isInternal = url.startsWith("/") || url.startsWith("#");
7274
- window.open(url, isInternal ? "_self" : "_blank", isInternal ? void 0 : "noopener,noreferrer");
7302
+ const isInternal = resolvedUrl.startsWith("/") || resolvedUrl.startsWith("#");
7303
+ window.open(resolvedUrl, isInternal ? "_self" : "_blank", isInternal ? void 0 : "noopener,noreferrer");
7275
7304
  }
7276
7305
  };
7277
7306
  view.dom.addEventListener("mousedown", this.handler, true);
@@ -7918,17 +7947,25 @@ var SectionGeometryPlugin = class {
7918
7947
  constructor(view) {
7919
7948
  this.view = view;
7920
7949
  this.measure();
7950
+ if (typeof ResizeObserver !== "undefined" && this.view.contentDOM) {
7951
+ this.resizeObserver = new ResizeObserver(() => {
7952
+ this.view.requestMeasure();
7953
+ this.measure();
7954
+ });
7955
+ this.resizeObserver.observe(this.view.contentDOM);
7956
+ }
7921
7957
  }
7922
7958
  view;
7923
7959
  rects = [];
7924
7960
  docVersion = 0;
7925
7961
  listeners = /* @__PURE__ */ new Set();
7926
7962
  pendingNotify = null;
7963
+ resizeObserver = null;
7927
7964
  update(update) {
7928
7965
  if (update.docChanged) {
7929
7966
  this.docVersion++;
7930
7967
  }
7931
- if (update.docChanged || update.geometryChanged) {
7968
+ if (update.docChanged || update.geometryChanged || update.viewportChanged) {
7932
7969
  this.measure();
7933
7970
  }
7934
7971
  }
@@ -7992,6 +8029,8 @@ var SectionGeometryPlugin = class {
7992
8029
  if (this.pendingNotify !== null && typeof cancelAnimationFrame === "function") {
7993
8030
  cancelAnimationFrame(this.pendingNotify);
7994
8031
  }
8032
+ this.resizeObserver?.disconnect();
8033
+ this.resizeObserver = null;
7995
8034
  this.listeners.clear();
7996
8035
  }
7997
8036
  };
@@ -8950,6 +8989,7 @@ function createTagDraftRow(view, root, key, onCommit) {
8950
8989
  const discard = () => settle(false);
8951
8990
  attachSuggestions(input, view, root, "value", key, [], commit);
8952
8991
  input.addEventListener("keydown", (e) => {
8992
+ if (e.isComposing || e.keyCode === 229) return;
8953
8993
  if (e.key === "Escape") {
8954
8994
  e.preventDefault();
8955
8995
  discard();
@@ -9069,6 +9109,7 @@ function createMetricDraftRow(view, root, referenceProvider, commit) {
9069
9109
  customKeyInput.setAttribute("aria-label", "Metric key");
9070
9110
  customKeyInput.dataset.frontmatterField = "key";
9071
9111
  customKeyInput.addEventListener("keydown", (e) => {
9112
+ if (e.isComposing || e.keyCode === 229) return;
9072
9113
  if (e.key === "Escape") {
9073
9114
  e.preventDefault();
9074
9115
  settle(false);
@@ -9093,6 +9134,7 @@ function createMetricDraftRow(view, root, referenceProvider, commit) {
9093
9134
  attachFor();
9094
9135
  select.addEventListener("change", attachFor);
9095
9136
  input.addEventListener("keydown", (e) => {
9137
+ if (e.isComposing || e.keyCode === 229) return;
9096
9138
  if (e.defaultPrevented && e.key !== "Escape") return;
9097
9139
  if (e.key === "Escape") {
9098
9140
  e.preventDefault();
@@ -9163,6 +9205,7 @@ function createSummaryDraftRow(view, commit) {
9163
9205
  view.requestMeasure();
9164
9206
  };
9165
9207
  keyInput.addEventListener("keydown", (e) => {
9208
+ if (e.isComposing || e.keyCode === 229) return;
9166
9209
  if (e.key === "Escape") {
9167
9210
  e.preventDefault();
9168
9211
  settle(false);
@@ -9175,6 +9218,7 @@ function createSummaryDraftRow(view, commit) {
9175
9218
  }
9176
9219
  });
9177
9220
  valInput.addEventListener("keydown", (e) => {
9221
+ if (e.isComposing || e.keyCode === 229) return;
9178
9222
  if (e.key === "Escape") {
9179
9223
  e.preventDefault();
9180
9224
  settle(false);
@@ -10828,11 +10872,12 @@ function appendFormattedCellContent(container, rawText, view) {
10828
10872
  } else if (match[2] !== void 0 && match[3] !== void 0) {
10829
10873
  const label = match[2];
10830
10874
  const url = match[3];
10875
+ const isExternal = /^https?:\/\//i.test(url);
10876
+ const resolvedUrl = isExternal ? applyAmazonAffiliateTag(url, view.state.facet(affiliateTagFacet)) : url;
10831
10877
  const a = document.createElement("a");
10832
- a.href = url;
10878
+ a.href = resolvedUrl;
10833
10879
  a.textContent = label;
10834
10880
  a.className = "cm-table-cell-link underline underline-offset-2";
10835
- const isExternal = /^https?:\/\//i.test(url);
10836
10881
  if (isExternal) {
10837
10882
  a.target = "_blank";
10838
10883
  a.rel = "noopener noreferrer";
@@ -10947,6 +10992,7 @@ var MarkdownTableWidget = class extends view.WidgetType {
10947
10992
  input.addEventListener("click", (e) => e.stopPropagation());
10948
10993
  input.addEventListener("keydown", (e) => {
10949
10994
  e.stopPropagation();
10995
+ if (e.isComposing || e.keyCode === 229) return;
10950
10996
  if (e.key === "Tab") {
10951
10997
  e.preventDefault();
10952
10998
  const dir = e.shiftKey ? -1 : 1;
@@ -11290,7 +11336,8 @@ function openLinkEditPopover(anchorEl, view, match) {
11290
11336
  openBtn.addEventListener("click", (e) => {
11291
11337
  e.preventDefault();
11292
11338
  e.stopPropagation();
11293
- const targetUrl = urlInput.value.trim() || match.url;
11339
+ const rawUrl = urlInput.value.trim() || match.url;
11340
+ const targetUrl = applyAmazonAffiliateTag(rawUrl, view.state.facet(affiliateTagFacet));
11294
11341
  closeActiveLinkPopover();
11295
11342
  const navHook = view.state.facet(navigationFacet);
11296
11343
  if (!isExternalHttpUrl(targetUrl) && navHook) {
@@ -11341,6 +11388,7 @@ function openLinkEditPopover(anchorEl, view, match) {
11341
11388
  });
11342
11389
  const handleKeyDown = (e) => {
11343
11390
  e.stopPropagation();
11391
+ if (e.isComposing || e.keyCode === 229) return;
11344
11392
  if (e.key === "Enter") {
11345
11393
  e.preventDefault();
11346
11394
  applyChanges();
@@ -11377,21 +11425,23 @@ function openLinkEditPopover(anchorEl, view, match) {
11377
11425
  labelInput.select();
11378
11426
  }
11379
11427
  var LinkPillWidget = class extends view.WidgetType {
11380
- constructor(label, url, from, to, readOnly) {
11428
+ constructor(label, url, from, to, readOnly, affiliateTag) {
11381
11429
  super();
11382
11430
  this.label = label;
11383
11431
  this.url = url;
11384
11432
  this.from = from;
11385
11433
  this.to = to;
11386
11434
  this.readOnly = readOnly;
11435
+ this.affiliateTag = affiliateTag;
11387
11436
  }
11388
11437
  label;
11389
11438
  url;
11390
11439
  from;
11391
11440
  to;
11392
11441
  readOnly;
11442
+ affiliateTag;
11393
11443
  eq(other) {
11394
- return this.label === other.label && this.url === other.url && this.from === other.from && this.to === other.to && this.readOnly === other.readOnly;
11444
+ return this.label === other.label && this.url === other.url && this.from === other.from && this.to === other.to && this.readOnly === other.readOnly && this.affiliateTag === other.affiliateTag;
11395
11445
  }
11396
11446
  toDOM(view) {
11397
11447
  const isExternal = isExternalHttpUrl(this.url);
@@ -11418,9 +11468,10 @@ var LinkPillWidget = class extends view.WidgetType {
11418
11468
  });
11419
11469
  }
11420
11470
  pill.appendChild(label);
11471
+ const resolvedUrl = isExternal ? applyAmazonAffiliateTag(this.url, this.affiliateTag) : this.url;
11421
11472
  const open = document.createElement("a");
11422
11473
  open.className = "cm-link-pill-open";
11423
- open.href = this.url;
11474
+ open.href = resolvedUrl;
11424
11475
  if (isExternal) {
11425
11476
  open.target = "_blank";
11426
11477
  open.rel = "noopener noreferrer";
@@ -11432,11 +11483,11 @@ var LinkPillWidget = class extends view.WidgetType {
11432
11483
  if (navHook) {
11433
11484
  e.preventDefault();
11434
11485
  e.stopPropagation();
11435
- navHook(this.url, view);
11486
+ navHook(resolvedUrl, view);
11436
11487
  }
11437
11488
  });
11438
11489
  }
11439
- open.title = this.url;
11490
+ open.title = resolvedUrl;
11440
11491
  open.appendChild(createLinkArrowIcon(isExternal));
11441
11492
  pill.appendChild(open);
11442
11493
  return pill;
@@ -11570,7 +11621,8 @@ function buildLinkDecos(state$1) {
11570
11621
  link.url,
11571
11622
  link.from,
11572
11623
  link.to,
11573
- state$1.readOnly
11624
+ state$1.readOnly,
11625
+ state$1.facet(affiliateTagFacet)
11574
11626
  )
11575
11627
  })
11576
11628
  );
@@ -18267,13 +18319,13 @@ function editorPreset(optionsOrDialect = "markdown") {
18267
18319
  }
18268
18320
 
18269
18321
  // src/version.ts
18270
- var VERSION = "0.56.2210";
18271
- var GIT_SHA = "92d64b5";
18272
- var BUILD_TIME = "2026-11-12T20:56:12.928Z";
18322
+ var VERSION = "0.58.2220";
18323
+ var GIT_SHA = "89b2e39";
18324
+ var BUILD_TIME = "2026-11-14T03:19:12.696Z";
18273
18325
  var SEMVER = {
18274
- version: "0.56.2210",
18275
- gitSha: "92d64b5",
18276
- buildTime: "2026-11-12T20:56:12.928Z"
18326
+ version: "0.58.2220",
18327
+ gitSha: "89b2e39",
18328
+ buildTime: "2026-11-14T03:19:12.696Z"
18277
18329
  };
18278
18330
 
18279
18331
  Object.defineProperty(exports, "CONTENT_GROUPING_DIMENSIONS", {
@@ -18351,6 +18403,8 @@ exports.WqlTimeseries = WqlTimeseries;
18351
18403
  exports.ZoneDistribution = ZoneDistribution;
18352
18404
  exports.activeCursorSection = activeCursorSection;
18353
18405
  exports.addRuntimePanel = addRuntimePanel;
18406
+ exports.affiliateTagFacet = affiliateTagFacet;
18407
+ exports.applyAmazonAffiliateTag = applyAmazonAffiliateTag;
18354
18408
  exports.attachmentUrlFacet = attachmentUrlFacet;
18355
18409
  exports.autocompleteTooltipTheme = autocompleteTooltipTheme;
18356
18410
  exports.bindTokenParamIntoWql = bindTokenParamIntoWql;
@@ -18414,6 +18468,7 @@ exports.hashCode = hashCode;
18414
18468
  exports.inlineButtonDecoration = inlineButtonDecoration;
18415
18469
  exports.insertMarkdownLinkCommand = insertMarkdownLinkCommand;
18416
18470
  exports.invalidateSuggestions = invalidateSuggestions;
18471
+ exports.isAmazonRetailHost = isAmazonRetailHost;
18417
18472
  exports.isEditorFocused = isEditorFocused;
18418
18473
  exports.isInternalFrontmatterKey = isInternalFrontmatterKey;
18419
18474
  exports.isNavigableUrl = isNavigableUrl;