@the-portland-company/shell 0.68.0 → 0.69.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/CHANGELOG.md +46 -0
- package/README.md +4 -1
- package/dist/FormColumn-DsNP6NVG.d.cts +21 -0
- package/dist/FormColumn-DsNP6NVG.d.ts +21 -0
- package/dist/app-chrome.cjs +254 -97
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +24 -12
- package/dist/app-chrome.d.ts +24 -12
- package/dist/app-chrome.js +73 -15
- package/dist/app-chrome.js.map +1 -1
- package/dist/app-icons.cjs +6 -10
- package/dist/app-icons.cjs.map +1 -1
- package/dist/app-icons.d.cts +6 -6
- package/dist/app-icons.d.ts +6 -6
- package/dist/app-icons.js +6 -10
- package/dist/app-icons.js.map +1 -1
- package/dist/chunk-LPSBSAF3.js +26 -0
- package/dist/chunk-LPSBSAF3.js.map +1 -0
- package/dist/{chunk-ZKYREVCK.js → chunk-WFUWFMCA.js} +195 -123
- package/dist/chunk-WFUWFMCA.js.map +1 -0
- package/dist/index.cjs +68 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -9
- package/dist/index.d.ts +30 -9
- package/dist/index.js +59 -45
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +211 -121
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +56 -29
- package/dist/native.d.ts +56 -29
- package/dist/native.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-ZKYREVCK.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -848,43 +848,8 @@ function Card({
|
|
|
848
848
|
}
|
|
849
849
|
);
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
children
|
|
853
|
-
maxW = "container.xl",
|
|
854
|
-
px,
|
|
855
|
-
py,
|
|
856
|
-
lockHeight = true
|
|
857
|
-
}) {
|
|
858
|
-
const isFullWidth = maxW === "full";
|
|
859
|
-
const effectivePx = isFullWidth ? 0 : px === void 0 ? 4 : Number(px);
|
|
860
|
-
const effectivePy = py === void 0 ? isFullWidth ? 0 : 4 : py;
|
|
861
|
-
const pxValue = String(effectivePx);
|
|
862
|
-
const pyValue = String(effectivePy);
|
|
863
|
-
const maxWClass = isFullWidth ? "max-w-none" : maxW === "container.xl" ? "max-w-7xl" : maxW === "container.lg" ? "max-w-6xl" : maxW === "container.md" ? "max-w-5xl" : typeof maxW === "string" && /^(\d+)px$/.test(maxW) ? "" : "max-w-7xl";
|
|
864
|
-
const pxClass = pxValue === "0" ? "px-0" : pxValue === "1" ? "px-1" : pxValue === "2" ? "px-2" : pxValue === "3" ? "px-3" : pxValue === "4" ? "px-4" : "px-4";
|
|
865
|
-
const pyClass = pyValue === "0" ? "py-0" : pyValue === "4" ? "py-4" : pyValue === "5" ? "py-5" : pyValue === "6" ? "py-6" : "py-6";
|
|
866
|
-
const inlineMaxWStyle = typeof maxW === "string" && /^(\d+)px$/.test(maxW) ? { maxWidth: maxW } : void 0;
|
|
867
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
868
|
-
"main",
|
|
869
|
-
{
|
|
870
|
-
className: lockHeight ? "h-[calc(100vh-80px)] min-h-[calc(100vh-80px)]" : "",
|
|
871
|
-
style: { background: "var(--app-tab-content-bg)" },
|
|
872
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
873
|
-
"div",
|
|
874
|
-
{
|
|
875
|
-
className: clsx2__default.default(
|
|
876
|
-
"mx-auto w-full",
|
|
877
|
-
maxWClass,
|
|
878
|
-
pxClass,
|
|
879
|
-
pyClass,
|
|
880
|
-
lockHeight ? "h-full" : "h-auto"
|
|
881
|
-
),
|
|
882
|
-
style: inlineMaxWStyle,
|
|
883
|
-
children
|
|
884
|
-
}
|
|
885
|
-
)
|
|
886
|
-
}
|
|
887
|
-
);
|
|
851
|
+
function FormColumn({ children, className }) {
|
|
852
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-form-column": "", className: clsx2__default.default("w-full max-w-[960px]", className), children });
|
|
888
853
|
}
|
|
889
854
|
var resolveMaxWidthClass = (maxW) => {
|
|
890
855
|
if (maxW === "full") return "max-w-none";
|
|
@@ -948,11 +913,72 @@ function PageHeader({
|
|
|
948
913
|
}
|
|
949
914
|
);
|
|
950
915
|
}
|
|
916
|
+
|
|
917
|
+
// src/lib/deprecation.ts
|
|
918
|
+
var warned = /* @__PURE__ */ new Set();
|
|
919
|
+
function isDev() {
|
|
920
|
+
try {
|
|
921
|
+
return typeof process !== "undefined" && process.env?.NODE_ENV !== "production";
|
|
922
|
+
} catch {
|
|
923
|
+
return false;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
function warnDeprecated(key, message) {
|
|
927
|
+
if (!isDev() || warned.has(key)) return;
|
|
928
|
+
warned.add(key);
|
|
929
|
+
console.warn(`[@the-portland-company/shell] ${message}`);
|
|
930
|
+
}
|
|
931
|
+
function PageContainer({
|
|
932
|
+
children,
|
|
933
|
+
maxW = "container.xl",
|
|
934
|
+
px,
|
|
935
|
+
py,
|
|
936
|
+
lockHeight = true
|
|
937
|
+
}) {
|
|
938
|
+
warnDeprecated(
|
|
939
|
+
"PageContainer",
|
|
940
|
+
"<PageContainer> is deprecated for apps: the frame owns a fluid <main>. Render content directly inside <PolitogyAppFrame>, and use <FormColumn> for form/settings pages."
|
|
941
|
+
);
|
|
942
|
+
const isFullWidth = maxW === "full";
|
|
943
|
+
const effectivePx = isFullWidth ? 0 : px === void 0 ? 4 : Number(px);
|
|
944
|
+
const effectivePy = py === void 0 ? isFullWidth ? 0 : 4 : py;
|
|
945
|
+
const pxValue = String(effectivePx);
|
|
946
|
+
const pyValue = String(effectivePy);
|
|
947
|
+
const maxWClass = isFullWidth ? "max-w-none" : maxW === "container.xl" ? "max-w-7xl" : maxW === "container.lg" ? "max-w-6xl" : maxW === "container.md" ? "max-w-5xl" : typeof maxW === "string" && /^(\d+)px$/.test(maxW) ? "" : "max-w-7xl";
|
|
948
|
+
const pxClass = pxValue === "0" ? "px-0" : pxValue === "1" ? "px-1" : pxValue === "2" ? "px-2" : pxValue === "3" ? "px-3" : pxValue === "4" ? "px-4" : "px-4";
|
|
949
|
+
const pyClass = pyValue === "0" ? "py-0" : pyValue === "4" ? "py-4" : pyValue === "5" ? "py-5" : pyValue === "6" ? "py-6" : "py-6";
|
|
950
|
+
const inlineMaxWStyle = typeof maxW === "string" && /^(\d+)px$/.test(maxW) ? { maxWidth: maxW } : void 0;
|
|
951
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
952
|
+
"main",
|
|
953
|
+
{
|
|
954
|
+
className: lockHeight ? "h-[calc(100vh-80px)] min-h-[calc(100vh-80px)]" : "",
|
|
955
|
+
style: { background: "var(--app-tab-content-bg)" },
|
|
956
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
957
|
+
"div",
|
|
958
|
+
{
|
|
959
|
+
className: clsx2__default.default(
|
|
960
|
+
"mx-auto w-full",
|
|
961
|
+
maxWClass,
|
|
962
|
+
pxClass,
|
|
963
|
+
pyClass,
|
|
964
|
+
lockHeight ? "h-full" : "h-auto"
|
|
965
|
+
),
|
|
966
|
+
style: inlineMaxWStyle,
|
|
967
|
+
children
|
|
968
|
+
}
|
|
969
|
+
)
|
|
970
|
+
}
|
|
971
|
+
);
|
|
972
|
+
}
|
|
951
973
|
function BreadcrumbBar({
|
|
952
974
|
breadcrumbs = [],
|
|
953
975
|
actions = null,
|
|
954
976
|
maxW = "full"
|
|
955
977
|
}) {
|
|
978
|
+
warnDeprecated(
|
|
979
|
+
"BreadcrumbBar",
|
|
980
|
+
"<BreadcrumbBar> is deprecated for apps: the breadcrumb trail is retired. Use the page header (mode eyebrow + title) instead."
|
|
981
|
+
);
|
|
956
982
|
if ((!breadcrumbs || breadcrumbs.length === 0) && !actions) {
|
|
957
983
|
return null;
|
|
958
984
|
}
|
|
@@ -979,6 +1005,10 @@ function HeaderTabBar({
|
|
|
979
1005
|
className,
|
|
980
1006
|
ariaLabel = "Tabs"
|
|
981
1007
|
}) {
|
|
1008
|
+
warnDeprecated(
|
|
1009
|
+
"HeaderTabBar",
|
|
1010
|
+
"<HeaderTabBar> is deprecated: use <NavTabStrip> from @the-portland-company/shell/native, the canonical page tab strip."
|
|
1011
|
+
);
|
|
982
1012
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
983
1013
|
"div",
|
|
984
1014
|
{
|
|
@@ -1559,6 +1589,7 @@ exports.BrandIcon = BrandIcon;
|
|
|
1559
1589
|
exports.BrandLogo = BrandLogo;
|
|
1560
1590
|
exports.BreadcrumbBar = BreadcrumbBar;
|
|
1561
1591
|
exports.Card = Card;
|
|
1592
|
+
exports.FormColumn = FormColumn;
|
|
1562
1593
|
exports.GlobalUiIdProvider = GlobalUiIdProvider;
|
|
1563
1594
|
exports.HeaderTabBar = HeaderTabBar;
|
|
1564
1595
|
exports.PageContainer = PageContainer;
|