@hazem3500/komo 0.9.12 → 0.9.13
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 +18 -2
- package/dist/chunk-RCC6R6PS.js +1 -0
- package/dist/dom.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/react.js +1 -1
- package/dist/setup.js +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/server/setup-client.txt +22 -22
- package/src/types.ts +2 -0
- package/dist/chunk-LTTJF7OZ.js +0 -1
package/dist/react.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{b as e,c as n,f as t,z as r}from"./chunk-JXIYWNFL.js";import{b as o}from"./chunk-
|
|
1
|
+
"use client";import{b as e,c as n,f as t,z as r}from"./chunk-JXIYWNFL.js";import{b as o}from"./chunk-RCC6R6PS.js";import"./chunk-URGMAMH5.js";import"./chunk-DH22G2S5.js";import"./chunk-7YUXYVQA.js";import"./chunk-ANKCS6NI.js";import"./chunk-I7AUKTXE.js";import{useEffect as s,useRef as c}from"react";function u(e){let n=c(null);s(()=>{if(n.current&&function(e,n){return[...new Set([...Object.keys(e),...Object.keys(n)])].every(t=>{if("shortcuts"===t||"features"===t){let r=e[t]??{},o=n[t]??{};return Object.keys({...r,...o}).every(e=>Object.is(r[e],o[e]))}if("design"===t){let t=e.design,r=n.design;if(!t||!r)return t===r;let o=t.themes??[],s=r.themes??[];return t.tokens===r.tokens&&t.components===r.components&&o.length===s.length&&o.every((e,n)=>e===s[n])}if("onboarding"!==t)return Object.is(e[t],n[t]);let r=e.onboarding,o=n.onboarding;return r&&o?Object.keys({...r,...o}).every(e=>"sites"===e?r.sites?.length===o.sites?.length&&(r.sites??[]).every((e,n)=>e===o.sites?.[n]):Object.is(r[e],o[e])):r===o})}(n.current.config,e)||(n.current?.controller.destroy(),n.current=null,!1===e.enabled))return;let t={...e,...e.onboarding?{onboarding:{...e.onboarding,...e.onboarding.sites?{sites:[...e.onboarding.sites]}:{}}}:{}};n.current={config:t,controller:o(t)}}),s(()=>()=>{n.current?.controller.destroy(),n.current=null},[])}function i(t){let r=c(null),o=c(null);return o.current||(o.current=e=>{r.current=e}),s(()=>{if(!0===t.enabled&&r.current)return e(r.current,t.component,t.props,t.onChange)},[t.enabled,t.component]),s(()=>{!0===t.enabled&&n(r.current,t.component,t.props,t.onChange)},[t.enabled,t.component,t.props,t.onChange]),{ref:o.current,"data-komo-inspectable":t.component.id}}function l(e){s(()=>{if(!0!==e.enabled)return;let n=e.root??document.documentElement;return t(n,e.tokens)},[e.root,e.tokens,e.enabled])}export{r as cssVariableTokens,u as useKomo,l as useKomoDesignTokens,i as useKomoInspectable};
|
package/dist/setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,c as n}from"./chunk-
|
|
1
|
+
import{a as o,c as n}from"./chunk-RCC6R6PS.js";import"./chunk-URGMAMH5.js";import"./chunk-DH22G2S5.js";import"./chunk-7YUXYVQA.js";import"./chunk-ANKCS6NI.js";import"./chunk-I7AUKTXE.js";function r(r){return(s={})=>n(o({...r,...s}))}export{r as defineKomo};
|
package/dist/types.d.ts
CHANGED
|
@@ -77,6 +77,8 @@ export interface KomoShortcuts {
|
|
|
77
77
|
design?: string | false;
|
|
78
78
|
/** Restore a dismissed toolbar. Defaults to "Shift+K". */
|
|
79
79
|
restore?: string | false;
|
|
80
|
+
/** Open or close the comment list. Defaults to "L". */
|
|
81
|
+
comments?: string | false;
|
|
80
82
|
}
|
|
81
83
|
/** Optional review features. Each defaults to true; false removes it from the UI. */
|
|
82
84
|
export interface KomoFeatures {
|