@admin-layout/tailwind-design-pro 12.2.5-alpha.27 → 12.2.5-alpha.29
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/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/__tests__/pageSettings.test.d.ts +2 -0
- package/lib/utils/__tests__/pageSettings.test.d.ts.map +1 -0
- package/lib/utils/pageSettings.d.ts +19 -0
- package/lib/utils/pageSettings.d.ts.map +1 -0
- package/lib/utils/pageSettings.js +26 -0
- package/lib/utils/pageSettings.js.map +1 -0
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './tailwindConfig';
|
|
|
3
3
|
export * from './redux';
|
|
4
4
|
export * from './hooks';
|
|
5
5
|
export * from './utils/settingsTheme';
|
|
6
|
+
export * from './utils/pageSettings';
|
|
6
7
|
export * from './components/SettingsThemeApplier';
|
|
7
8
|
export type { SearchModuleDescriptor, ModuleSearchHit, ModuleSearchInput, } from './components/Layout/GlobalHeader/SearchBar';
|
|
8
9
|
declare const _default: Feature;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,YAAY,EACR,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GACpB,MAAM,4CAA4C,CAAC;;AAEpD,wBAAqC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,YAAY,EACR,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GACpB,MAAM,4CAA4C,CAAC;;AAEpD,wBAAqC"}
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {Feature}from'@common-stack/client-react';import settings from'./module.js';export{themeConfig}from'./tailwindConfig.js';export{SEARCH_ACTIONS,clearSearch,searchReducer,setSearchError,setSearchQuery,setSearchResult}from'./redux/searchReducer.js';export{useTailwindTheme}from'./hooks/useTailwindTheme.js';export{useMediaQuery}from'./hooks/useMediaQuery.js';export{SidebarControlsProvider,useSidebarControls}from'./components/Layout/SidebarControlsContext.js';export{SETTINGS_THEME_STYLE_ID,THEME_KEYS,applyThemeToDom,buildOverridesCss,getServerThemeAttrs,hexToHslSpace}from'./utils/settingsTheme.js';export{SettingsThemeApplier}from'./components/SettingsThemeApplier/SettingsThemeApplier.js';// eslint-disable-next-line import/no-extraneous-dependencies
|
|
1
|
+
import {Feature}from'@common-stack/client-react';import settings from'./module.js';export{themeConfig}from'./tailwindConfig.js';export{SEARCH_ACTIONS,clearSearch,searchReducer,setSearchError,setSearchQuery,setSearchResult}from'./redux/searchReducer.js';export{useTailwindTheme}from'./hooks/useTailwindTheme.js';export{useMediaQuery}from'./hooks/useMediaQuery.js';export{SidebarControlsProvider,useSidebarControls}from'./components/Layout/SidebarControlsContext.js';export{SETTINGS_THEME_STYLE_ID,THEME_KEYS,applyThemeToDom,buildOverridesCss,getServerThemeAttrs,hexToHslSpace}from'./utils/settingsTheme.js';export{resolvePageSettings}from'./utils/pageSettings.js';export{SettingsThemeApplier}from'./components/SettingsThemeApplier/SettingsThemeApplier.js';// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
2
|
var index = new Feature(settings);export{index as default};//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"mvBAAA;AAeA,YAAe,IAAI,OAAO,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageSettings.test.d.ts","sourceRoot":"","sources":["../../../src/utils/__tests__/pageSettings.test.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The settings one page renders with, resolved the way the client does it.
|
|
3
|
+
*
|
|
4
|
+
* Kept out of `settingsTheme.ts` on purpose: `@adminide-stack/core` needs
|
|
5
|
+
* `reflect-metadata` loaded before it evaluates, and `settingsTheme.ts` is deep
|
|
6
|
+
* imported by app roots and appliers that must stay dependency-free.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Base -> `[device]` -> `[route][device]`, the chain the settings machine applies
|
|
10
|
+
* (`routePattern` is the leaf route id, as `TailwindLayout` passes it). The drawer
|
|
11
|
+
* and the theme provider save a page's theme as `[route][device]` and an
|
|
12
|
+
* all-pages theme as `[device]`, so a server render that stamps <html> from the
|
|
13
|
+
* top level paints the base theme first and flips to the saved one when the
|
|
14
|
+
* machine takes over after hydration. Feed `getServerThemeAttrs` this instead.
|
|
15
|
+
*
|
|
16
|
+
* `device` defaults to `desktop` because that is what the machine starts with.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolvePageSettings<T extends object = Record<string, unknown>>(settings: T | null | undefined, routePattern: string | undefined, device?: 'desktop' | 'mobile'): T;
|
|
19
|
+
//# sourceMappingURL=pageSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageSettings.d.ts","sourceRoot":"","sources":["../../src/utils/pageSettings.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1E,QAAQ,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,MAAM,GAAE,SAAS,GAAG,QAAoB,GACzC,CAAC,CAIH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {extractConfigurationWithModel}from'@adminide-stack/core';/**
|
|
2
|
+
* The settings one page renders with, resolved the way the client does it.
|
|
3
|
+
*
|
|
4
|
+
* Kept out of `settingsTheme.ts` on purpose: `@adminide-stack/core` needs
|
|
5
|
+
* `reflect-metadata` loaded before it evaluates, and `settingsTheme.ts` is deep
|
|
6
|
+
* imported by app roots and appliers that must stay dependency-free.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Base -> `[device]` -> `[route][device]`, the chain the settings machine applies
|
|
10
|
+
* (`routePattern` is the leaf route id, as `TailwindLayout` passes it). The drawer
|
|
11
|
+
* and the theme provider save a page's theme as `[route][device]` and an
|
|
12
|
+
* all-pages theme as `[device]`, so a server render that stamps <html> from the
|
|
13
|
+
* top level paints the base theme first and flips to the saved one when the
|
|
14
|
+
* machine takes over after hydration. Feed `getServerThemeAttrs` this instead.
|
|
15
|
+
*
|
|
16
|
+
* `device` defaults to `desktop` because that is what the machine starts with.
|
|
17
|
+
*/
|
|
18
|
+
function resolvePageSettings(settings, routePattern, device = 'desktop') {
|
|
19
|
+
if (!settings) return {};
|
|
20
|
+
const {
|
|
21
|
+
model
|
|
22
|
+
} = extractConfigurationWithModel(settings);
|
|
23
|
+
return model.override([routePattern || '/', device], {
|
|
24
|
+
strict: true
|
|
25
|
+
}).getValue('');
|
|
26
|
+
}export{resolvePageSettings};//# sourceMappingURL=pageSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageSettings.js","sources":["../../src/utils/pageSettings.ts"],"sourcesContent":[null],"names":[],"mappings":"iEAAA;;;;;;AAMG;AAIH;;;;;;;;;AASG;AACG,SAAU,mBAAmB,CAC/B,QAA8B,EAC9B,YAAgC,EAChC,SAA+B,SAAS,EAAA;AAExC,EAAA,IAAA,CAAA,QAAK,EAAQ,OAAA,EAAA;AAAE,EAAA,MAAA;IACf;MACA,6BAAuB,CAAA,QAAgB,CAAA;AAC3C,EAAC,OAAA,KAAA,CAAA,QAAA,CAAA,CAAA,YAAA,IAAA,GAAA,EAAA,MAAA,CAAA,EAAA;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/tailwind-design-pro",
|
|
3
|
-
"version": "12.2.5-alpha.
|
|
3
|
+
"version": "12.2.5-alpha.29",
|
|
4
4
|
"description": "Sample core for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@admin-layout/assets": "12.2.5-alpha.2",
|
|
24
24
|
"@admin-layout/client": "12.2.5-alpha.27",
|
|
25
|
-
"@admin-layout/tailwind-ui": "12.2.5-alpha.
|
|
25
|
+
"@admin-layout/tailwind-ui": "12.2.5-alpha.29",
|
|
26
26
|
"path-to-regexp": "^8.0.0",
|
|
27
27
|
"react-favicon": "^0.0.23",
|
|
28
28
|
"react-intl": "^6.1.1",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"typescript": {
|
|
56
56
|
"definition": "lib/index.d.ts"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "c779497dad52abf5d97a568fa755af42e90c46b4"
|
|
59
59
|
}
|