@adapttable/naive-ui 0.3.3 → 0.4.0

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.
Files changed (194) hide show
  1. package/dist/{NaiveFilterSurface-BwJ-D-EB.js → NaiveFilterSurface-CnhNSSF1.js} +5 -5
  2. package/dist/NaiveFilterSurface-CnhNSSF1.js.map +1 -0
  3. package/dist/{NaiveFilterSurface-BXsgCRMO.cjs → NaiveFilterSurface-DqUmkz-o.cjs} +3 -3
  4. package/dist/NaiveFilterSurface-DqUmkz-o.cjs.map +1 -0
  5. package/dist/{NaiveManagedPopover-DhLEXdew.cjs → NaiveManagedPopover-CWoJsbAN.cjs} +3 -3
  6. package/dist/NaiveManagedPopover-CWoJsbAN.cjs.map +1 -0
  7. package/dist/{NaiveManagedPopover-XhOSQEWC.js → NaiveManagedPopover-DftDHR8p.js} +5 -5
  8. package/dist/NaiveManagedPopover-DftDHR8p.js.map +1 -0
  9. package/dist/{NaiveRowActions-D3J6uPSu.cjs → NaiveRowActions-BR140413.cjs} +4 -3
  10. package/dist/NaiveRowActions-BR140413.cjs.map +1 -0
  11. package/dist/{NaiveRowActions-DlDrl3Ed.js → NaiveRowActions-DVyMXQJq.js} +5 -4
  12. package/dist/NaiveRowActions-DVyMXQJq.js.map +1 -0
  13. package/dist/{assistant-C5NcmK_X.cjs → assistant-DppW6EN1.cjs} +2 -2
  14. package/dist/assistant-DppW6EN1.cjs.map +1 -0
  15. package/dist/{assistant-CEXAPOyL.js → assistant-_SYRZCOi.js} +4 -4
  16. package/dist/assistant-_SYRZCOi.js.map +1 -0
  17. package/dist/assistant.cjs +1 -1
  18. package/dist/assistant.js +1 -1
  19. package/dist/batch-editing.cjs +1 -1
  20. package/dist/batch-editing.js +1 -1
  21. package/dist/button-BxXdDW7A.js.map +1 -1
  22. package/dist/button-CaakTzYM.cjs.map +1 -1
  23. package/dist/{column-menu-Bb6BOjdI.js → column-menu-BeNblq2u.js} +7 -3
  24. package/dist/column-menu-BeNblq2u.js.map +1 -0
  25. package/dist/{column-menu-CDtaqm4z.cjs → column-menu-GUeADLrH.cjs} +7 -3
  26. package/dist/column-menu-GUeADLrH.cjs.map +1 -0
  27. package/dist/column-menu.cjs +1 -1
  28. package/dist/column-menu.js +1 -1
  29. package/dist/columns.cjs +26 -0
  30. package/dist/columns.d.cts +3 -0
  31. package/dist/columns.d.ts +3 -0
  32. package/dist/columns.js +2 -0
  33. package/dist/{command-palette-D396WFrI.cjs → command-palette-4qS9viir.cjs} +2 -2
  34. package/dist/{command-palette-D396WFrI.cjs.map → command-palette-4qS9viir.cjs.map} +1 -1
  35. package/dist/{command-palette-ZSFMOROm.js → command-palette-CSI-tgcP.js} +2 -2
  36. package/dist/{command-palette-ZSFMOROm.js.map → command-palette-CSI-tgcP.js.map} +1 -1
  37. package/dist/command-palette.cjs +1 -1
  38. package/dist/command-palette.js +1 -1
  39. package/dist/{context-menu-DjYIQXhY.js → context-menu-CsbLaMcR.js} +4 -4
  40. package/dist/context-menu-CsbLaMcR.js.map +1 -0
  41. package/dist/{context-menu-BbhrjTZr.cjs → context-menu-qVwE9S2V.cjs} +2 -2
  42. package/dist/context-menu-qVwE9S2V.cjs.map +1 -0
  43. package/dist/context-menu.cjs +1 -1
  44. package/dist/context-menu.js +1 -1
  45. package/dist/{editing-DR4w-oKB.cjs → editing-BAUOl5Ox.cjs} +8 -6
  46. package/dist/editing-BAUOl5Ox.cjs.map +1 -0
  47. package/dist/editing-CdIoFGiK.d.cts.map +1 -1
  48. package/dist/{editing-C7QHX-gq.js → editing-DTOBwNI6.js} +9 -7
  49. package/dist/editing-DTOBwNI6.js.map +1 -0
  50. package/dist/editing-Dho3Y2RK.d.ts.map +1 -1
  51. package/dist/editing.cjs +1 -1
  52. package/dist/editing.js +1 -1
  53. package/dist/export-csv-BU39yRSN.d.ts +9 -0
  54. package/dist/export-csv-BU39yRSN.d.ts.map +1 -0
  55. package/dist/export-csv-DRDjZuQj.d.cts +9 -0
  56. package/dist/export-csv-DRDjZuQj.d.cts.map +1 -0
  57. package/dist/export-csv.cjs +11 -0
  58. package/dist/export-csv.cjs.map +1 -0
  59. package/dist/export-csv.d.cts +2 -0
  60. package/dist/export-csv.d.ts +2 -0
  61. package/dist/export-csv.js +10 -0
  62. package/dist/export-csv.js.map +1 -0
  63. package/dist/export-pdf.cjs +53 -0
  64. package/dist/export-pdf.cjs.map +1 -0
  65. package/dist/export-pdf.d.cts +8 -0
  66. package/dist/export-pdf.d.cts.map +1 -0
  67. package/dist/export-pdf.d.ts +8 -0
  68. package/dist/export-pdf.d.ts.map +1 -0
  69. package/dist/export-pdf.js +10 -0
  70. package/dist/export-pdf.js.map +1 -0
  71. package/dist/export-xlsx.cjs +23 -0
  72. package/dist/export-xlsx.cjs.map +1 -0
  73. package/dist/export-xlsx.d.cts +8 -0
  74. package/dist/export-xlsx.d.cts.map +1 -0
  75. package/dist/export-xlsx.d.ts +8 -0
  76. package/dist/export-xlsx.d.ts.map +1 -0
  77. package/dist/export-xlsx.js +10 -0
  78. package/dist/export-xlsx.js.map +1 -0
  79. package/dist/export.cjs +2 -15
  80. package/dist/export.d.cts +2 -9
  81. package/dist/export.d.ts +2 -9
  82. package/dist/export.js +1 -14
  83. package/dist/features.cjs +13 -12
  84. package/dist/features.d.cts +2 -1
  85. package/dist/features.d.ts +2 -1
  86. package/dist/features.js +12 -11
  87. package/dist/{filters-Ce9485--.cjs → filters-B5JX7H8p.cjs} +79 -67
  88. package/dist/filters-B5JX7H8p.cjs.map +1 -0
  89. package/dist/filters-BJ48GzqJ.d.ts.map +1 -1
  90. package/dist/filters-C6DvAZ_T.d.cts.map +1 -1
  91. package/dist/{filters-w5iJExiN.js → filters-DipcT7-T.js} +80 -68
  92. package/dist/filters-DipcT7-T.js.map +1 -0
  93. package/dist/filters.cjs +2 -2
  94. package/dist/filters.js +2 -2
  95. package/dist/grouping.cjs +1 -1
  96. package/dist/grouping.cjs.map +1 -1
  97. package/dist/grouping.js +2 -2
  98. package/dist/grouping.js.map +1 -1
  99. package/dist/{header-filters-B5_gSabO.cjs → header-filters-C8cAJJ7r.cjs} +37 -18
  100. package/dist/header-filters-C8cAJJ7r.cjs.map +1 -0
  101. package/dist/header-filters-CQg6clum.d.cts.map +1 -1
  102. package/dist/header-filters-CQg6clum.d.ts.map +1 -1
  103. package/dist/{header-filters-DmgFtg_F.js → header-filters-CWad6foD.js} +39 -20
  104. package/dist/header-filters-CWad6foD.js.map +1 -0
  105. package/dist/header-filters.cjs +1 -1
  106. package/dist/header-filters.js +1 -1
  107. package/dist/index.cjs +106 -29
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.d.cts.map +1 -1
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +108 -31
  112. package/dist/index.js.map +1 -1
  113. package/dist/{mobile-DvFNwZq-.cjs → mobile-CYsldyHR.cjs} +46 -38
  114. package/dist/mobile-CYsldyHR.cjs.map +1 -0
  115. package/dist/{mobile-BHOtdPjL.js → mobile-DxQ4glDn.js} +47 -39
  116. package/dist/mobile-DxQ4glDn.js.map +1 -0
  117. package/dist/{modalEscape-CP6_uqjE.js → modalEscape-BIm9yvam.js} +4 -3
  118. package/dist/modalEscape-BIm9yvam.js.map +1 -0
  119. package/dist/{modalEscape-aYoIK8OW.cjs → modalEscape-Dgmkd7NP.cjs} +3 -2
  120. package/dist/modalEscape-Dgmkd7NP.cjs.map +1 -0
  121. package/dist/pivot.cjs +3 -4
  122. package/dist/pivot.cjs.map +1 -1
  123. package/dist/pivot.d.cts +3 -4
  124. package/dist/pivot.d.cts.map +1 -1
  125. package/dist/pivot.d.ts +3 -4
  126. package/dist/pivot.d.ts.map +1 -1
  127. package/dist/pivot.js +4 -5
  128. package/dist/pivot.js.map +1 -1
  129. package/dist/preset.cjs +7 -6
  130. package/dist/preset.cjs.map +1 -1
  131. package/dist/preset.js +6 -5
  132. package/dist/preset.js.map +1 -1
  133. package/dist/renderers.cjs +1 -1
  134. package/dist/renderers.d.cts +8 -10
  135. package/dist/renderers.d.cts.map +1 -1
  136. package/dist/renderers.d.ts +8 -10
  137. package/dist/renderers.d.ts.map +1 -1
  138. package/dist/renderers.js +1 -1
  139. package/dist/row-actions.cjs +1 -1
  140. package/dist/row-actions.js +1 -1
  141. package/dist/row-pinning.cjs +1 -1
  142. package/dist/row-pinning.js +1 -1
  143. package/dist/{row-reorder-BRySq2FF.cjs → row-reorder-2Ztn7QRu.cjs} +3 -3
  144. package/dist/row-reorder-2Ztn7QRu.cjs.map +1 -0
  145. package/dist/{row-reorder-BNYYEL8w.js → row-reorder-DBzbJ20V.js} +5 -5
  146. package/dist/row-reorder-DBzbJ20V.js.map +1 -0
  147. package/dist/row-reorder.cjs +1 -1
  148. package/dist/row-reorder.js +1 -1
  149. package/dist/rowActionsSlot-B48S_yZD.cjs.map +1 -1
  150. package/dist/rowActionsSlot-YWkCOo5W.js.map +1 -1
  151. package/dist/rows.cjs +30 -0
  152. package/dist/rows.d.cts +6 -0
  153. package/dist/rows.d.ts +6 -0
  154. package/dist/rows.js +4 -0
  155. package/dist/{saved-views-DLuxKH_r.cjs → saved-views-Co9WH7lC.cjs} +2 -2
  156. package/dist/{saved-views-DLuxKH_r.cjs.map → saved-views-Co9WH7lC.cjs.map} +1 -1
  157. package/dist/{saved-views-hTIhkbu0.js → saved-views-Dac8M1-P.js} +2 -2
  158. package/dist/{saved-views-hTIhkbu0.js.map → saved-views-Dac8M1-P.js.map} +1 -1
  159. package/dist/saved-views.cjs +1 -1
  160. package/dist/saved-views.js +1 -1
  161. package/dist/styles.css +5 -0
  162. package/dist/withNaiveExport-B0gpxqNd.js +15 -0
  163. package/dist/withNaiveExport-B0gpxqNd.js.map +1 -0
  164. package/dist/withNaiveExport-pQdjjXto.cjs +20 -0
  165. package/dist/withNaiveExport-pQdjjXto.cjs.map +1 -0
  166. package/package.json +53 -4
  167. package/dist/NaiveFilterSurface-BXsgCRMO.cjs.map +0 -1
  168. package/dist/NaiveFilterSurface-BwJ-D-EB.js.map +0 -1
  169. package/dist/NaiveManagedPopover-DhLEXdew.cjs.map +0 -1
  170. package/dist/NaiveManagedPopover-XhOSQEWC.js.map +0 -1
  171. package/dist/NaiveRowActions-D3J6uPSu.cjs.map +0 -1
  172. package/dist/NaiveRowActions-DlDrl3Ed.js.map +0 -1
  173. package/dist/assistant-C5NcmK_X.cjs.map +0 -1
  174. package/dist/assistant-CEXAPOyL.js.map +0 -1
  175. package/dist/column-menu-Bb6BOjdI.js.map +0 -1
  176. package/dist/column-menu-CDtaqm4z.cjs.map +0 -1
  177. package/dist/context-menu-BbhrjTZr.cjs.map +0 -1
  178. package/dist/context-menu-DjYIQXhY.js.map +0 -1
  179. package/dist/editing-C7QHX-gq.js.map +0 -1
  180. package/dist/editing-DR4w-oKB.cjs.map +0 -1
  181. package/dist/export.cjs.map +0 -1
  182. package/dist/export.d.cts.map +0 -1
  183. package/dist/export.d.ts.map +0 -1
  184. package/dist/export.js.map +0 -1
  185. package/dist/filters-Ce9485--.cjs.map +0 -1
  186. package/dist/filters-w5iJExiN.js.map +0 -1
  187. package/dist/header-filters-B5_gSabO.cjs.map +0 -1
  188. package/dist/header-filters-DmgFtg_F.js.map +0 -1
  189. package/dist/mobile-BHOtdPjL.js.map +0 -1
  190. package/dist/mobile-DvFNwZq-.cjs.map +0 -1
  191. package/dist/modalEscape-CP6_uqjE.js.map +0 -1
  192. package/dist/modalEscape-aYoIK8OW.cjs.map +0 -1
  193. package/dist/row-reorder-BNYYEL8w.js.map +0 -1
  194. package/dist/row-reorder-BRySq2FF.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"button-BxXdDW7A.js","names":[],"sources":["../src/controls/attributes.ts","../src/controls/elementTarget.ts","../src/renderers/nativeElement.ts","../src/controls/button.ts"],"sourcesContent":["import type { Attrs } from \"@adapttable/vue\";\n\n/** Remove only attributes consumed by a component's controlled-value API. */\nexport function withoutAttributes(\n attrs: Attrs,\n names: readonly string[]\n): Attrs {\n return Object.fromEntries(\n Object.entries(attrs).filter(([name]) => !names.includes(name))\n );\n}\n\n/** Vue may merge DOM listeners into arrays; preserve their order and event identity. */\nexport function eventHandler<TEvent extends Event>(\n value: unknown\n): ((event: TEvent) => void) | undefined {\n if (typeof value === \"function\") return value as (event: TEvent) => void;\n if (!Array.isArray(value)) return undefined;\n const listeners = value.map((entry: unknown) => eventHandler<TEvent>(entry));\n return (event) => {\n for (const listener of listeners) listener?.(event);\n };\n}\n","import type { ComponentPublicInstance } from \"vue\";\n\n/** Public Vue host access for Naive primitives with a single HTML root. */\nexport function htmlRoot(\n instance: ComponentPublicInstance\n): HTMLElement | null {\n const value: unknown = instance.$el;\n return typeof HTMLElement !== \"undefined\" && value instanceof HTMLElement\n ? value\n : null;\n}\n","import type { Attrs, ElementRef } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport {\n type Component,\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n type VNodeChild,\n} from \"vue\";\n\nimport { withoutAttributes } from \"../controls/attributes\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\nconst NativeElement = defineComponent(\n (props: {\n readonly component: Component;\n readonly attrs: Attrs;\n readonly content: () => VNodeChild;\n }) => {\n const instance = shallowRef<ComponentPublicInstance | null>(null);\n useElementRef(\n () => (instance.value ? htmlRoot(instance.value) : null),\n () =>\n typeof props.attrs.ref === \"function\"\n ? (props.attrs.ref as ElementRef)\n : undefined\n );\n return () => {\n const attrs = withoutAttributes(props.attrs, [\"ref\"]);\n return h(\n props.component,\n { ...attrs, ref: instance },\n { default: props.content }\n );\n };\n },\n {\n name: \"NaiveSemanticElement\",\n props: {\n component: { type: [Object, Function] as PropType<Component> },\n attrs: { type: Object as PropType<Attrs> },\n content: { type: Function as PropType<() => VNodeChild> },\n },\n }\n);\n\n/** Naive primitives have one semantic root; refs resolve through public $el. */\nexport function naiveElement(\n component: Component,\n attrs: Attrs,\n content: () => VNodeChild = () => null\n) {\n return h(NativeElement, {\n key: attrs.key as string | number | symbol | undefined,\n component,\n attrs,\n content,\n });\n}\n","import type { Attrs } from \"@adapttable/vue\";\nimport { type ButtonProps, NButton } from \"naive-ui\";\nimport { type VNode, type VNodeChild } from \"vue\";\n\nimport { naiveElement } from \"../renderers/nativeElement\";\n\n/** NButton's public attrType forwards the native type to its button. */\nexport function naiveButton(\n attrs: Attrs,\n content: VNodeChild,\n appearance: Pick<ButtonProps, \"tag\" | \"text\" | \"size\"> = {}\n): VNode {\n const { type, ...nativeAttrs } = attrs;\n return naiveElement(\n NButton,\n {\n ...appearance,\n // Naive's synthetic focus cancels mousedown, preventing native drags\n // from both a handle and a sortable button inside a draggable header.\n nativeFocusBehavior: true,\n ...nativeAttrs,\n attrType: type === \"submit\" || type === \"reset\" ? type : \"button\",\n size: appearance.size ?? \"small\",\n },\n () => content\n );\n}\n"],"mappings":";;;;;AAGA,SAAgB,kBACd,OACA,OACO;CACP,OAAO,OAAO,YACZ,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,SAAS,IAAI,CAAC,CAChE;AACF;;AAGA,SAAgB,aACd,OACuC;CACvC,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,KAAA;CAClC,MAAM,YAAY,MAAM,KAAK,UAAmB,aAAqB,KAAK,CAAC;CAC3E,QAAQ,UAAU;EAChB,KAAK,MAAM,YAAY,WAAW,WAAW,KAAK;CACpD;AACF;;;;ACnBA,SAAgB,SACd,UACoB;CACpB,MAAM,QAAiB,SAAS;CAChC,OAAO,OAAO,gBAAgB,eAAe,iBAAiB,cAC1D,QACA;AACN;;;ACKA,MAAM,gBAAgB,iBACnB,UAIK;CACJ,MAAM,WAAW,WAA2C,IAAI;CAChE,oBACS,SAAS,QAAQ,SAAS,SAAS,KAAK,IAAI,YAEjD,OAAO,MAAM,MAAM,QAAQ,aACtB,MAAM,MAAM,MACb,KAAA,CACR;CACA,aAAa;EACX,MAAM,QAAQ,kBAAkB,MAAM,OAAO,CAAC,KAAK,CAAC;EACpD,OAAO,EACL,MAAM,WACN;GAAE,GAAG;GAAO,KAAK;EAAS,GAC1B,EAAE,SAAS,MAAM,QAAQ,CAC3B;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,WAAW,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAyB;EAC7D,OAAO,EAAE,MAAM,OAA0B;EACzC,SAAS,EAAE,MAAM,SAAuC;CAC1D;AACF,CACF;;AAGA,SAAgB,aACd,WACA,OACA,gBAAkC,MAClC;CACA,OAAO,EAAE,eAAe;EACtB,KAAK,MAAM;EACX;EACA;EACA;CACF,CAAC;AACH;;;;ACrDA,SAAgB,YACd,OACA,SACA,aAAyD,CAAC,GACnD;CACP,MAAM,EAAE,MAAM,GAAG,gBAAgB;CACjC,OAAO,aACL,SACA;EACE,GAAG;EAGH,qBAAqB;EACrB,GAAG;EACH,UAAU,SAAS,YAAY,SAAS,UAAU,OAAO;EACzD,MAAM,WAAW,QAAQ;CAC3B,SACM,OACR;AACF"}
1
+ {"version":3,"file":"button-BxXdDW7A.js","names":[],"sources":["../src/controls/attributes.ts","../src/controls/elementTarget.ts","../src/renderers/nativeElement.ts","../src/controls/button.ts"],"sourcesContent":["import type { Attrs } from \"@adapttable/vue\";\n\n/** Remove only attributes consumed by a component's controlled-value API. */\nexport function withoutAttributes(\n attrs: Attrs,\n names: readonly string[]\n): Attrs {\n return Object.fromEntries(\n Object.entries(attrs).filter(([name]) => !names.includes(name))\n );\n}\n\n/** Vue may merge DOM listeners into arrays; preserve their order and event identity. */\nexport function eventHandler<TEvent extends Event>(\n value: unknown\n): ((event: TEvent) => void) | undefined {\n if (typeof value === \"function\") return value as (event: TEvent) => void;\n if (!Array.isArray(value)) return undefined;\n const listeners = value.map((entry: unknown) => eventHandler<TEvent>(entry));\n return (event) => {\n for (const listener of listeners) listener?.(event);\n };\n}\n","import type { ComponentPublicInstance } from \"vue\";\n\n/** Public Vue host access for Naive primitives with a single HTML root. */\nexport function htmlRoot(\n instance: ComponentPublicInstance\n): HTMLElement | null {\n const value: unknown = instance.$el;\n return typeof HTMLElement !== \"undefined\" && value instanceof HTMLElement\n ? value\n : null;\n}\n","import type { Attrs, ElementRef } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport {\n type Component,\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n type VNodeChild,\n} from \"vue\";\n\nimport { withoutAttributes } from \"../controls/attributes\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\nconst NativeElement = defineComponent(\n (props: {\n readonly component: Component;\n readonly attrs: Attrs;\n readonly content: () => VNodeChild;\n }) => {\n const instance = shallowRef<ComponentPublicInstance | null>(null);\n useElementRef(\n () => (instance.value ? htmlRoot(instance.value) : null),\n () =>\n typeof props.attrs.ref === \"function\"\n ? (props.attrs.ref as ElementRef)\n : undefined\n );\n return () => {\n const attrs = withoutAttributes(props.attrs, [\"ref\"]);\n return h(\n props.component,\n { ...attrs, ref: instance },\n { default: props.content }\n );\n };\n },\n {\n name: \"NaiveSemanticElement\",\n props: {\n component: { type: [Object, Function] as PropType<Component> },\n attrs: { type: Object as PropType<Attrs> },\n content: { type: Function as PropType<() => VNodeChild> },\n },\n }\n);\n\n/** Naive primitives have one semantic root; refs resolve through public $el. */\nexport function naiveElement(\n component: Component,\n attrs: Attrs,\n content: () => VNodeChild = () => null\n) {\n return h(NativeElement, {\n key: attrs.key as string | number | symbol | undefined,\n component,\n attrs,\n content,\n });\n}\n","import type { Attrs } from \"@adapttable/vue\";\nimport { type ButtonProps, NButton } from \"naive-ui\";\nimport { type VNode, type VNodeChild } from \"vue\";\n\nimport { naiveElement } from \"../renderers/nativeElement\";\n\n/** NButton's public attrType forwards the native type to its button. */\nexport function naiveButton(\n attrs: Attrs,\n content: VNodeChild,\n appearance: Pick<ButtonProps, \"tag\" | \"text\" | \"size\" | \"type\"> = {}\n): VNode {\n const { type, ...nativeAttrs } = attrs;\n return naiveElement(\n NButton,\n {\n ...appearance,\n // Naive's synthetic focus cancels mousedown, preventing native drags\n // from both a handle and a sortable button inside a draggable header.\n nativeFocusBehavior: true,\n ...nativeAttrs,\n attrType: type === \"submit\" || type === \"reset\" ? type : \"button\",\n size: appearance.size ?? \"small\",\n },\n () => content\n );\n}\n"],"mappings":";;;;;AAGA,SAAgB,kBACd,OACA,OACO;CACP,OAAO,OAAO,YACZ,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,SAAS,IAAI,CAAC,CAChE;AACF;;AAGA,SAAgB,aACd,OACuC;CACvC,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,KAAA;CAClC,MAAM,YAAY,MAAM,KAAK,UAAmB,aAAqB,KAAK,CAAC;CAC3E,QAAQ,UAAU;EAChB,KAAK,MAAM,YAAY,WAAW,WAAW,KAAK;CACpD;AACF;;;;ACnBA,SAAgB,SACd,UACoB;CACpB,MAAM,QAAiB,SAAS;CAChC,OAAO,OAAO,gBAAgB,eAAe,iBAAiB,cAC1D,QACA;AACN;;;ACKA,MAAM,gBAAgB,iBACnB,UAIK;CACJ,MAAM,WAAW,WAA2C,IAAI;CAChE,oBACS,SAAS,QAAQ,SAAS,SAAS,KAAK,IAAI,YAEjD,OAAO,MAAM,MAAM,QAAQ,aACtB,MAAM,MAAM,MACb,KAAA,CACR;CACA,aAAa;EACX,MAAM,QAAQ,kBAAkB,MAAM,OAAO,CAAC,KAAK,CAAC;EACpD,OAAO,EACL,MAAM,WACN;GAAE,GAAG;GAAO,KAAK;EAAS,GAC1B,EAAE,SAAS,MAAM,QAAQ,CAC3B;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,WAAW,EAAE,MAAM,CAAC,QAAQ,QAAQ,EAAyB;EAC7D,OAAO,EAAE,MAAM,OAA0B;EACzC,SAAS,EAAE,MAAM,SAAuC;CAC1D;AACF,CACF;;AAGA,SAAgB,aACd,WACA,OACA,gBAAkC,MAClC;CACA,OAAO,EAAE,eAAe;EACtB,KAAK,MAAM;EACX;EACA;EACA;CACF,CAAC;AACH;;;;ACrDA,SAAgB,YACd,OACA,SACA,aAAkE,CAAC,GAC5D;CACP,MAAM,EAAE,MAAM,GAAG,gBAAgB;CACjC,OAAO,aACL,SACA;EACE,GAAG;EAGH,qBAAqB;EACrB,GAAG;EACH,UAAU,SAAS,YAAY,SAAS,UAAU,OAAO;EACzD,MAAM,WAAW,QAAQ;CAC3B,SACM,OACR;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"button-CaakTzYM.cjs","names":["defineComponent","shallowRef","h","NButton"],"sources":["../src/controls/attributes.ts","../src/controls/elementTarget.ts","../src/renderers/nativeElement.ts","../src/controls/button.ts"],"sourcesContent":["import type { Attrs } from \"@adapttable/vue\";\n\n/** Remove only attributes consumed by a component's controlled-value API. */\nexport function withoutAttributes(\n attrs: Attrs,\n names: readonly string[]\n): Attrs {\n return Object.fromEntries(\n Object.entries(attrs).filter(([name]) => !names.includes(name))\n );\n}\n\n/** Vue may merge DOM listeners into arrays; preserve their order and event identity. */\nexport function eventHandler<TEvent extends Event>(\n value: unknown\n): ((event: TEvent) => void) | undefined {\n if (typeof value === \"function\") return value as (event: TEvent) => void;\n if (!Array.isArray(value)) return undefined;\n const listeners = value.map((entry: unknown) => eventHandler<TEvent>(entry));\n return (event) => {\n for (const listener of listeners) listener?.(event);\n };\n}\n","import type { ComponentPublicInstance } from \"vue\";\n\n/** Public Vue host access for Naive primitives with a single HTML root. */\nexport function htmlRoot(\n instance: ComponentPublicInstance\n): HTMLElement | null {\n const value: unknown = instance.$el;\n return typeof HTMLElement !== \"undefined\" && value instanceof HTMLElement\n ? value\n : null;\n}\n","import type { Attrs, ElementRef } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport {\n type Component,\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n type VNodeChild,\n} from \"vue\";\n\nimport { withoutAttributes } from \"../controls/attributes\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\nconst NativeElement = defineComponent(\n (props: {\n readonly component: Component;\n readonly attrs: Attrs;\n readonly content: () => VNodeChild;\n }) => {\n const instance = shallowRef<ComponentPublicInstance | null>(null);\n useElementRef(\n () => (instance.value ? htmlRoot(instance.value) : null),\n () =>\n typeof props.attrs.ref === \"function\"\n ? (props.attrs.ref as ElementRef)\n : undefined\n );\n return () => {\n const attrs = withoutAttributes(props.attrs, [\"ref\"]);\n return h(\n props.component,\n { ...attrs, ref: instance },\n { default: props.content }\n );\n };\n },\n {\n name: \"NaiveSemanticElement\",\n props: {\n component: { type: [Object, Function] as PropType<Component> },\n attrs: { type: Object as PropType<Attrs> },\n content: { type: Function as PropType<() => VNodeChild> },\n },\n }\n);\n\n/** Naive primitives have one semantic root; refs resolve through public $el. */\nexport function naiveElement(\n component: Component,\n attrs: Attrs,\n content: () => VNodeChild = () => null\n) {\n return h(NativeElement, {\n key: attrs.key as string | number | symbol | undefined,\n component,\n attrs,\n content,\n });\n}\n","import type { Attrs } from \"@adapttable/vue\";\nimport { type ButtonProps, NButton } from \"naive-ui\";\nimport { type VNode, type VNodeChild } from \"vue\";\n\nimport { naiveElement } from \"../renderers/nativeElement\";\n\n/** NButton's public attrType forwards the native type to its button. */\nexport function naiveButton(\n attrs: Attrs,\n content: VNodeChild,\n appearance: Pick<ButtonProps, \"tag\" | \"text\" | \"size\"> = {}\n): VNode {\n const { type, ...nativeAttrs } = attrs;\n return naiveElement(\n NButton,\n {\n ...appearance,\n // Naive's synthetic focus cancels mousedown, preventing native drags\n // from both a handle and a sortable button inside a draggable header.\n nativeFocusBehavior: true,\n ...nativeAttrs,\n attrType: type === \"submit\" || type === \"reset\" ? type : \"button\",\n size: appearance.size ?? \"small\",\n },\n () => content\n );\n}\n"],"mappings":";;;;;AAGA,SAAgB,kBACd,OACA,OAC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,YACd,OACA,SACA,aAAyD,CAAC,GACnD;CACP,MAAM,EAAE,MAAM,GAAG,gBAAgB;CACjC,OAAO,aACLC,SAAAA,SACA;EACE,GAAG;EAGH,qBAAqB;EACrB,GAAG;EACH,UAAU,SAAS,YAAY,SAAS,UAAU,OAAO;EACzD,MAAM,WAAW,QAAQ;CAC3B,SACM,OACR;AACF"}
1
+ {"version":3,"file":"button-CaakTzYM.cjs","names":["defineComponent","shallowRef","h","NButton"],"sources":["../src/controls/attributes.ts","../src/controls/elementTarget.ts","../src/renderers/nativeElement.ts","../src/controls/button.ts"],"sourcesContent":["import type { Attrs } from \"@adapttable/vue\";\n\n/** Remove only attributes consumed by a component's controlled-value API. */\nexport function withoutAttributes(\n attrs: Attrs,\n names: readonly string[]\n): Attrs {\n return Object.fromEntries(\n Object.entries(attrs).filter(([name]) => !names.includes(name))\n );\n}\n\n/** Vue may merge DOM listeners into arrays; preserve their order and event identity. */\nexport function eventHandler<TEvent extends Event>(\n value: unknown\n): ((event: TEvent) => void) | undefined {\n if (typeof value === \"function\") return value as (event: TEvent) => void;\n if (!Array.isArray(value)) return undefined;\n const listeners = value.map((entry: unknown) => eventHandler<TEvent>(entry));\n return (event) => {\n for (const listener of listeners) listener?.(event);\n };\n}\n","import type { ComponentPublicInstance } from \"vue\";\n\n/** Public Vue host access for Naive primitives with a single HTML root. */\nexport function htmlRoot(\n instance: ComponentPublicInstance\n): HTMLElement | null {\n const value: unknown = instance.$el;\n return typeof HTMLElement !== \"undefined\" && value instanceof HTMLElement\n ? value\n : null;\n}\n","import type { Attrs, ElementRef } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport {\n type Component,\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n type VNodeChild,\n} from \"vue\";\n\nimport { withoutAttributes } from \"../controls/attributes\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\nconst NativeElement = defineComponent(\n (props: {\n readonly component: Component;\n readonly attrs: Attrs;\n readonly content: () => VNodeChild;\n }) => {\n const instance = shallowRef<ComponentPublicInstance | null>(null);\n useElementRef(\n () => (instance.value ? htmlRoot(instance.value) : null),\n () =>\n typeof props.attrs.ref === \"function\"\n ? (props.attrs.ref as ElementRef)\n : undefined\n );\n return () => {\n const attrs = withoutAttributes(props.attrs, [\"ref\"]);\n return h(\n props.component,\n { ...attrs, ref: instance },\n { default: props.content }\n );\n };\n },\n {\n name: \"NaiveSemanticElement\",\n props: {\n component: { type: [Object, Function] as PropType<Component> },\n attrs: { type: Object as PropType<Attrs> },\n content: { type: Function as PropType<() => VNodeChild> },\n },\n }\n);\n\n/** Naive primitives have one semantic root; refs resolve through public $el. */\nexport function naiveElement(\n component: Component,\n attrs: Attrs,\n content: () => VNodeChild = () => null\n) {\n return h(NativeElement, {\n key: attrs.key as string | number | symbol | undefined,\n component,\n attrs,\n content,\n });\n}\n","import type { Attrs } from \"@adapttable/vue\";\nimport { type ButtonProps, NButton } from \"naive-ui\";\nimport { type VNode, type VNodeChild } from \"vue\";\n\nimport { naiveElement } from \"../renderers/nativeElement\";\n\n/** NButton's public attrType forwards the native type to its button. */\nexport function naiveButton(\n attrs: Attrs,\n content: VNodeChild,\n appearance: Pick<ButtonProps, \"tag\" | \"text\" | \"size\" | \"type\"> = {}\n): VNode {\n const { type, ...nativeAttrs } = attrs;\n return naiveElement(\n NButton,\n {\n ...appearance,\n // Naive's synthetic focus cancels mousedown, preventing native drags\n // from both a handle and a sortable button inside a draggable header.\n nativeFocusBehavior: true,\n ...nativeAttrs,\n attrType: type === \"submit\" || type === \"reset\" ? type : \"button\",\n size: appearance.size ?? \"small\",\n },\n () => content\n );\n}\n"],"mappings":";;;;;AAGA,SAAgB,kBACd,OACA,OACO;CACP,OAAO,OAAO,YACZ,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,SAAS,IAAI,CAAC,CAChE;AACF;;AAGA,SAAgB,aACd,OACuC;CACvC,IAAI,O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S,YAAY,SAAS,UAAU,OAAO;EACzD,MAAM,WAAW,QAAQ;CAC3B,SACM,OACR;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { t as naiveButton } from "./button-BxXdDW7A.js";
2
2
  import { t as naiveInput } from "./input-YgQ2d8K9.js";
3
3
  import { t as naiveSelect } from "./select-Bgc5ttop.js";
4
- import { t as NaiveManagedPopover } from "./NaiveManagedPopover-XhOSQEWC.js";
4
+ import { t as NaiveManagedPopover } from "./NaiveManagedPopover-DftDHR8p.js";
5
5
  import { COLUMN_HEADER_RENAME, COLUMN_MENU, ColumnHeaderRenameChrome, ColumnMenuChrome, extendFeature, managedOverlayPanel, slotRender, useColumnMenu } from "@adapttable/vue/adapter";
6
6
  import { columnMenu } from "@adapttable/vue/features";
7
7
  import { createBlock, defineComponent, h, openBlock, unref } from "vue";
@@ -16,7 +16,11 @@ const icons = {
16
16
  rename: "✎"
17
17
  };
18
18
  function button({ attrs, label, icon }) {
19
- return naiveButton(attrs, icon ? h(NIcon, { "aria-hidden": true }, { default: () => icons[icon] }) : label);
19
+ return naiveButton(attrs, icon ? h(NIcon, { "aria-hidden": true }, { default: () => icons[icon] }) : label, pinnedPin(icon, attrs) ? { type: "primary" } : {});
20
+ }
21
+ /** A pin button whose column is pinned takes the kit's primary emphasis. */
22
+ function pinnedPin(icon, attrs) {
23
+ return icon === "pin" && attrs["aria-pressed"] === true;
20
24
  }
21
25
  const naiveColumnMenuSlots = {
22
26
  Trigger: button,
@@ -71,4 +75,4 @@ function columnMenu$1() {
71
75
  //#endregion
72
76
  export { _sfc_main as n, columnMenu$1 as t };
73
77
 
74
- //# sourceMappingURL=column-menu-Bb6BOjdI.js.map
78
+ //# sourceMappingURL=column-menu-BeNblq2u.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-menu-BeNblq2u.js","names":["columnMenu","bindingColumnMenu","ColumnMenu"],"sources":["../src/columns/controls.ts","../src/columns/ColumnMenu.vue","../src/column-menu.ts"],"sourcesContent":["import {\n type ColumnMenuButtonProps,\n type ColumnMenuSlots,\n managedOverlayPanel,\n} from \"@adapttable/vue/adapter\";\nimport { NIcon } from \"naive-ui\";\nimport { h } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { naiveInput } from \"../controls/input\";\nimport { naiveSelect } from \"../controls/select\";\nimport { NaiveManagedPopover } from \"./NaiveManagedPopover\";\n\nconst icons = {\n grip: \"⠿\",\n visible: \"◉\",\n hidden: \"○\",\n pin: \"⌖\",\n more: \"⋯\",\n rename: \"✎\",\n};\nfunction button({ attrs, label, icon }: ColumnMenuButtonProps) {\n return naiveButton(\n attrs,\n icon\n ? h(NIcon, { \"aria-hidden\": true }, { default: () => icons[icon] })\n : label,\n pinnedPin(icon, attrs) ? { type: \"primary\" } : {}\n );\n}\n\n/** A pin button whose column is pinned takes the kit's primary emphasis. */\nfunction pinnedPin(\n icon: ColumnMenuButtonProps[\"icon\"],\n attrs: ColumnMenuButtonProps[\"attrs\"]\n): boolean {\n return icon === \"pin\" && attrs[\"aria-pressed\"] === true;\n}\n\nexport const naiveColumnMenuSlots: ColumnMenuSlots = {\n Trigger: button,\n Button: button,\n Input: naiveInput,\n Choice: naiveSelect,\n Panel: managedOverlayPanel((control) => h(NaiveManagedPopover, { control })),\n};\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n ColumnMenuChrome,\n type ColumnMenuSlotProps,\n useColumnMenu,\n} from \"@adapttable/vue/adapter\";\n\nimport { naiveColumnMenuSlots } from \"./controls\";\n\nconst props = defineProps<ColumnMenuSlotProps<TRow>>();\nconst model = useColumnMenu(() => props);\n</script>\n\n<template>\n <ColumnMenuChrome :model=\"model\" :slots=\"naiveColumnMenuSlots\" />\n</template>\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n COLUMN_HEADER_RENAME,\n COLUMN_MENU,\n ColumnHeaderRenameChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { columnMenu as bindingColumnMenu } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport ColumnMenu from \"./columns/ColumnMenu.vue\";\nimport { naiveColumnMenuSlots } from \"./columns/controls\";\n\n/** Shared column state and rename editors with genuine Naive UI controls. */\nexport function columnMenu(): StaticTableFeature {\n return extendFeature(bindingColumnMenu(), [\n slotRender(COLUMN_MENU, (props) => h(ColumnMenu<never>, { ...props })),\n slotRender(COLUMN_HEADER_RENAME, (props) =>\n h(ColumnHeaderRenameChrome, { ...props, slots: naiveColumnMenuSlots })\n ),\n ]);\n}\nexport { default as ColumnMenu } from \"./columns/ColumnMenu.vue\";\nexport type { ColumnMenuSlotProps } from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;;AAaA,MAAM,QAAQ;CACZ,MAAM;CACN,SAAS;CACT,QAAQ;CACR,KAAK;CACL,MAAM;CACN,QAAQ;AACV;AACA,SAAS,OAAO,EAAE,OAAO,OAAO,QAA+B;CAC7D,OAAO,YACL,OACA,OACI,EAAE,OAAO,EAAE,eAAe,KAAK,GAAG,EAAE,eAAe,MAAM,MAAM,CAAC,IAChE,OACJ,UAAU,MAAM,KAAK,IAAI,EAAE,MAAM,UAAU,IAAI,CAAC,CAClD;AACF;;AAGA,SAAS,UACP,MACA,OACS;CACT,OAAO,SAAS,SAAS,MAAM,oBAAoB;AACrD;AAEA,MAAa,uBAAwC;CACnD,SAAS;CACT,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,OAAO,qBAAqB,YAAY,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AAC7E;;;;;;;;;;;;;;;;;;;;;;;;;ECpCA,MAAM,QAAQ;EACd,MAAM,QAAQ,oBAAoB,KAAK;;GAIrC,OAAA,UAAA,GAAA,YAAiE,MAAA,gBAAA,GAAA;IAA9C,OAAO,MAAA,KAAA;IAAQ,OAAO,MAAA,oBAAA;;;;;;;;ACC3C,SAAgBA,eAAiC;CAC/C,OAAO,cAAcC,WAAkB,GAAG,CACxC,WAAW,cAAc,UAAU,EAAEC,WAAmB,EAAE,GAAG,MAAM,CAAC,CAAC,GACrE,WAAW,uBAAuB,UAChC,EAAE,0BAA0B;EAAE,GAAG;EAAO,OAAO;CAAqB,CAAC,CACvE,CACF,CAAC;AACH"}
@@ -1,7 +1,7 @@
1
1
  const require_button = require("./button-CaakTzYM.cjs");
2
2
  const require_input = require("./input-DZV2IoAG.cjs");
3
3
  const require_select = require("./select-C8UKnsWO.cjs");
4
- const require_NaiveManagedPopover = require("./NaiveManagedPopover-DhLEXdew.cjs");
4
+ const require_NaiveManagedPopover = require("./NaiveManagedPopover-CWoJsbAN.cjs");
5
5
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
6
6
  let _adapttable_vue_features = require("@adapttable/vue/features");
7
7
  let vue = require("vue");
@@ -16,7 +16,11 @@ const icons = {
16
16
  rename: "✎"
17
17
  };
18
18
  function button({ attrs, label, icon }) {
19
- return require_button.naiveButton(attrs, icon ? (0, vue.h)(naive_ui.NIcon, { "aria-hidden": true }, { default: () => icons[icon] }) : label);
19
+ return require_button.naiveButton(attrs, icon ? (0, vue.h)(naive_ui.NIcon, { "aria-hidden": true }, { default: () => icons[icon] }) : label, pinnedPin(icon, attrs) ? { type: "primary" } : {});
20
+ }
21
+ /** A pin button whose column is pinned takes the kit's primary emphasis. */
22
+ function pinnedPin(icon, attrs) {
23
+ return icon === "pin" && attrs["aria-pressed"] === true;
20
24
  }
21
25
  const naiveColumnMenuSlots = {
22
26
  Trigger: button,
@@ -82,4 +86,4 @@ Object.defineProperty(exports, "columnMenu", {
82
86
  }
83
87
  });
84
88
 
85
- //# sourceMappingURL=column-menu-CDtaqm4z.cjs.map
89
+ //# sourceMappingURL=column-menu-GUeADLrH.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-menu-GUeADLrH.cjs","names":["naiveButton","h","NIcon","naiveInput","naiveSelect","managedOverlayPanel","NaiveManagedPopover","extendFeature","bindingColumnMenu","slotRender","COLUMN_MENU","h","ColumnMenu","COLUMN_HEADER_RENAME","ColumnHeaderRenameChrome"],"sources":["../src/columns/controls.ts","../src/columns/ColumnMenu.vue","../src/column-menu.ts"],"sourcesContent":["import {\n type ColumnMenuButtonProps,\n type ColumnMenuSlots,\n managedOverlayPanel,\n} from \"@adapttable/vue/adapter\";\nimport { NIcon } from \"naive-ui\";\nimport { h } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { naiveInput } from \"../controls/input\";\nimport { naiveSelect } from \"../controls/select\";\nimport { NaiveManagedPopover } from \"./NaiveManagedPopover\";\n\nconst icons = {\n grip: \"⠿\",\n visible: \"◉\",\n hidden: \"○\",\n pin: \"⌖\",\n more: \"⋯\",\n rename: \"✎\",\n};\nfunction button({ attrs, label, icon }: ColumnMenuButtonProps) {\n return naiveButton(\n attrs,\n icon\n ? h(NIcon, { \"aria-hidden\": true }, { default: () => icons[icon] })\n : label,\n pinnedPin(icon, attrs) ? { type: \"primary\" } : {}\n );\n}\n\n/** A pin button whose column is pinned takes the kit's primary emphasis. */\nfunction pinnedPin(\n icon: ColumnMenuButtonProps[\"icon\"],\n attrs: ColumnMenuButtonProps[\"attrs\"]\n): boolean {\n return icon === \"pin\" && attrs[\"aria-pressed\"] === true;\n}\n\nexport const naiveColumnMenuSlots: ColumnMenuSlots = {\n Trigger: button,\n Button: button,\n Input: naiveInput,\n Choice: naiveSelect,\n Panel: managedOverlayPanel((control) => h(NaiveManagedPopover, { control })),\n};\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n ColumnMenuChrome,\n type ColumnMenuSlotProps,\n useColumnMenu,\n} from \"@adapttable/vue/adapter\";\n\nimport { naiveColumnMenuSlots } from \"./controls\";\n\nconst props = defineProps<ColumnMenuSlotProps<TRow>>();\nconst model = useColumnMenu(() => props);\n</script>\n\n<template>\n <ColumnMenuChrome :model=\"model\" :slots=\"naiveColumnMenuSlots\" />\n</template>\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n COLUMN_HEADER_RENAME,\n COLUMN_MENU,\n ColumnHeaderRenameChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { columnMenu as bindingColumnMenu } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport ColumnMenu from \"./columns/ColumnMenu.vue\";\nimport { naiveColumnMenuSlots } from \"./columns/controls\";\n\n/** Shared column state and rename editors with genuine Naive UI controls. */\nexport function columnMenu(): StaticTableFeature {\n return extendFeature(bindingColumnMenu(), [\n slotRender(COLUMN_MENU, (props) => h(ColumnMenu<never>, { ...props })),\n slotRender(COLUMN_HEADER_RENAME, (props) =>\n h(ColumnHeaderRenameChrome, { ...props, slots: naiveColumnMenuSlots })\n ),\n ]);\n}\nexport { default as ColumnMenu } from \"./columns/ColumnMenu.vue\";\nexport type { ColumnMenuSlotProps } from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;;AAaA,MAAM,QAAQ;CACZ,MAAM;CACN,SAAS;CACT,QAAQ;CACR,KAAK;CACL,MAAM;CACN,QAAQ;AACV;AACA,SAAS,OAAO,EAAE,OAAO,OAAO,QAA+B;CAC7D,OAAOA,eAAAA,YACL,OACA,QAAA,GACIC,IAAAA,EAAAA,CAAEC,SAAAA,OAAO,EAAE,eAAe,KAAK,GAAG,EAAE,eAAe,MAAM,MAAM,CAAC,IAChE,OACJ,UAAU,MAAM,KAAK,IAAI,EAAE,MAAM,UAAU,IAAI,CAAC,CAClD;AACF;;AAGA,SAAS,UACP,MACA,OACS;CACT,OAAO,SAAS,SAAS,MAAM,oBAAoB;AACrD;AAEA,MAAa,uBAAwC;CACnD,SAAS;CACT,QAAQ;CACR,OAAOC,cAAAA;CACP,QAAQC,eAAAA;CACR,QAAA,GAAOC,wBAAAA,oBAAAA,EAAqB,aAAA,GAAYJ,IAAAA,EAAAA,CAAEK,4BAAAA,qBAAqB,EAAE,QAAQ,CAAC,CAAC;AAC7E;;;;;;;;;;;;;;;;;;;;;;;;;ECpCA,MAAM,QAAQ;EACd,MAAM,SAAA,GAAQ,wBAAA,cAAA,OAAoB,KAAK;;GAIrC,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,EAAA,GAAiE,IAAA,MAAA,CAAA,wBAAA,gBAAA,GAAA;IAA9C,QAAA,GAAO,IAAA,MAAA,CAAA,KAAA;IAAQ,QAAA,GAAO,IAAA,MAAA,CAAA,oBAAA;;;;;;;;ACC3C,SAAgB,aAAiC;CAC/C,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,WAAAA,CAAkB,GAAG,EAAA,GACxCC,wBAAAA,WAAAA,CAAWC,wBAAAA,cAAc,WAAA,GAAUC,IAAAA,EAAAA,CAAEC,WAAmB,EAAE,GAAG,MAAM,CAAC,CAAC,IAAA,GACrEH,wBAAAA,WAAAA,CAAWI,wBAAAA,uBAAuB,WAAA,GAChCF,IAAAA,EAAAA,CAAEG,wBAAAA,0BAA0B;EAAE,GAAG;EAAO,OAAO;CAAqB,CAAC,CACvE,CACF,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_column_menu = require("./column-menu-CDtaqm4z.cjs");
2
+ const require_column_menu = require("./column-menu-GUeADLrH.cjs");
3
3
  exports.ColumnMenu = require_column_menu._sfc_main;
4
4
  exports.columnMenu = require_column_menu.columnMenu;
@@ -1,2 +1,2 @@
1
- import { n as _sfc_main, t as columnMenu } from "./column-menu-Bb6BOjdI.js";
1
+ import { n as _sfc_main, t as columnMenu } from "./column-menu-BeNblq2u.js";
2
2
  export { _sfc_main as ColumnMenu, columnMenu };
@@ -0,0 +1,26 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _adapttable_vue_features = require("@adapttable/vue/features");
3
+ Object.defineProperty(exports, "collapsibleColumnGroups", {
4
+ enumerable: true,
5
+ get: function() {
6
+ return _adapttable_vue_features.collapsibleColumnGroups;
7
+ }
8
+ });
9
+ Object.defineProperty(exports, "fitColumns", {
10
+ enumerable: true,
11
+ get: function() {
12
+ return _adapttable_vue_features.fitColumns;
13
+ }
14
+ });
15
+ Object.defineProperty(exports, "multiSort", {
16
+ enumerable: true,
17
+ get: function() {
18
+ return _adapttable_vue_features.multiSort;
19
+ }
20
+ });
21
+ Object.defineProperty(exports, "resizableColumns", {
22
+ enumerable: true,
23
+ get: function() {
24
+ return _adapttable_vue_features.resizableColumns;
25
+ }
26
+ });
@@ -0,0 +1,3 @@
1
+ import { ColumnResizeHandleOptions, ColumnResizeHandleProps } from "@adapttable/vue/adapter";
2
+ import { collapsibleColumnGroups, fitColumns, multiSort, resizableColumns } from "@adapttable/vue/features";
3
+ export { type ColumnResizeHandleOptions, type ColumnResizeHandleProps, collapsibleColumnGroups, fitColumns, multiSort, resizableColumns };
@@ -0,0 +1,3 @@
1
+ import { ColumnResizeHandleOptions, ColumnResizeHandleProps } from "@adapttable/vue/adapter";
2
+ import { collapsibleColumnGroups, fitColumns, multiSort, resizableColumns } from "@adapttable/vue/features";
3
+ export { type ColumnResizeHandleOptions, type ColumnResizeHandleProps, collapsibleColumnGroups, fitColumns, multiSort, resizableColumns };
@@ -0,0 +1,2 @@
1
+ import { collapsibleColumnGroups, fitColumns, multiSort, resizableColumns } from "@adapttable/vue/features";
2
+ export { collapsibleColumnGroups, fitColumns, multiSort, resizableColumns };
@@ -1,6 +1,6 @@
1
1
  const require_button = require("./button-CaakTzYM.cjs");
2
2
  const require_input = require("./input-DZV2IoAG.cjs");
3
- const require_modalEscape = require("./modalEscape-aYoIK8OW.cjs");
3
+ const require_modalEscape = require("./modalEscape-Dgmkd7NP.cjs");
4
4
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
5
5
  let _adapttable_vue_features = require("@adapttable/vue/features");
6
6
  let vue = require("vue");
@@ -114,4 +114,4 @@ Object.defineProperty(exports, "commandPalette", {
114
114
  }
115
115
  });
116
116
 
117
- //# sourceMappingURL=command-palette-D396WFrI.cjs.map
117
+ //# sourceMappingURL=command-palette-4qS9viir.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette-D396WFrI.cjs","names":["shallowRef","useNaiveModalEscape","htmlRoot","h","NModal","NCard","managedCommandPaletteSurface","h","naiveInput","toVueAttrs","naiveButton","NText","CommandPaletteChrome","extendFeature","bindingCommandPalette","slotRender","COMMAND_PALETTE_CONTROL"],"sources":["../src/actions/NaivePaletteSurface.ts","../src/command-palette.ts"],"sourcesContent":["import type { Direction } from \"@adapttable/vue\";\nimport type { ManagedCommandPaletteSurfaceProps } from \"@adapttable/vue/adapter\";\nimport { NCard, NModal } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { htmlRoot } from \"../controls/elementTarget\";\nimport { useNaiveModalEscape } from \"../controls/modalEscape\";\n\n/** Naive owns modal autofocus, Tab trapping, and focus restoration. */\nexport const NaivePaletteSurface = /*#__PURE__*/ defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir: Direction;\n }) => {\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const escape = useNaiveModalEscape(() =>\n card.value ? htmlRoot(card.value) : null\n );\n return () => {\n const owner = props.control;\n const close = () => {\n if (owner.open && owner.isCurrent()) owner.onClose();\n };\n return h(\n NModal,\n {\n show: owner.open && owner.isCurrent(),\n to: props.container,\n autoFocus: true,\n trapFocus: true,\n \"onUpdate:show\": (show: boolean) => {\n if (!show && escape.allow()) close();\n },\n },\n {\n default: () =>\n h(\n NCard,\n {\n ref: card,\n role: \"dialog\",\n dir: props.dir,\n onKeydownCapture: escape.capture,\n \"aria-modal\": true,\n \"aria-label\": owner.label,\n \"data-adapttable-part\": \"command-palette\",\n class: owner.className,\n style: {\n width: \"min(40rem,calc(100vw - 2rem))\",\n maxHeight: \"75dvh\",\n overflow: \"auto\",\n },\n },\n { default: () => owner.children }\n ),\n }\n );\n };\n },\n {\n name: \"NaivePaletteSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<Direction> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n type ActionPresentation,\n COMMAND_PALETTE_CONTROL,\n CommandPaletteChrome,\n type CommandPaletteModel,\n type CommandPaletteSlots,\n extendFeature,\n managedCommandPaletteSurface,\n slotRender,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { commandPalette as bindingCommandPalette } from \"@adapttable/vue/features\";\nimport { NText } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { NaivePaletteSurface } from \"./actions/NaivePaletteSurface\";\nimport { naiveButton } from \"./controls/button\";\nimport { naiveInput } from \"./controls/input\";\n\nconst NaiveCommandPalette = /*#__PURE__*/ defineComponent(\n (props: ActionPresentation & { readonly model: CommandPaletteModel }) => {\n // A stable surface identity lets the shared controller retain queued actions.\n const slots: CommandPaletteSlots = {\n Surface: managedCommandPaletteSurface((control) =>\n h(NaivePaletteSurface, {\n control,\n container: props.container,\n dir: props.dir,\n })\n ),\n Input: ({ inputProps }) => {\n const { value, onChange, ref, ...attrs } = inputProps;\n return naiveInput({\n value,\n onChange,\n attrs: {\n ...toVueAttrs(attrs),\n ref,\n class: props.classNames?.commandInput,\n },\n });\n },\n Item: (control) =>\n naiveButton(\n {\n ...toVueAttrs(control.itemProps),\n class: props.classNames?.commandItem,\n tabindex: -1,\n disabled: control.command.disabled,\n },\n control.command.label\n ),\n Empty: (control) =>\n h(\n NText,\n {\n \"data-adapttable-part\": \"command-empty\",\n class: props.classNames?.commandEmpty,\n },\n { default: () => control.message }\n ),\n };\n return () => [\n props.model.button\n ? naiveButton(\n {\n \"data-adapttable-part\": \"command-palette-button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": props.model.open,\n class: props.classNames?.commandPaletteButton,\n onClick: props.model.show,\n },\n props.labels.commandPalette\n )\n : null,\n h(CommandPaletteChrome, {\n commands: props.model.commands,\n open: props.model.open,\n onClose: props.model.close,\n labels: props.labels,\n className: props.classNames?.commandPalette,\n slots,\n }),\n ];\n },\n {\n name: \"NaiveCommandPalette\",\n props: {\n model: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"model\"]\n >,\n },\n labels: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"labels\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ActionPresentation & { readonly model: CommandPaletteModel })[\"dir\"]\n >,\n },\n classNames: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"classNames\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"container\"]\n >,\n },\n },\n }\n);\nexport function commandPalette(\n options: Parameters<typeof bindingCommandPalette>[0] = true\n): StaticTableFeature {\n return extendFeature(bindingCommandPalette(options), [\n slotRender(COMMAND_PALETTE_CONTROL, (props) =>\n h(NaiveCommandPalette, props)\n ),\n ]);\n}\nexport type { CommandPaletteOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AAeA,MAAa,sBAAoC,eAAA,GAAA,IAAA,gBAAA,EAC9C,UAIK;CACJ,MAAM,QAAA,GAAOA,IAAAA,WAAAA,CAA2C,IAAI;CAC5D,MAAM,SAASC,oBAAAA,0BACb,KAAK,QAAQC,eAAAA,SAAS,KAAK,KAAK,IAAI,IACtC;CACA,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,MAAM,cAAc;GAClB,IAAI,MAAM,QAAQ,MAAM,UAAU,GAAG,MAAM,QAAQ;EACrD;EACA,QAAA,GAAOC,IAAAA,EAAAA,CACLC,SAAAA,QACA;GACE,MAAM,MAAM,QAAQ,MAAM,UAAU;GACpC,IAAI,MAAM;GACV,WAAW;GACX,WAAW;GACX,kBAAkB,SAAkB;IAClC,IAAI,CAAC,QAAQ,OAAO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MAAM,MAAM,SACRD,eAAAA,YACE;EACE,wBAAwB;EACxB,iBAAiB;EACjB,iBAAiB,MAAM,MAAM;EAC7B,OAAO,MAAM,YAAY;EACzB,SAAS,MAAM,MAAM;CACvB,GACA,MAAM,OAAO,cACf,IACA,OAAA,GACJH,IAAAA,EAAAA,CAAEK,wBAAAA,sBAAsB;EACtB,UAAU,MAAM,MAAM;EACtB,MAAM,MAAM,MAAM;EAClB,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,WAAW,MAAM,YAAY;EAC7B;CACF,CAAC,CACH;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EACL,MAAM,OAKR;EACA,QAAQ,EACN,MAAM,OAKR;EACA,KAAK,EACH,MAAM,OAGR;EACA,YAAY,EACV,MAAM,OAKR;EACA,WAAW,EACT,MAAM,OAKR;CACF;AACF,CACF;AACA,SAAgB,eACd,UAAuD,MACnC;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,eAAAA,CAAsB,OAAO,GAAG,EAAA,GACnDC,wBAAAA,WAAAA,CAAWC,wBAAAA,0BAA0B,WAAA,GACnCT,IAAAA,EAAAA,CAAE,qBAAqB,KAAK,CAC9B,CACF,CAAC;AACH"}
1
+ {"version":3,"file":"command-palette-4qS9viir.cjs","names":["shallowRef","useNaiveModalEscape","htmlRoot","h","NModal","NCard","managedCommandPaletteSurface","h","naiveInput","toVueAttrs","naiveButton","NText","CommandPaletteChrome","extendFeature","bindingCommandPalette","slotRender","COMMAND_PALETTE_CONTROL"],"sources":["../src/actions/NaivePaletteSurface.ts","../src/command-palette.ts"],"sourcesContent":["import type { Direction } from \"@adapttable/vue\";\nimport type { ManagedCommandPaletteSurfaceProps } from \"@adapttable/vue/adapter\";\nimport { NCard, NModal } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { htmlRoot } from \"../controls/elementTarget\";\nimport { useNaiveModalEscape } from \"../controls/modalEscape\";\n\n/** Naive owns modal autofocus, Tab trapping, and focus restoration. */\nexport const NaivePaletteSurface = /*#__PURE__*/ defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir: Direction;\n }) => {\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const escape = useNaiveModalEscape(() =>\n card.value ? htmlRoot(card.value) : null\n );\n return () => {\n const owner = props.control;\n const close = () => {\n if (owner.open && owner.isCurrent()) owner.onClose();\n };\n return h(\n NModal,\n {\n show: owner.open && owner.isCurrent(),\n to: props.container,\n autoFocus: true,\n trapFocus: true,\n \"onUpdate:show\": (show: boolean) => {\n if (!show && escape.allow()) close();\n },\n },\n {\n default: () =>\n h(\n NCard,\n {\n ref: card,\n role: \"dialog\",\n dir: props.dir,\n onKeydownCapture: escape.capture,\n \"aria-modal\": true,\n \"aria-label\": owner.label,\n \"data-adapttable-part\": \"command-palette\",\n class: owner.className,\n style: {\n width: \"min(40rem,calc(100vw - 2rem))\",\n maxHeight: \"75dvh\",\n overflow: \"auto\",\n },\n },\n { default: () => owner.children }\n ),\n }\n );\n };\n },\n {\n name: \"NaivePaletteSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<Direction> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n type ActionPresentation,\n COMMAND_PALETTE_CONTROL,\n CommandPaletteChrome,\n type CommandPaletteModel,\n type CommandPaletteSlots,\n extendFeature,\n managedCommandPaletteSurface,\n slotRender,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { commandPalette as bindingCommandPalette } from \"@adapttable/vue/features\";\nimport { NText } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { NaivePaletteSurface } from \"./actions/NaivePaletteSurface\";\nimport { naiveButton } from \"./controls/button\";\nimport { naiveInput } from \"./controls/input\";\n\nconst NaiveCommandPalette = /*#__PURE__*/ defineComponent(\n (props: ActionPresentation & { readonly model: CommandPaletteModel }) => {\n // A stable surface identity lets the shared controller retain queued actions.\n const slots: CommandPaletteSlots = {\n Surface: managedCommandPaletteSurface((control) =>\n h(NaivePaletteSurface, {\n control,\n container: props.container,\n dir: props.dir,\n })\n ),\n Input: ({ inputProps }) => {\n const { value, onChange, ref, ...attrs } = inputProps;\n return naiveInput({\n value,\n onChange,\n attrs: {\n ...toVueAttrs(attrs),\n ref,\n class: props.classNames?.commandInput,\n },\n });\n },\n Item: (control) =>\n naiveButton(\n {\n ...toVueAttrs(control.itemProps),\n class: props.classNames?.commandItem,\n tabindex: -1,\n disabled: control.command.disabled,\n },\n control.command.label\n ),\n Empty: (control) =>\n h(\n NText,\n {\n \"data-adapttable-part\": \"command-empty\",\n class: props.classNames?.commandEmpty,\n },\n { default: () => control.message }\n ),\n };\n return () => [\n props.model.button\n ? naiveButton(\n {\n \"data-adapttable-part\": \"command-palette-button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": props.model.open,\n class: props.classNames?.commandPaletteButton,\n onClick: props.model.show,\n },\n props.labels.commandPalette\n )\n : null,\n h(CommandPaletteChrome, {\n commands: props.model.commands,\n open: props.model.open,\n onClose: props.model.close,\n labels: props.labels,\n className: props.classNames?.commandPalette,\n slots,\n }),\n ];\n },\n {\n name: \"NaiveCommandPalette\",\n props: {\n model: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"model\"]\n >,\n },\n labels: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"labels\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ActionPresentation & { readonly model: CommandPaletteModel })[\"dir\"]\n >,\n },\n classNames: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"classNames\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"container\"]\n >,\n },\n },\n }\n);\nexport function commandPalette(\n options: Parameters<typeof bindingCommandPalette>[0] = true\n): StaticTableFeature {\n return extendFeature(bindingCommandPalette(options), [\n slotRender(COMMAND_PALETTE_CONTROL, (props) =>\n h(NaiveCommandPalette, props)\n ),\n ]);\n}\nexport type { CommandPaletteOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AAeA,MAAa,sBAAoC,eAAA,GAAA,IAAA,gBAAA,EAC9C,UAIK;CACJ,MAAM,QAAA,GAAOA,IAAAA,WAAAA,CAA2C,IAAI;CAC5D,MAAM,SAASC,oBAAAA,0BACb,KAAK,QAAQC,eAAAA,SAAS,KAAK,KAAK,IAAI,IACtC;CACA,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,MAAM,cAAc;GAClB,IAAI,MAAM,QAAQ,MAAM,UAAU,GAAG,MAAM,QAAQ;EACrD;EACA,QAAA,GAAOC,IAAAA,EAAAA,CACLC,SAAAA,QACA;GACE,MAAM,MAAM,QAAQ,MAAM,UAAU;GACpC,IAAI,MAAM;GACV,WAAW;GACX,WAAW;GACX,kBAAkB,SAAkB;IAClC,IAAI,CAAC,QAAQ,OAAO,MAAM,GAAG,MAAM;GACrC;EACF,GACA,EACE,gBAAA,GACED,IAAAA,EAAAA,CACEE,SAAAA,OACA;GACE,KAAK;GACL,MAAM;GACN,KAAK,MAAM;GACX,kBAAkB,OAAO;GACzB,cAAc;GACd,cAAc,MAAM;GACpB,wBAAwB;GACxB,OAAO,MAAM;GACb,OAAO;IACL,OAAO;IACP,WAAW;IACX,UAAU;GACZ;EACF,GACA,EAAE,eAAe,MAAM,SAAS,CAClC,EACJ,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAAsD;EACvE,WAAW,EAAE,MAAM,OAA4C;EAC/D,KAAK,EAAE,MAAM,OAA8B;CAC7C;AACF,CACF;;;ACtDA,MAAM,sBAAoC,e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AAY,EACV,MAAM,OAKR;EACA,WAAW,EACT,MAAM,OAKR;CACF;AACF,CACF;AACA,SAAgB,eACd,UAAuD,MACnC;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,eAAAA,CAAsB,OAAO,GAAG,EAAA,GACnDC,wBAAAA,WAAAA,CAAWC,wBAAAA,0BAA0B,WAAA,GACnCT,IAAAA,EAAAA,CAAE,qBAAqB,KAAK,CAC9B,CACF,CAAC;AACH"}
@@ -1,6 +1,6 @@
1
1
  import { r as htmlRoot, t as naiveButton } from "./button-BxXdDW7A.js";
2
2
  import { t as naiveInput } from "./input-YgQ2d8K9.js";
3
- import { t as useNaiveModalEscape } from "./modalEscape-CP6_uqjE.js";
3
+ import { t as useNaiveModalEscape } from "./modalEscape-BIm9yvam.js";
4
4
  import { COMMAND_PALETTE_CONTROL, CommandPaletteChrome, extendFeature, managedCommandPaletteSurface, slotRender, toVueAttrs } from "@adapttable/vue/adapter";
5
5
  import { commandPalette } from "@adapttable/vue/features";
6
6
  import { defineComponent, h, shallowRef } from "vue";
@@ -109,4 +109,4 @@ function commandPalette$1(options = true) {
109
109
  //#endregion
110
110
  export { commandPalette$1 as t };
111
111
 
112
- //# sourceMappingURL=command-palette-ZSFMOROm.js.map
112
+ //# sourceMappingURL=command-palette-CSI-tgcP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette-ZSFMOROm.js","names":["commandPalette","bindingCommandPalette"],"sources":["../src/actions/NaivePaletteSurface.ts","../src/command-palette.ts"],"sourcesContent":["import type { Direction } from \"@adapttable/vue\";\nimport type { ManagedCommandPaletteSurfaceProps } from \"@adapttable/vue/adapter\";\nimport { NCard, NModal } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { htmlRoot } from \"../controls/elementTarget\";\nimport { useNaiveModalEscape } from \"../controls/modalEscape\";\n\n/** Naive owns modal autofocus, Tab trapping, and focus restoration. */\nexport const NaivePaletteSurface = /*#__PURE__*/ defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir: Direction;\n }) => {\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const escape = useNaiveModalEscape(() =>\n card.value ? htmlRoot(card.value) : null\n );\n return () => {\n const owner = props.control;\n const close = () => {\n if (owner.open && owner.isCurrent()) owner.onClose();\n };\n return h(\n NModal,\n {\n show: owner.open && owner.isCurrent(),\n to: props.container,\n autoFocus: true,\n trapFocus: true,\n \"onUpdate:show\": (show: boolean) => {\n if (!show && escape.allow()) close();\n },\n },\n {\n default: () =>\n h(\n NCard,\n {\n ref: card,\n role: \"dialog\",\n dir: props.dir,\n onKeydownCapture: escape.capture,\n \"aria-modal\": true,\n \"aria-label\": owner.label,\n \"data-adapttable-part\": \"command-palette\",\n class: owner.className,\n style: {\n width: \"min(40rem,calc(100vw - 2rem))\",\n maxHeight: \"75dvh\",\n overflow: \"auto\",\n },\n },\n { default: () => owner.children }\n ),\n }\n );\n };\n },\n {\n name: \"NaivePaletteSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<Direction> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n type ActionPresentation,\n COMMAND_PALETTE_CONTROL,\n CommandPaletteChrome,\n type CommandPaletteModel,\n type CommandPaletteSlots,\n extendFeature,\n managedCommandPaletteSurface,\n slotRender,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { commandPalette as bindingCommandPalette } from \"@adapttable/vue/features\";\nimport { NText } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { NaivePaletteSurface } from \"./actions/NaivePaletteSurface\";\nimport { naiveButton } from \"./controls/button\";\nimport { naiveInput } from \"./controls/input\";\n\nconst NaiveCommandPalette = /*#__PURE__*/ defineComponent(\n (props: ActionPresentation & { readonly model: CommandPaletteModel }) => {\n // A stable surface identity lets the shared controller retain queued actions.\n const slots: CommandPaletteSlots = {\n Surface: managedCommandPaletteSurface((control) =>\n h(NaivePaletteSurface, {\n control,\n container: props.container,\n dir: props.dir,\n })\n ),\n Input: ({ inputProps }) => {\n const { value, onChange, ref, ...attrs } = inputProps;\n return naiveInput({\n value,\n onChange,\n attrs: {\n ...toVueAttrs(attrs),\n ref,\n class: props.classNames?.commandInput,\n },\n });\n },\n Item: (control) =>\n naiveButton(\n {\n ...toVueAttrs(control.itemProps),\n class: props.classNames?.commandItem,\n tabindex: -1,\n disabled: control.command.disabled,\n },\n control.command.label\n ),\n Empty: (control) =>\n h(\n NText,\n {\n \"data-adapttable-part\": \"command-empty\",\n class: props.classNames?.commandEmpty,\n },\n { default: () => control.message }\n ),\n };\n return () => [\n props.model.button\n ? naiveButton(\n {\n \"data-adapttable-part\": \"command-palette-button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": props.model.open,\n class: props.classNames?.commandPaletteButton,\n onClick: props.model.show,\n },\n props.labels.commandPalette\n )\n : null,\n h(CommandPaletteChrome, {\n commands: props.model.commands,\n open: props.model.open,\n onClose: props.model.close,\n labels: props.labels,\n className: props.classNames?.commandPalette,\n slots,\n }),\n ];\n },\n {\n name: \"NaiveCommandPalette\",\n props: {\n model: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"model\"]\n >,\n },\n labels: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"labels\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ActionPresentation & { readonly model: CommandPaletteModel })[\"dir\"]\n >,\n },\n classNames: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"classNames\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"container\"]\n >,\n },\n },\n }\n);\nexport function commandPalette(\n options: Parameters<typeof bindingCommandPalette>[0] = true\n): StaticTableFeature {\n return extendFeature(bindingCommandPalette(options), [\n slotRender(COMMAND_PALETTE_CONTROL, (props) =>\n h(NaiveCommandPalette, props)\n ),\n ]);\n}\nexport type { CommandPaletteOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AAeA,MAAa,sBAAoC,+BAC9C,UAIK;CACJ,MAAM,OAAO,WAA2C,IAAI;CAC5D,MAAM,SAAS,0BACb,KAAK,QAAQ,SAAS,KAAK,KAAK,IAAI,IACtC;CACA,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,MAAM,cAAc;GAClB,IAAI,MAAM,QAAQ,MAAM,UAAU,GAAG,MAAM,QAAQ;EACrD;EACA,OAAO,EACL,QACA;GACE,MAAM,MAAM,QAAQ,MAAM,UAAU;GACpC,IAAI,MAAM;GACV,WAAW;GACX,WAAW;GACX,kBAAkB,SAAkB;IAClC,IAAI,CAAC,QAAQ,OAAO,MAAM,GAAG,MAAM;GACrC;EACF,GACA,EACE,eACE,EACE,OACA;GACE,KAAK;GACL,MAAM;GACN,KAAK,MAAM;GACX,kBAAkB,OAAO;GACzB,cAAc;GACd,cAAc,MAAM;GACpB,wBAAwB;GACxB,OAAO,MAAM;GACb,OAAO;IACL,OAAO;IACP,WAAW;IACX,UAAU;GACZ;EACF,GACA,EAAE,eAAe,MAAM,SAAS,CAClC,EACJ,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAAsD;EACvE,WAAW,EAAE,MAAM,OAA4C;EAC/D,KAAK,EAAE,MAAM,OAA8B;CAC7C;AACF,CACF;;;ACtDA,MAAM,sBAAoC,+BACvC,UAAwE;CAEvE,MAAM,QAA6B;EACjC,SAAS,8BAA8B,YACrC,EAAE,qBAAqB;GACrB;GACA,WAAW,MAAM;GACjB,KAAK,MAAM;EACb,CAAC,CACH;EACA,QAAQ,EAAE,iBAAiB;GACzB,MAAM,EAAE,OAAO,UAAU,KAAK,GAAG,UAAU;GAC3C,OAAO,WAAW;IAChB;IACA;IACA,OAAO;KACL,GAAG,WAAW,KAAK;KACnB;KACA,OAAO,MAAM,YAAY;IAC3B;GACF,CAAC;EACH;EACA,OAAO,YACL,YACE;GACE,GAAG,WAAW,QAAQ,SAAS;GAC/B,OAAO,MAAM,YAAY;GACzB,UAAU;GACV,UAAU,QAAQ,QAAQ;EAC5B,GACA,QAAQ,QAAQ,KAClB;EACF,QAAQ,YACN,EACE,OACA;GACE,wBAAwB;GACxB,OAAO,MAAM,YAAY;EAC3B,GACA,EAAE,eAAe,QAAQ,QAAQ,CACnC;CACJ;CACA,aAAa,CACX,MAAM,MAAM,SACR,YACE;EACE,wBAAwB;EACxB,iBAAiB;EACjB,iBAAiB,MAAM,MAAM;EAC7B,OAAO,MAAM,YAAY;EACzB,SAAS,MAAM,MAAM;CACvB,GACA,MAAM,OAAO,cACf,IACA,MACJ,EAAE,sBAAsB;EACtB,UAAU,MAAM,MAAM;EACtB,MAAM,MAAM,MAAM;EAClB,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,WAAW,MAAM,YAAY;EAC7B;CACF,CAAC,CACH;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EACL,MAAM,OAKR;EACA,QAAQ,EACN,MAAM,OAKR;EACA,KAAK,EACH,MAAM,OAGR;EACA,YAAY,EACV,MAAM,OAKR;EACA,WAAW,EACT,MAAM,OAKR;CACF;AACF,CACF;AACA,SAAgBA,iBACd,UAAuD,MACnC;CACpB,OAAO,cAAcC,eAAsB,OAAO,GAAG,CACnD,WAAW,0BAA0B,UACnC,EAAE,qBAAqB,KAAK,CAC9B,CACF,CAAC;AACH"}
1
+ {"version":3,"file":"command-palette-CSI-tgcP.js","names":["commandPalette","bindingCommandPalette"],"sources":["../src/actions/NaivePaletteSurface.ts","../src/command-palette.ts"],"sourcesContent":["import type { Direction } from \"@adapttable/vue\";\nimport type { ManagedCommandPaletteSurfaceProps } from \"@adapttable/vue/adapter\";\nimport { NCard, NModal } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { htmlRoot } from \"../controls/elementTarget\";\nimport { useNaiveModalEscape } from \"../controls/modalEscape\";\n\n/** Naive owns modal autofocus, Tab trapping, and focus restoration. */\nexport const NaivePaletteSurface = /*#__PURE__*/ defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir: Direction;\n }) => {\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const escape = useNaiveModalEscape(() =>\n card.value ? htmlRoot(card.value) : null\n );\n return () => {\n const owner = props.control;\n const close = () => {\n if (owner.open && owner.isCurrent()) owner.onClose();\n };\n return h(\n NModal,\n {\n show: owner.open && owner.isCurrent(),\n to: props.container,\n autoFocus: true,\n trapFocus: true,\n \"onUpdate:show\": (show: boolean) => {\n if (!show && escape.allow()) close();\n },\n },\n {\n default: () =>\n h(\n NCard,\n {\n ref: card,\n role: \"dialog\",\n dir: props.dir,\n onKeydownCapture: escape.capture,\n \"aria-modal\": true,\n \"aria-label\": owner.label,\n \"data-adapttable-part\": \"command-palette\",\n class: owner.className,\n style: {\n width: \"min(40rem,calc(100vw - 2rem))\",\n maxHeight: \"75dvh\",\n overflow: \"auto\",\n },\n },\n { default: () => owner.children }\n ),\n }\n );\n };\n },\n {\n name: \"NaivePaletteSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<Direction> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n type ActionPresentation,\n COMMAND_PALETTE_CONTROL,\n CommandPaletteChrome,\n type CommandPaletteModel,\n type CommandPaletteSlots,\n extendFeature,\n managedCommandPaletteSurface,\n slotRender,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { commandPalette as bindingCommandPalette } from \"@adapttable/vue/features\";\nimport { NText } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { NaivePaletteSurface } from \"./actions/NaivePaletteSurface\";\nimport { naiveButton } from \"./controls/button\";\nimport { naiveInput } from \"./controls/input\";\n\nconst NaiveCommandPalette = /*#__PURE__*/ defineComponent(\n (props: ActionPresentation & { readonly model: CommandPaletteModel }) => {\n // A stable surface identity lets the shared controller retain queued actions.\n const slots: CommandPaletteSlots = {\n Surface: managedCommandPaletteSurface((control) =>\n h(NaivePaletteSurface, {\n control,\n container: props.container,\n dir: props.dir,\n })\n ),\n Input: ({ inputProps }) => {\n const { value, onChange, ref, ...attrs } = inputProps;\n return naiveInput({\n value,\n onChange,\n attrs: {\n ...toVueAttrs(attrs),\n ref,\n class: props.classNames?.commandInput,\n },\n });\n },\n Item: (control) =>\n naiveButton(\n {\n ...toVueAttrs(control.itemProps),\n class: props.classNames?.commandItem,\n tabindex: -1,\n disabled: control.command.disabled,\n },\n control.command.label\n ),\n Empty: (control) =>\n h(\n NText,\n {\n \"data-adapttable-part\": \"command-empty\",\n class: props.classNames?.commandEmpty,\n },\n { default: () => control.message }\n ),\n };\n return () => [\n props.model.button\n ? naiveButton(\n {\n \"data-adapttable-part\": \"command-palette-button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": props.model.open,\n class: props.classNames?.commandPaletteButton,\n onClick: props.model.show,\n },\n props.labels.commandPalette\n )\n : null,\n h(CommandPaletteChrome, {\n commands: props.model.commands,\n open: props.model.open,\n onClose: props.model.close,\n labels: props.labels,\n className: props.classNames?.commandPalette,\n slots,\n }),\n ];\n },\n {\n name: \"NaiveCommandPalette\",\n props: {\n model: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"model\"]\n >,\n },\n labels: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"labels\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ActionPresentation & { readonly model: CommandPaletteModel })[\"dir\"]\n >,\n },\n classNames: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"classNames\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ActionPresentation & {\n readonly model: CommandPaletteModel;\n })[\"container\"]\n >,\n },\n },\n }\n);\nexport function commandPalette(\n options: Parameters<typeof bindingCommandPalette>[0] = true\n): StaticTableFeature {\n return extendFeature(bindingCommandPalette(options), [\n slotRender(COMMAND_PALETTE_CONTROL, (props) =>\n h(NaiveCommandPalette, props)\n ),\n ]);\n}\nexport type { CommandPaletteOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AAeA,MAAa,sBAAoC,+BAC9C,UAIK;CACJ,MAAM,OAAO,WAA2C,IAAI;CAC5D,MAAM,SAAS,0BACb,KAAK,QAAQ,SAAS,KAAK,KAAK,IAAI,IACtC;CACA,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,MAAM,cAAc;GAClB,IAAI,MAAM,QAAQ,MAAM,UAAU,GAAG,MAAM,QAAQ;EACrD;EACA,OAAO,EACL,QACA;GACE,MAAM,MAAM,QAAQ,MAAM,UAAU;GACpC,IAAI,MAAM;GACV,WAAW;GACX,WAAW;GACX,kBAAkB,SAAkB;IAClC,IAAI,CAAC,QAAQ,OAAO,MAAM,GAAG,MAAM;GACrC;EACF,GACA,EACE,eACE,EACE,OACA;GACE,KAAK;GACL,MAAM;GACN,KAAK,MAAM;GACX,kBAAkB,OAAO;GACzB,cAAc;GACd,cAAc,MAAM;GACpB,wBAAwB;GACxB,OAAO,MAAM;GACb,OAAO;IACL,OAAO;IACP,WAAW;IACX,UAAU;GACZ;EACF,GACA,EAAE,eAAe,MAAM,SAAS,CAClC,EACJ,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAAsD;EACvE,WAAW,EAAE,MAAM,OAA4C;EAC/D,KAAK,EAAE,MAAM,OAA8B;CAC7C;AACF,CAC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AqB,KAAK,CAC9B,CACF,CAAC;AACH"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_command_palette = require("./command-palette-D396WFrI.cjs");
2
+ const require_command_palette = require("./command-palette-4qS9viir.cjs");
3
3
  exports.commandPalette = require_command_palette.commandPalette;
@@ -1,2 +1,2 @@
1
- import { t as commandPalette } from "./command-palette-ZSFMOROm.js";
1
+ import { t as commandPalette } from "./command-palette-CSI-tgcP.js";
2
2
  export { commandPalette };
@@ -1,7 +1,7 @@
1
1
  import { r as htmlRoot, t as naiveButton } from "./button-BxXdDW7A.js";
2
- import { CONTEXT_MENU_CONTROL, ContextMenuChrome, createMenuNavigation, extendFeature, slotRender, useScopeActivity } from "@adapttable/vue/adapter";
2
+ import { CONTEXT_MENU_CONTROL, ContextMenuChrome, createMenuNavigation, extendFeature, scheduleTick, slotRender, useScopeActivity } from "@adapttable/vue/adapter";
3
3
  import { contextMenu } from "@adapttable/vue/features";
4
- import { defineComponent, h, nextTick, shallowRef, watch } from "vue";
4
+ import { defineComponent, h, shallowRef, watch } from "vue";
5
5
  import { NCard, NDivider, NPopover } from "naive-ui";
6
6
  //#region src/actions/NaiveContextMenuSurface.ts
7
7
  /** Native surfaces apply the shared core's menu-navigation decisions. */
@@ -22,7 +22,7 @@ const NaiveContextMenuSurface = /*#__PURE__*/ defineComponent((props) => {
22
22
  navigation.reset();
23
23
  if (!live) return;
24
24
  let current = true;
25
- nextTick(() => {
25
+ scheduleTick(() => {
26
26
  if (current && active.value) entries().find((item) => item.getAttribute("aria-disabled") !== "true")?.focus({ preventScroll: true });
27
27
  });
28
28
  cleanup(() => {
@@ -137,4 +137,4 @@ function contextMenu$1(options = true) {
137
137
  //#endregion
138
138
  export { contextMenu$1 as t };
139
139
 
140
- //# sourceMappingURL=context-menu-DjYIQXhY.js.map
140
+ //# sourceMappingURL=context-menu-CsbLaMcR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-menu-CsbLaMcR.js","names":["contextMenu","bindingContextMenu"],"sources":["../src/actions/NaiveContextMenuSurface.ts","../src/context-menu.ts"],"sourcesContent":["import {\n type ContextMenuSurfaceProps,\n createMenuNavigation,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { NCard, NPopover } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n type VNodeChild,\n watch,\n} from \"vue\";\n\nimport { htmlRoot } from \"../controls/elementTarget\";\n/** Native surfaces apply the shared core's menu-navigation decisions. */\nexport const NaiveContextMenuSurface = /*#__PURE__*/ defineComponent(\n (props: ContextMenuSurfaceProps<VNodeChild>) => {\n const active = useScopeActivity();\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const navigation = createMenuNavigation();\n const root = () => (card.value ? htmlRoot(card.value) : null);\n const entries = () => {\n const panel = root();\n return [\n ...(panel?.querySelectorAll<HTMLElement>('[role=\"menuitem\"]') ?? []),\n ].filter((item) => item.closest('[role=\"menu\"]') === panel);\n };\n watch(\n [card, active, () => props.at],\n ([, live], _previous, cleanup) => {\n navigation.reset();\n if (!live) return;\n let current = true;\n scheduleTick(() => {\n if (current && active.value)\n entries()\n .find((item) => item.getAttribute(\"aria-disabled\") !== \"true\")\n ?.focus({ preventScroll: true });\n });\n cleanup(() => {\n current = false;\n });\n },\n { flush: \"post\" }\n );\n const keydown = (event: KeyboardEvent) => {\n const panel = root();\n if (\n !active.value ||\n !panel ||\n !(event.target instanceof Element) ||\n event.target.closest('[role=\"menu\"]') !== panel\n )\n return;\n const items = entries();\n const focusTargets: readonly (EventTarget | null | undefined)[] = items;\n const action = navigation.key(\n event,\n items.map((item) => ({\n label: item.textContent ?? \"\",\n disabled: item.getAttribute(\"aria-disabled\") === \"true\",\n })),\n focusTargets.indexOf(panel.ownerDocument.activeElement)\n );\n if (!action) return;\n if (action.kind !== \"close\" || action.key !== \"Tab\")\n event.preventDefault();\n event.stopPropagation();\n if (action.kind === \"close\") props.onClose();\n else items[action.index]?.focus({ preventScroll: true });\n };\n return () => {\n const at = props.at;\n const close = () => {\n if (active.value && props.at === at) props.onClose();\n };\n return h(\n NPopover,\n {\n trigger: \"manual\",\n show: active.value,\n x: at.x,\n y: at.y,\n to: props.container ?? false,\n raw: true,\n showArrow: false,\n placement: \"bottom-start\",\n onClickoutside: close,\n },\n {\n default: () =>\n h(\n NCard,\n {\n ref: card,\n size: \"small\",\n role: \"menu\",\n tabindex: -1,\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"context-menu\",\n class: [\"adapttable-naive-context-menu\", props.className],\n onKeydown: keydown,\n contentStyle: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n },\n style: {\n maxWidth: \"90vw\",\n maxHeight: \"80dvh\",\n overflow: \"auto\",\n },\n },\n { default: () => props.children }\n ),\n }\n );\n };\n },\n {\n name: \"NaiveContextMenuSurface\",\n props: {\n at: {\n type: Object as PropType<ContextMenuSurfaceProps<VNodeChild>[\"at\"]>,\n },\n anchorRef: {\n type: Object as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"anchorRef\"]\n >,\n },\n label: {\n type: String as PropType<ContextMenuSurfaceProps<VNodeChild>[\"label\"]>,\n },\n onClose: {\n type: Function as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"onClose\"]\n >,\n },\n container: {\n type: Object as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"children\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"className\"]\n >,\n },\n },\n }\n);\n","import type { TableFeature } from \"@adapttable/vue\";\nimport {\n CONTEXT_MENU_CONTROL,\n ContextMenuChrome,\n type ContextMenuSlots,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n contextMenu as bindingContextMenu,\n type ContextMenuOptions,\n} from \"@adapttable/vue/features\";\nimport { NDivider } from \"naive-ui\";\nimport { h } from \"vue\";\n\nimport { NaiveContextMenuSurface } from \"./actions/NaiveContextMenuSurface\";\nimport { naiveButton } from \"./controls/button\";\nfunction contextSlots(\n names: Readonly<Record<string, string | undefined>> = {}\n): ContextMenuSlots {\n return {\n Surface: (props) => h(NaiveContextMenuSurface, props),\n Item: ({ item, onSelect }) =>\n naiveButton(\n {\n role: \"menuitem\",\n tabindex: -1,\n disabled: item.disabled,\n \"aria-disabled\": item.disabled,\n \"data-danger\": item.danger ? \"\" : undefined,\n \"data-adapttable-part\": \"context-menu-item\",\n class: names.contextMenuItem,\n onClick: onSelect,\n },\n item.label\n ),\n Separator: () =>\n h(NDivider, {\n role: \"separator\",\n \"data-adapttable-part\": \"context-menu-separator\",\n class: names.contextMenuSeparator,\n }),\n };\n}\nexport function contextMenu<TRow>(\n options: boolean | ContextMenuOptions<TRow> = true\n): TableFeature<TRow> {\n return extendFeature(bindingContextMenu<TRow>(options), [\n slotRender(CONTEXT_MENU_CONTROL, (props) =>\n h(ContextMenuChrome, {\n items: props.model.items,\n at: props.model.at,\n onClose: props.model.close,\n labels: props.labels,\n className: props.classNames?.contextMenu,\n container: props.container,\n slots: contextSlots(props.classNames),\n })\n ),\n ]);\n}\nexport type { ContextMenuOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;AAmBA,MAAa,0BAAwC,+BAClD,UAA+C;CAC9C,MAAM,SAAS,iBAAiB;CAChC,MAAM,OAAO,WAA2C,IAAI;CAC5D,MAAM,aAAa,qBAAqB;CACxC,MAAM,aAAc,KAAK,QAAQ,SAAS,KAAK,KAAK,IAAI;CACxD,MAAM,gBAAgB;EACpB,MAAM,QAAQ,KAAK;EACnB,OAAO,CACL,GAAI,OAAO,iBAA8B,qBAAmB,KAAK,CAAC,CACpE,CAAC,CAAC,QAAQ,SAAS,KAAK,QAAQ,iBAAe,MAAM,KAAK;CAC5D;CACA,MACE;EAAC;E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"}
@@ -22,7 +22,7 @@ const NaiveContextMenuSurface = /*#__PURE__*/ (0, vue.defineComponent)((props) =
22
22
  navigation.reset();
23
23
  if (!live) return;
24
24
  let current = true;
25
- (0, vue.nextTick)(() => {
25
+ (0, _adapttable_vue_adapter.scheduleTick)(() => {
26
26
  if (current && active.value) entries().find((item) => item.getAttribute("aria-disabled") !== "true")?.focus({ preventScroll: true });
27
27
  });
28
28
  cleanup(() => {
@@ -142,4 +142,4 @@ Object.defineProperty(exports, "contextMenu", {
142
142
  }
143
143
  });
144
144
 
145
- //# sourceMappingURL=context-menu-BbhrjTZr.cjs.map
145
+ //# sourceMappingURL=context-menu-qVwE9S2V.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-menu-qVwE9S2V.cjs","names":["useScopeActivity","shallowRef","createMenuNavigation","htmlRoot","h","NPopover","NCard","h","naiveButton","NDivider","extendFeature","bindingContextMenu","slotRender","CONTEXT_MENU_CONTROL","ContextMenuChrome"],"sources":["../src/actions/NaiveContextMenuSurface.ts","../src/context-menu.ts"],"sourcesContent":["import {\n type ContextMenuSurfaceProps,\n createMenuNavigation,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { NCard, NPopover } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n type VNodeChild,\n watch,\n} from \"vue\";\n\nimport { htmlRoot } from \"../controls/elementTarget\";\n/** Native surfaces apply the shared core's menu-navigation decisions. */\nexport const NaiveContextMenuSurface = /*#__PURE__*/ defineComponent(\n (props: ContextMenuSurfaceProps<VNodeChild>) => {\n const active = useScopeActivity();\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const navigation = createMenuNavigation();\n const root = () => (card.value ? htmlRoot(card.value) : null);\n const entries = () => {\n const panel = root();\n return [\n ...(panel?.querySelectorAll<HTMLElement>('[role=\"menuitem\"]') ?? []),\n ].filter((item) => item.closest('[role=\"menu\"]') === panel);\n };\n watch(\n [card, active, () => props.at],\n ([, live], _previous, cleanup) => {\n navigation.reset();\n if (!live) return;\n let current = true;\n scheduleTick(() => {\n if (current && active.value)\n entries()\n .find((item) => item.getAttribute(\"aria-disabled\") !== \"true\")\n ?.focus({ preventScroll: true });\n });\n cleanup(() => {\n current = false;\n });\n },\n { flush: \"post\" }\n );\n const keydown = (event: KeyboardEvent) => {\n const panel = root();\n if (\n !active.value ||\n !panel ||\n !(event.target instanceof Element) ||\n event.target.closest('[role=\"menu\"]') !== panel\n )\n return;\n const items = entries();\n const focusTargets: readonly (EventTarget | null | undefined)[] = items;\n const action = navigation.key(\n event,\n items.map((item) => ({\n label: item.textContent ?? \"\",\n disabled: item.getAttribute(\"aria-disabled\") === \"true\",\n })),\n focusTargets.indexOf(panel.ownerDocument.activeElement)\n );\n if (!action) return;\n if (action.kind !== \"close\" || action.key !== \"Tab\")\n event.preventDefault();\n event.stopPropagation();\n if (action.kind === \"close\") props.onClose();\n else items[action.index]?.focus({ preventScroll: true });\n };\n return () => {\n const at = props.at;\n const close = () => {\n if (active.value && props.at === at) props.onClose();\n };\n return h(\n NPopover,\n {\n trigger: \"manual\",\n show: active.value,\n x: at.x,\n y: at.y,\n to: props.container ?? false,\n raw: true,\n showArrow: false,\n placement: \"bottom-start\",\n onClickoutside: close,\n },\n {\n default: () =>\n h(\n NCard,\n {\n ref: card,\n size: \"small\",\n role: \"menu\",\n tabindex: -1,\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"context-menu\",\n class: [\"adapttable-naive-context-menu\", props.className],\n onKeydown: keydown,\n contentStyle: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"4px\",\n },\n style: {\n maxWidth: \"90vw\",\n maxHeight: \"80dvh\",\n overflow: \"auto\",\n },\n },\n { default: () => props.children }\n ),\n }\n );\n };\n },\n {\n name: \"NaiveContextMenuSurface\",\n props: {\n at: {\n type: Object as PropType<ContextMenuSurfaceProps<VNodeChild>[\"at\"]>,\n },\n anchorRef: {\n type: Object as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"anchorRef\"]\n >,\n },\n label: {\n type: String as PropType<ContextMenuSurfaceProps<VNodeChild>[\"label\"]>,\n },\n onClose: {\n type: Function as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"onClose\"]\n >,\n },\n container: {\n type: Object as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"children\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<\n ContextMenuSurfaceProps<VNodeChild>[\"className\"]\n >,\n },\n },\n }\n);\n","import type { TableFeature } from \"@adapttable/vue\";\nimport {\n CONTEXT_MENU_CONTROL,\n ContextMenuChrome,\n type ContextMenuSlots,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n contextMenu as bindingContextMenu,\n type ContextMenuOptions,\n} from \"@adapttable/vue/features\";\nimport { NDivider } from \"naive-ui\";\nimport { h } from \"vue\";\n\nimport { NaiveContextMenuSurface } from \"./actions/NaiveContextMenuSurface\";\nimport { naiveButton } from \"./controls/button\";\nfunction contextSlots(\n names: Readonly<Record<string, string | undefined>> = {}\n): ContextMenuSlots {\n return {\n Surface: (props) => h(NaiveContextMenuSurface, props),\n Item: ({ item, onSelect }) =>\n naiveButton(\n {\n role: \"menuitem\",\n tabindex: -1,\n disabled: item.disabled,\n \"aria-disabled\": item.disabled,\n \"data-danger\": item.danger ? \"\" : undefined,\n \"data-adapttable-part\": \"context-menu-item\",\n class: names.contextMenuItem,\n onClick: onSelect,\n },\n item.label\n ),\n Separator: () =>\n h(NDivider, {\n role: \"separator\",\n \"data-adapttable-part\": \"context-menu-separator\",\n class: names.contextMenuSeparator,\n }),\n };\n}\nexport function contextMenu<TRow>(\n options: boolean | ContextMenuOptions<TRow> = true\n): TableFeature<TRow> {\n return extendFeature(bindingContextMenu<TRow>(options), [\n slotRender(CONTEXT_MENU_CONTROL, (props) =>\n h(ContextMenuChrome, {\n items: props.model.items,\n at: props.model.at,\n onClose: props.model.close,\n labels: props.labels,\n className: props.classNames?.contextMenu,\n container: props.container,\n slots: contextSlots(props.classNames),\n })\n ),\n ]);\n}\nexport type { ContextMenuOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;AAmBA,MAAa,0BAAwC,eAAA,GAAA,IAAA,gBAAA,EAClD,UAA+C;CAC9C,MAAM,UAAA,GAASA,wBAAAA,iBAAAA,CAAiB;CAChC,MAAM,QAAA,GAAOC,IAAAA,WAAAA,CAA2C,IAAI;CAC5D,MAAM,cAAA,GAAaC,wBAAAA,qBAAAA,CAAqB;CACxC,MAAM,aAAc,KAAK,QAAQC,eAAAA,SAAS,KAAK,KAAK,IAAI;CACxD,MAAM,gBAAgB;EACpB,MAAM,QAAQ,KAAK;EACnB,OAAO,CACL,GAAI,OAAO,iBAA8B,qBAAmB,KAAK,CAAC,CACpE,CAAC,CAAC,QAAQ,SAAS,KAAK,QAAQ,iBAAe,MAAM,KAAK;CAC5D;CACA,CAAA,GAAA,IAAA,MAAA,CACE;EAAC;EAAM;QAAc,MAAM;CAAE,IAC5B,GAAG,OAAO,WAAW,YAAY;EAChC,WAAW,MAAM;EACjB,IAAI,CAAC,MAAM;EACX,IAAI,UAAU;EACd,CAAA,GAAA,wBAAA,aAAA,OAAmB;GACjB,IAAI,WAAW,OAAO,OACpB,QAAQ,CAAC,CACN,MAAM,SAAS,KAAK,aAAa,eAAe,MAAM,MAAM,CAAC,EAC5D,MAAM,EAAE,eAAe,KAAK,CAAC;EACrC,CAAC;EACD,cAAc;GACZ,UAAU;EACZ,CAAC;CACH,GACA,EAAE,OAAO,OAAO,CAClB;CACA,MAAM,WAAW,UAAyB;EACxC,MAAM,QAAQ,KAAK;EACnB,IACE,CAAC,OAAO,SACR,CAAC,SACD,EAAE,MAAM,kBAAkB,YAC1B,MAAM,OAAO,QAAQ,iBAAe,MAAM,OAE1C;EACF,MAAM,QAAQ,QAAQ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;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAG7C,SAAS,KAAA;EACX;EACA,WAAW,EACT,MAAM,OAGR;CACF;AACF,CACF;;;AC/IA,SAAS,aACP,QAAsD,CAAC,GACrC;CAClB,OAAO;EACL,UAAU,WAAA,GAAUC,IAAAA,EAAAA,CAAE,yBAAyB,KAAK;EACpD,OAAO,EAAE,MAAM,eACbC,eAAAA,YACE;GACE,MAAM;GACN,UAAU;GACV,UAAU,KAAK;GACf,iBAAiB,KAAK;GACtB,eAAe,KAAK,SAAS,KAAK,KAAA;GAClC,wBAAwB;GACxB,OAAO,MAAM;GACb,SAAS;EACX,GACA,KAAK,KACP;EACF,kBAAA,GACED,IAAAA,EAAAA,CAAEE,SAAAA,UAAU;GACV,MAAM;GACN,wBAAwB;GACxB,OAAO,MAAM;EACf,CAAC;CACL;AACF;AACA,SAAgB,YACd,UAA8C,MAC1B;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,YAAAA,CAAyB,OAAO,GAAG,EAAA,GACtDC,wBAAAA,WAAAA,CAAWC,wBAAAA,uBAAuB,WAAA,GAChCN,IAAAA,EAAAA,CAAEO,wBAAAA,mBAAmB;EACnB,OAAO,MAAM,MAAM;EACnB,IAAI,MAAM,MAAM;EAChB,SAAS,MAAM,MAAM;EACrB,QAAQ,MAAM;EACd,WAAW,MAAM,YAAY;EAC7B,WAAW,MAAM;EACjB,OAAO,aAAa,MAAM,UAAU;CACtC,CAAC,CACH,CACF,CAAC;AACH"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_context_menu = require("./context-menu-BbhrjTZr.cjs");
2
+ const require_context_menu = require("./context-menu-qVwE9S2V.cjs");
3
3
  exports.contextMenu = require_context_menu.contextMenu;
@@ -1,2 +1,2 @@
1
- import { t as contextMenu } from "./context-menu-DjYIQXhY.js";
1
+ import { t as contextMenu } from "./context-menu-CsbLaMcR.js";
2
2
  export { contextMenu };
@@ -21,17 +21,18 @@ const _sfc_main$2 = /*@__PURE__*/ (0, vue.defineComponent)({
21
21
  batch: {},
22
22
  contested: {
23
23
  type: Boolean,
24
- default: void 0
24
+ default: () => void 0
25
25
  },
26
26
  labels: {},
27
27
  className: {},
28
28
  buttonClassName: {}
29
29
  },
30
30
  setup(__props) {
31
- const props = __props;
31
+ const props = (0, vue.createPropsRestProxy)(__props, ["contested"]);
32
32
  const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
33
33
  const Render = () => (0, _adapttable_vue_adapter.BatchEditBarChrome)({
34
34
  ...props,
35
+ contested: __props.contested,
35
36
  className: [props.className, names.value.batchEditBar].filter(Boolean).join(" "),
36
37
  controls: { Button: (control) => naiveEditingButton(control, names.value.batchEditButton) }
37
38
  });
@@ -190,7 +191,7 @@ const _sfc_main$1 = /*@__PURE__*/ (0, vue.defineComponent)({
190
191
  rowIndex: {},
191
192
  rows: {},
192
193
  columns: {},
193
- rowKey: { type: Function },
194
+ rowKey: {},
194
195
  editLabel: {},
195
196
  undoLabel: {},
196
197
  display: { type: [
@@ -320,7 +321,7 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
320
321
  conflict: {},
321
322
  showBegin: {
322
323
  type: Boolean,
323
- default: void 0
324
+ default: () => void 0
324
325
  },
325
326
  rowEditing: {},
326
327
  row: {},
@@ -328,10 +329,11 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
328
329
  labels: {}
329
330
  },
330
331
  setup(__props) {
331
- const props = __props;
332
+ const props = (0, vue.createPropsRestProxy)(__props, ["showBegin"]);
332
333
  const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
333
334
  const Render = () => (0, _adapttable_vue_adapter.RowEditActionsChrome)({
334
335
  ...props,
336
+ showBegin: __props.showBegin,
335
337
  className: [props.className, names.value.rowEditActions].filter(Boolean).join(" "),
336
338
  controls: { Button: (control) => naiveEditingButton(control, names.value.rowEditButton) }
337
339
  });
@@ -406,4 +408,4 @@ Object.defineProperty(exports, "undoRedoButtons", {
406
408
  }
407
409
  });
408
410
 
409
- //# sourceMappingURL=editing-DR4w-oKB.cjs.map
411
+ //# sourceMappingURL=editing-BAUOl5Ox.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editing-BAUOl5Ox.cjs","names":["naiveButton","mergeProps","defineComponent","shallowRef","useScopeActivity","useId","htmlRoot","withoutAttributes","h","NSelect","readMultiDraft","formatMultiDraft","defineComponent","useScopeActivity","shallowRef","htmlRoot","h","NInputNumber","withoutAttributes","defineComponent","useDataTableClassNames","HistoryButtonsChrome","naiveButton","slotRender","editableCellSlotKey","h","NaiveEditableCell","extendFeature","bindingEditing","bindingRowEditing","rowEditActionsSlotKey","NaiveRowEditActions","bindingBatchEditing","batchEditBarSlotKey","NaiveBatchEditBar","bindingUndoRedoButtons","UNDO_REDO_CONTROL"],"sources":["../src/editing/naiveEditingButton.ts","../src/editing/NaiveBatchEditBar.vue","../src/editing/NaiveChoiceEditor.ts","../src/editing/NaiveNumberEditor.ts","../src/editing/NaiveEditableCell.vue","../src/editing/NaiveHistoryButtons.ts","../src/editing/NaiveRowEditActions.vue","../src/editing.ts"],"sourcesContent":["import type { EditingActionButtonProps } from \"@adapttable/vue/adapter\";\nimport { mergeProps, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\nexport function naiveEditingButton(\n control: EditingActionButtonProps,\n className?: string\n) {\n return naiveButton(\n mergeProps(control.attrs, { class: className, onClick: control.onClick }),\n [\n control.icon === false ? null : (control.icon as VNodeChild),\n control.label,\n ]\n );\n}\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n BatchEditBarChrome,\n type BatchEditBarProps,\n useDataTableClassNames,\n} from \"@adapttable/vue/adapter\";\n\nimport { naiveEditingButton } from \"./naiveEditingButton\";\ndefineOptions({ name: \"NaiveBatchEditBar\" });\nconst { contested = undefined, ...props } =\n defineProps<BatchEditBarProps<TRow>>();\nconst names = useDataTableClassNames();\nconst Render = () =>\n BatchEditBarChrome({\n ...props,\n contested,\n className: [props.className, names.value.batchEditBar]\n .filter(Boolean)\n .join(\" \"),\n controls: {\n Button: (control) =>\n naiveEditingButton(control, names.value.batchEditButton),\n },\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import type { Attrs, ElementRef } from \"@adapttable/vue\";\nimport {\n formatMultiDraft,\n readMultiDraft,\n useElementRef,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { NSelect, type SelectInst } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type InputHTMLAttributes,\n type PropType,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\n\nimport { withoutAttributes } from \"../controls/attributes\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\ninterface ChoiceEditorProps {\n readonly attrs: Attrs;\n readonly draft: string;\n readonly multiple: boolean;\n readonly options: readonly {\n readonly value: string;\n readonly label: string;\n }[];\n readonly onChange: (value: string) => void;\n readonly onBlur: () => void;\n readonly onKeyDown: (event: KeyboardEvent) => void;\n}\n\n/** NSelect owns its open menu; the binding owns editing keys when that menu is closed. */\nexport const NaiveChoiceEditor = defineComponent(\n (props: ChoiceEditorProps) => {\n const instance = shallowRef<(ComponentPublicInstance & SelectInst) | null>(\n null\n );\n const active = useScopeActivity();\n const show = shallowRef(false);\n const listId = `adapttable-naive-edit-options-${useId()}`;\n watch(\n active,\n (enabled) => {\n if (!enabled) show.value = false;\n },\n { flush: \"sync\" }\n );\n useElementRef(\n () =>\n active.value && instance.value\n ? htmlRoot(instance.value)?.querySelector<HTMLInputElement>(\n 'input[role=\"combobox\"]'\n )\n : null,\n () =>\n typeof props.attrs.ref === \"function\"\n ? (props.attrs.ref as ElementRef)\n : undefined\n );\n let menuKey = false;\n return () => {\n const attrs = withoutAttributes(props.attrs, [\n \"ref\",\n \"onBlur\",\n \"onKeydown\",\n \"id\",\n \"class\",\n \"data-adapttable-part\",\n ]);\n const inputProps = {\n ...attrs,\n id: props.attrs.id as string | undefined,\n class: props.attrs.class as InputHTMLAttributes[\"class\"],\n \"data-adapttable-part\": props.attrs[\"data-adapttable-part\"],\n role: \"combobox\",\n \"aria-autocomplete\": \"list\" as const,\n \"aria-expanded\": show.value,\n \"aria-controls\": listId,\n };\n return h(NSelect, {\n ref: instance,\n size: \"small\",\n disabled: props.attrs.disabled === true,\n filterable: true,\n to: false,\n show: active.value && show.value,\n multiple: props.multiple,\n value: props.multiple ? readMultiDraft(props.draft) : props.draft,\n options: [...props.options],\n inputProps,\n menuProps: {\n id: listId,\n role: \"listbox\",\n \"aria-multiselectable\": props.multiple || undefined,\n },\n nodeProps: (option) => ({\n role: \"option\",\n \"aria-selected\": props.multiple\n ? readMultiDraft(props.draft).includes(String(option.value))\n : option.value === props.draft,\n }),\n \"onUpdate:value\": (\n value: string | number | (string | number)[] | null\n ) => {\n if (!active.value) return;\n const draft = Array.isArray(value)\n ? formatMultiDraft(value.map(String))\n : String(value ?? \"\");\n props.onChange(draft);\n },\n \"onUpdate:show\": (value: boolean) => {\n if (active.value) show.value = value;\n },\n onBlur: () => {\n if (active.value) props.onBlur();\n },\n onKeydownCapture: (event: KeyboardEvent) => {\n menuKey =\n show.value &&\n [\"Escape\", \"Enter\", \"ArrowUp\", \"ArrowDown\", \"Home\", \"End\"].includes(\n event.key\n );\n },\n onKeydown: (event: KeyboardEvent) => {\n if (!active.value) return;\n if (menuKey) {\n event.stopPropagation();\n if (event.key === \"Escape\") instance.value?.focusInput();\n } else props.onKeyDown(event);\n menuKey = false;\n },\n });\n };\n },\n {\n name: \"NaiveChoiceEditor\",\n inheritAttrs: false,\n props: {\n attrs: { type: Object as PropType<ChoiceEditorProps[\"attrs\"]> },\n draft: { type: String as PropType<ChoiceEditorProps[\"draft\"]> },\n multiple: {\n type: Boolean as PropType<ChoiceEditorProps[\"multiple\"]>,\n default: undefined,\n },\n options: { type: Array as PropType<ChoiceEditorProps[\"options\"]> },\n onChange: { type: Function as PropType<ChoiceEditorProps[\"onChange\"]> },\n onBlur: { type: Function as PropType<ChoiceEditorProps[\"onBlur\"]> },\n onKeyDown: { type: Function as PropType<ChoiceEditorProps[\"onKeyDown\"]> },\n },\n }\n);\n","import type { Attrs, ElementRef } from \"@adapttable/vue\";\nimport { useElementRef, useScopeActivity } from \"@adapttable/vue/adapter\";\nimport { NInputNumber } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { withoutAttributes } from \"../controls/attributes\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\ninterface NumberEditorProps {\n readonly attrs: Attrs;\n readonly draft: string;\n readonly onChange: (value: string) => void;\n readonly onBlur: () => void;\n}\n\n/** The public formatter preserves the binding's raw draft through vendor blur formatting. */\nexport const NaiveNumberEditor = defineComponent(\n (props: NumberEditorProps) => {\n const active = useScopeActivity();\n const instance = shallowRef<ComponentPublicInstance | null>(null);\n useElementRef(\n () =>\n active.value && instance.value\n ? htmlRoot(instance.value)?.querySelector<HTMLInputElement>(\n 'input[role=\"spinbutton\"]'\n )\n : null,\n () =>\n typeof props.attrs.ref === \"function\"\n ? (props.attrs.ref as ElementRef)\n : undefined\n );\n return () =>\n h(NInputNumber, {\n ref: instance,\n size: \"small\",\n disabled: props.attrs.disabled === true,\n readonly:\n props.attrs.readonly === true || props.attrs.readOnly === true,\n value:\n props.draft.trim() !== \"\" && Number.isFinite(Number(props.draft))\n ? Number(props.draft)\n : null,\n format: () => props.draft,\n showButton: false,\n inputProps: {\n ...withoutAttributes(props.attrs, [\"ref\", \"onBlur\"]),\n role: \"spinbutton\",\n onInput: (event: Event) => {\n if (active.value)\n props.onChange((event.currentTarget as HTMLInputElement).value);\n },\n },\n \"onUpdate:value\": (value: number | null) => {\n if (active.value) props.onChange(value === null ? \"\" : String(value));\n },\n onBlur: () => {\n if (active.value) props.onBlur();\n },\n });\n },\n {\n name: \"NaiveNumberEditor\",\n inheritAttrs: false,\n props: {\n attrs: { type: Object as PropType<NumberEditorProps[\"attrs\"]> },\n draft: { type: String as PropType<NumberEditorProps[\"draft\"]> },\n onChange: { type: Function as PropType<NumberEditorProps[\"onChange\"]> },\n onBlur: { type: Function as PropType<NumberEditorProps[\"onBlur\"]> },\n },\n }\n);\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n EditableCellChrome,\n type EditableCellChromeSlots,\n editableCustomControl,\n elementRef,\n useDataTableClassNames,\n useEditableCellModel,\n type VueEditableCellProps,\n} from \"@adapttable/vue/adapter\";\nimport { Fragment, h, mergeProps, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { naiveCheckbox } from \"../controls/checkbox\";\nimport { naiveInput } from \"../controls/input\";\nimport { NaiveChoiceEditor } from \"./NaiveChoiceEditor\";\nimport { NaiveNumberEditor } from \"./NaiveNumberEditor\";\n\nconst props = defineProps<VueEditableCellProps<TRow>>();\nconst names = useDataTableClassNames();\nconst model = useEditableCellModel(() => props);\nconst controls: EditableCellChromeSlots<TRow> = {\n Activate: (control) =>\n naiveButton(\n {\n title: control.title,\n \"aria-description\": control.title,\n class: [control.className, names.value.editCellActivate],\n ref: elementRef(control.activateRef),\n \"data-adapttable-part\": \"edit-cell-activate\",\n \"data-save-status\": control.saveStatus,\n \"data-dirty\": control.dirty ? \"\" : undefined,\n onClick: control.onClick,\n onDblclick: control.onDoubleClick,\n onKeydown: control.onKeyDown,\n },\n control.display,\n { text: true }\n ),\n Editor: (control) => {\n const editor = control.controller.editor;\n const attrs = mergeProps(control.attrs, {\n ref: elementRef<HTMLElement>(control.editorRef),\n class: names.value.editCellEditor,\n onBlur: control.onBlur,\n onKeydown: control.onKeyDown,\n });\n if (editor && typeof editor === \"object\") {\n if (editor.type === \"custom\")\n return h(Fragment, [\n editor.render(editableCustomControl(model.value)) as VNodeChild,\n ]);\n return h(NaiveChoiceEditor, {\n attrs,\n draft: control.controller.draft,\n multiple: editor.type === \"multi-select\",\n options: control.controller.selectOptions,\n onChange: control.onChange,\n onBlur: control.onBlur,\n onKeyDown: control.onKeyDown,\n });\n }\n if (editor === \"number\")\n return h(NaiveNumberEditor, {\n attrs,\n draft: control.controller.draft,\n onChange: control.onChange,\n onBlur: control.onBlur,\n });\n if (editor === \"boolean\")\n return naiveCheckbox({\n attrs,\n checked: control.controller.draft === \"true\",\n indeterminate: false,\n onToggle: () =>\n control.onChange(String(control.controller.draft !== \"true\")),\n });\n return naiveInput({\n attrs: {\n ...attrs,\n type: editor === \"datetime\" ? \"datetime-local\" : (editor ?? \"text\"),\n },\n value: control.controller.draft,\n onChange: control.onChange,\n });\n },\n Button: (control) =>\n naiveButton(\n {\n class: [\n control.className,\n control.part === \"edit-cell-rollback\"\n ? names.value.editCellRollback\n : names.value.editCellConflictButton,\n ],\n \"data-adapttable-part\": control.part,\n onMousedown: control.onMouseDown,\n onClick: control.onClick,\n },\n control.label\n ),\n};\nconst Render = () =>\n EditableCellChrome({ model: model.value, controls, classNames: names.value });\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import {\n HistoryButtonsChrome,\n type ToolbarExtrasSlotProps,\n useDataTableClassNames,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\nexport const NaiveHistoryButtons = defineComponent(\n (props: ToolbarExtrasSlotProps) => {\n const names = useDataTableClassNames();\n return () =>\n HistoryButtonsChrome({\n ...props,\n classNames: { ...names.value },\n slots: { Button: ({ label, attrs }) => naiveButton(attrs, label) },\n });\n },\n {\n name: \"NaiveHistoryButtons\",\n props: {\n onUndo: { type: Function as PropType<ToolbarExtrasSlotProps[\"onUndo\"]> },\n onRedo: { type: Function as PropType<ToolbarExtrasSlotProps[\"onRedo\"]> },\n canUndo: {\n type: Boolean as PropType<ToolbarExtrasSlotProps[\"canUndo\"]>,\n default: undefined,\n },\n canRedo: {\n type: Boolean as PropType<ToolbarExtrasSlotProps[\"canRedo\"]>,\n default: undefined,\n },\n undoLabel: {\n type: String as PropType<ToolbarExtrasSlotProps[\"undoLabel\"]>,\n },\n redoLabel: {\n type: String as PropType<ToolbarExtrasSlotProps[\"redoLabel\"]>,\n },\n density: { type: String as PropType<ToolbarExtrasSlotProps[\"density\"]> },\n onDensityChange: {\n type: Function as PropType<ToolbarExtrasSlotProps[\"onDensityChange\"]>,\n },\n labels: { type: Object as PropType<ToolbarExtrasSlotProps[\"labels\"]> },\n classNames: {\n type: Object as PropType<ToolbarExtrasSlotProps[\"classNames\"]>,\n },\n },\n }\n);\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n RowEditActionsChrome,\n type RowEditActionsProps,\n useDataTableClassNames,\n} from \"@adapttable/vue/adapter\";\n\nimport { naiveEditingButton } from \"./naiveEditingButton\";\ndefineOptions({ name: \"NaiveRowEditActions\" });\nconst { showBegin = undefined, ...props } =\n defineProps<RowEditActionsProps<TRow>>();\nconst names = useDataTableClassNames();\nconst Render = () =>\n RowEditActionsChrome({\n ...props,\n showBegin,\n className: [props.className, names.value.rowEditActions]\n .filter(Boolean)\n .join(\" \"),\n controls: {\n Button: (control) =>\n naiveEditingButton(control, names.value.rowEditButton),\n },\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import type {\n CellEditHandler,\n StaticTableFeature,\n TableEditingOptions,\n TableFeature,\n} from \"@adapttable/vue\";\nimport {\n batchEditBarSlotKey,\n editableCellSlotKey,\n extendFeature,\n rowEditActionsSlotKey,\n slotRender,\n UNDO_REDO_CONTROL,\n} from \"@adapttable/vue/adapter\";\nimport {\n batchEditing as bindingBatchEditing,\n editing as bindingEditing,\n type EditingLifecycleExtras,\n rowEditing as bindingRowEditing,\n undoRedoButtons as bindingUndoRedoButtons,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport NaiveBatchEditBar from \"./editing/NaiveBatchEditBar.vue\";\nimport NaiveEditableCell from \"./editing/NaiveEditableCell.vue\";\nimport { NaiveHistoryButtons } from \"./editing/NaiveHistoryButtons\";\nimport NaiveRowEditActions from \"./editing/NaiveRowEditActions.vue\";\n\nfunction cellSlot<TRow>() {\n return slotRender(editableCellSlotKey<TRow>(), (props) =>\n h(NaiveEditableCell<TRow>, { ...props })\n );\n}\n\n/** Naive controls keep all validation, save and host-write transitions in the binding. */\nexport function editing<TRow>(\n onCellEdit: CellEditHandler<TRow>,\n extras: EditingLifecycleExtras<TRow> = {}\n): TableFeature<TRow> {\n return extendFeature(bindingEditing(onCellEdit, extras), [cellSlot<TRow>()]);\n}\n\n/** Edit a row as one gesture with explicit Naive UI Save and Cancel controls. */\nexport function rowEditing<TRow>(\n onRowEdit: NonNullable<TableEditingOptions<TRow>[\"onRowEdit\"]>,\n extras: EditingLifecycleExtras<TRow> = {}\n): TableFeature<TRow> {\n return extendFeature(bindingRowEditing(onRowEdit, extras), [\n cellSlot<TRow>(),\n slotRender(rowEditActionsSlotKey<TRow>(), (props) =>\n h(NaiveRowEditActions<TRow>, { ...props })\n ),\n ]);\n}\n\n/** Stage edits across rows; host writes happen only on the batch Save action. */\nexport function batchEditing<TRow>(\n onBatchEdit: NonNullable<TableEditingOptions<TRow>[\"onBatchEdit\"]>,\n extras: EditingLifecycleExtras<TRow> = {}\n): TableFeature<TRow> {\n return extendFeature(bindingBatchEditing(onBatchEdit, extras), [\n cellSlot<TRow>(),\n slotRender(batchEditBarSlotKey<TRow>(), (props) =>\n h(NaiveBatchEditBar<TRow>, { ...props })\n ),\n ]);\n}\n\nexport { default as NaiveBatchEditBar } from \"./editing/NaiveBatchEditBar.vue\";\nexport { default as NaiveEditableCell } from \"./editing/NaiveEditableCell.vue\";\nexport { default as NaiveRowEditActions } from \"./editing/NaiveRowEditActions.vue\";\nexport type {\n BatchEditingState,\n BatchRowEdit,\n CellEditHandler,\n RowEditingState,\n TableEditingOptions,\n} from \"@adapttable/vue\";\nexport type { RowEditIcons } from \"@adapttable/vue/adapter\";\nexport type { EditingLifecycleExtras } from \"@adapttable/vue/features\";\nexport { dirtyIndicators, editHistory } from \"@adapttable/vue/features\";\n\n/** Opt-in Naive UI Undo and Redo buttons use the shell's history projection. */\nexport function undoRedoButtons(): StaticTableFeature {\n return extendFeature(bindingUndoRedoButtons(), [\n slotRender(UNDO_REDO_CONTROL, (props) =>\n h(NaiveHistoryButtons, { ...props })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;AAKA,SAAgB,mBACd,SACA,WACA;CACA,OAAOA,eAAAA,aAAAA,GACLC,IAAAA,WAAAA,CAAW,QAAQ,OAAO;EAAE,OAAO;EAAW,SAAS,QAAQ;CAAQ,CAAC,GACxE,CACE,QAAQ,SAAS,QAAQ,OAAQ,QAAQ,MACzC,QAAQ,KACV,CACF;AACF;;;;;;;;;;;;;;;;;ECPA,MAAM,SAAA,GACJ,IAAA,qBAAA,CAAA,SAAA,CAAA,WAAA,CAAA;EACF,MAAM,SAAA,GAAQ,wBAAA,uBAAA,CAAuB;EACrC,MAAM,gBAAA,GACJ,wBAAA,mBAAA,CAAmB;GACjB,GAAG;GACH,WAAQ,QAAA;GACR,WAAW,CAAC,MAAM,WAAW,MAAM,MAAM,YAAY,CAAA,CAClD,OAAO,OAAO,CAAA,CACd,KAAK,GAAG;GACX,UAAU,EACR,SAAS,YACP,mBAAmB,SAAS,MAAM,MAAM,eAAe,EAC3D;EACF,CAAC;EAIH,OAAO,QAAQ,CAAA;;GAIb,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAAU,MAAA;;;;;;;ACKZ,MAAa,qBAAA,GAAoBC,IAAAA,gBAAAA,EAC9B,UAA6B;CAC5B,MAAM,YAAA,GAAWC,IAAAA,WAAAA,CACf,IACF;CACA,MAAM,UAAA,GAASC,wBAAAA,iBAAAA,CAAiB;CAChC,MAAM,QAAA,GAAOD,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AAgB,kBAAsC;CACpD,QAAA,GAAOP,wBAAAA,cAAAA,EAAAA,GAAcQ,yBAAAA,gBAAAA,CAAuB,GAAG,EAAA,GAC7CZ,wBAAAA,WAAAA,CAAWa,wBAAAA,oBAAoB,WAAA,GAC7BX,IAAAA,EAAAA,CAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC,CACrC,CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-CdIoFGiK.d.cts","names":[],"sources":["../src/editing/NaiveBatchEditBar.vue","../src/editing/NaiveEditableCell.vue","../src/editing/NaiveRowEditActions.vue","../src/editing.ts"],"mappings":";;;;cA0CM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,sBAAmB,kBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCwB9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmHO,qBAAc,cAAc,sBAAmB,qBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCxN9F,eAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,oBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,oBAAmB,oBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,iBAAO;KACvB,oBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;;iBCvEpF,QAAQ,MACtB,YAAY,gBAAgB,OAC5B,SAAQ,uBAAuB,QAC9B,aAAa;;iBAKA,WAAW,MACzB,WAAW,YAAY,oBAAoB,qBAC3C,SAAQ,uBAAuB,QAC9B,aAAa;;iBAUA,aAAa,MAC3B,aAAa,YAAY,oBAAoB,uBAC7C,SAAQ,uBAAuB,QAC9B,aAAa;;iBAwBA,mBAAmB"}
1
+ {"version":3,"file":"editing-CdIoFGiK.d.cts","names":[],"sources":["../src/editing/NaiveBatchEditBar.vue","../src/editing/NaiveEditableCell.vue","../src/editing/NaiveRowEditActions.vue","../src/editing.ts"],"mappings":";;;;cA0CM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAgDO,qBAAc,cAAc,sBAAmB,kBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cC2B9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmHO,qBAAc,cAAc,sBAAmB,qBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAA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