@papernote/ui 1.12.0 → 1.13.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.
package/dist/index.js CHANGED
@@ -13205,8 +13205,13 @@ function Sidebar({ items, onNavigate, className = '', header, footer, currentPat
13205
13205
  };
13206
13206
  // Sidebar content (shared between desktop and mobile)
13207
13207
  const sidebarContent = (jsxRuntime.jsxs("div", { ref: sidebarRef, className: `flex flex-col h-full bg-white border-r border-paper-300 notebook-binding ${width} ${className}`, children: [mobileOpen !== undefined && (jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 pt-4 md:hidden", children: [jsxRuntime.jsx("div", { className: "flex-1", children: header }), jsxRuntime.jsx("button", { onClick: onMobileClose, className: "\n flex items-center justify-center\n w-10 h-10 -mr-2\n text-ink-500 hover:text-ink-700\n hover:bg-paper-100 rounded-full\n transition-colors\n ", "aria-label": "Close sidebar", children: jsxRuntime.jsx(lucideReact.X, { className: "w-5 h-5" }) })] })), header && mobileOpen === undefined && (jsxRuntime.jsx("div", { className: "px-6 pt-6 pb-4", children: header })), header && mobileOpen !== undefined && (jsxRuntime.jsx("div", { className: "px-6 pt-2 pb-4 hidden md:block", children: header })), jsxRuntime.jsx("nav", { className: "flex-1 px-3 py-2 space-y-1 overflow-y-auto", children: items.map((item) => {
13208
- // Render separator
13208
+ // Render separator or section header
13209
13209
  if (item.separator) {
13210
+ // Section header: separator with a label
13211
+ if (item.label) {
13212
+ return (jsxRuntime.jsx("div", { className: "mt-6 mb-2 px-3", "data-testid": item.dataAttributes?.['data-testid'] || `sidebar-section-${item.id}`, ...item.dataAttributes, children: jsxRuntime.jsx("div", { className: "border-t border-paper-300 pt-3", children: jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-ink-400", children: item.label }) }) }, item.id));
13213
+ }
13214
+ // Plain separator: just a line
13210
13215
  return (jsxRuntime.jsx("div", { className: "my-4 border-t border-paper-300", "data-testid": item.dataAttributes?.['data-testid'] || `sidebar-separator-${item.id}`, ...item.dataAttributes }, item.id));
13211
13216
  }
13212
13217
  // Render nav item
@@ -15701,44 +15706,52 @@ function getAugmentedNamespace(n) {
15701
15706
  * (A1, A1:C5, ...)
15702
15707
  */
15703
15708
 
15704
- let Collection$3 = class Collection {
15709
+ var collection;
15710
+ var hasRequiredCollection;
15711
+
15712
+ function requireCollection () {
15713
+ if (hasRequiredCollection) return collection;
15714
+ hasRequiredCollection = 1;
15715
+ class Collection {
15705
15716
 
15706
- constructor(data, refs) {
15707
- if (data == null && refs == null) {
15708
- this._data = [];
15709
- this._refs = [];
15710
- } else {
15711
- if (data.length !== refs.length)
15712
- throw Error('Collection: data length should match references length.');
15713
- this._data = data;
15714
- this._refs = refs;
15715
- }
15716
- }
15717
+ constructor(data, refs) {
15718
+ if (data == null && refs == null) {
15719
+ this._data = [];
15720
+ this._refs = [];
15721
+ } else {
15722
+ if (data.length !== refs.length)
15723
+ throw Error('Collection: data length should match references length.');
15724
+ this._data = data;
15725
+ this._refs = refs;
15726
+ }
15727
+ }
15717
15728
 
15718
- get data() {
15719
- return this._data;
15720
- }
15729
+ get data() {
15730
+ return this._data;
15731
+ }
15721
15732
 
15722
- get refs() {
15723
- return this._refs;
15724
- }
15733
+ get refs() {
15734
+ return this._refs;
15735
+ }
15725
15736
 
15726
- get length() {
15727
- return this._data.length;
15728
- }
15737
+ get length() {
15738
+ return this._data.length;
15739
+ }
15729
15740
 
15730
- /**
15731
- * Add data and references to this collection.
15732
- * @param {{}} obj - data
15733
- * @param {{}} ref - reference
15734
- */
15735
- add(obj, ref) {
15736
- this._data.push(obj);
15737
- this._refs.push(ref);
15738
- }
15739
- };
15741
+ /**
15742
+ * Add data and references to this collection.
15743
+ * @param {{}} obj - data
15744
+ * @param {{}} ref - reference
15745
+ */
15746
+ add(obj, ref) {
15747
+ this._data.push(obj);
15748
+ this._refs.push(ref);
15749
+ }
15750
+ }
15740
15751
 
15741
- var collection = Collection$3;
15752
+ collection = Collection;
15753
+ return collection;
15754
+ }
15742
15755
 
15743
15756
  var helpers;
15744
15757
  var hasRequiredHelpers;
@@ -15747,7 +15760,7 @@ function requireHelpers () {
15747
15760
  if (hasRequiredHelpers) return helpers;
15748
15761
  hasRequiredHelpers = 1;
15749
15762
  const FormulaError = requireError();
15750
- const Collection = collection;
15763
+ const Collection = requireCollection();
15751
15764
 
15752
15765
  const Types = {
15753
15766
  NUMBER: 0,
@@ -25401,7 +25414,7 @@ var engineering = EngineeringFunctions;
25401
25414
 
25402
25415
  const FormulaError$b = requireError();
25403
25416
  const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
25404
- const Collection$2 = collection;
25417
+ const Collection$2 = requireCollection();
25405
25418
  const H$5 = FormulaHelpers$8;
25406
25419
 
25407
25420
  const ReferenceFunctions$1 = {
@@ -37029,7 +37042,7 @@ var parsing = {
37029
37042
  const FormulaError$4 = requireError();
37030
37043
  const {Address: Address$1} = requireHelpers();
37031
37044
  const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
37032
- const Collection$1 = collection;
37045
+ const Collection$1 = requireCollection();
37033
37046
  const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
37034
37047
  const {NotAllInputParsedException} = require$$4;
37035
37048
 
@@ -37791,7 +37804,7 @@ var hooks$1 = {
37791
37804
  const FormulaError$2 = requireError();
37792
37805
  const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
37793
37806
  const {Prefix, Postfix, Infix, Operators} = operators;
37794
- const Collection = collection;
37807
+ const Collection = requireCollection();
37795
37808
  const MAX_ROW = 1048576, MAX_COLUMN = 16384;
37796
37809
 
37797
37810
  let Utils$1 = class Utils {
@@ -61838,7 +61851,7 @@ function AdminModal({ isOpen, onClose, title, subtitle, onSubmit, isSaving = fal
61838
61851
  };
61839
61852
  return (jsxRuntime.jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4 admin-modal-overlay", children: jsxRuntime.jsxs("div", { className: `bg-white rounded-lg w-full ${sizeClasses[size]} flex flex-col overflow-hidden shadow-2xl admin-modal-content`, style: { height: height }, children: [jsxRuntime.jsx("div", { className: "fixed inset-0 pointer-events-none admin-modal-sidebar-placeholder" }), jsxRuntime.jsxs("div", { className: "px-6 py-4 border-b", children: [jsxRuntime.jsx("h3", { className: "text-lg font-semibold", children: title }), subtitle && jsxRuntime.jsx("p", { className: "text-sm text-gray-500 mt-1", children: subtitle })] }), tabs.length > 1 && (jsxRuntime.jsx("div", { className: "border-b border-gray-200 bg-white", children: jsxRuntime.jsx("nav", { className: "-mb-px flex items-center px-6 admin-modal-tabs", "aria-label": "Tabs", children: tabs.map((tab, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", onClick: () => onTabChange(tab.id), className: `whitespace-nowrap border-b-2 py-3 px-4 text-sm font-medium transition-colors ${activeTabId === tab.id
61840
61853
  ? 'border-blue-500 text-blue-600'
61841
- : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}`, "aria-current": activeTabId === tab.id ? 'page' : undefined, children: tab.label }), index < tabs.length - 1 && (jsxRuntime.jsx("div", { className: "admin-modal-tab-separator" }))] }, tab.id))) }) })), onSubmit ? (jsxRuntime.jsx("form", { className: "flex-1 overflow-y-auto min-h-0 h-0 px-6 py-6 admin-modal-form", onSubmit: handleFormSubmit, id: formId, children: activeTab?.content || children })) : (jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto min-h-0 h-0 px-6 py-6 admin-modal-content-area", children: activeTab?.content || children })), jsxRuntime.jsxs("div", { className: "px-6 py-4 border-t bg-gray-50 flex justify-between gap-3", children: [jsxRuntime.jsx("button", { type: "button", onClick: onClose, className: "px-4 py-2 text-sm text-gray-600 hover:text-gray-800", disabled: isSaving, children: "Cancel" }), jsxRuntime.jsxs("div", { className: "flex gap-3", children: [customFooterActions, onSubmit && (jsxRuntime.jsx("button", { type: "submit", form: formId, disabled: isSaving, className: "px-4 py-2 text-sm bg-primary-600 text-white rounded hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed", children: isSaving ? 'Saving...' : 'Save Changes' }))] })] })] }) }));
61854
+ : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700'}`, "aria-current": activeTabId === tab.id ? 'page' : undefined, children: tab.label }), index < tabs.length - 1 && (jsxRuntime.jsx("div", { className: "admin-modal-tab-separator" }))] }, tab.id))) }) })), onSubmit ? (jsxRuntime.jsx("form", { className: "flex-1 overflow-y-auto min-h-0 h-0 px-6 py-6 admin-modal-form", onSubmit: handleFormSubmit, id: formId, noValidate: true, children: activeTab?.content || children })) : (jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto min-h-0 h-0 px-6 py-6 admin-modal-content-area", children: activeTab?.content || children })), jsxRuntime.jsxs("div", { className: "px-6 py-4 border-t bg-gray-50 flex justify-between gap-3", children: [jsxRuntime.jsx("button", { type: "button", onClick: onClose, className: "px-4 py-2 text-sm text-gray-600 hover:text-gray-800", disabled: isSaving, children: "Cancel" }), jsxRuntime.jsxs("div", { className: "flex gap-3", children: [customFooterActions, onSubmit && (jsxRuntime.jsx("button", { type: "submit", form: formId, disabled: isSaving, className: "px-4 py-2 text-sm bg-primary-600 text-white rounded hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed", children: isSaving ? 'Saving...' : 'Save Changes' }))] })] })] }) }));
61842
61855
  }
61843
61856
 
61844
61857
  /**