native-fn 1.2.0 → 1.2.2

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.
Files changed (68) hide show
  1. package/README.md +145 -33
  2. package/dist/index.d.ts +12 -6
  3. package/dist/native.cjs +180 -102
  4. package/dist/native.min.cjs +1 -1
  5. package/dist/native.min.mjs +1 -1
  6. package/dist/native.mjs +180 -102
  7. package/dist/native.umd.js +180 -102
  8. package/dist/native.umd.min.js +1 -1
  9. package/dist/plugin/appearance/index.cjs +8 -3
  10. package/dist/plugin/appearance/index.mjs +8 -3
  11. package/dist/plugin/appearance/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  12. package/dist/plugin/appearance/src/plugin/pip/types/pip.d.ts +5 -2
  13. package/dist/plugin/appearance/src/types/subscription-manager.d.ts +1 -1
  14. package/dist/plugin/badge/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  15. package/dist/plugin/badge/src/plugin/pip/types/pip.d.ts +5 -2
  16. package/dist/plugin/badge/src/types/subscription-manager.d.ts +1 -1
  17. package/dist/plugin/battery/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  18. package/dist/plugin/battery/src/plugin/pip/types/pip.d.ts +5 -2
  19. package/dist/plugin/battery/src/types/subscription-manager.d.ts +1 -1
  20. package/dist/plugin/clipboard/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  21. package/dist/plugin/clipboard/src/plugin/pip/types/pip.d.ts +5 -2
  22. package/dist/plugin/clipboard/src/types/subscription-manager.d.ts +1 -1
  23. package/dist/plugin/dimension/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  24. package/dist/plugin/dimension/src/plugin/pip/types/pip.d.ts +5 -2
  25. package/dist/plugin/dimension/src/types/subscription-manager.d.ts +1 -1
  26. package/dist/plugin/fullscreen/index.cjs +93 -54
  27. package/dist/plugin/fullscreen/index.d.ts +7 -4
  28. package/dist/plugin/fullscreen/index.mjs +93 -54
  29. package/dist/plugin/fullscreen/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  30. package/dist/plugin/fullscreen/src/plugin/pip/types/pip.d.ts +5 -2
  31. package/dist/plugin/fullscreen/src/types/subscription-manager.d.ts +1 -1
  32. package/dist/plugin/geolocation/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  33. package/dist/plugin/geolocation/src/plugin/pip/types/pip.d.ts +5 -2
  34. package/dist/plugin/geolocation/src/types/subscription-manager.d.ts +1 -1
  35. package/dist/plugin/notification/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  36. package/dist/plugin/notification/src/plugin/pip/types/pip.d.ts +5 -2
  37. package/dist/plugin/notification/src/types/subscription-manager.d.ts +1 -1
  38. package/dist/plugin/open/index.cjs +8 -3
  39. package/dist/plugin/open/index.mjs +8 -3
  40. package/dist/plugin/open/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  41. package/dist/plugin/open/src/plugin/pip/types/pip.d.ts +5 -2
  42. package/dist/plugin/open/src/types/subscription-manager.d.ts +1 -1
  43. package/dist/plugin/permission/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  44. package/dist/plugin/permission/src/plugin/pip/types/pip.d.ts +5 -2
  45. package/dist/plugin/permission/src/types/subscription-manager.d.ts +1 -1
  46. package/dist/plugin/pip/index.cjs +448 -47
  47. package/dist/plugin/pip/index.d.ts +5 -2
  48. package/dist/plugin/pip/index.mjs +448 -47
  49. package/dist/plugin/pip/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  50. package/dist/plugin/pip/src/plugin/pip/types/pip.d.ts +5 -2
  51. package/dist/plugin/pip/src/types/subscription-manager.d.ts +1 -1
  52. package/dist/plugin/platform/index.cjs +8 -3
  53. package/dist/plugin/platform/index.mjs +8 -3
  54. package/dist/plugin/platform/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  55. package/dist/plugin/platform/src/plugin/pip/types/pip.d.ts +5 -2
  56. package/dist/plugin/platform/src/types/subscription-manager.d.ts +1 -1
  57. package/dist/plugin/theme/index.cjs +8 -3
  58. package/dist/plugin/theme/index.mjs +8 -3
  59. package/dist/plugin/theme/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  60. package/dist/plugin/theme/src/plugin/pip/types/pip.d.ts +5 -2
  61. package/dist/plugin/theme/src/types/subscription-manager.d.ts +1 -1
  62. package/dist/plugin/vibration/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  63. package/dist/plugin/vibration/src/plugin/pip/types/pip.d.ts +5 -2
  64. package/dist/plugin/vibration/src/types/subscription-manager.d.ts +1 -1
  65. package/dist/src/plugin/fullscreen/types/fullscreen.d.ts +7 -4
  66. package/dist/src/plugin/pip/types/pip.d.ts +5 -2
  67. package/dist/src/types/subscription-manager.d.ts +1 -1
  68. package/package.json +1 -1
package/README.md CHANGED
@@ -56,9 +56,10 @@ yarn add native-fn
56
56
  - **[fullscreen](#fullscreen)**
57
57
  - [supported](#fullscreen-supported)
58
58
  - [element](#fullscreen-element)
59
- - [isFullscreen](#fullscreen-isfullscreen)
59
+ - [isActive](#fullscreen-isactive)
60
60
  - [request](#fullscreen-request)
61
61
  - [exit](#fullscreen-exit)
62
+ - [toggle](#fullscreen-toggle)
62
63
  - [onChange](#fullscreen-onchange)
63
64
  - [onError](#fullscreen-onerror)
64
65
  - **[geolocation](#geolocation)**
@@ -87,9 +88,10 @@ yarn add native-fn
87
88
  - **[pip](#pip)**
88
89
  - [supported](#pip-supported)
89
90
  - [element](#pip-element)
90
- - [isPip](#pip-ispip)
91
+ - [isActive](#pip-isactive)
91
92
  - [request](#pip-request)
92
93
  - [exit](#pip-exit)
94
+ - [toggle](#pip-toggle)
93
95
  - [onChange](#pip-onchange)
94
96
  - [onError](#pip-onerror)
95
97
  - **[platform](#platform)**
@@ -299,7 +301,7 @@ Returns whether battery is supported in the current environment.
299
301
  ```ts
300
302
  if (Native.battery.supported) {
301
303
  const battery = await Native.battery.value;
302
-
304
+
303
305
  console.log(battery.level); // 0.0 – 1.0
304
306
  }
305
307
  ```
@@ -334,7 +336,7 @@ Returns the current battery status.
334
336
  const battery = await Native.battery.value;
335
337
 
336
338
  console.log(battery.level); // 0.0 – 1.0
337
- console.log(battery.charging); // true | false
339
+ console.log(battery.charging); // boolean
338
340
  console.log(battery.chargingTime); // seconds until full
339
341
  console.log(battery.dischargingTime); // seconds until empty
340
342
  ```
@@ -378,7 +380,7 @@ Subscribes to battery status changes.
378
380
  ```ts
379
381
  const unsubscribe = Native.battery.onChange((battery) => {
380
382
  console.log(battery.level); // 0.0 – 1.0
381
- console.log(battery.charging); // true | false
383
+ console.log(battery.charging); // boolean
382
384
  });
383
385
 
384
386
  unsubscribe();
@@ -653,7 +655,7 @@ unsubscribe();
653
655
 
654
656
  ## fullscreen
655
657
 
656
- [`supported`](#fullscreen-supported) · [`element`](#fullscreen-element) · [`isFullscreen`](#fullscreen-isfullscreen) · [`request`](#fullscreen-request) · [`exit`](#fullscreen-exit) · [`onChange`](#fullscreen-onchange) · [`onError`](#fullscreen-onerror)
658
+ [`supported`](#fullscreen-supported) · [`element`](#fullscreen-element) · [`isActive`](#fullscreen-isactive) · [`request`](#fullscreen-request) · [`exit`](#fullscreen-exit) · [`toggle`](#fullscreen-toggle) · [`onChange`](#fullscreen-onchange) · [`onError`](#fullscreen-onerror)
657
659
 
658
660
  <h3 id="fullscreen-supported"><code>fullscreen.supported</code></h3>
659
661
 
@@ -702,7 +704,7 @@ Returns the element currently displayed in fullscreen, or null if not in fullscr
702
704
 
703
705
  ```ts
704
706
  const el = Native.fullscreen.element;
705
-
707
+
706
708
  if (el !== null) {
707
709
  console.log(el.tagName); // e.g. 'VIDEO', 'DIV'
708
710
  }
@@ -722,12 +724,12 @@ Element | null
722
724
 
723
725
  ---
724
726
 
725
- <h3 id="fullscreen-isfullscreen"><code>fullscreen.isFullscreen</code></h3>
727
+ <h3 id="fullscreen-isactive"><code>fullscreen.isActive</code></h3>
726
728
 
727
729
  **Signature**
728
730
 
729
731
  ```ts
730
- get isFullscreen(): boolean
732
+ get isActive(): boolean
731
733
  ```
732
734
 
733
735
  Returns whether fullscreen is currently active.
@@ -735,7 +737,7 @@ Returns whether fullscreen is currently active.
735
737
  **Example**
736
738
 
737
739
  ```ts
738
- console.log(Native.fullscreen.isFullscreen); // true | false
740
+ console.log(Native.fullscreen.isActive); // boolean
739
741
  ```
740
742
 
741
743
  **Returns**
@@ -783,10 +785,10 @@ flowchart TD
783
785
  ```ts
784
786
  // Default: documentElement on desktop, first video on iOS
785
787
  await Native.fullscreen.request();
786
-
788
+
787
789
  // Specific element
788
790
  await Native.fullscreen.request(document.getElementById('player'));
789
-
791
+
790
792
  // With options
791
793
  await Native.fullscreen.request(element, { navigationUI: 'hide' });
792
794
  ```
@@ -863,12 +865,60 @@ throw new NotSupportedError // failed to exit fullscreen
863
865
 
864
866
  ---
865
867
 
868
+ <h3 id="fullscreen-toggle"><code>fullscreen.toggle</code></h3>
869
+
870
+ **Signature**
871
+
872
+ ```ts
873
+ toggle(target?: Element, options?: FullscreenOptions): Promise<void>
874
+ ```
875
+
876
+ Toggles fullscreen for an element.
877
+
878
+ **Example**
879
+
880
+ ```ts
881
+ // Default: documentElement on desktop, first video on iOS
882
+ await Native.fullscreen.toggle();
883
+
884
+ // Specific element
885
+ await Native.fullscreen.toggle(document.getElementById('player'));
886
+
887
+ // With options
888
+ await Native.fullscreen.toggle(element, { navigationUI: 'hide' });
889
+ ```
890
+
891
+ **Returns**
892
+
893
+ ```ts
894
+ Promise<void>
895
+ ```
896
+
897
+
898
+ **Throws**
899
+
900
+ ```ts
901
+ throw new NotSupportedError // element does not support fullscreen
902
+ ```
903
+ ```ts
904
+ throw new NotSupportedError // iOS video lacks webkitEnterFullscreen
905
+ ```
906
+ ```ts
907
+ throw new NotSupportedError // failed to exit fullscreen
908
+ ```
909
+ ```ts
910
+ throw new InvalidStateError // iOS video not yet played
911
+ ```
912
+
913
+ ---
914
+
866
915
  <h3 id="fullscreen-onchange"><code>fullscreen.onChange</code></h3>
867
916
 
868
917
  **Signature**
869
918
 
870
919
  ```ts
871
920
  onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void
921
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void
872
922
  ```
873
923
 
874
924
  Subscribes to fullscreen state changes.
@@ -877,11 +927,11 @@ Subscribes to fullscreen state changes.
877
927
 
878
928
  ```ts
879
929
  const unsubscribe = Native.fullscreen.onChange((payload) => {
880
- console.log(payload.isFullscreen); // true | false
930
+ console.log(payload.isActive); // boolean
881
931
  console.log(payload.element); // Element
882
932
  console.log(payload.nativeEvent); // Event
883
933
  });
884
-
934
+
885
935
  unsubscribe();
886
936
  ```
887
937
 
@@ -905,6 +955,7 @@ unsubscribe();
905
955
 
906
956
  ```ts
907
957
  onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void
958
+ onError(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void
908
959
  ```
909
960
 
910
961
  Subscribes to fullscreen errors.
@@ -913,11 +964,11 @@ Subscribes to fullscreen errors.
913
964
 
914
965
  ```ts
915
966
  const unsubscribe = Native.fullscreen.onError((payload) => {
916
- console.log(payload.isFullscreen); // boolean
967
+ console.log(payload.isActive); // boolean
917
968
  console.log(payload.element); // Element
918
969
  console.log(payload.nativeEvent); // Event
919
970
  });
920
-
971
+
921
972
  unsubscribe();
922
973
  ```
923
974
 
@@ -1268,13 +1319,13 @@ try {
1268
1319
  switch (result) {
1269
1320
  AppOpenState.Intent:
1270
1321
  console.log('Opened via Android intent.'); break;
1271
- AppOpenState.Universal:
1322
+ AppOpenState.Universal:
1272
1323
  console.log('Opened via Universal Link.'); break;
1273
- AppOpenState.Scheme:
1324
+ AppOpenState.Scheme:
1274
1325
  console.log('Opened via custom scheme.'); break;
1275
- AppOpenState.Fallback:
1326
+ AppOpenState.Fallback:
1276
1327
  console.log('Opened via fallback URL.'); break;
1277
- AppOpenState.Store:
1328
+ AppOpenState.Store:
1278
1329
  console.log('Redirected to App Store.'); break;
1279
1330
  }
1280
1331
  } catch (e) {
@@ -1625,12 +1676,24 @@ Promise<Contact[]>
1625
1676
 
1626
1677
  ```ts
1627
1678
  interface Contact {
1628
- name?: string;
1629
- email?: string;
1630
- tel?: string;
1631
- address?: string;
1679
+ name?: string[];
1680
+ email?: string[];
1681
+ tel?: string[];
1682
+ address?: ContactAddress[];
1632
1683
  icon?: Blob[];
1633
1684
  }
1685
+
1686
+ interface ContactAddress {
1687
+ country?: string;
1688
+ region?: string;
1689
+ city?: string;
1690
+ dependentLocality?: string;
1691
+ postalCode?: string;
1692
+ sortingCode?: string;
1693
+ organization?: string;
1694
+ recipient?: string;
1695
+ addressLine?: string[];
1696
+ }
1634
1697
  ```
1635
1698
 
1636
1699
  **Throws**
@@ -1885,7 +1948,7 @@ enum PermissionState {
1885
1948
 
1886
1949
  ## pip
1887
1950
 
1888
- [`supported`](#pip-supported) · [`element`](#pip-element) · [`isPip`](#pip-ispip) · [`request`](#pip-request) · [`exit`](#pip-exit) · [`onChange`](#pip-onchange) · [`onError`](#pip-onerror)
1951
+ [`supported`](#pip-supported) · [`element`](#pip-element) · [`isActive`](#pip-isactive) · [`request`](#pip-request) · [`exit`](#pip-exit) · [`toggle`](#pip-toggle) · [`onChange`](#pip-onchange) · [`onError`](#pip-onerror)
1889
1952
 
1890
1953
  <h3 id="pip-supported"><code>pip.supported</code></h3>
1891
1954
 
@@ -1934,7 +1997,7 @@ Returns the video element currently in Picture-in-Picture, or null if not active
1934
1997
 
1935
1998
  ```ts
1936
1999
  const el = Native.pip.element;
1937
-
2000
+
1938
2001
  if (el !== null) {
1939
2002
  console.log(el.src); // currently PiP video source
1940
2003
  }
@@ -1954,12 +2017,12 @@ HTMLVideoElement | null
1954
2017
 
1955
2018
  ---
1956
2019
 
1957
- <h3 id="pip-ispip"><code>pip.isPip</code></h3>
2020
+ <h3 id="pip-isactive"><code>pip.isActive</code></h3>
1958
2021
 
1959
2022
  **Signature**
1960
2023
 
1961
2024
  ```ts
1962
- get isPip(): boolean
2025
+ get isActive(): boolean
1963
2026
  ```
1964
2027
 
1965
2028
  Returns whether Picture-in-Picture is currently active.
@@ -1967,7 +2030,7 @@ Returns whether Picture-in-Picture is currently active.
1967
2030
  **Example**
1968
2031
 
1969
2032
  ```ts
1970
- console.log(Native.pip.isPip); // true | false
2033
+ console.log(Native.pip.isActive); // boolean
1971
2034
  ```
1972
2035
 
1973
2036
  **Returns**
@@ -2017,7 +2080,7 @@ flowchart TD
2017
2080
  ```ts
2018
2081
  // Default: first video element
2019
2082
  await Native.pip.request();
2020
-
2083
+
2021
2084
  // Specific video element
2022
2085
  await Native.pip.request(document.querySelector('video#player'));
2023
2086
  ```
@@ -2099,12 +2162,60 @@ throw new NotSupportedError // failed to exit PiP
2099
2162
 
2100
2163
  ---
2101
2164
 
2165
+ <h3 id="pip-toggle"><code>pip.toggle</code></h3>
2166
+
2167
+ **Signature**
2168
+
2169
+ ```ts
2170
+ toggle(target?: HTMLVideoElement): Promise<void>
2171
+ ```
2172
+
2173
+ Toggles Picture-in-Picture for a video element.
2174
+
2175
+ **Example**
2176
+
2177
+ ```ts
2178
+ // Default: first video element
2179
+ await Native.pip.toggle();
2180
+
2181
+ // Specific video element
2182
+ await Native.pip.toggle(document.querySelector('video#player'));
2183
+ ```
2184
+
2185
+ **Returns**
2186
+
2187
+ ```ts
2188
+ Promise<void>
2189
+ ```
2190
+
2191
+
2192
+ **Throws**
2193
+
2194
+ ```ts
2195
+ throw new NotSupportedError // target is not a video element
2196
+ ```
2197
+ ```ts
2198
+ throw new NotSupportedError // PiP disabled on this element (disablePictureInPicture)
2199
+ ```
2200
+ ```ts
2201
+ throw new NotSupportedError // requestPictureInPicture and webkitSetPresentationMode both unavailable
2202
+ ```
2203
+ ```ts
2204
+ throw new NotSupportedError // failed to exit PiP
2205
+ ```
2206
+ ```ts
2207
+ throw new InvalidStateError // PiP transition already in progress
2208
+ ```
2209
+
2210
+ ---
2211
+
2102
2212
  <h3 id="pip-onchange"><code>pip.onChange</code></h3>
2103
2213
 
2104
2214
  **Signature**
2105
2215
 
2106
2216
  ```ts
2107
2217
  onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void
2218
+ onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void
2108
2219
  ```
2109
2220
 
2110
2221
  Subscribes to Picture-in-Picture state changes.
@@ -2113,11 +2224,11 @@ Subscribes to Picture-in-Picture state changes.
2113
2224
 
2114
2225
  ```ts
2115
2226
  const unsubscribe = Native.pip.onChange((payload) => {
2116
- console.log(payload.isPip); // true | false
2227
+ console.log(payload.isActive); // boolean
2117
2228
  console.log(payload.element); // HTMLVideoElement
2118
2229
  console.log(payload.nativeEvent); // Event
2119
2230
  });
2120
-
2231
+
2121
2232
  unsubscribe();
2122
2233
  ```
2123
2234
 
@@ -2141,6 +2252,7 @@ unsubscribe();
2141
2252
 
2142
2253
  ```ts
2143
2254
  onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void
2255
+ onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void
2144
2256
  ```
2145
2257
 
2146
2258
  Subscribes to Picture-in-Picture errors.
@@ -2149,7 +2261,7 @@ Subscribes to Picture-in-Picture errors.
2149
2261
 
2150
2262
  ```ts
2151
2263
  const unsubscribe = Native.pip.onError((payload) => {
2152
- console.log(payload.isPip); // boolean
2264
+ console.log(payload.isActive); // boolean
2153
2265
  console.log(payload.element); // HTMLVideoElement
2154
2266
  console.log(payload.nativeEvent); // Event
2155
2267
  });
package/dist/index.d.ts CHANGED
@@ -147,13 +147,16 @@ declare const Dimension: DimensionInstance;
147
147
  declare const InvalidStateError: ErrorConstructor;
148
148
 
149
149
  declare interface FullscreenInstance {
150
- supported: boolean;
151
- element: Element | null;
152
- isFullscreen: boolean;
150
+ get supported(): boolean;
151
+ get element(): Element | null;
152
+ get isActive(): boolean;
153
153
  request(target?: Element, options?: FullscreenOptions): Promise<void>;
154
+ toggle(target?: Element, options?: FullscreenOptions): Promise<void>;
154
155
  exit(): Promise<void>;
155
156
  onChange(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
157
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
156
158
  onError(listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
159
+ onChange(target: Element, listener: (payload: FullscreenEventPayload) => void, options?: AddEventListenerOptions): () => void;
157
160
  Constants: {};
158
161
  Errors: {
159
162
  NotSupportedError: typeof NotSupportedError;
@@ -163,7 +166,7 @@ declare interface FullscreenInstance {
163
166
  declare interface FullscreenEventPayload {
164
167
  nativeEvent: Event;
165
168
  element: Element;
166
- isFullscreen: boolean;
169
+ isActive: boolean;
167
170
  }
168
171
 
169
172
  declare global {
@@ -733,11 +736,14 @@ declare const Permission: PermissionInstance;
733
736
  declare interface PipInstance {
734
737
  get supported(): boolean;
735
738
  get element(): HTMLVideoElement | null;
736
- get isPip(): boolean;
739
+ get isActive(): boolean;
737
740
  request(target?: HTMLVideoElement): Promise<void>;
738
741
  exit(): Promise<void>;
742
+ toggle(target?: HTMLVideoElement): Promise<void>;
739
743
  onChange(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
744
+ onChange(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
740
745
  onError(listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
746
+ onError(target: HTMLVideoElement, listener: (payload: PipEventPayload) => void, options?: AddEventListenerOptions): () => void;
741
747
  Constants: {};
742
748
  Errors: {
743
749
  NotSupportedError: typeof NotSupportedError;
@@ -747,7 +753,7 @@ declare interface PipInstance {
747
753
  declare interface PipEventPayload {
748
754
  nativeEvent: Event;
749
755
  element: HTMLVideoElement;
750
- isPip: boolean;
756
+ isActive: boolean;
751
757
  }
752
758
 
753
759
  declare global {