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

@starbeam/interfaces

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@starbeam/interfaces - npm Package Compare versions

Comparing version 0.8.10-unstable.4198c97 to 0.8.10-unstable.4247abc

16

.eslintrc.json
{
"root": true,
"ignorePatterns": ["node_modules", "dist", "html", "tests"],
"plugins": ["@starbeam"],
"overrides": [
{
"extends": ["plugin:@starbeam/tight"],
"files": ["index.ts", "src/**/*.ts"],
"parserOptions": {
"project": "tsconfig.json"
}
},
{
"extends": ["plugin:@starbeam/json:recommended"],
"files": ["*.json"]
}
]
"extends": ["plugin:@starbeam-dev/library:recommended"]
}

16

package.json
{
"name": "@starbeam/interfaces",
"version": "0.8.10-unstable.4198c97",
"type": "module",
"version": "0.8.10-unstable.4247abc",
"main": "dist/index.cjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.cjs"
}
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.cjs"
},

@@ -20,8 +18,8 @@ "starbeam": {

"dependencies": {
"@starbeam/shared": "1.3.8-unstable.4198c97",
"@starbeam/shared": "1.3.8-unstable.4247abc",
"@domtree/any": "^0.9.3"
},
"devDependencies": {
"@starbeam/eslint-plugin": "^1.0.0",
"@starbeam-dev/build-support": "^1.0.0"
"@starbeam-dev/compile": "^1.0.2",
"@starbeam-dev/eslint-plugin": "^1.0.4"
},

@@ -28,0 +26,0 @@ "scripts": {

@@ -18,4 +18,5 @@ import type { TAG } from "@starbeam/shared";

/**
* Cell is the fundamental mutable reactive value. All subscriptions in Starbeam are ultimately
* subscriptions to cells, and all mutations in Starbeam are ultimately mutations to cells.
* Cell is the fundamental mutable reactive value. All subscriptions in
* Starbeam are ultimately subscriptions to cells, and all mutations in
* Starbeam are ultimately mutations to cells.
*/

@@ -32,12 +33,15 @@ export interface CellTag extends TagMethods {

/**
* Formula is a reactive that has *dynamic* children. This means that you can't cache the children
* (or subscribe directly to them), because they may change. This is different from delegates, which
* are guaranteed to have the same set of children forever.
* Formula is a reactive that has *dynamic* children. This means that you can't
* cache the children (or subscribe directly to them), because they may change.
* This is different from delegates, which are guaranteed to have the same set
* of children forever.
*
* Composite reactives must notify the timeline when their children have changed.
* Composite reactives must notify the timeline when their children have
* changed.
*
* A subscription to a composite reactive is a subscription to its current children, as of the last
* time the timeline was notified of changes to the composite's children. Whenever the timeline is
* notified of a change to the composite's children, it removes subscriptions from any stale
* dependencies and adds subscriptions to any new dependencies.
* A subscription to a composite reactive is a subscription to its current
* children, as of the last time the timeline was notified of changes to the
* composite's children. Whenever the timeline is notified of a change to the
* composite's children, it removes subscriptions from any stale dependencies
* and adds subscriptions to any new dependencies.
*/

@@ -74,9 +78,11 @@ export interface FormulaTag extends TagMethods {

/**
* Delegate is a reactive that represents one or more reactives, but that set of reactives cannot
* change. This allows you to cache the value of the `delegate` property, and it also allows you to
* subscribe directly to the delegate's targets.
* Delegate is a reactive that represents one or more reactives, but that set
* of reactives cannot change. This allows you to cache the value of the
* `delegate` property, and it also allows you to subscribe directly to the
* delegate's targets.
*
* In practice, when you subscribe to a delegate, the timeline subscribes directly to the delegate's
* targets. This means that delegates don't need to know when their value changes, and don't need to
* notify the timeline when their targets change.
* In practice, when you subscribe to a delegate, the timeline subscribes
* directly to the delegate's targets. This means that delegates don't need to
* know when their value changes, and don't need to notify the timeline when
* their targets change.
*/

@@ -90,12 +96,14 @@ export interface DelegateTag extends TagMethods {

/**
* Static is a reactive that is guaranteed not to change. This means that you can cache the value of
* the static reactive and don't need to include it in composite children. All validation semantics
* act as if static reactives were not present.
* Static is a reactive that is guaranteed not to change. This means that you
* can cache the value of the static reactive and don't need to include it in
* composite children. All validation semantics act as if static reactives were
* not present.
*
* If a formula or delegate has only static children, it is also static. Even though a formula's
* children can change, if the formula's *only* children are static, then the formula can never
* invalidate, and therefore it, itself, is treated as static.
* If a formula or delegate has only static children, it is also static. Even
* though a formula's children can change, if the formula's *only* children are
* static, then the formula can never invalidate, and therefore it, itself, is
* treated as static.
*
* TODO: Do we need a separate fundamental type for pollable formulas, which can get new
* dependencies even if they never invalidate?
* TODO: Do we need a separate fundamental type for pollable formulas, which
* can get new dependencies even if they never invalidate?
*/

@@ -108,9 +116,11 @@ export interface StaticTag extends TagMethods {

/**
* A tag validates a reactive value. The behavior of a tags is defined in relation to reads and
* writes of the reactive value they represent. Tags model **value composition** (and functional
* composition), not a more general algebra.
* A tag validates a reactive value. The behavior of a tags is defined in
* relation to reads and writes of the reactive value they represent. Tags
* model **value composition** (and functional composition), not a more general
* algebra.
*
* In other words, it doesn't make sense to think about the composition of tags abstracted from the
* values they represent. Attempting to think about tags this way makes them seem more general than
* they are, and that generality breaks system invariants derived from value composition.
* In other words, it doesn't make sense to think about the composition of tags
* abstracted from the values they represent. Attempting to think about tags
* this way makes them seem more general than they are, and that generality
* breaks system invariants derived from value composition.
*/

@@ -122,5 +132,6 @@ export type Tag = CellTag | FormulaTag | DelegateTag | StaticTag;

*
* A subscription to a formula is a dynamic subscription to its current dependencies.
* A subscription to a delegate is equivalent to subscribing to its (stable) targets.
* A subscription to a static is equivalent to subscribing to nothing.
* A subscription to a formula is a dynamic subscription to its current
* dependencies. A subscription to a delegate is equivalent to subscribing to
* its (stable) targets. A subscription to a static is equivalent to
* subscribing to nothing.
*/

@@ -127,0 +138,0 @@ export type SubscriptionTarget = CellTag | FormulaTag;

@@ -29,15 +29,18 @@ import type { UNINITIALIZED } from "@starbeam/shared";

/**
* Formula is a reactive that has *dynamic* children. This means that you can't cache the children
* (or subscribe directly to them), because they may change. This is different from delegates, which
* are guaranteed to have the same set of children forever.
* Formula is a reactive that has *dynamic* children. This means that you can't
* cache the children (or subscribe directly to them), because they may change.
* This is different from delegates, which are guaranteed to have the same set
* of children forever.
*
* Composite reactives must notify the timeline when their children have changed.
* Composite reactives must notify the timeline when their children have
* changed.
*
* A subscription to a composite reactive is a subscription to its current children, as of the last
* time the timeline was notified of changes to the composite's children. Whenever the timeline is
* notified of a change to the composite's children, it removes subscriptions from any stale
* dependencies and adds subscriptions to any new dependencies.
* A subscription to a composite reactive is a subscription to its current
* children, as of the last time the timeline was notified of changes to the
* composite's children. Whenever the timeline is notified of a change to the
* composite's children, it removes subscriptions from any stale dependencies
* and adds subscriptions to any new dependencies.
*
* TODO: Do we need a separate fundamental type for non-cached formulas, which can get new
* dependencies even if they never invalidate?
* TODO: Do we need a separate fundamental type for non-cached formulas, which
* can get new dependencies even if they never invalidate?
*/

@@ -51,10 +54,12 @@ export interface FormulaTag {

/**
* A tag validates a reactive value. The behavior of a tags is defined in relation to reads and
* writes of the reactive value they represent. Tags model **value composition** (and functional
* composition), not a more general algebra.
* A tag validates a reactive value. The behavior of a tags is defined in
* relation to reads and writes of the reactive value they represent. Tags
* model **value composition** (and functional composition), not a more general
* algebra.
*
* In other words, it doesn't make sense to think about the composition of tags abstracted from the
* values they represent. Attempting to think about tags this way makes them seem more general than
* they are, and that generality breaks system invariants derived from value composition.
* In other words, it doesn't make sense to think about the composition of tags
* abstracted from the values they represent. Attempting to think about tags
* this way makes them seem more general than they are, and that generality
* breaks system invariants derived from value composition.
*/
export type Tag = CellTag | FormulaTag;

@@ -26,5 +26,5 @@ import type { TAG } from "@starbeam/shared";

/**
* A `TaggedReactive` object is a reactive object that has a `Tag` (which is used
* to validate it) and a `read` function that can be used to read the current
* value of the object.
* A `TaggedReactive` object is a reactive object that has a `Tag` (which is
* used to validate it) and a `read` function that can be used to read the
* current value of the object.
*/

@@ -31,0 +31,0 @@ export interface TaggedReactive<out T = unknown, I extends Tag = Tag>

@@ -5,10 +5,10 @@ {

"composite": true,
"types": ["../../env.d.ts"],
"declaration": true,
"declarationDir": "../../../dist/types",
"declarationMap": true,
"outDir": "../../../dist/packages",
"types": ["../../env"]
"emitDeclarationOnly": true
},
"exclude": ["dist/**/*"],
"include": ["index.ts", "./src/**/*.ts", "./src/**/*.d.ts"]
"include": ["index.ts", "./src/**/*.ts", "./src/**/*.d.ts"],
"exclude": ["dist/**/*"]
}
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