@salesforce/storefront-next-runtime 0.4.1 → 1.0.0-alpha.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/README.md +9 -3
- package/dist/config.d.ts +33 -221
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +34 -116
- package/dist/config.js.map +1 -1
- package/dist/data-store.d.ts +185 -15
- package/dist/data-store.d.ts.map +1 -1
- package/dist/data-store.js +412 -10
- package/dist/data-store.js.map +1 -1
- package/dist/design-data.d.ts +266 -62
- package/dist/design-data.d.ts.map +1 -1
- package/dist/design-data.js +399 -14
- package/dist/design-data.js.map +1 -1
- package/dist/design-mode.d.ts +3 -2
- package/dist/design-mode.d.ts.map +1 -1
- package/dist/events.d.ts +32 -6
- package/dist/events.d.ts.map +1 -1
- package/dist/i18n-client.d.ts.map +1 -1
- package/dist/i18n-client.js.map +1 -1
- package/dist/i18n.d.ts +1 -2
- package/dist/i18n.d.ts.map +1 -1
- package/dist/modeDetection.js +0 -18
- package/dist/modeDetection.js.map +1 -1
- package/dist/scapi.d.ts +2185 -466
- package/dist/scapi.d.ts.map +1 -1
- package/dist/scapi.js +1 -1
- package/dist/scapi.js.map +1 -1
- package/dist/schema.d.ts +17 -15
- package/dist/schema.d.ts.map +1 -1
- package/dist/site-context.d.ts +43 -27
- package/dist/site-context.d.ts.map +1 -1
- package/dist/site-context.js +2 -2
- package/dist/site-context2.js +41 -31
- package/dist/site-context2.js.map +1 -1
- package/dist/types.d.ts +19 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types2.d.ts +89 -63
- package/dist/types2.d.ts.map +1 -1
- package/package.json +2 -20
- package/dist/custom-global-preferences.d.ts +0 -20
- package/dist/custom-global-preferences.d.ts.map +0 -1
- package/dist/custom-global-preferences.js +0 -31
- package/dist/custom-global-preferences.js.map +0 -1
- package/dist/custom-site-preferences.d.ts +0 -20
- package/dist/custom-site-preferences.d.ts.map +0 -1
- package/dist/custom-site-preferences.js +0 -31
- package/dist/custom-site-preferences.js.map +0 -1
- package/dist/data-store-custom-global-preferences.d.ts +0 -2
- package/dist/data-store-custom-global-preferences.js +0 -6
- package/dist/data-store-custom-site-preferences.d.ts +0 -2
- package/dist/data-store-custom-site-preferences.js +0 -6
- package/dist/data-store-gcp-preferences.d.ts +0 -2
- package/dist/data-store-gcp-preferences.js +0 -6
- package/dist/gcp-preferences.d.ts +0 -52
- package/dist/gcp-preferences.d.ts.map +0 -1
- package/dist/gcp-preferences.js +0 -64
- package/dist/gcp-preferences.js.map +0 -1
- package/dist/utils.js +0 -90
- package/dist/utils.js.map +0 -1
package/dist/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","names":[],"sources":["../src/i18n/context.ts","../src/i18n/types.ts","../src/i18n/middleware.ts","../src/i18n/defaults.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AE2BA;AAA6C,iBFI7B,cAAA,CEJ6B,OAAA,CAAA,EFIJ,QEJI,CFIK,qBEJL,CAAA,CAAA,EAAA;EAA0C,OAAA,MAAA;EAAnB,CAAA,oBAAA,CAAA,CAAA,aAAA,EAAA,GAAA,MAAA,EAAA,CAAA,EAAA,SAAA,CAAA;CAAkB;;;;ACTtF;iBHqCgB,SAAA,UAAmB,SAAS;;;;;iBAQ5B,eAAA,kBACK;;aACsB
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","names":[],"sources":["../src/i18n/context.ts","../src/i18n/types.ts","../src/i18n/middleware.ts","../src/i18n/defaults.ts"],"sourcesContent":[],"mappings":";;;;;;;;;AE2BA;AAA6C,iBFI7B,cAAA,CEJ6B,OAAA,CAAA,EFIJ,QEJI,CFIK,qBEJL,CAAA,CAAA,EAAA;EAA0C,OAAA,MAAA;EAAnB,CAAA,oBAAA,CAAA,CAAA,aAAA,EAAA,GAAA,MAAA,EAAA,CAAA,EAAA,SAAA,CAAA;CAAkB;;;;ACTtF;iBHqCgB,SAAA,UAAmB,SAAS;;;;;iBAQ5B,eAAA,kBACK;;aACsB;;;;AC/C3C;AACe,UADE,oBAAA,CACF;EAGK,SAAA,EAHL,QAGK;EACN,kBAAA,EAAA,MAAA,EAAA;EAAgB,gBAAA,EAAA,MAAA;EAWlB,aAAA,CAAA,EAZQ,oBAYgD;YAXtD;;;ACId;;;;;;;KDOY,YAAA,yBAAqC;EEhBpC,OAAA,EFgBuD,gBERnE;;;;;;;AHKD;AAAkD,iBEJlC,oBAAA,CFIkC,MAAA,EEJL,oBFIK,CAAA,EEJkB,kBFIlB,CEJqC,QFIrC,CAAA;;;ACblD;AACe,cEDF,oBFCE,EEDoB,oBFCpB"}
|
package/dist/modeDetection.js
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
//#region src/design/modeDetection.ts
|
|
2
2
|
/**
|
|
3
|
-
* Copyright 2026 Salesforce, Inc.
|
|
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
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Utility functions for detecting active design/preview modes
|
|
19
|
-
*/
|
|
20
|
-
/**
|
|
21
3
|
* Get the mode parameter from URL search params
|
|
22
4
|
* @param url - Optional URL string or Request object for server-side usage. If not provided, uses window.location on client-side
|
|
23
5
|
* @returns The mode parameter value or null if not found
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modeDetection.js","names":["searchParams: URLSearchParams"],"sources":["../src/design/modeDetection.ts"],"sourcesContent":["/**\n * Copyright 2026 Salesforce, Inc.\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/**\n * Utility functions for detecting active design/preview modes\n */\n\n/**\n * Get the mode parameter from URL search params\n * @param url - Optional URL string or Request object for server-side usage. If not provided, uses window.location on client-side\n * @returns The mode parameter value or null if not found\n */\nexport const getUrlMode = (url?: string | URL | Request):
|
|
1
|
+
{"version":3,"file":"modeDetection.js","names":["searchParams: URLSearchParams"],"sources":["../src/design/modeDetection.ts"],"sourcesContent":["/**\n * Copyright 2026 Salesforce, Inc.\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/**\n * Utility functions for detecting active design/preview modes\n */\n\nexport type PageDesignerMode = 'EDIT' | 'PREVIEW';\n\n/**\n * Get the mode parameter from URL search params\n * @param url - Optional URL string or Request object for server-side usage. If not provided, uses window.location on client-side\n * @returns The mode parameter value or null if not found\n */\nexport const getUrlMode = (url?: string | URL | Request): PageDesignerMode | null => {\n let searchParams: URLSearchParams;\n\n if (url) {\n // Server-side: extract search params from provided URL or Request\n if (url instanceof Request) {\n searchParams = new URL(url.url).searchParams;\n } else {\n searchParams = new URL(url).searchParams;\n }\n } else {\n // Client-side: use window.location\n if (typeof window === 'undefined') {\n return null;\n }\n searchParams = new URLSearchParams(window.location.search);\n }\n\n return searchParams.get('mode') as PageDesignerMode | null;\n};\n\n/**\n * Check if design mode is active\n * @param url - Optional URL string or Request object for server-side usage\n * @returns True if mode=EDIT is present in URL\n */\nexport const isDesignModeActive = (url?: string | URL | Request): boolean => getUrlMode(url) === 'EDIT';\n\n/**\n * Check if preview mode is active\n * @param url - Optional URL string or Request object for server-side usage\n * @returns True if mode=PREVIEW is present in URL\n */\nexport const isPreviewModeActive = (url?: string | URL | Request): boolean => getUrlMode(url) === 'PREVIEW';\n"],"mappings":";;;;;;AA2BA,MAAa,cAAc,QAA0D;CACjF,IAAIA;AAEJ,KAAI,IAEA,KAAI,eAAe,QACf,gBAAe,IAAI,IAAI,IAAI,IAAI,CAAC;KAEhC,gBAAe,IAAI,IAAI,IAAI,CAAC;MAE7B;AAEH,MAAI,OAAO,WAAW,YAClB,QAAO;AAEX,iBAAe,IAAI,gBAAgB,OAAO,SAAS,OAAO;;AAG9D,QAAO,aAAa,IAAI,OAAO;;;;;;;AAQnC,MAAa,sBAAsB,QAA0C,WAAW,IAAI,KAAK;;;;;;AAOjG,MAAa,uBAAuB,QAA0C,WAAW,IAAI,KAAK"}
|