yummies 3.0.10 → 3.0.11

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/html.d.ts CHANGED
@@ -24,5 +24,7 @@ export declare const checkElementHasParent: (element: HTMLElement | null, parent
24
24
  *
25
25
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition | MDN: Document.startViewTransition}
26
26
  */
27
- export declare const startViewTransitionSafety: (fn: VoidFunction) => ViewTransition | undefined;
27
+ export declare const startViewTransitionSafety: (fn: VoidFunction, params?: {
28
+ disabled?: boolean;
29
+ }) => ViewTransition | undefined;
28
30
  //# sourceMappingURL=html.d.ts.map
package/html.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAIjD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MAAM,GAAG,IAa1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,cACnB,MAAM,GAAG,IAAI,aACb,MAAM,SAgBlB,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,UAI7C;AAED,eAAO,MAAM,gBAAgB,YAAa,WAAW,GAAG,IAAI,WAU3D,CAAC;AAEF,eAAO,MAAM,SAAS,MAAO,KAAK,YAKjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,SAAU,WAAW,SAgBzD,CAAC;AA0DF,eAAO,MAAM,YAAY,SACjB,KAAK,CAAC,MAAM,CAAC,WACV,OAAO,CAAC,eAAe,CAAC,WAMlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,YACvB,WAAW,GAAG,IAAI,UACnB,KAAK,CAAC,WAAW,CAAC,YAe3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,OAAQ,YAAY,+BAKzD,CAAC"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../src/html.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAIjD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MAAM,GAAG,IAa1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,cACnB,MAAM,GAAG,IAAI,aACb,MAAM,SAgBlB,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,UAI7C;AAED,eAAO,MAAM,gBAAgB,YAAa,WAAW,GAAG,IAAI,WAU3D,CAAC;AAEF,eAAO,MAAM,SAAS,MAAO,KAAK,YAKjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,SAAU,WAAW,SAgBzD,CAAC;AA0DF,eAAO,MAAM,YAAY,SACjB,KAAK,CAAC,MAAM,CAAC,WACV,OAAO,CAAC,eAAe,CAAC,WAMlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,YACvB,WAAW,GAAG,IAAI,UACnB,KAAK,CAAC,WAAW,CAAC,YAe3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,OAChC,YAAY,WACP;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,+BAMhC,CAAC"}
package/html.js CHANGED
@@ -145,8 +145,8 @@ export const checkElementHasParent = (element, parent) => {
145
145
  *
146
146
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition | MDN: Document.startViewTransition}
147
147
  */
148
- export const startViewTransitionSafety = (fn) => {
149
- if (document.startViewTransition) {
148
+ export const startViewTransitionSafety = (fn, params) => {
149
+ if (document.startViewTransition && !(params === null || params === void 0 ? void 0 : params.disabled)) {
150
150
  return document.startViewTransition(fn);
151
151
  }
152
152
  fn();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yummies",
3
- "version": "3.0.10",
3
+ "version": "3.0.11",
4
4
  "keywords": [],
5
5
  "author": "js2me",
6
6
  "license": "MIT",