@wix/site-service-site-info 1.0.3 → 1.0.4

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.
@@ -14,28 +14,42 @@ export type ISiteInfoServiceConfig = {
14
14
  */
15
15
  revision: number;
16
16
  };
17
- /** Information about the site that is being rendered. Both values can change during an editor session. */
17
+ /** Reports the display name and revision number of the site your code runs on. */
18
18
  export interface ISiteInfoService {
19
19
  /**
20
- * Display name of the site, as set in the site's settings.
20
+ * Site's display name.
21
+ *
22
+ * A Wix user sets it in the Website Settings section of the site's dashboard.
23
+ *
24
+ * This value can change while the page is open. It changes when a Wix user renames the site while
25
+ * editing it. Read it while a component renders, or inside an `effect` or `computed`, to react to
26
+ * changes.
21
27
  *
22
28
  * `''` when the site has no display name.
23
29
  *
24
- * @exampleValue 'My Bakery'
30
+ * @exampleValue 'Example Outfitters'
25
31
  */
26
32
  readonly name: string;
27
33
  /**
28
- * Revision of the site that is being rendered.
34
+ * Site's revision number.
35
+ *
36
+ * The site gets a new revision each time a Wix user saves or publishes it after a change.
37
+ *
38
+ * This value can change while the page is open. It changes when the site gets a new revision while a
39
+ * Wix user is editing it. Read it while a component renders, or inside an `effect` or `computed`, to
40
+ * react to changes.
29
41
  *
30
- * `0` when there is no revision.
42
+ * `0` when no revision is available.
31
43
  *
32
44
  * @exampleValue 42
33
45
  */
34
46
  readonly revision: number;
35
- /** Called by the host when the site is renamed or gets a new revision. Fields left out keep their value. */
47
+ /** @internal Host-only. Replaces config values when the host's state changes. */
36
48
  _updateConfig: (config: Partial<ISiteInfoServiceConfig>) => void;
37
49
  }
50
+ /** Definition of the Site Info service, used to resolve it from the services manager. */
38
51
  export type ISiteInfoDefinition = ServiceDefinition<ISiteInfoService, ISiteInfoServiceConfig>;
52
+ /** Definition of the Site Info service. Specify it in `useService()` or `servicesManager.getService()`. */
39
53
  export declare const SiteInfoDefinition: string & {
40
54
  __api: ISiteInfoService;
41
55
  __config: ISiteInfoServiceConfig;
@@ -2,5 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SiteInfoDefinition = void 0;
4
4
  const services_definitions_1 = require("@wix/services-definitions");
5
+ /** Definition of the Site Info service. Specify it in `useService()` or `servicesManager.getService()`. */
5
6
  exports.SiteInfoDefinition = (0, services_definitions_1.defineService)('@wix/site-service-site-info');
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AA2C5C,QAAA,kBAAkB,GAAG,IAAA,oCAAa,EAA2C,6BAA6B,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAwDzD,2GAA2G;AAC9F,QAAA,kBAAkB,GAAG,IAAA,oCAAa,EAA2C,6BAA6B,CAAC,CAAA"}
@@ -14,28 +14,42 @@ export type ISiteInfoServiceConfig = {
14
14
  */
15
15
  revision: number;
16
16
  };
17
- /** Information about the site that is being rendered. Both values can change during an editor session. */
17
+ /** Reports the display name and revision number of the site your code runs on. */
18
18
  export interface ISiteInfoService {
19
19
  /**
20
- * Display name of the site, as set in the site's settings.
20
+ * Site's display name.
21
+ *
22
+ * A Wix user sets it in the Website Settings section of the site's dashboard.
23
+ *
24
+ * This value can change while the page is open. It changes when a Wix user renames the site while
25
+ * editing it. Read it while a component renders, or inside an `effect` or `computed`, to react to
26
+ * changes.
21
27
  *
22
28
  * `''` when the site has no display name.
23
29
  *
24
- * @exampleValue 'My Bakery'
30
+ * @exampleValue 'Example Outfitters'
25
31
  */
26
32
  readonly name: string;
27
33
  /**
28
- * Revision of the site that is being rendered.
34
+ * Site's revision number.
35
+ *
36
+ * The site gets a new revision each time a Wix user saves or publishes it after a change.
37
+ *
38
+ * This value can change while the page is open. It changes when the site gets a new revision while a
39
+ * Wix user is editing it. Read it while a component renders, or inside an `effect` or `computed`, to
40
+ * react to changes.
29
41
  *
30
- * `0` when there is no revision.
42
+ * `0` when no revision is available.
31
43
  *
32
44
  * @exampleValue 42
33
45
  */
34
46
  readonly revision: number;
35
- /** Called by the host when the site is renamed or gets a new revision. Fields left out keep their value. */
47
+ /** @internal Host-only. Replaces config values when the host's state changes. */
36
48
  _updateConfig: (config: Partial<ISiteInfoServiceConfig>) => void;
37
49
  }
50
+ /** Definition of the Site Info service, used to resolve it from the services manager. */
38
51
  export type ISiteInfoDefinition = ServiceDefinition<ISiteInfoService, ISiteInfoServiceConfig>;
52
+ /** Definition of the Site Info service. Specify it in `useService()` or `servicesManager.getService()`. */
39
53
  export declare const SiteInfoDefinition: string & {
40
54
  __api: ISiteInfoService;
41
55
  __config: ISiteInfoServiceConfig;
@@ -1,3 +1,4 @@
1
1
  import { defineService } from '@wix/services-definitions';
2
+ /** Definition of the Site Info service. Specify it in `useService()` or `servicesManager.getService()`. */
2
3
  export const SiteInfoDefinition = defineService('@wix/site-service-site-info');
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AA2CzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAA2C,6BAA6B,CAAC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAwDzD,2GAA2G;AAC3G,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAA2C,6BAA6B,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/site-service-site-info",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "license": "UNLICENSED",
5
5
  "files": [
6
6
  "dist",
@@ -77,5 +77,5 @@
77
77
  ]
78
78
  }
79
79
  },
80
- "falconPackageHash": "002db8725b0ef087ace3a88ced03868bf4176dd60c8f070a7fc5b6c0"
80
+ "falconPackageHash": "9ca22f2f212b83bd0b77df5bf34004090d28fb13ab1342b33e2b7bdc"
81
81
  }
@@ -17,28 +17,42 @@ export type ISiteInfoServiceConfig = {
17
17
  revision: number
18
18
  }
19
19
 
20
- /** Information about the site that is being rendered. Both values can change during an editor session. */
20
+ /** Reports the display name and revision number of the site your code runs on. */
21
21
  export interface ISiteInfoService {
22
22
  /**
23
- * Display name of the site, as set in the site's settings.
23
+ * Site's display name.
24
+ *
25
+ * A Wix user sets it in the Website Settings section of the site's dashboard.
26
+ *
27
+ * This value can change while the page is open. It changes when a Wix user renames the site while
28
+ * editing it. Read it while a component renders, or inside an `effect` or `computed`, to react to
29
+ * changes.
24
30
  *
25
31
  * `''` when the site has no display name.
26
32
  *
27
- * @exampleValue 'My Bakery'
33
+ * @exampleValue 'Example Outfitters'
28
34
  */
29
35
  readonly name: string
30
36
  /**
31
- * Revision of the site that is being rendered.
37
+ * Site's revision number.
38
+ *
39
+ * The site gets a new revision each time a Wix user saves or publishes it after a change.
40
+ *
41
+ * This value can change while the page is open. It changes when the site gets a new revision while a
42
+ * Wix user is editing it. Read it while a component renders, or inside an `effect` or `computed`, to
43
+ * react to changes.
32
44
  *
33
- * `0` when there is no revision.
45
+ * `0` when no revision is available.
34
46
  *
35
47
  * @exampleValue 42
36
48
  */
37
49
  readonly revision: number
38
- /** Called by the host when the site is renamed or gets a new revision. Fields left out keep their value. */
50
+ /** @internal Host-only. Replaces config values when the host's state changes. */
39
51
  _updateConfig: (config: Partial<ISiteInfoServiceConfig>) => void
40
52
  }
41
53
 
54
+ /** Definition of the Site Info service, used to resolve it from the services manager. */
42
55
  export type ISiteInfoDefinition = ServiceDefinition<ISiteInfoService, ISiteInfoServiceConfig>
43
56
 
57
+ /** Definition of the Site Info service. Specify it in `useService()` or `servicesManager.getService()`. */
44
58
  export const SiteInfoDefinition = defineService<ISiteInfoService, ISiteInfoServiceConfig>('@wix/site-service-site-info')