@trops/dash-core 0.1.517 → 0.1.518

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.esm.js CHANGED
@@ -49723,6 +49723,14 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
49723
49723
  _useState14 = _slicedToArray(_useState13, 2),
49724
49724
  selectedPackageKey = _useState14[0],
49725
49725
  setSelectedPackageKey = _useState14[1];
49726
+ // Two top-level tabs so the inline `HowThisWorksPanel` (which carries
49727
+ // example fixtures and is intentionally tall) doesn't push the
49728
+ // package list/detail below the viewport. "permissions" is the
49729
+ // default and contains the actual UI users came here to use.
49730
+ var _useState15 = useState("permissions"),
49731
+ _useState16 = _slicedToArray(_useState15, 2),
49732
+ activeTab = _useState16[0],
49733
+ setActiveTab = _useState16[1];
49726
49734
  var reload = useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
49727
49735
  var _api$widgetMcp, api, result, _t;
49728
49736
  return _regeneratorRuntime.wrap(function (_context) {
@@ -49944,7 +49952,7 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
49944
49952
  return /*#__PURE__*/jsxs("div", {
49945
49953
  className: "flex flex-col flex-1 min-h-0",
49946
49954
  children: [/*#__PURE__*/jsxs("div", {
49947
- className: "flex-shrink-0 flex flex-col space-y-4 p-6 border-b border-gray-800",
49955
+ className: "flex-shrink-0 flex flex-col space-y-3 px-6 pt-6 pb-3 border-b border-gray-800",
49948
49956
  children: [/*#__PURE__*/jsxs("div", {
49949
49957
  className: "flex flex-col space-y-2",
49950
49958
  children: [/*#__PURE__*/jsx(SubHeading3, {
@@ -49954,14 +49962,38 @@ var PrivacySecuritySection = function PrivacySecuritySection() {
49954
49962
  className: "text-xs opacity-60",
49955
49963
  children: "Granting access here is a trust signal about the widget \u2014 not a per-dashboard switch."
49956
49964
  })]
49957
- }), /*#__PURE__*/jsx(EnforcementToggles, {}), /*#__PURE__*/jsx(HowThisWorksPanel, {}), error && /*#__PURE__*/jsx("div", {
49965
+ }), /*#__PURE__*/jsx(Tabs3, {
49966
+ value: activeTab,
49967
+ onValueChange: setActiveTab,
49968
+ backgroundColor: "bg-transparent",
49969
+ spacing: "p-0",
49970
+ children: /*#__PURE__*/jsxs(Tabs3.List, {
49971
+ spacing: "p-0.5",
49972
+ children: [/*#__PURE__*/jsx(Tabs3.Trigger, {
49973
+ value: "permissions",
49974
+ children: "Permissions"
49975
+ }), /*#__PURE__*/jsx(Tabs3.Trigger, {
49976
+ value: "help",
49977
+ children: "Help"
49978
+ })]
49979
+ })
49980
+ }), error && /*#__PURE__*/jsx("div", {
49958
49981
  className: "text-xs text-red-400 bg-red-900 bg-opacity-20 border border-red-700 rounded p-3",
49959
49982
  children: error
49960
49983
  })]
49961
- }), /*#__PURE__*/jsx(SectionLayout, {
49962
- listContent: listContent,
49963
- detailContent: detailContent,
49964
- emptyDetailMessage: "Select a package to view its grants"
49984
+ }), activeTab === "permissions" ? /*#__PURE__*/jsxs("div", {
49985
+ className: "flex flex-col flex-1 min-h-0",
49986
+ children: [/*#__PURE__*/jsx("div", {
49987
+ className: "flex-shrink-0 px-6 py-4 border-b border-gray-800",
49988
+ children: /*#__PURE__*/jsx(EnforcementToggles, {})
49989
+ }), /*#__PURE__*/jsx(SectionLayout, {
49990
+ listContent: listContent,
49991
+ detailContent: detailContent,
49992
+ emptyDetailMessage: "Select a package to view its grants"
49993
+ })]
49994
+ }) : /*#__PURE__*/jsx("div", {
49995
+ className: "flex-1 overflow-y-auto p-6",
49996
+ children: /*#__PURE__*/jsx(HowThisWorksPanel, {})
49965
49997
  }), /*#__PURE__*/jsx(GrantManuallyModal, {
49966
49998
  isOpen: !!manualGrantWidgetId,
49967
49999
  setIsOpen: function setIsOpen(open) {
@@ -49998,19 +50030,19 @@ var EnforcementToggles = function EnforcementToggles() {
49998
50030
  // pendingDisable: { flag: 'enforce' | 'jit' } | null
49999
50031
  // When the user toggles a flag from ON → OFF, we open a confirm modal
50000
50032
  // before persisting. ON → ON or OFF → ON go through immediately.
50001
- var _useState15 = useState(null),
50002
- _useState16 = _slicedToArray(_useState15, 2),
50003
- pendingDisable = _useState16[0],
50004
- setPendingDisable = _useState16[1];
50033
+ var _useState17 = useState(null),
50034
+ _useState18 = _slicedToArray(_useState17, 2),
50035
+ pendingDisable = _useState18[0],
50036
+ setPendingDisable = _useState18[1];
50005
50037
 
50006
50038
  // lastTestResult: feedback for the "Test prompt" button. Tells the
50007
50039
  // user whether their JIT response was actually persisted, so they
50008
50040
  // don't have to interpret the post-grant "server not connected"
50009
50041
  // error as failure.
50010
- var _useState17 = useState(null),
50011
- _useState18 = _slicedToArray(_useState17, 2),
50012
- lastTestResult = _useState18[0],
50013
- setLastTestResult = _useState18[1];
50042
+ var _useState19 = useState(null),
50043
+ _useState20 = _slicedToArray(_useState19, 2),
50044
+ lastTestResult = _useState20[0],
50045
+ setLastTestResult = _useState20[1];
50014
50046
 
50015
50047
  // Auto-clear the test result after 30 seconds so it doesn't linger
50016
50048
  // forever after a successful test.
@@ -50411,10 +50443,10 @@ var noop = function noop() {};
50411
50443
  * users who don't want the wall of text collapse manually.
50412
50444
  */
50413
50445
  var HowThisWorksPanel = function HowThisWorksPanel() {
50414
- var _useState19 = useState(true),
50415
- _useState20 = _slicedToArray(_useState19, 2),
50416
- open = _useState20[0],
50417
- setOpen = _useState20[1];
50446
+ var _useState21 = useState(true),
50447
+ _useState22 = _slicedToArray(_useState21, 2),
50448
+ open = _useState22[0],
50449
+ setOpen = _useState22[1];
50418
50450
  return /*#__PURE__*/jsxs("div", {
50419
50451
  className: "border border-gray-700 rounded",
50420
50452
  children: [/*#__PURE__*/jsxs("button", {