Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cfcs/core

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfcs/core - npm Package Compare versions

Comparing version 0.0.26 to 0.1.0

LICENSE

5

declaration/dom/index.d.ts

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export * from "./utils";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { Ref } from "../core";

@@ -2,0 +7,0 @@ /**

@@ -0,3 +1,8 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export * from "./core";
export * from "./dom";
export * from "./reactive";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export declare const OBSERVERS_PATH = "__observers__";

@@ -2,0 +7,0 @@ export declare const COMPUTED_PATH = "__computed__";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export * from "./utils";

@@ -2,0 +7,0 @@ export * from "./types";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { ComputedObserver } from "./ComputedObserver";

@@ -2,0 +7,0 @@ import { Observer } from "./Observer";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import Component from "@egjs/component";

@@ -2,0 +7,0 @@ interface EmitterEvents<Value> {

11

declaration/reactive/ReactiveAdapter.d.ts

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { EventKey, EventTriggerParams } from "@egjs/component/declaration/types";

@@ -8,3 +13,3 @@ import { ReactiveEventCallback, ReactiveState } from "./types";

*/
export interface ReacitveSetup<Instance extends ReactiveSubscribe<Record<string, any>>, State extends Record<string, any> = ReactiveState<Instance>, Methods extends keyof Partial<Instance> = never, Props = any, Events extends Record<string, any> = {}> {
export interface ReactiveSetup<Instance extends ReactiveSubscribe<Record<string, any>>, State extends Record<string, any> = ReactiveState<Instance>, Methods extends keyof Partial<Instance> = never, Props = any, Events extends Record<string, any> = {}> {
/**

@@ -71,3 +76,3 @@ * Get external props.

*/
export declare type ReactiveSetupAdapter<Instance extends ReactiveSubscribe<Record<string, any>>, State extends Record<string, any> = ReactiveState<Instance>, Methods extends keyof Partial<Instance> = never, Props = any, Events extends Record<string, any> = {}> = (setup: ReacitveSetup<Instance, State, Methods, Props, Events>) => Instance | undefined | void;
export declare type ReactiveSetupAdapter<Instance extends ReactiveSubscribe<Record<string, any>>, State extends Record<string, any> = ReactiveState<Instance>, Methods extends keyof Partial<Instance> = never, Props = any, Events extends Record<string, any> = {}> = (setup: ReactiveSetup<Instance, State, Methods, Props, Events>) => Instance | undefined | void;
/**

@@ -104,3 +109,3 @@ * Object type Reactive Adapter

*/
setup?(setup: ReacitveSetup<Instance, State, Methods, Props, Events>): Instance | undefined | void;
setup?(setup: ReactiveSetup<Instance, State, Methods, Props, Events>): Instance | undefined | void;
/**

@@ -107,0 +112,0 @@ * Occurs when a component is created.

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { ComponentEvent } from "@egjs/component";

@@ -2,0 +7,0 @@ import { ReactiveSubscribe } from "./decorators/ReactiveSubscribe";

/*
Copyright (c) NAVER Crop.
Copyright (c) 2022-present NAVER Corp.
name: @cfcs/core
license: MIT
author: NAVER Crop.
repository: https://github.com/naver/cfcs
version: 0.0.26
repository: https://github.com/naver/cfcs/tree/main/packages/core
version: 0.1.0
*/

@@ -57,2 +57,7 @@ 'use strict';

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -122,2 +127,7 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
var OBSERVERS_PATH = "__observers__";

@@ -176,2 +186,7 @@ var COMPUTED_PATH = "__computed__";

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function getDetectedStack() {

@@ -209,2 +224,7 @@ // Version issues do not occur when you access the native object in the global.

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* Creates a mutable ref object. You can access the `.current` value and detect the value change through `.subscribe`.

@@ -350,2 +370,8 @@ * @category Reactive

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function injectObserve(prototype, memberName, publicName) {

@@ -432,2 +458,7 @@ if (publicName === void 0) {

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -500,2 +531,8 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function makeReactiveObject(setup, all) {

@@ -599,2 +636,7 @@ var result = isFunction(setup) ? setup() : setup;

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -908,2 +950,7 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @description `Computed` is a property decorator.

@@ -910,0 +957,0 @@ * Changes in computed state values are also recognized according to changes in observers used within the getter function.

/*
Copyright (c) NAVER Crop.
Copyright (c) 2022-present NAVER Corp.
name: @cfcs/core
license: MIT
author: NAVER Crop.
repository: https://github.com/naver/cfcs
version: 0.0.26
repository: https://github.com/naver/cfcs/tree/main/packages/core
version: 0.1.0
*/

@@ -55,2 +55,7 @@ import Component from '@egjs/component';

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -120,2 +125,7 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
var OBSERVERS_PATH = "__observers__";

@@ -174,2 +184,7 @@ var COMPUTED_PATH = "__computed__";

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function getDetectedStack() {

@@ -207,2 +222,7 @@ // Version issues do not occur when you access the native object in the global.

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* Creates a mutable ref object. You can access the `.current` value and detect the value change through `.subscribe`.

@@ -348,2 +368,8 @@ * @category Reactive

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function injectObserve(prototype, memberName, publicName) {

@@ -430,2 +456,7 @@ if (publicName === void 0) {

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -498,2 +529,8 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function makeReactiveObject(setup, all) {

@@ -597,2 +634,7 @@ var result = isFunction(setup) ? setup() : setup;

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -906,2 +948,7 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @description `Computed` is a property decorator.

@@ -908,0 +955,0 @@ * Changes in computed state values are also recognized according to changes in observers used within the getter function.

/*
Copyright (c) NAVER Crop.
Copyright (c) 2022-present NAVER Corp.
name: @cfcs/core
license: MIT
author: NAVER Crop.
repository: https://github.com/naver/cfcs
version: 0.0.26
repository: https://github.com/naver/cfcs/tree/main/packages/core
version: 0.1.0
*/

@@ -59,2 +59,7 @@ (function (global, factory) {

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -124,2 +129,7 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
var OBSERVERS_PATH = "__observers__";

@@ -178,2 +188,7 @@ var COMPUTED_PATH = "__computed__";

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function getDetectedStack() {

@@ -611,2 +626,7 @@ // Version issues do not occur when you access the native object in the global.

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* Creates a mutable ref object. You can access the `.current` value and detect the value change through `.subscribe`.

@@ -752,2 +772,8 @@ * @category Reactive

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function injectObserve(prototype, memberName, publicName) {

@@ -834,2 +860,7 @@ if (publicName === void 0) {

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -902,2 +933,8 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
function makeReactiveObject(setup, all) {

@@ -1001,2 +1038,7 @@ var result = isFunction(setup) ? setup() : setup;

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @hidden

@@ -1310,2 +1352,7 @@ */

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
/**
* @description `Computed` is a property decorator.

@@ -1368,2 +1415,8 @@ * Changes in computed state values are also recognized according to changes in observers used within the getter function.

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
var modules = {

@@ -1370,0 +1423,0 @@ __proto__: null,

/*
Copyright (c) NAVER Crop.
Copyright (c) 2022-present NAVER Corp.
name: @cfcs/core
license: MIT
author: NAVER Crop.
repository: https://github.com/naver/cfcs
version: 0.0.26
repository: https://github.com/naver/cfcs/tree/main/packages/core
version: 0.1.0
*/
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).cfcs=n()}(this,function(){"use strict";function _(t){return Object.keys(t)}function e(t){return"string"==typeof t}function n(t){return"object"==typeof t}function g(t){return"function"==typeof t}var r="__observers__",i="__computed__",o=1,u="__CFCS_DETECTED_DEPENDENCIES__",c=function(t,n){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function m(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||((r=r||Array.prototype.slice.call(n,0,o))[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}function f(){Object[u]=Object[u]||{};var t=Object[u];return t[o]=t[o]||[],t[o]}function a(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(function(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),u=[];try{for(;(void 0===n||0<n--)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return u}(arguments[n]));return t}function l(t){return void 0===t}var h=function(){function t(t,n){var e,r;if(this._canceled=!1,n)try{for(var o=a(Object.keys(n)),i=o.next();!i.done;i=o.next()){var u=i.value;this[u]=n[u]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.eventType=t}var n=t.prototype;return n.stop=function(){this._canceled=!0},n.isCanceled=function(){return this._canceled},t}(),O=function(){function t(){this._eventHandler={}}var n=t.prototype;return n.trigger=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var r=n instanceof h?n.eventType:n,r=s(this._eventHandler[r]||[]);return r.length<=0||(n instanceof h?(n.currentTarget=this,r.forEach(function(t){t(n)})):r.forEach(function(t){t.apply(void 0,s(e))})),this},n.once=function(e,r){var o,i=this;if("object"==typeof e&&l(r)){var t,n=e;for(t in n)this.once(t,n[t])}else"string"==typeof e&&"function"==typeof r&&(o=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r.apply(void 0,s(t)),i.off(e,o)},this.on(e,o));return this},n.hasOn=function(t){return!!this._eventHandler[t]},n.on=function(t,n){if("object"==typeof t&&l(n)){var e,r=t;for(e in r)this.on(e,r[e])}else{var o;"string"==typeof t&&"function"==typeof n&&(o=this._eventHandler[t],l(o)&&(this._eventHandler[t]=[],o=this._eventHandler[t]),o.push(n))}return this},n.off=function(t,n){var e,r;if(l(t))return this._eventHandler={},this;if(l(n)){if("string"==typeof t)return delete this._eventHandler[t],this;var o,i=t;for(o in i)this.off(o,i[o])}else{var u=this._eventHandler[t];if(u){var c=0;try{for(var f=a(u),s=f.next();!s.done;s=f.next()){if(s.value===n){u.splice(c,1),u.length<=0&&delete this._eventHandler[t];break}c++}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}}}return this},t.VERSION="3.0.4",t}(),v=function(){function t(t){this._emitter=new O,this._current=t}var n=t.prototype;return Object.defineProperty(n,"current",{get:function(){var t=(t=f())[t.length-1];return null!=t&&t.push(this),this._current},set:function(t){this._setCurrent(t)},enumerable:!1,configurable:!0}),n.subscribe=function(t){return this.current,this._emitter.on("update",t),this},n.unsubscribe=function(t){return this._emitter.off("update",t),this},n._setCurrent=function(t){var n=this._current,e=t!==n;this._current=t,e&&this._emitter.trigger("update",t,n)},n.toString=function(){return"".concat(this.current)},n.valueOf=function(){return this.current},t}(),p=function(e){var t=o,n=e;if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}function o(t){var n=e.call(this)||this;return n._computedCallback=t,n._registered=[],n._onCheckUpdate=function(){n._setCurrent(n.current)},n._current=n.current,n}return c(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r),Object.defineProperty(o.prototype,"current",{get:function(){var n,e,r=this,t=(n=this,t=f(),o={host:n,observers:e=[],push:function(t){n!==t&&-1===e.indexOf(t)&&e.push(t)}},t.push(o),this._computedCallback()),o=f().pop();return this._registered.forEach(function(t){t.unsubscribe(r._onCheckUpdate)}),o.observers.forEach(function(t){t.subscribe(r._onCheckUpdate)}),this._registered=o.observers,t},enumerable:!1,configurable:!0}),o}(v);function d(t,n,e){void 0===e&&(e=n),Object.defineProperty(t,n,{configurable:!0,get:function(){return x(this,e).current},set:function(t){x(this,e,t).current=t}}),e!==n&&Object.defineProperty(t,e,{configurable:!0,get:function(){return x(this,e).current}})}function b(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1<e.length?d(e[0],e[1]):function(t,n){return d(t,n,e[0])}}function y(t){t.subscribe=function(t,n){this[t],x(this,t).subscribe(n)},t.unsubscribe=function(t,n){var e=this;t?t in this&&x(this,t).unsubscribe(n):_(S(this)).forEach(function(t){e.unsubscribe(t)})}}function t(t){var e=g(t)?t():t,r={};return w(r),_(e).forEach(function(t){var n=e[t];P(n)?H(r,t,n):H(r,t,E(n)),b(t)(r,t)}),y(r),r}function E(t){return new v(t)}function j(t){return new p(t)}function C(o,t){var n={};return t&&t.forEach(function(r){n[r]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=o.current||o.value;return e[r].apply(e,t)}}),n}function w(t){var n={};return Object.defineProperty(t,r,{get:function(){return n}}),n}function S(n,t){n[r]||w(n);var e=n[r];return t||(t=null==(t=null==(t=null==n?void 0:n.constructor)?void 0:t.prototype)?void 0:t[i])&&t.forEach(function(t){!(t in e)&&t in n&&n[t]}),e}function x(t,n,e){t=S(t);return t[n]||(t[n]=E(e)),t[n]}function H(t,n,e){S(t)[n]=e}function P(t){return t&&n(t)&&"current"in t&&"subscribe"in t&&"unsubscribe"in t}return{__proto__:null,keys:_,camelize:function(t){return t.replace(/[\s-_]([a-z])/g,function(t,n){return n.toUpperCase()})},isString:e,isObject:n,isFunction:g,findTarget:function(t){var n;return t?(e(t)?n=document.querySelector(t):t instanceof Element?n=t:("value"in t||"current"in t)&&(n=t.value||t.current),n):null},withClassMethods:function(n){return function(t,o){n.forEach(function(r){r in t||(t[r]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=(e=this[o])[r].apply(e,t);return e===this[o]?this:e})})}},withReactiveMethods:C,defineObservers:w,getObservers:S,getObserver:x,setObserver:H,isObserver:P,isReactive:function(t){return t&&!P(t)&&"subscribe"in t&&"unsubscribe"in t},Observer:v,ComputedObserver:p,reactive:t,partialReactive:t,observe:E,computed:j,adaptReactive:function(t,n){var i=g(t)?{setup:t}:t;function r(){var t;return null!=(t=null!=(t=null!=(t=null==n?void 0:n())?t:null==(t=i.props)?void 0:t.call(i))?t:null==(t=i.data)?void 0:t.call(i))?t:{}}function e(t){s.push(t)}function o(t){d=t}function u(t){b=t}function c(t){y=t}var f=new O,s=[],a=[],l=[],h=[],v={current:null},p=[],d=null,b=[],y=[];return i.setup&&(v.current=i.setup({getProps:r,setInitialState:o,setEvents:u,setMethods:c,onMounted:e,onDestroy:function(t){l.push(t)},onInit:function(t){a.push(t)},emit:function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];f.trigger.apply(f,m([t],n,!1))},on:function(t){h.push(t)}})||null),i.created&&(v.current=i.created(r())||null),i.events&&u(i.events),i.state&&o(i.state),i.methods&&c(i.methods),i.mounted&&e(i.mounted),i.destroy&&l.push(i.destroy),i.init&&a.push(i.init),i.on&&h.push(function(n,e,r){var o=i.on(n,e,r);return function(){var t;o&&o(),null!=(t=i.off)&&t.call(i,n,e,r)}}),{events:function(){return b},state:function(){var e,t=v.current;return d||(t&&(e=S(t),o(_(e).reduce(function(t,n){return t[n]=e[n].current,t},{}))),d||{})},instance:function(){return v.current},mounted:function(){var n=r();s.forEach(function(t){v.current=t(n,v.current)||v.current})},init:function(){var n=v.current,e=r();p=b.map(function(e){function n(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];f.trigger.apply(f,m([e],t,!1))}var r=v.current;return h.map(function(t){return t(r,e,n)}).filter(Boolean)}),a.forEach(function(t){t(n,e)})},destroy:function(){p.forEach(function(t){t.forEach(function(t){t()})}),f.off();var n=v.current,e=r();l.forEach(function(t){t(n,e)})},methods:function(){return C(v,y)},on:function(t,n){f.on(t,n)},off:function(t,n){f.off(t,n)}}},Observe:b,Reactive:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return b.apply(void 0,t)},Computed:function(t,n,e){var r=e.get,e={configurable:!0,get:function(){var t=S(this,!0);return n in t||(t[n]=j(r.bind(this))),x(this,n).current}},o=(t[i]||(t[i]=[]),t[i]);return-1===o.indexOf(n)&&o.push(n),Object.defineProperty(t,n,e),e},injectReactiveSubscribe:y,ReactiveSubscribe:function(t){y(t.prototype)}}});
//# sourceMappingURL=cfcs.min.js.map
{
"name": "@cfcs/core",
"version": "0.0.26",
"description": "CFCs(Cross Framework Components) are modules that convert components into framework usage",
"version": "0.1.0",
"description": "Write once, create framework components that supports React, Vue, Svelte, and more.",
"main": "dist/cfcs.cjs.js",

@@ -15,5 +15,6 @@ "module": "dist/cfcs.esm.js",

},
"homepage": "https://naver.github.io/cfcs",
"repository": {
"type": "git",
"url": "https://github.com/naver/cfcs"
"url": "https://github.com/naver/cfcs/tree/main/packages/core"
},

@@ -20,0 +21,0 @@ "author": "NAVER Crop.",

@@ -9,3 +9,3 @@

<p align="center">CFCs(Cross Framework Components) are modules that convert components into framework usage.</p>
<p align="center">Write once, create framework components that supports React, Vue, Svelte, and more.</p>

@@ -26,2 +26,7 @@

<h3 align="center">
<a href="https://naver.github.io/cfcs/">Demo</a> / <a href="https://naver.github.io/cfcs/docs/api/Core/Reactive/Function/reactive">API</a> / <a href="https://naver.github.io/cfcs/docs">Tutorials</a>
</h3>
## ⚙️ Installation

@@ -41,5 +46,5 @@ ```sh

The Hooks component can provide us with a value for the state by changing the state designated as a Hook by certain conditions.
**Reactive State** is a state that changes according to a specific condition.
The state used in Hooks is called **Reactive State**.
You can detect state changes and also create a UI that changes based on conditions.

@@ -49,10 +54,3 @@

### CFCs DOM
CFCs DOM supports various frameworks by delegating the DOM render function to the framework. (Soon)
![](https://raw.githubusercontent.com/naver/cfcs/main/images/cfcs-dom.png)
## 📦 Packages

@@ -59,0 +57,0 @@ |Package|Version|Description|

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export * from "./utils";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { isString, Ref } from "../core";

@@ -2,0 +7,0 @@

@@ -0,3 +1,8 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export * from "./core";
export * from "./dom";
export * from "./reactive";
export * from "./reactive";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { isFunction, keys } from "../core";

@@ -2,0 +7,0 @@ import { Ref } from "../core/types";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { detectDependencies, endDetectDependencies } from "./detectDependencies";

@@ -2,0 +7,0 @@ import { Observer } from "./Observer";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export const OBSERVERS_PATH = "__observers__";

@@ -2,0 +7,0 @@ export const COMPUTED_PATH = "__computed__";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { COMPUTED_PATH } from "../const";

@@ -2,0 +7,0 @@ import { computed } from "../inline";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { getObserver } from "../utils";

@@ -2,0 +7,0 @@

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { keys } from "../../core";

@@ -2,0 +7,0 @@ import { getObserver, getObservers } from "../utils";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import {

@@ -2,0 +7,0 @@ CFCS_DETECTED_DEPENDENCIES,

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import {

@@ -2,0 +7,0 @@ CFCS_DETECTED_DEPENDENCIES,

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
export * from "./utils";

@@ -2,0 +7,0 @@ export * from "./types";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { ComputedObserver } from "./ComputedObserver";

@@ -2,0 +7,0 @@ import { Observer } from "./Observer";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import Component from "@egjs/component";

@@ -2,0 +7,0 @@ import { getCurrentDetected } from "./detectDependencies";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { EventKey, EventTriggerParams } from "@egjs/component/declaration/types";

@@ -9,3 +14,3 @@ import { ReactiveEventCallback, ReactiveState } from "./types";

*/
export interface ReacitveSetup<
export interface ReactiveSetup<
Instance extends ReactiveSubscribe<Record<string, any>>,

@@ -93,3 +98,3 @@ State extends Record<string, any> = ReactiveState<Instance>,

Events extends Record<string, any> = {},
> = (setup: ReacitveSetup<Instance, State, Methods, Props, Events>) => Instance | undefined | void;
> = (setup: ReactiveSetup<Instance, State, Methods, Props, Events>) => Instance | undefined | void;

@@ -133,3 +138,3 @@ /**

*/
setup?(setup: ReacitveSetup<Instance, State, Methods, Props, Events>): Instance | undefined | void;
setup?(setup: ReactiveSetup<Instance, State, Methods, Props, Events>): Instance | undefined | void;
/**

@@ -136,0 +141,0 @@ * Occurs when a component is created.

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { ComponentEvent } from "@egjs/component";

@@ -2,0 +7,0 @@ import { Observer } from "./Observer";

@@ -0,1 +1,6 @@

/**
* cfcs
* Copyright (c) 2022-present NAVER Corp.
* MIT license
*/
import { COMPUTED_PATH, OBSERVERS_PATH } from "./const";

@@ -2,0 +7,0 @@ import { Observer } from "./Observer";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc