@silexlabs/silex 3.0.0-alpha.52 → 3.0.0-alpha.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/client/assetUrl.d.ts +28 -0
- package/dist/client/js/main.js +14 -14
- package/dist/client/types.d.ts +17 -16
- package/dist/plugins/client/client/assetUrl.d.ts +28 -0
- package/dist/plugins/client/client/assetUrl.js +170 -0
- package/dist/plugins/client/client/assetUrl.js.map +1 -0
- package/dist/plugins/client/client/grapesjs/PublicationManager.js +10 -3
- package/dist/plugins/client/client/grapesjs/PublicationManager.js.map +1 -1
- package/dist/plugins/client/client/grapesjs/storage.js +7 -5
- package/dist/plugins/client/client/grapesjs/storage.js.map +1 -1
- package/dist/plugins/client/plugins/client/11ty.js +0 -5
- package/dist/plugins/client/plugins/client/11ty.js.map +1 -1
- package/dist/plugins/client/types.d.ts +17 -16
- package/dist/plugins/client/types.js +11 -0
- package/dist/plugins/client/types.js.map +1 -1
- package/dist/plugins/server/plugins/server/GitlabConnector.d.ts +1 -0
- package/dist/plugins/server/plugins/server/GitlabConnector.js +2 -2
- package/dist/plugins/server/plugins/server/GitlabConnector.js.map +1 -1
- package/dist/plugins/server/types.d.ts +17 -16
- package/dist/plugins/server/types.js +11 -0
- package/dist/plugins/server/types.js.map +1 -1
- package/dist/server/server/api/publicationApi.js +1 -1
- package/package.json +1 -1
- package/src/ts/client/assetUrl.ts +182 -0
- package/src/ts/client/grapesjs/PublicationManager.ts +17 -10
- package/src/ts/client/grapesjs/storage.ts +9 -7
- package/src/ts/client/publication-transformers.test.ts +1 -1
- package/src/ts/plugins/client/11ty.ts +0 -6
- package/src/ts/plugins/server/GitlabConnector.ts +3 -2
- package/src/ts/server/api/publicationApi.ts +1 -1
- package/src/ts/server/connectors/FsStorage.ts +1 -0
- package/src/ts/types.ts +34 -13
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Asset, ConnectorId, Page, Style, WebsiteId } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Update asset URL to use the current storage connector and website ID
|
|
4
|
+
* Assets URLs are stored in the project data in the form `/assets/image.webp`
|
|
5
|
+
* This function adds the API path and the connectorId and websiteId like so: `/api/website/assets/image.webp?websiteId=47868975&connectorId=gitlab`
|
|
6
|
+
*/
|
|
7
|
+
export declare function addTempDataToAssetUrl(assets: Asset[], websiteId: WebsiteId, storageId: ConnectorId): Asset[];
|
|
8
|
+
/**
|
|
9
|
+
* Remove the temporary data from the asset URL
|
|
10
|
+
* Remove the API path and the connectorId and websiteId like so: `/assets/image.webp`
|
|
11
|
+
*/
|
|
12
|
+
export declare function removeTempDataFromAssetUrl(assets: Asset[]): Asset[];
|
|
13
|
+
/**
|
|
14
|
+
* Add temp data to pages
|
|
15
|
+
*/
|
|
16
|
+
export declare function addTemDataToPages(pages: Page[], websiteId: WebsiteId, storageId: ConnectorId): Page[];
|
|
17
|
+
/**
|
|
18
|
+
* Remove temp data from asset URL in the components
|
|
19
|
+
*/
|
|
20
|
+
export declare function removeTempDataFromPages(pages: Page[]): Page[];
|
|
21
|
+
/**
|
|
22
|
+
* Add data to stylesheets
|
|
23
|
+
*/
|
|
24
|
+
export declare function addTempDataToStyles(styles: Style[], websiteId: WebsiteId, storageId: ConnectorId): Style[];
|
|
25
|
+
/**
|
|
26
|
+
* Remove temp data from stylesheets
|
|
27
|
+
*/
|
|
28
|
+
export declare function removeTempDataFromStyles(styles: Style[]): Style[];
|