@aglyn/shared-ui-jsx 1.0.0-beta.234 → 1.0.0-beta.235
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/package.json +5 -5
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/components/activity-details-dialog.component.d.ts +69 -0
- package/src/lib/components/activity-details-dialog.component.js +186 -0
- package/src/lib/components/activity-details-dialog.component.js.map +1 -0
- package/src/lib/components/app-link.d.ts +72 -8
- package/src/lib/components/app-link.js +20 -2
- package/src/lib/components/app-link.js.map +1 -1
- package/src/lib/components/list-table.component.d.ts +18 -2
- package/src/lib/components/list-table.component.js +11 -18
- package/src/lib/components/list-table.component.js.map +1 -1
- package/src/lib/components/row-actions-menu.component.d.ts +6 -1
- package/src/lib/components/row-actions-menu.component.js +15 -6
- package/src/lib/components/row-actions-menu.component.js.map +1 -1
- package/src/lib/hooks/use-viewport-fill.d.ts +31 -8
- package/src/lib/hooks/use-viewport-fill.js +83 -11
- package/src/lib/hooks/use-viewport-fill.js.map +1 -1
- package/src/lib/utils/new-tab.d.ts +82 -0
- package/src/lib/utils/new-tab.js +97 -0
- package/src/lib/utils/new-tab.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aglyn/shared-ui-jsx",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.235",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"homepage": "https://aglyn.com",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aglyn/shared-data-mdi": "1.0.0-beta.
|
|
29
|
-
"@aglyn/shared-ui-theme": "1.0.0-beta.
|
|
30
|
-
"@aglyn/shared-util-tools": "1.0.0-beta.
|
|
31
|
-
"@aglyn/shared-util-vendor": "1.0.0-beta.
|
|
28
|
+
"@aglyn/shared-data-mdi": "1.0.0-beta.235",
|
|
29
|
+
"@aglyn/shared-ui-theme": "1.0.0-beta.235",
|
|
30
|
+
"@aglyn/shared-util-tools": "1.0.0-beta.235",
|
|
31
|
+
"@aglyn/shared-util-vendor": "1.0.0-beta.235",
|
|
32
32
|
"@mdi/js": "^7.4.47",
|
|
33
33
|
"@swc/helpers": "0.5.23",
|
|
34
34
|
"change-case": "^5.4.4",
|
package/src/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from './lib/hocs/create-hoc-with-context-consumer';
|
|
|
40
40
|
export * from './lib/hocs/with-hoc';
|
|
41
41
|
export * from './lib/utils/make-link-elements';
|
|
42
42
|
export * from './lib/utils/make-meta-elements';
|
|
43
|
+
export * from './lib/utils/new-tab';
|
|
43
44
|
export * from './lib/types';
|
|
44
45
|
export * from './lib/hooks/mdi-icon/use-mdi-icon';
|
|
45
46
|
export * from './lib/hooks/mdi-icon/use-mdi-icons';
|
package/src/index.js
CHANGED
|
@@ -156,6 +156,7 @@ export * from "./lib/hocs/create-hoc-with-context-consumer.js";
|
|
|
156
156
|
export * from "./lib/hocs/with-hoc.js";
|
|
157
157
|
export * from "./lib/utils/make-link-elements.js";
|
|
158
158
|
export * from "./lib/utils/make-meta-elements.js";
|
|
159
|
+
export * from "./lib/utils/new-tab.js";
|
|
159
160
|
// `./lib/utils/vendor` is NOT re-exported (AGL-2682). It wraps eleven `react-is`
|
|
160
161
|
// predicates and NOTHING reads any of them from this index — the two real
|
|
161
162
|
// consumers, `aglyn-node-renderer`'s `leaf.tsx` and the besigner's
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/shared/ui/jsx/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// ── Barrel discipline (AGL-1290, extending AGL-1151) ────────────────────────\n// The tenant runtime reaches this barrel statically (the node renderer\n// imports ShadowDom/ErrorBoundary through it), and Turbopack cannot prove a\n// module with top-level `styled()`/`forwardRef()` calls side-effect-free —\n// so EVERY component re-exported here ships eagerly on EVERY published\n// customer page, used or not. Measured: RulerGuides, SplashScreen,\n// NavigationDrawer, DialogConfirm and the whole MUI Dialog/Drawer/Popper\n// stack were in /pricing's first-load chunks, imported by nothing.\n//\n// Rule: a component joins this barrel only if the tenant page graph or the\n// besigner needs it by name. Console-/www-only components are imported by\n// subpath instead: '@aglyn/shared-ui-jsx/components/<file>' (the tsconfig\n// wildcard path already resolves it — same pattern as DataTable/GridList\n// below). Pure modules (hooks, types, const data) are exempt: the bundler\n// proves them pure and drops the unused ones.\n//\n// THIS RULE IS ENFORCED (AGL-1895) — `npm run check:jsx-barrel`, in CI. Every\n// line below is pinned in `tools/scripts/jsx-barrel-baseline.json`, along with\n// every third-party package this barrel transitively reaches, so a heavy\n// import added inside a module ALREADY listed here goes red too. Adding or\n// removing an export fails until the allowlist moves in the same commit,\n// which is what puts the cost in front of a reviewer. Measured with esbuild,\n// minified and GZIPPED: re-exporting data-table.component costs +162,866 B and\n// grid-list +20,386 B on every page of every published customer site.\n// Until then this rule was a comment, and a comment cannot fail.\n//\n// `package.json` here declares `\"sideEffects\": false`, which is what lets a\n// bundler act on the paragraph above rather than only obey it. Without the\n// declaration every module reachable from this file has to be assumed\n// side-effectful and kept, so a named import of one component through this\n// barrel still drags the rest — measured on a published page's cold load, the\n// PAGES ROUTER (`next/router`, reached from `hooks/router-events`) was a 40 KB\n// chunk on a page that has no Pages Router, and declaring this tree pure is\n// what took it off the wire. The claim was audited file by file: the only\n// module-scope work here is local `.displayName` / `.aglyn` assignment and\n// `createContext`, none of which another module can observe. `shadow-dom` and\n// `mui-shadow-dom` build a Proxy over a module-local Map, which is not an\n// exception either. A second clause stood here for `use-observer-resize`,\n// whose default import of `resize-observer-polyfill` was the one bare-looking\n// import in the tree; the hook went with the nineteen nothing called and the\n// dependency followed it out of `package.json` (AGL-2706), so the audit is\n// shorter by a module rather than by an argument.\n// A module added here that DOES do observable\n// work at import time — a global write, a registration, a bare polyfill\n// import — must be listed in `sideEffects` in the same commit, or it will be\n// dropped from builds that never name it.\nexport * from './lib/components/app-link'\n// aspect-ratio, background-image, children-function-prop, dialog-confirm +\n// confirmation-provider, ellipsis-pulse, grid-buttons, loading-layout,\n// loading-modal, loading-text, navigation-view, next-link, popper-styled,\n// resizeable-stack, ruler-guides, sandbox-frame, scroll-reaction,\n// splash-screen, emotion-cache-provider and const/prebuilt-components are\n// NOT in the barrel (AGL-1290) — subpath-import them (see rule above).\n// navigation-drawer is the one deliberate exception, below.\nexport * from './lib/components/card-display'\nexport * from './lib/components/card-list-item'\n// NOT in the barrel (AGL-1151). `DataTable` wraps MUI X DataGrid, which with\n// its virtualizer is ~257 KB of the bundle — and exporting it here put all of\n// that behind every `@aglyn/shared-ui-jsx` import, including the tenant\n// runtime. Every visitor to every published site downloaded a data grid to\n// render a page that has never contained one; nothing in the tenant or the\n// node renderer references DataTable at all.\n//\n// Measured both ways: removing this line drops MuiDataGrid from the tenant\n// bundle entirely (13741 KB → 13484 KB built output).\n//\n// Import it from '@aglyn/shared-ui-jsx/components/data-table.component' — the\n// subpath already resolves. Kept out of the barrel rather than lazy-loaded\n// because `GridOverlay` is used at module scope inside `styled()`, so the\n// module cannot be deferred without splitting the component.\nexport * from './lib/components/container'\nexport * from './lib/components/error-boundary.component'\nexport * from './lib/components/grid-items'\n// `grid-list` is deliberately NOT re-exported (AGL-1151). It is the only\n// consumer of `react-virtuoso`, and the tenant runtime imports this barrel —\n// so exporting it here put a virtualizer into every published customer page to\n// render a list those pages never contain. Exactly what `DataTable` did with\n// MUI X DataGrid in 828c43939. Import it from\n// `@aglyn/shared-ui-jsx/components/grid-list` instead.\nexport * from './lib/components/aglyn-text'\nexport * from './lib/components/help-tip.component'\nexport * from './lib/components/menu'\nexport * from './lib/components/mui-shadow-dom'\n// navigation-drawer is NOT re-exported (AGL-1290): it kept the MUI Drawer\n// stack in the tenant's first-load chunk. Import it from\n// `@aglyn/shared-ui-jsx/components/navigation-drawer.component`.\nexport * from './lib/components/shadow-dom'\nexport * from './lib/components/sr-only'\n// zoomable-panning-component is NOT re-exported (AGL-2486), for the same\n// reason navigation-drawer is not — and with less excuse, because nothing\n// imports it. The only references left in the tree are a COMMENTED-OUT import\n// in `viewport-canvas.component.tsx` and three prose mentions; the barrel\n// export was its last live edge, so every published customer page was paying\n// to parse an editor-only pan/zoom canvas class (and the five\n// `getBoundingClientRect()` call sites in it) that nothing on the page mounts.\n// Still importable from\n// `@aglyn/shared-ui-jsx/components/zoomable-panning-component` if the besigner\n// ever uncomments that import.\n\nexport * from './lib/contexts/confirmation.context'\nexport * from './lib/contexts/loading.context'\n\n// Nineteen hooks were DELETED here, not merely un-exported (AGL-2706):\n// use-client-rect, use-debounce, use-debounced-transition,\n// use-effect-post-mount, use-element-position, use-interval,\n// use-local-storage-item-state, use-mouse-enter, use-mouse-over,\n// use-mouse-position, use-node-property, use-observer-intersection,\n// use-observer-mutation, use-observer-resize, use-on-mouse-enter,\n// use-on-mouse-over, use-tag-name, use-timeout and use-timeout-delay.\n//\n// Not one had a caller — not an app, not a plugin, not a tool — and a React\n// hook cannot be reached except by importing it, so nothing could have. The\n// AGL-2486 note that stood here for `use-observer-resize` said exactly this\n// and stopped at dropping the re-export; the rest were in the same position\n// and had been for as long.\n//\n// `useLocalStorageItemState` is the one worth naming, because it is the one\n// that was TRIED. Roughly twenty places in the console, the plugins and the\n// besigner keep a value in `localStorage` and hand-roll the same hook beside\n// it, and every one of them reads storage in a mount effect with the same\n// comment: reading during render hydrate-mismatches, because there is no\n// `localStorage` on the server. This hook seeded `useState` from storage\n// directly, which is precisely the defect they were each working around, so\n// adopting it would have been a regression. Deleted rather than widened: the\n// shape those callers actually need is a patch update over typed defaults,\n// which is not this signature, and designing a second one against no caller\n// is how the first got here.\n//\n// Deleting cost zero bytes — the barrel declares `sideEffects: false` and\n// every one of these was already tree-shaken out of both apps. What it buys\n// is that nobody adopts them by mistake.\nexport * from './lib/hooks/router-events'\nexport * from './lib/hooks/use-callback-param-ref'\nexport * from './lib/hooks/use-async-effect'\nexport * from './lib/hooks/use-id'\nexport * from './lib/hooks/use-isomorphic-layout-effect'\nexport * from './lib/hooks/use-merge-refs'\nexport * from './lib/hooks/use-subscribable'\n\n// prebuilt-components is a module-scope `<LoadingModal open />` — rendering\n// at import time is exactly the impurity the rule above exists for.\nexport * from './lib/const/svg-icons'\n\nexport * from './lib/hocs/create-hoc-with-context-consumer'\nexport * from './lib/hocs/with-hoc'\n\nexport * from './lib/utils/make-link-elements'\nexport * from './lib/utils/make-meta-elements'\n// `./lib/utils/vendor` is NOT re-exported (AGL-2682). It wraps eleven `react-is`\n// predicates and NOTHING reads any of them from this index — the two real\n// consumers, `aglyn-node-renderer`'s `leaf.tsx` and the besigner's\n// `component-icon.component.tsx`, import `react-is` directly. So the line's\n// only effect was to hold `react-is` inside the reachable set of a barrel that\n// ships eagerly on every published page. Still importable as\n// `@aglyn/shared-ui-jsx/utils/vendor`.\n\nexport * from './lib/types'\n\nexport * from './lib/hooks/mdi-icon/use-mdi-icon'\nexport * from './lib/hooks/mdi-icon/use-mdi-icons'\n\nexport * from './lib/components/mdi-icon/mdi-icon'\nexport * from './lib/components/mdi-icon/mdi-icon-from-id'\n\nexport * from '@aglyn/shared-data-mdi'\n\n// import dynamic from 'next/dynamic'\n// export const MdiIconFromId = dynamic(\n// () => import('./components/mdi-svg-icon'),\n// {loading: () => (<span />)},\n// )\n// MdiIconFrom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AAC/E,6DAA6D;AAC7D,uCAAuC;AAEvC,cAAc,iBAAa;AAE3B,cAAc,uCAAmC;AACjD,cAAc,wCAAoC;AAElD,cAAc,wCAAoC;AAClD,cAAc,gDAA4C;AAE1D,cAAc,yBAAwB,CAEtC,qCAAqC;CACrC,wCAAwC;CACxC,+CAA+C;CAC/C,iCAAiC;CACjC,IAAI;CACJ,8CAA8C;CAC9C,6BAA6B"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/shared/ui/jsx/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// ── Barrel discipline (AGL-1290, extending AGL-1151) ────────────────────────\n// The tenant runtime reaches this barrel statically (the node renderer\n// imports ShadowDom/ErrorBoundary through it), and Turbopack cannot prove a\n// module with top-level `styled()`/`forwardRef()` calls side-effect-free —\n// so EVERY component re-exported here ships eagerly on EVERY published\n// customer page, used or not. Measured: RulerGuides, SplashScreen,\n// NavigationDrawer, DialogConfirm and the whole MUI Dialog/Drawer/Popper\n// stack were in /pricing's first-load chunks, imported by nothing.\n//\n// Rule: a component joins this barrel only if the tenant page graph or the\n// besigner needs it by name. Console-/www-only components are imported by\n// subpath instead: '@aglyn/shared-ui-jsx/components/<file>' (the tsconfig\n// wildcard path already resolves it — same pattern as DataTable/GridList\n// below). Pure modules (hooks, types, const data) are exempt: the bundler\n// proves them pure and drops the unused ones.\n//\n// THIS RULE IS ENFORCED (AGL-1895) — `npm run check:jsx-barrel`, in CI. Every\n// line below is pinned in `tools/scripts/jsx-barrel-baseline.json`, along with\n// every third-party package this barrel transitively reaches, so a heavy\n// import added inside a module ALREADY listed here goes red too. Adding or\n// removing an export fails until the allowlist moves in the same commit,\n// which is what puts the cost in front of a reviewer. Measured with esbuild,\n// minified and GZIPPED: re-exporting data-table.component costs +162,866 B and\n// grid-list +20,386 B on every page of every published customer site.\n// Until then this rule was a comment, and a comment cannot fail.\n//\n// `package.json` here declares `\"sideEffects\": false`, which is what lets a\n// bundler act on the paragraph above rather than only obey it. Without the\n// declaration every module reachable from this file has to be assumed\n// side-effectful and kept, so a named import of one component through this\n// barrel still drags the rest — measured on a published page's cold load, the\n// PAGES ROUTER (`next/router`, reached from `hooks/router-events`) was a 40 KB\n// chunk on a page that has no Pages Router, and declaring this tree pure is\n// what took it off the wire. The claim was audited file by file: the only\n// module-scope work here is local `.displayName` / `.aglyn` assignment and\n// `createContext`, none of which another module can observe. `shadow-dom` and\n// `mui-shadow-dom` build a Proxy over a module-local Map, which is not an\n// exception either. A second clause stood here for `use-observer-resize`,\n// whose default import of `resize-observer-polyfill` was the one bare-looking\n// import in the tree; the hook went with the nineteen nothing called and the\n// dependency followed it out of `package.json` (AGL-2706), so the audit is\n// shorter by a module rather than by an argument.\n// A module added here that DOES do observable\n// work at import time — a global write, a registration, a bare polyfill\n// import — must be listed in `sideEffects` in the same commit, or it will be\n// dropped from builds that never name it.\nexport * from './lib/components/app-link'\n// aspect-ratio, background-image, children-function-prop, dialog-confirm +\n// confirmation-provider, ellipsis-pulse, grid-buttons, loading-layout,\n// loading-modal, loading-text, navigation-view, next-link, popper-styled,\n// resizeable-stack, ruler-guides, sandbox-frame, scroll-reaction,\n// splash-screen, emotion-cache-provider and const/prebuilt-components are\n// NOT in the barrel (AGL-1290) — subpath-import them (see rule above).\n// navigation-drawer is the one deliberate exception, below.\nexport * from './lib/components/card-display'\nexport * from './lib/components/card-list-item'\n// NOT in the barrel (AGL-1151). `DataTable` wraps MUI X DataGrid, which with\n// its virtualizer is ~257 KB of the bundle — and exporting it here put all of\n// that behind every `@aglyn/shared-ui-jsx` import, including the tenant\n// runtime. Every visitor to every published site downloaded a data grid to\n// render a page that has never contained one; nothing in the tenant or the\n// node renderer references DataTable at all.\n//\n// Measured both ways: removing this line drops MuiDataGrid from the tenant\n// bundle entirely (13741 KB → 13484 KB built output).\n//\n// Import it from '@aglyn/shared-ui-jsx/components/data-table.component' — the\n// subpath already resolves. Kept out of the barrel rather than lazy-loaded\n// because `GridOverlay` is used at module scope inside `styled()`, so the\n// module cannot be deferred without splitting the component.\nexport * from './lib/components/container'\nexport * from './lib/components/error-boundary.component'\nexport * from './lib/components/grid-items'\n// `grid-list` is deliberately NOT re-exported (AGL-1151). It is the only\n// consumer of `react-virtuoso`, and the tenant runtime imports this barrel —\n// so exporting it here put a virtualizer into every published customer page to\n// render a list those pages never contain. Exactly what `DataTable` did with\n// MUI X DataGrid in 828c43939. Import it from\n// `@aglyn/shared-ui-jsx/components/grid-list` instead.\nexport * from './lib/components/aglyn-text'\nexport * from './lib/components/help-tip.component'\nexport * from './lib/components/menu'\nexport * from './lib/components/mui-shadow-dom'\n// navigation-drawer is NOT re-exported (AGL-1290): it kept the MUI Drawer\n// stack in the tenant's first-load chunk. Import it from\n// `@aglyn/shared-ui-jsx/components/navigation-drawer.component`.\nexport * from './lib/components/shadow-dom'\nexport * from './lib/components/sr-only'\n// zoomable-panning-component is NOT re-exported (AGL-2486), for the same\n// reason navigation-drawer is not — and with less excuse, because nothing\n// imports it. The only references left in the tree are a COMMENTED-OUT import\n// in `viewport-canvas.component.tsx` and three prose mentions; the barrel\n// export was its last live edge, so every published customer page was paying\n// to parse an editor-only pan/zoom canvas class (and the five\n// `getBoundingClientRect()` call sites in it) that nothing on the page mounts.\n// Still importable from\n// `@aglyn/shared-ui-jsx/components/zoomable-panning-component` if the besigner\n// ever uncomments that import.\n\nexport * from './lib/contexts/confirmation.context'\nexport * from './lib/contexts/loading.context'\n\n// Nineteen hooks were DELETED here, not merely un-exported (AGL-2706):\n// use-client-rect, use-debounce, use-debounced-transition,\n// use-effect-post-mount, use-element-position, use-interval,\n// use-local-storage-item-state, use-mouse-enter, use-mouse-over,\n// use-mouse-position, use-node-property, use-observer-intersection,\n// use-observer-mutation, use-observer-resize, use-on-mouse-enter,\n// use-on-mouse-over, use-tag-name, use-timeout and use-timeout-delay.\n//\n// Not one had a caller — not an app, not a plugin, not a tool — and a React\n// hook cannot be reached except by importing it, so nothing could have. The\n// AGL-2486 note that stood here for `use-observer-resize` said exactly this\n// and stopped at dropping the re-export; the rest were in the same position\n// and had been for as long.\n//\n// `useLocalStorageItemState` is the one worth naming, because it is the one\n// that was TRIED. Roughly twenty places in the console, the plugins and the\n// besigner keep a value in `localStorage` and hand-roll the same hook beside\n// it, and every one of them reads storage in a mount effect with the same\n// comment: reading during render hydrate-mismatches, because there is no\n// `localStorage` on the server. This hook seeded `useState` from storage\n// directly, which is precisely the defect they were each working around, so\n// adopting it would have been a regression. Deleted rather than widened: the\n// shape those callers actually need is a patch update over typed defaults,\n// which is not this signature, and designing a second one against no caller\n// is how the first got here.\n//\n// Deleting cost zero bytes — the barrel declares `sideEffects: false` and\n// every one of these was already tree-shaken out of both apps. What it buys\n// is that nobody adopts them by mistake.\nexport * from './lib/hooks/router-events'\nexport * from './lib/hooks/use-callback-param-ref'\nexport * from './lib/hooks/use-async-effect'\nexport * from './lib/hooks/use-id'\nexport * from './lib/hooks/use-isomorphic-layout-effect'\nexport * from './lib/hooks/use-merge-refs'\nexport * from './lib/hooks/use-subscribable'\n\n// prebuilt-components is a module-scope `<LoadingModal open />` — rendering\n// at import time is exactly the impurity the rule above exists for.\nexport * from './lib/const/svg-icons'\n\nexport * from './lib/hocs/create-hoc-with-context-consumer'\nexport * from './lib/hocs/with-hoc'\n\nexport * from './lib/utils/make-link-elements'\nexport * from './lib/utils/make-meta-elements'\nexport * from './lib/utils/new-tab'\n// `./lib/utils/vendor` is NOT re-exported (AGL-2682). It wraps eleven `react-is`\n// predicates and NOTHING reads any of them from this index — the two real\n// consumers, `aglyn-node-renderer`'s `leaf.tsx` and the besigner's\n// `component-icon.component.tsx`, import `react-is` directly. So the line's\n// only effect was to hold `react-is` inside the reachable set of a barrel that\n// ships eagerly on every published page. Still importable as\n// `@aglyn/shared-ui-jsx/utils/vendor`.\n\nexport * from './lib/types'\n\nexport * from './lib/hooks/mdi-icon/use-mdi-icon'\nexport * from './lib/hooks/mdi-icon/use-mdi-icons'\n\nexport * from './lib/components/mdi-icon/mdi-icon'\nexport * from './lib/components/mdi-icon/mdi-icon-from-id'\n\nexport * from '@aglyn/shared-data-mdi'\n\n// import dynamic from 'next/dynamic'\n// export const MdiIconFromId = dynamic(\n// () => import('./components/mdi-svg-icon'),\n// {loading: () => (<span />)},\n// )\n// MdiIconFromId.displayName = 'MdiIconFromId'\n// MdiIconFromId.aglyn = true\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,+EAA+E;AAC/E,uEAAuE;AACvE,4EAA4E;AAC5E,2EAA2E;AAC3E,uEAAuE;AACvE,mEAAmE;AACnE,yEAAyE;AACzE,mEAAmE;AACnE,EAAE;AACF,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,8CAA8C;AAC9C,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,6EAA6E;AAC7E,+EAA+E;AAC/E,sEAAsE;AACtE,iEAAiE;AACjE,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,4EAA4E;AAC5E,0EAA0E;AAC1E,2EAA2E;AAC3E,8EAA8E;AAC9E,0EAA0E;AAC1E,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;AAC3E,kDAAkD;AAClD,8CAA8C;AAC9C,wEAAwE;AACxE,6EAA6E;AAC7E,0CAA0C;AAC1C,cAAc,+B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4EAA4E;AAC5E,6BAA6B;AAC7B,EAAE;AACF,0EAA0E;AAC1E,4EAA4E;AAC5E,yCAAyC;AACzC,cAAc,+BAA2B;AACzC,cAAc,wCAAoC;AAClD,cAAc,kCAA8B;AAC5C,cAAc,wBAAoB;AAClC,cAAc,8CAA0C;AACxD,cAAc,gCAA4B;AAC1C,cAAc,kCAA8B;AAE5C,4EAA4E;AAC5E,oEAAoE;AACpE,cAAc,2BAAuB;AAErC,cAAc,iDAA6C;AAC3D,cAAc,yBAAqB;AAEnC,cAAc,oCAAgC;AAC9C,cAAc,oCAAgC;AAC9C,cAAc,yBAAqB;AACnC,iFAAiF;AACjF,0EAA0E;AAC1E,mEAAmE;AACnE,4EAA4E;AAC5E,+EAA+E;AAC/E,6DAA6D;AAC7D,uCAAuC;AAEvC,cAAc,iBAAa;AAE3B,cAAc,uCAAmC;AACjD,cAAc,wCAAoC;AAElD,cAAc,wCAAoC;AAClD,cAAc,gDAA4C;AAE1D,cAAc,yBAAwB,CAEtC,qCAAqC;CACrC,wCAAwC;CACxC,+CAA+C;CAC/C,iCAAiC;CACjC,IAAI;CACJ,8CAA8C;CAC9C,6BAA6B"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A row's words, as the shared label map (`@aglyn/aglyn/app-utils/
|
|
4
|
+
* activity-labels`, `ActivityDescription`) composes them. Declared here by
|
|
5
|
+
* shape, because a shared component imports only shared code.
|
|
6
|
+
*/
|
|
7
|
+
export interface ActivityDetailsDescription {
|
|
8
|
+
action: string;
|
|
9
|
+
target: string;
|
|
10
|
+
why: string | null;
|
|
11
|
+
credits: number | null;
|
|
12
|
+
result: string | null;
|
|
13
|
+
/** The stored code — staff only. */
|
|
14
|
+
code: string | null;
|
|
15
|
+
/** The stored path — staff only. */
|
|
16
|
+
path: string | null;
|
|
17
|
+
/** The AI job behind the row — its id is staff only. */
|
|
18
|
+
jobId: string | null;
|
|
19
|
+
}
|
|
20
|
+
/** One activity or audit row, as the details dialog shows it. */
|
|
21
|
+
export interface ActivityDetails {
|
|
22
|
+
/** The row's words, from the shared label map. */
|
|
23
|
+
description: ActivityDetailsDescription;
|
|
24
|
+
/** Who did it, as the row names them. */
|
|
25
|
+
who: string;
|
|
26
|
+
/** When, already formatted for the reader. */
|
|
27
|
+
when: string;
|
|
28
|
+
/** Where, when the list has a Where column. */
|
|
29
|
+
where?: string | null;
|
|
30
|
+
/** Places to go from the row: the AI job, the item, the site. */
|
|
31
|
+
links?: ReadonlyArray<{
|
|
32
|
+
label: string;
|
|
33
|
+
href: string;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Facts only Aglyn staff may read — the raw code and path are added from
|
|
37
|
+
* `description` by the dialog itself, and these after them. Ignored unless
|
|
38
|
+
* the dialog is told it is a staff view.
|
|
39
|
+
*/
|
|
40
|
+
staffFields?: ReadonlyArray<{
|
|
41
|
+
label: string;
|
|
42
|
+
value: ReactNode;
|
|
43
|
+
}>;
|
|
44
|
+
}
|
|
45
|
+
export interface ActivityDetailsDialogProps {
|
|
46
|
+
details: ActivityDetails | null;
|
|
47
|
+
/**
|
|
48
|
+
* A STAFF view. Only then does the dialog show the stored code, the
|
|
49
|
+
* stored path and `staffFields`: a customer's own activity list opens the
|
|
50
|
+
* same dialog with the same words and none of the platform's internals.
|
|
51
|
+
*/
|
|
52
|
+
staff?: boolean;
|
|
53
|
+
onClose: () => void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* EVERY ACTIVITY AND AUDIT ROW OPENS THIS (AGL-3660).
|
|
57
|
+
*
|
|
58
|
+
* A table row holds as much as one line can: the act, the target, who,
|
|
59
|
+
* where, when. What did not fit — why, the credits an AI act spent, what
|
|
60
|
+
* came of it, the job it belonged to — is here, in the same words the row
|
|
61
|
+
* used, from the same label map. A staff view adds what a customer never
|
|
62
|
+
* sees: the code the writer stored and the path it filed the row under,
|
|
63
|
+
* which is what an engineer needs to find the row in the database.
|
|
64
|
+
*/
|
|
65
|
+
export declare function ActivityDetailsDialog({ details, staff, onClose }: ActivityDetailsDialogProps): import("react").JSX.Element;
|
|
66
|
+
export declare namespace ActivityDetailsDialog {
|
|
67
|
+
var displayName: string;
|
|
68
|
+
}
|
|
69
|
+
export default ActivityDetailsDialog;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/ 'use client';
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import AppLink from "./app-link.js";
|
|
19
|
+
import { Box, Button, Dialog, DialogActions, DialogContent, DialogTitle, Divider, Stack, Typography } from "@mui/material";
|
|
20
|
+
function Field({ label, children }) {
|
|
21
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
22
|
+
direction: {
|
|
23
|
+
xs: 'column',
|
|
24
|
+
sm: 'row'
|
|
25
|
+
},
|
|
26
|
+
spacing: {
|
|
27
|
+
xs: 0.25,
|
|
28
|
+
sm: 2
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
32
|
+
variant: "body2",
|
|
33
|
+
color: "text.secondary",
|
|
34
|
+
sx: {
|
|
35
|
+
minWidth: {
|
|
36
|
+
sm: 120
|
|
37
|
+
},
|
|
38
|
+
flexShrink: 0
|
|
39
|
+
},
|
|
40
|
+
children: label
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ _jsx(Box, {
|
|
43
|
+
sx: {
|
|
44
|
+
minWidth: 0,
|
|
45
|
+
overflowWrap: 'anywhere'
|
|
46
|
+
},
|
|
47
|
+
children: typeof children === 'string' || typeof children === 'number' ? /*#__PURE__*/ _jsx(Typography, {
|
|
48
|
+
variant: "body2",
|
|
49
|
+
children: children
|
|
50
|
+
}) : children
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* EVERY ACTIVITY AND AUDIT ROW OPENS THIS (AGL-3660).
|
|
57
|
+
*
|
|
58
|
+
* A table row holds as much as one line can: the act, the target, who,
|
|
59
|
+
* where, when. What did not fit — why, the credits an AI act spent, what
|
|
60
|
+
* came of it, the job it belonged to — is here, in the same words the row
|
|
61
|
+
* used, from the same label map. A staff view adds what a customer never
|
|
62
|
+
* sees: the code the writer stored and the path it filed the row under,
|
|
63
|
+
* which is what an engineer needs to find the row in the database.
|
|
64
|
+
*/ export function ActivityDetailsDialog({ details, staff = false, onClose }) {
|
|
65
|
+
var _ref, _details_staffFields;
|
|
66
|
+
var _details_links;
|
|
67
|
+
const description = details == null ? void 0 : details.description;
|
|
68
|
+
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
69
|
+
open: Boolean(details),
|
|
70
|
+
onClose: onClose,
|
|
71
|
+
fullWidth: true,
|
|
72
|
+
maxWidth: "sm",
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ _jsx(DialogTitle, {
|
|
75
|
+
children: (_ref = description == null ? void 0 : description.action) != null ? _ref : 'Activity'
|
|
76
|
+
}),
|
|
77
|
+
/*#__PURE__*/ _jsx(DialogContent, {
|
|
78
|
+
dividers: true,
|
|
79
|
+
children: details && description ? /*#__PURE__*/ _jsxs(Stack, {
|
|
80
|
+
spacing: 1.25,
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ _jsx(Field, {
|
|
83
|
+
label: "What",
|
|
84
|
+
children: description.action
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ _jsx(Field, {
|
|
87
|
+
label: "Target",
|
|
88
|
+
children: description.target
|
|
89
|
+
}),
|
|
90
|
+
details.where ? /*#__PURE__*/ _jsx(Field, {
|
|
91
|
+
label: "Where",
|
|
92
|
+
children: details.where
|
|
93
|
+
}) : null,
|
|
94
|
+
/*#__PURE__*/ _jsx(Field, {
|
|
95
|
+
label: "Who",
|
|
96
|
+
children: details.who
|
|
97
|
+
}),
|
|
98
|
+
/*#__PURE__*/ _jsx(Field, {
|
|
99
|
+
label: "When",
|
|
100
|
+
children: details.when
|
|
101
|
+
}),
|
|
102
|
+
description.why ? /*#__PURE__*/ _jsx(Field, {
|
|
103
|
+
label: "Why",
|
|
104
|
+
children: description.why
|
|
105
|
+
}) : null,
|
|
106
|
+
description.credits != null ? /*#__PURE__*/ _jsx(Field, {
|
|
107
|
+
label: "AI credits",
|
|
108
|
+
children: description.credits.toLocaleString()
|
|
109
|
+
}) : null,
|
|
110
|
+
description.result ? /*#__PURE__*/ _jsx(Field, {
|
|
111
|
+
label: "Result",
|
|
112
|
+
children: description.result
|
|
113
|
+
}) : null,
|
|
114
|
+
((_details_links = details.links) == null ? void 0 : _details_links.length) ? /*#__PURE__*/ _jsx(Field, {
|
|
115
|
+
label: "Open",
|
|
116
|
+
children: /*#__PURE__*/ _jsx(Stack, {
|
|
117
|
+
spacing: 0.5,
|
|
118
|
+
children: details.links.map((link)=>/*#__PURE__*/ _jsx(AppLink, {
|
|
119
|
+
href: link.href,
|
|
120
|
+
variant: "body2",
|
|
121
|
+
children: link.label
|
|
122
|
+
}, link.href))
|
|
123
|
+
})
|
|
124
|
+
}) : null,
|
|
125
|
+
staff ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
126
|
+
children: [
|
|
127
|
+
/*#__PURE__*/ _jsx(Divider, {
|
|
128
|
+
flexItem: true
|
|
129
|
+
}),
|
|
130
|
+
/*#__PURE__*/ _jsx(Typography, {
|
|
131
|
+
variant: "overline",
|
|
132
|
+
color: "text.secondary",
|
|
133
|
+
children: "Staff only"
|
|
134
|
+
}),
|
|
135
|
+
description.code ? /*#__PURE__*/ _jsx(Field, {
|
|
136
|
+
label: "Code",
|
|
137
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
138
|
+
variant: "body2",
|
|
139
|
+
sx: {
|
|
140
|
+
fontFamily: 'monospace'
|
|
141
|
+
},
|
|
142
|
+
children: description.code
|
|
143
|
+
})
|
|
144
|
+
}) : null,
|
|
145
|
+
description.path ? /*#__PURE__*/ _jsx(Field, {
|
|
146
|
+
label: "Path",
|
|
147
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
148
|
+
variant: "body2",
|
|
149
|
+
sx: {
|
|
150
|
+
fontFamily: 'monospace'
|
|
151
|
+
},
|
|
152
|
+
children: description.path
|
|
153
|
+
})
|
|
154
|
+
}) : null,
|
|
155
|
+
description.jobId ? /*#__PURE__*/ _jsx(Field, {
|
|
156
|
+
label: "AI job id",
|
|
157
|
+
children: /*#__PURE__*/ _jsx(Typography, {
|
|
158
|
+
variant: "body2",
|
|
159
|
+
sx: {
|
|
160
|
+
fontFamily: 'monospace'
|
|
161
|
+
},
|
|
162
|
+
children: description.jobId
|
|
163
|
+
})
|
|
164
|
+
}) : null,
|
|
165
|
+
((_details_staffFields = details.staffFields) != null ? _details_staffFields : []).map((field)=>/*#__PURE__*/ _jsx(Field, {
|
|
166
|
+
label: field.label,
|
|
167
|
+
children: field.value
|
|
168
|
+
}, field.label))
|
|
169
|
+
]
|
|
170
|
+
}) : null
|
|
171
|
+
]
|
|
172
|
+
}) : null
|
|
173
|
+
}),
|
|
174
|
+
/*#__PURE__*/ _jsx(DialogActions, {
|
|
175
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
176
|
+
onClick: onClose,
|
|
177
|
+
children: "Close"
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
ActivityDetailsDialog.displayName = 'ActivityDetailsDialog';
|
|
184
|
+
export default ActivityDetailsDialog;
|
|
185
|
+
|
|
186
|
+
//# sourceMappingURL=activity-details-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/activity-details-dialog.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport AppLink from './app-link'\nimport {\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n Stack,\n Typography,\n} from '@mui/material'\nimport type { ReactNode } from 'react'\n\n/**\n * A row's words, as the shared label map (`@aglyn/aglyn/app-utils/\n * activity-labels`, `ActivityDescription`) composes them. Declared here by\n * shape, because a shared component imports only shared code.\n */\nexport interface ActivityDetailsDescription {\n action: string\n target: string\n why: string | null\n credits: number | null\n result: string | null\n /** The stored code — staff only. */\n code: string | null\n /** The stored path — staff only. */\n path: string | null\n /** The AI job behind the row — its id is staff only. */\n jobId: string | null\n}\n\n/** One activity or audit row, as the details dialog shows it. */\nexport interface ActivityDetails {\n /** The row's words, from the shared label map. */\n description: ActivityDetailsDescription\n /** Who did it, as the row names them. */\n who: string\n /** When, already formatted for the reader. */\n when: string\n /** Where, when the list has a Where column. */\n where?: string | null\n /** Places to go from the row: the AI job, the item, the site. */\n links?: ReadonlyArray<{ label: string; href: string }>\n /**\n * Facts only Aglyn staff may read — the raw code and path are added from\n * `description` by the dialog itself, and these after them. Ignored unless\n * the dialog is told it is a staff view.\n */\n staffFields?: ReadonlyArray<{ label: string; value: ReactNode }>\n}\n\nexport interface ActivityDetailsDialogProps {\n details: ActivityDetails | null\n /**\n * A STAFF view. Only then does the dialog show the stored code, the\n * stored path and `staffFields`: a customer's own activity list opens the\n * same dialog with the same words and none of the platform's internals.\n */\n staff?: boolean\n onClose: () => void\n}\n\nfunction Field({ label, children }: { label: string; children: ReactNode }) {\n return (\n <Stack direction={{ xs: 'column', sm: 'row' }} spacing={{ xs: 0.25, sm: 2 }}>\n <Typography\n variant=\"body2\"\n color=\"text.secondary\"\n sx={{ minWidth: { sm: 120 }, flexShrink: 0 }}\n >\n {label}\n </Typography>\n <Box sx={{ minWidth: 0, overflowWrap: 'anywhere' }}>\n {typeof children === 'string' || typeof children === 'number' ? (\n <Typography variant=\"body2\">{children}</Typography>\n ) : (\n children\n )}\n </Box>\n </Stack>\n )\n}\n\n/**\n * EVERY ACTIVITY AND AUDIT ROW OPENS THIS (AGL-3660).\n *\n * A table row holds as much as one line can: the act, the target, who,\n * where, when. What did not fit — why, the credits an AI act spent, what\n * came of it, the job it belonged to — is here, in the same words the row\n * used, from the same label map. A staff view adds what a customer never\n * sees: the code the writer stored and the path it filed the row under,\n * which is what an engineer needs to find the row in the database.\n */\nexport function ActivityDetailsDialog({ details, staff = false, onClose }: ActivityDetailsDialogProps) {\n const description = details?.description\n return (\n <Dialog open={Boolean(details)} onClose={onClose} fullWidth maxWidth=\"sm\">\n <DialogTitle>{description?.action ?? 'Activity'}</DialogTitle>\n <DialogContent dividers>\n {details && description ? (\n <Stack spacing={1.25}>\n <Field label=\"What\">{description.action}</Field>\n <Field label=\"Target\">{description.target}</Field>\n {details.where ? <Field label=\"Where\">{details.where}</Field> : null}\n <Field label=\"Who\">{details.who}</Field>\n <Field label=\"When\">{details.when}</Field>\n {description.why ? <Field label=\"Why\">{description.why}</Field> : null}\n {description.credits != null ? (\n <Field label=\"AI credits\">{description.credits.toLocaleString()}</Field>\n ) : null}\n {description.result ? <Field label=\"Result\">{description.result}</Field> : null}\n {details.links?.length ? (\n <Field label=\"Open\">\n <Stack spacing={0.5}>\n {details.links.map((link) => (\n <AppLink key={link.href} href={link.href} variant=\"body2\">\n {link.label}\n </AppLink>\n ))}\n </Stack>\n </Field>\n ) : null}\n {staff ? (\n <>\n <Divider flexItem />\n <Typography variant=\"overline\" color=\"text.secondary\">\n Staff only\n </Typography>\n {description.code ? (\n <Field label=\"Code\">\n <Typography variant=\"body2\" sx={{ fontFamily: 'monospace' }}>\n {description.code}\n </Typography>\n </Field>\n ) : null}\n {description.path ? (\n <Field label=\"Path\">\n <Typography variant=\"body2\" sx={{ fontFamily: 'monospace' }}>\n {description.path}\n </Typography>\n </Field>\n ) : null}\n {description.jobId ? (\n <Field label=\"AI job id\">\n <Typography variant=\"body2\" sx={{ fontFamily: 'monospace' }}>\n {description.jobId}\n </Typography>\n </Field>\n ) : null}\n {(details.staffFields ?? []).map((field) => (\n <Field key={field.label} label={field.label}>\n {field.value}\n </Field>\n ))}\n </>\n ) : null}\n </Stack>\n ) : null}\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose}>Close</Button>\n </DialogActions>\n </Dialog>\n )\n}\nActivityDetailsDialog.displayName = 'ActivityDetailsDialog'\n\nexport default ActivityDetailsDialog\n"],"names":["AppLink","Box","Button","Dialog","DialogActions","DialogContent","DialogTitle","Divider","Stack","Typography","Field","label","children","direction","xs","sm","spacing","variant","color","sx","minWidth","flexShrink","overflowWrap","ActivityDetailsDialog","details","staff","onClose","description","open","Boolean","fullWidth","maxWidth","action","dividers","target","where","who","when","why","credits","toLocaleString","result","links","length","map","link","href","flexItem","code","fontFamily","path","jobId","staffFields","field","value","onClick","displayName"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;AAEA,OAAOA,aAAa,gBAAY;AAChC,SACEC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wCAAwBC,OAAO0C,MAAM1C,KAAK;kDACxC0C,MAAMC,KAAK;uCADFD,MAAM1C,KAAK;;6BAKzB;;qBAEJ;;0BAEN,KAACP;0BACC,cAAA,KAACF;oBAAOqD,SAAS7B;8BAAS;;;;;AAIlC;AACAH,sBAAsBiC,WAAW,GAAG;AAEpC,eAAejC,sBAAqB"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { ButtonBaseProps as MuiButtonBaseProps, ButtonProps as MuiButtonProps, FabProps as MuiFabProps, IconButtonProps as MuiIconButtonProps, LinkProps as MuiLinkProps } from '@mui/material';
|
|
2
2
|
import { type NextLinkProps } from './next-link';
|
|
3
3
|
export type AppLinkVariant = 'naked' | 'button' | 'button-base' | 'icon-button' | 'fab' | 'text' | 'default' | undefined | never;
|
|
4
|
-
type BaseLinkProps = Omit<NextLinkProps, 'hrefTo'
|
|
4
|
+
type BaseLinkProps = Omit<NextLinkProps, 'hrefTo'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
7
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
8
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
9
|
+
* see `utils/new-tab`.
|
|
10
|
+
*/
|
|
11
|
+
newTab?: boolean;
|
|
12
|
+
};
|
|
5
13
|
export type ButtonBaseProps = MuiButtonBaseProps<any, BaseLinkProps>;
|
|
6
14
|
export type ButtonProps = MuiButtonProps<any, BaseLinkProps>;
|
|
7
15
|
export type DefaultProps = TextProps;
|
|
@@ -40,31 +48,87 @@ export declare const appLinkClassKey: import("@aglyn/shared-ui-theme").ClassKeyM
|
|
|
40
48
|
* componentVariant === 'button' = MuiButton
|
|
41
49
|
* componentVariant === any = MuiLink
|
|
42
50
|
*/
|
|
43
|
-
declare const AppLink: import("react").ForwardRefExoticComponent<(Omit<
|
|
51
|
+
declare const AppLink: import("react").ForwardRefExoticComponent<(Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
52
|
+
/**
|
|
53
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
54
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
55
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
56
|
+
* see `utils/new-tab`.
|
|
57
|
+
*/
|
|
58
|
+
newTab?: boolean;
|
|
59
|
+
} & import("@mui/material").LinkOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
44
60
|
component?: React.ElementType | undefined;
|
|
45
61
|
} & {
|
|
46
62
|
componentVariant?: "text";
|
|
47
|
-
}, "ref"> | Omit<
|
|
63
|
+
}, "ref"> | Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
64
|
+
/**
|
|
65
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
66
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
67
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
68
|
+
* see `utils/new-tab`.
|
|
69
|
+
*/
|
|
70
|
+
newTab?: boolean;
|
|
71
|
+
} & import("@mui/material").LinkOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
48
72
|
component?: React.ElementType | undefined;
|
|
49
73
|
} & {
|
|
50
74
|
componentVariant?: "default";
|
|
51
|
-
}, "ref"> | Omit<
|
|
75
|
+
}, "ref"> | Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
76
|
+
/**
|
|
77
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
78
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
79
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
80
|
+
* see `utils/new-tab`.
|
|
81
|
+
*/
|
|
82
|
+
newTab?: boolean;
|
|
83
|
+
} & import("@mui/material").LinkOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
52
84
|
component?: React.ElementType | undefined;
|
|
53
85
|
} & {
|
|
54
86
|
componentVariant: "naked";
|
|
55
|
-
}, "ref"> | Omit<
|
|
87
|
+
}, "ref"> | Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
88
|
+
/**
|
|
89
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
90
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
91
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
92
|
+
* see `utils/new-tab`.
|
|
93
|
+
*/
|
|
94
|
+
newTab?: boolean;
|
|
95
|
+
} & import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, string | number> & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
56
96
|
component?: React.ElementType | undefined;
|
|
57
97
|
} & {
|
|
58
98
|
componentVariant: "button";
|
|
59
|
-
}, "ref"> | Omit<
|
|
99
|
+
}, "ref"> | Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
100
|
+
/**
|
|
101
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
102
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
103
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
104
|
+
* see `utils/new-tab`.
|
|
105
|
+
*/
|
|
106
|
+
newTab?: boolean;
|
|
107
|
+
} & import("@mui/material").ButtonBaseOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
60
108
|
component?: React.ElementType | undefined;
|
|
61
109
|
} & {
|
|
62
110
|
componentVariant: "button-base";
|
|
63
|
-
}, "ref"> | Omit<
|
|
111
|
+
}, "ref"> | Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
112
|
+
/**
|
|
113
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
114
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
115
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
116
|
+
* see `utils/new-tab`.
|
|
117
|
+
*/
|
|
118
|
+
newTab?: boolean;
|
|
119
|
+
} & import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, string | number> & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
64
120
|
component?: React.ElementType | undefined;
|
|
65
121
|
} & {
|
|
66
122
|
componentVariant: "icon-button";
|
|
67
|
-
}, "ref"> | Omit<
|
|
123
|
+
}, "ref"> | Omit<Omit<NextLinkProps, "hrefTo"> & {
|
|
124
|
+
/**
|
|
125
|
+
* Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains
|
|
126
|
+
* `noopener noreferrer`, and the accessible name ends with
|
|
127
|
+
* "(opens in a new tab)". Every Preview / View / Visit link sets this —
|
|
128
|
+
* see `utils/new-tab`.
|
|
129
|
+
*/
|
|
130
|
+
newTab?: boolean;
|
|
131
|
+
} & import("@mui/material").FabOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, string | number> & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof NextLinkProps> & {
|
|
68
132
|
component?: React.ElementType | undefined;
|
|
69
133
|
} & {
|
|
70
134
|
componentVariant: "fab";
|
|
@@ -31,6 +31,7 @@ import clsx from "clsx";
|
|
|
31
31
|
import { usePathname } from "next/navigation";
|
|
32
32
|
import { forwardRef, useMemo } from "react";
|
|
33
33
|
import NextLink from "./next-link.js";
|
|
34
|
+
import { mergeNewTabRel, withNewTabHint } from "../utils/new-tab.js";
|
|
34
35
|
export const appLinkClassKey = generateComponentClassKeys('AglynAppLink', [
|
|
35
36
|
'active',
|
|
36
37
|
'activeAsAncestor',
|
|
@@ -52,11 +53,13 @@ export const appLinkClassKey = generateComponentClassKeys('AglynAppLink', [
|
|
|
52
53
|
* componentVariant === any = MuiLink
|
|
53
54
|
*/ const AppLink = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
54
55
|
var _usePathname;
|
|
55
|
-
const { className, componentVariant, href } = props,
|
|
56
|
+
const { className, componentVariant, href, newTab } = props, passed = _object_without_properties_loose(props, [
|
|
56
57
|
"className",
|
|
57
58
|
"componentVariant",
|
|
58
|
-
"href"
|
|
59
|
+
"href",
|
|
60
|
+
"newTab"
|
|
59
61
|
]);
|
|
62
|
+
const rest = newTab ? _extends({}, passed, newTabAttributes(passed)) : passed;
|
|
60
63
|
const variant = componentVariant;
|
|
61
64
|
const pathname = (_usePathname = usePathname()) != null ? _usePathname : '';
|
|
62
65
|
const [active, activeAsAncestor] = useMemo(()=>{
|
|
@@ -132,6 +135,21 @@ export const appLinkClassKey = generateComponentClassKeys('AglynAppLink', [
|
|
|
132
135
|
}
|
|
133
136
|
});
|
|
134
137
|
AppLink.displayName = 'AppLink';
|
|
138
|
+
/**
|
|
139
|
+
* What `newTab` adds. The accessible name is the caller's `aria-label` when
|
|
140
|
+
* there is one, else the plain-text children — a button whose label is a
|
|
141
|
+
* string reads "Preview (opens in a new tab)" without every call site
|
|
142
|
+
* restating its own text.
|
|
143
|
+
*/ function newTabAttributes(props) {
|
|
144
|
+
var _props_arialabel;
|
|
145
|
+
const named = (_props_arialabel = props['aria-label']) != null ? _props_arialabel : typeof props['children'] === 'string' ? props['children'] : undefined;
|
|
146
|
+
return _extends({
|
|
147
|
+
target: '_blank',
|
|
148
|
+
rel: mergeNewTabRel(props['rel'])
|
|
149
|
+
}, named ? {
|
|
150
|
+
'aria-label': withNewTabHint(named)
|
|
151
|
+
} : {});
|
|
152
|
+
}
|
|
135
153
|
AppLink.aglyn = true;
|
|
136
154
|
export { AppLink };
|
|
137
155
|
export default AppLink;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/app-link.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2024 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { generateComponentClassKeys } from '@aglyn/shared-ui-theme'\nimport { _isObj } from '@aglyn/shared-util-tools'\nimport { truthy } from '@aglyn/shared-util-tools'\nimport type {\n ButtonBaseProps as MuiButtonBaseProps,\n ButtonProps as MuiButtonProps,\n FabProps as MuiFabProps,\n IconButtonProps as MuiIconButtonProps,\n LinkProps as MuiLinkProps,\n} from '@mui/material'\n// AGL-926: `Fab` and `IconButton` used to be pulled in with `next/dynamic`,\n// which returns a plain function component and therefore swallows the ref.\n// That made those two variants unusable as a child of anything that clones\n// its child and measures it — MUI `Tooltip` threw\n// `childNode.getAttribute is not a function` and took out every help tip.\n// They are ordinary static imports now, like the other four variants.\nimport {\n Button as MuiButton,\n ButtonBase as MuiButtonBase,\n Fab as MuiFab,\n IconButton as MuiIconButton,\n Link as MuiLink,\n} from '@mui/material'\nimport clsx from 'clsx'\nimport { usePathname } from 'next/navigation'\nimport { forwardRef, type Ref, useMemo } from 'react'\nimport NextLink, { type NextLinkProps } from './next-link'\n\nexport type AppLinkVariant =\n | 'naked'\n | 'button'\n | 'button-base'\n | 'icon-button'\n | 'fab'\n | 'text'\n | 'default'\n | undefined\n | never\n\ntype BaseLinkProps = Omit<NextLinkProps, 'hrefTo'>\nexport type ButtonBaseProps = MuiButtonBaseProps<any, BaseLinkProps>\nexport type ButtonProps = MuiButtonProps<any, BaseLinkProps>\nexport type DefaultProps = TextProps\nexport type FabProps = MuiFabProps<any, BaseLinkProps>\nexport type IconButtonProps = MuiIconButtonProps<any, BaseLinkProps>\nexport type NakedProps = MuiLinkProps<any, BaseLinkProps>\nexport type TextProps = MuiLinkProps<any, BaseLinkProps>\n\nexport type AppLinkVariantDefault = Extract<\n AppLinkVariant,\n 'text' | 'default' | undefined | never\n>\n\nexport type AppLinkProps<T = AppLinkVariant> = T extends string\n ? T extends AppLinkVariant\n ? T extends AppLinkVariantDefault\n ? DefaultProps & { componentVariant?: T }\n : T extends 'button'\n ? ButtonProps & { componentVariant: T }\n : T extends 'button-base'\n ? ButtonBaseProps & { componentVariant: T }\n : T extends 'icon-button'\n ? IconButtonProps & { componentVariant: T }\n : T extends 'fab'\n ? FabProps & { componentVariant: T }\n : T extends 'naked'\n ? NakedProps & { componentVariant: T }\n : never\n : never\n : DefaultProps & { componentVariant?: undefined | never }\n\nexport type AppLinkSimpleLinkProps = AppLinkProps<AppLinkVariantDefault>\nexport type AppLinkNakedLinkProps = AppLinkProps<'naked'>\nexport type AppLinkButtonProps = AppLinkProps<'button'>\nexport type AppLinkButtonBaseProps = AppLinkProps<'button-base'>\nexport type AppLinkIconButtonProps = AppLinkProps<'icon-button'>\nexport type AppLinkFabProps = AppLinkProps<'fab'>\n\nexport const appLinkClassKey = generateComponentClassKeys('AglynAppLink', [\n 'active',\n 'activeAsAncestor',\n 'disabled',\n 'variantButton',\n 'variantButtonBase',\n 'variantDefault',\n 'variantFab',\n 'variantIconButton',\n 'variantNaked',\n 'variantText',\n])\n\n/**\n * A Material-UI styled version of a \"composed\" Next.js Link.\n *\n * Specify the `componentVariant` props to conditionally render output element\n * componentVariant === 'naked' = NextLink\n * componentVariant === 'button' = MuiButton\n * componentVariant === any = MuiLink\n */\nconst AppLink = forwardRef(\n <T extends AppLinkVariant>(props: AppLinkProps<T>, ref: Ref<any>) => {\n const { className, componentVariant, href, ...rest } = props\n\n const variant = componentVariant\n const pathname = usePathname() ?? ''\n const [active, activeAsAncestor] = useMemo(() => {\n const hrefPath = _isObj(href) ? href['pathname'] : href,\n samePath = hrefPath === pathname,\n isRootHref = hrefPath === '/',\n pathIsAncestor = pathname.startsWith(hrefPath),\n currentlyNested = pathname.lastIndexOf('/') > 0,\n isSpecified = truthy(hrefPath)\n const active = isSpecified && samePath\n const activeAsAncestor =\n isSpecified && !isRootHref && currentlyNested && pathIsAncestor\n return [active, !active && activeAsAncestor]\n }, [href, pathname])\n\n const elemClassName = clsx(\n {\n [appLinkClassKey.active]: active || truthy(rest['active']),\n [appLinkClassKey.activeAsAncestor]: activeAsAncestor,\n [appLinkClassKey.disabled]: truthy(rest['disabled']),\n [appLinkClassKey.variantNaked]: variant === 'naked',\n [appLinkClassKey.variantButton]: variant === 'button',\n [appLinkClassKey.variantButtonBase]: variant === 'button-base',\n [appLinkClassKey.variantIconButton]: variant === 'icon-button',\n [appLinkClassKey.variantFab]: variant === 'fab',\n [appLinkClassKey.variantText]:\n variant === 'text' || variant === 'default' || !variant,\n [appLinkClassKey.variantDefault]: variant === 'default' || !variant,\n },\n className,\n )\n\n switch (variant) {\n case 'naked':\n return (\n <NextLink\n ref={ref}\n className={elemClassName}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'button':\n return (\n <MuiButton\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'button-base':\n return (\n <MuiButtonBase\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'icon-button':\n return (\n <MuiIconButton\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'fab':\n return (\n <MuiFab\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n default:\n return (\n <MuiLink\n ref={ref}\n className={elemClassName}\n component={NextLink}\n hrefTo={href || ''}\n {...rest}\n />\n )\n }\n },\n)\nAppLink.displayName = 'AppLink'\nAppLink.aglyn = true\n\ntype AppLink = typeof AppLink\nexport { AppLink }\nexport default AppLink\n"],"names":["generateComponentClassKeys","_isObj","truthy","Button","MuiButton","ButtonBase","MuiButtonBase","Fab","MuiFab","IconButton","MuiIconButton","Link","MuiLink","clsx","usePathname","forwardRef","useMemo","NextLink","appLinkClassKey","AppLink","props","ref","className","componentVariant","href","rest","variant","pathname","active","activeAsAncestor","hrefPath","samePath","isRootHref","pathIsAncestor","startsWith","currentlyNested","lastIndexOf","isSpecified","elemClassName","disabled","variantNaked","variantButton","variantButtonBase","variantIconButton","variantFab","variantText","variantDefault","hrefTo","component","nativeButton","displayName","aglyn"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;;AAEA,SAASA,0BAA0B,QAAQ,yBAAwB;AACnE,SAASC,MAAM,QAAQ,2BAA0B;AACjD,SAASC,MAAM,QAAQ,2BAA0B;AAQjD,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,kDAAkD;AAClD,0EAA0E;AAC1E,sEAAsE;AACtE,SACEC,UAAUC,SAAS,EACnBC,cAAcC,aAAa,EAC3BC,OAAOC,MAAM,EACbC,cAAcC,aAAa,EAC3BC,QAAQC,OAAO,QACV,gBAAe;AACtB,OAAOC,UAAU,OAAM;AACvB,SAASC,WAAW,QAAQ,kBAAiB;AAC7C,SAASC,UAAU,EAAYC,OAAO,QAAQ,QAAO;AACrD,OAAOC,cAAsC,iBAAa;AAoD1D,OAAO,MAAMC,kBAAkBlB,2BAA2B,gBAAgB;IACxE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAC;AAEF;;;;;;;CAOC,GACD,MAAMmB,wBAAUJ,WACd,CAA2BK,OAAwBC;QAIhCP;IAHjB,MAAM,EAAEQ,SAAS,EAAEC,gBAAgB,EAAEC,IAAI,EAAW,GAAGJ,OAATK,wCAASL;;;;;IAEvD,MAAMM,UAAUH;IAChB,MAAMI,YAAWb,eAAAA,yBAAAA,eAAiB;IAClC,MAAM,CAACc,QAAQC,iBAAiB,GAAGb,QAAQ;QACzC,MAAMc,WAAW7B,OAAOuB,QAAQA,IAAI,CAAC,WAAW,GAAGA,MACjD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dF,QAAQvB,QAAQ;eACZC;QAIV,KAAK;YACH,qBACE,KAACf;gBACCW,KAAKA;gBACLC,WAAWgB;gBACXU,WAAW/B;gBACXgC,cAAc;gBACdF,QAAQvB,QAAQ;eACZC;QAIV,KAAK;YACH,qBACE,KAACjB;gBACCa,KAAKA;gBACLC,WAAWgB;gBACXU,WAAW/B;gBACXgC,cAAc;gBACdF,QAAQvB,QAAQ;eACZC;QAIV;YACE,qBACE,KAACb;gBACCS,KAAKA;gBACLC,WAAWgB;gBACXU,WAAW/B;gBACX8B,QAAQvB,QAAQ;eACZC;IAGZ;AACF;AAEFN,QAAQ+B,WAAW,GAAG;AACtB/B,QAAQgC,KAAK,GAAG;AAGhB,SAAShC,OAAO,GAAE;AAClB,eAAeA,QAAO"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/components/app-link.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2024 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { generateComponentClassKeys } from '@aglyn/shared-ui-theme'\nimport { _isObj } from '@aglyn/shared-util-tools'\nimport { truthy } from '@aglyn/shared-util-tools'\nimport type {\n ButtonBaseProps as MuiButtonBaseProps,\n ButtonProps as MuiButtonProps,\n FabProps as MuiFabProps,\n IconButtonProps as MuiIconButtonProps,\n LinkProps as MuiLinkProps,\n} from '@mui/material'\n// AGL-926: `Fab` and `IconButton` used to be pulled in with `next/dynamic`,\n// which returns a plain function component and therefore swallows the ref.\n// That made those two variants unusable as a child of anything that clones\n// its child and measures it — MUI `Tooltip` threw\n// `childNode.getAttribute is not a function` and took out every help tip.\n// They are ordinary static imports now, like the other four variants.\nimport {\n Button as MuiButton,\n ButtonBase as MuiButtonBase,\n Fab as MuiFab,\n IconButton as MuiIconButton,\n Link as MuiLink,\n} from '@mui/material'\nimport clsx from 'clsx'\nimport { usePathname } from 'next/navigation'\nimport { forwardRef, type Ref, useMemo } from 'react'\nimport NextLink, { type NextLinkProps } from './next-link'\nimport { mergeNewTabRel, withNewTabHint } from '../utils/new-tab'\n\nexport type AppLinkVariant =\n | 'naked'\n | 'button'\n | 'button-base'\n | 'icon-button'\n | 'fab'\n | 'text'\n | 'default'\n | undefined\n | never\n\ntype BaseLinkProps = Omit<NextLinkProps, 'hrefTo'> & {\n /**\n * Open in a new tab (AGL-3660): `target=\"_blank\"`, `rel` gains\n * `noopener noreferrer`, and the accessible name ends with\n * \"(opens in a new tab)\". Every Preview / View / Visit link sets this —\n * see `utils/new-tab`.\n */\n newTab?: boolean\n}\nexport type ButtonBaseProps = MuiButtonBaseProps<any, BaseLinkProps>\nexport type ButtonProps = MuiButtonProps<any, BaseLinkProps>\nexport type DefaultProps = TextProps\nexport type FabProps = MuiFabProps<any, BaseLinkProps>\nexport type IconButtonProps = MuiIconButtonProps<any, BaseLinkProps>\nexport type NakedProps = MuiLinkProps<any, BaseLinkProps>\nexport type TextProps = MuiLinkProps<any, BaseLinkProps>\n\nexport type AppLinkVariantDefault = Extract<\n AppLinkVariant,\n 'text' | 'default' | undefined | never\n>\n\nexport type AppLinkProps<T = AppLinkVariant> = T extends string\n ? T extends AppLinkVariant\n ? T extends AppLinkVariantDefault\n ? DefaultProps & { componentVariant?: T }\n : T extends 'button'\n ? ButtonProps & { componentVariant: T }\n : T extends 'button-base'\n ? ButtonBaseProps & { componentVariant: T }\n : T extends 'icon-button'\n ? IconButtonProps & { componentVariant: T }\n : T extends 'fab'\n ? FabProps & { componentVariant: T }\n : T extends 'naked'\n ? NakedProps & { componentVariant: T }\n : never\n : never\n : DefaultProps & { componentVariant?: undefined | never }\n\nexport type AppLinkSimpleLinkProps = AppLinkProps<AppLinkVariantDefault>\nexport type AppLinkNakedLinkProps = AppLinkProps<'naked'>\nexport type AppLinkButtonProps = AppLinkProps<'button'>\nexport type AppLinkButtonBaseProps = AppLinkProps<'button-base'>\nexport type AppLinkIconButtonProps = AppLinkProps<'icon-button'>\nexport type AppLinkFabProps = AppLinkProps<'fab'>\n\nexport const appLinkClassKey = generateComponentClassKeys('AglynAppLink', [\n 'active',\n 'activeAsAncestor',\n 'disabled',\n 'variantButton',\n 'variantButtonBase',\n 'variantDefault',\n 'variantFab',\n 'variantIconButton',\n 'variantNaked',\n 'variantText',\n])\n\n/**\n * A Material-UI styled version of a \"composed\" Next.js Link.\n *\n * Specify the `componentVariant` props to conditionally render output element\n * componentVariant === 'naked' = NextLink\n * componentVariant === 'button' = MuiButton\n * componentVariant === any = MuiLink\n */\nconst AppLink = forwardRef(\n <T extends AppLinkVariant>(props: AppLinkProps<T>, ref: Ref<any>) => {\n const {\n className,\n componentVariant,\n href,\n newTab,\n ...passed\n } = props as AppLinkProps<T> & { newTab?: boolean }\n const rest: Record<string, any> = newTab\n ? { ...passed, ...newTabAttributes(passed as Record<string, any>) }\n : passed\n\n const variant = componentVariant\n const pathname = usePathname() ?? ''\n const [active, activeAsAncestor] = useMemo(() => {\n const hrefPath = _isObj(href) ? href['pathname'] : href,\n samePath = hrefPath === pathname,\n isRootHref = hrefPath === '/',\n pathIsAncestor = pathname.startsWith(hrefPath),\n currentlyNested = pathname.lastIndexOf('/') > 0,\n isSpecified = truthy(hrefPath)\n const active = isSpecified && samePath\n const activeAsAncestor =\n isSpecified && !isRootHref && currentlyNested && pathIsAncestor\n return [active, !active && activeAsAncestor]\n }, [href, pathname])\n\n const elemClassName = clsx(\n {\n [appLinkClassKey.active]: active || truthy(rest['active']),\n [appLinkClassKey.activeAsAncestor]: activeAsAncestor,\n [appLinkClassKey.disabled]: truthy(rest['disabled']),\n [appLinkClassKey.variantNaked]: variant === 'naked',\n [appLinkClassKey.variantButton]: variant === 'button',\n [appLinkClassKey.variantButtonBase]: variant === 'button-base',\n [appLinkClassKey.variantIconButton]: variant === 'icon-button',\n [appLinkClassKey.variantFab]: variant === 'fab',\n [appLinkClassKey.variantText]:\n variant === 'text' || variant === 'default' || !variant,\n [appLinkClassKey.variantDefault]: variant === 'default' || !variant,\n },\n className,\n )\n\n switch (variant) {\n case 'naked':\n return (\n <NextLink\n ref={ref}\n className={elemClassName}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'button':\n return (\n <MuiButton\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'button-base':\n return (\n <MuiButtonBase\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'icon-button':\n return (\n <MuiIconButton\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n case 'fab':\n return (\n <MuiFab\n ref={ref}\n className={elemClassName}\n component={NextLink}\n nativeButton={false}\n hrefTo={href || ''}\n {...rest}\n />\n )\n\n default:\n return (\n <MuiLink\n ref={ref}\n className={elemClassName}\n component={NextLink}\n hrefTo={href || ''}\n {...rest}\n />\n )\n }\n },\n)\nAppLink.displayName = 'AppLink'\n\n/**\n * What `newTab` adds. The accessible name is the caller's `aria-label` when\n * there is one, else the plain-text children — a button whose label is a\n * string reads \"Preview (opens in a new tab)\" without every call site\n * restating its own text.\n */\nfunction newTabAttributes(props: Record<string, any>) {\n const named: string | undefined =\n props['aria-label'] ??\n (typeof props['children'] === 'string' ? props['children'] : undefined)\n return {\n target: '_blank',\n rel: mergeNewTabRel(props['rel']),\n ...(named ? { 'aria-label': withNewTabHint(named) } : {}),\n }\n}\nAppLink.aglyn = true\n\ntype AppLink = typeof AppLink\nexport { AppLink }\nexport default AppLink\n"],"names":["generateComponentClassKeys","_isObj","truthy","Button","MuiButton","ButtonBase","MuiButtonBase","Fab","MuiFab","IconButton","MuiIconButton","Link","MuiLink","clsx","usePathname","forwardRef","useMemo","NextLink","mergeNewTabRel","withNewTabHint","appLinkClassKey","AppLink","props","ref","className","componentVariant","href","newTab","passed","rest","newTabAttributes","variant","pathname","active","activeAsAncestor","hrefPath","samePath","isRootHref","pathIsAncestor","startsWith","currentlyNested","lastIndexOf","isSpecified","elemClassName","disabled","variantNaked","variantButton","variantButtonBase","variantIconButton","variantFab","variantText","variantDefault","hrefTo","component","nativeButton","displayName","named","undefined","target","rel","aglyn"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;;AAEA,SAASA,0BAA0B,QAAQ,yBAAwB;AACnE,SAASC,MAAM,QAAQ,2BAA0B;AACjD,SAASC,MAAM,QAAQ,2BAA0B;AAQjD,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,kDAAkD;AAClD,0EAA0E;AAC1E,sEAAsE;AACtE,SACEC,UAAUC,SAAS,EACnBC,cAAcC,aAAa,EAC3BC,OAAOC,MAAM,EACbC,cAAcC,aAAa,EAC3BC,QAAQC,OAAO,QACV,gBAAe;AACtB,OAAOC,UAAU,OAAM;AACvB,SAASC,WAAW,QAAQ,kBAAiB;AAC7C,SAASC,UAAU,EAAYC,OAAO,QAAQ,QAAO;AACrD,OAAOC,cAAsC,iBAAa;AAC1D,SAASC,cAAc,EAAEC,cAAc,QAAQ,sBAAkB;AA4DjE,OAAO,MAAMC,kBAAkBpB,2BAA2B,gBAAgB;IACxE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAC;AAEF;;;;;;;CAOC,GACD,MAAMqB,wBAAUN,WACd,CAA2BO,OAAwBC;QAahCT;IAZjB,MAAM,EACJU,SAAS,EACTC,gBAAgB,EAChBC,IAAI,EACJC,MAAM,EAEP,GAAGL,OADCM,0CACDN;;;;;;IACJ,MAAMO,OAA4BF,SAC9B,aAAKC,QAAWE,iBAAiBF,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