You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@tldraw/state

Package Overview
Dependencies
Maintainers
4
Versions
2069
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tldraw/state - npm Package Compare versions

Comparing version

to
2.0.0-canary.249bacf50bdd

25

CHANGELOG.md

@@ -0,1 +1,26 @@

# v2.0.0-alpha.14 (Tue Jul 04 2023)
#### 🐛 Bug Fix
- [fix] rename `global` in @tldraw/state to avoid collissions [#1672](https://github.com/tldraw/tldraw/pull/1672) ([@steveruizok](https://github.com/steveruizok))
#### Authors: 1
- Steve Ruiz ([@steveruizok](https://github.com/steveruizok))
---
# v2.0.0-alpha.13 (Wed Jun 28 2023)
#### 🔩 Dependency Updates
- Incorporate signia as @tldraw/state [#1620](https://github.com/tldraw/tldraw/pull/1620) ([@steveruizok](https://github.com/steveruizok) [@ds300](https://github.com/ds300))
#### Authors: 2
- David Sheldrick ([@ds300](https://github.com/ds300))
- Steve Ruiz ([@steveruizok](https://github.com/steveruizok))
---
# v2.0.0-alpha.12 (Mon Apr 03 2023)

@@ -2,0 +27,0 @@

14

dist-cjs/index.d.ts

@@ -15,3 +15,3 @@ import { FunctionComponent } from 'react';

*
* console.log(name.value) // 'John'
* print(name.value) // 'John'
* ```

@@ -358,3 +358,3 @@ *

* if (isUninitialized(prevValue)) {
* console.log('First time!')
* print('First time!')
* }

@@ -529,3 +529,3 @@ * return count.value * 2

* react('greet', () => {
* console.log(`Hello, ${firstName.value} ${lastName.value}!`)
* print(`Hello, ${firstName.value} ${lastName.value}!`)
* })

@@ -551,3 +551,3 @@ *

* react('greet', () => {
* console.log(`Hello, ${firstName.value} ${lastName.value}!`)
* print(`Hello, ${firstName.value} ${lastName.value}!`)
* })

@@ -575,3 +575,3 @@ *

* react('greet', () => {
* console.log(`Hello, ${firstName.value} ${lastName.value}!`)
* print(`Hello, ${firstName.value} ${lastName.value}!`)
* })

@@ -623,3 +623,3 @@ *

* react('log name changes', () => {
* console.log(name.value, 'was changed at', unsafe__withoutCapture(() => time.value))
* print(name.value, 'was changed at', unsafe__withoutCapture(() => time.value))
* })

@@ -745,3 +745,3 @@ *

* whyAmIRunning()
* console.log('Hello', name.value)
* print('Hello', name.value)
* })

@@ -748,0 +748,0 @@ *

@@ -29,5 +29,5 @@ "use strict";

var import_helpers = require("./helpers");
const globalKey = Symbol.for("__@tldraw/state__");
const global = globalThis;
if (global[globalKey]) {
const tldrawStateGlobalKey = Symbol.for("__@tldraw/state__");
const tldrawStateGlobal = globalThis;
if (tldrawStateGlobal[tldrawStateGlobalKey]) {
console.error(

@@ -37,3 +37,3 @@ 'Multiple versions of @tldraw/state detected. This will cause unexpected behavior. Please add "resolutions" (yarn/pnpm) or "overrides" (npm) in your package.json to ensure only one version of @tldraw/state is loaded.'

} else {
global[globalKey] = true;
tldrawStateGlobal[tldrawStateGlobalKey] = true;
}

@@ -40,0 +40,0 @@ class CaptureStackFrame {

{
"name": "@tldraw/state",
"description": "A tiny little drawing app (state).",
"version": "2.0.0-canary.245f74010c75",
"version": "2.0.0-canary.249bacf50bdd",
"packageManager": "yarn@3.5.0",

@@ -53,3 +53,3 @@ "author": {

"transformIgnorePatterns": [
"node_modules/(?!(nanoid|escape-string-regexp)/)"
"node_modules/(?!(nanoid)/)"
]

@@ -56,0 +56,0 @@ },

@@ -357,3 +357,2 @@ import { times } from 'lodash'

const test = new Test(seed)
// console.log(test.systemState)
for (let i = 0; i < NUM_OPS_PER_TEST; i++) {

@@ -360,0 +359,0 @@ test.tick()

@@ -47,3 +47,3 @@ import { ArraySet } from './ArraySet'

*
* console.log(name.value) // 'John'
* print(name.value) // 'John'
* ```

@@ -50,0 +50,0 @@ *

import { attach, detach } from './helpers'
import { Child, Signal } from './types'
const globalKey = Symbol.for('__@tldraw/state__')
const global = globalThis as { [globalKey]?: true }
const tldrawStateGlobalKey = Symbol.for('__@tldraw/state__')
const tldrawStateGlobal = globalThis as { [tldrawStateGlobalKey]?: true }
if (global[globalKey]) {
if (tldrawStateGlobal[tldrawStateGlobalKey]) {
console.error(

@@ -12,3 +12,3 @@ 'Multiple versions of @tldraw/state detected. This will cause unexpected behavior. Please add "resolutions" (yarn/pnpm) or "overrides" (npm) in your package.json to ensure only one version of @tldraw/state is loaded.'

} else {
global[globalKey] = true
tldrawStateGlobal[tldrawStateGlobalKey] = true
}

@@ -43,3 +43,3 @@

* react('log name changes', () => {
* console.log(name.value, 'was changed at', unsafe__withoutCapture(() => time.value))
* print(name.value, 'was changed at', unsafe__withoutCapture(() => time.value))
* })

@@ -139,3 +139,3 @@ *

* whyAmIRunning()
* console.log('Hello', name.value)
* print('Hello', name.value)
* })

@@ -142,0 +142,0 @@ *

@@ -29,3 +29,3 @@ /* eslint-disable prefer-rest-params */

* if (isUninitialized(prevValue)) {
* console.log('First time!')
* print('First time!')
* }

@@ -32,0 +32,0 @@ * return count.value * 2

@@ -146,3 +146,3 @@ import { _Atom } from './Atom'

* react('greet', () => {
* console.log(`Hello, ${firstName.value} ${lastName.value}!`)
* print(`Hello, ${firstName.value} ${lastName.value}!`)
* })

@@ -168,3 +168,3 @@ *

* react('greet', () => {
* console.log(`Hello, ${firstName.value} ${lastName.value}!`)
* print(`Hello, ${firstName.value} ${lastName.value}!`)
* })

@@ -192,3 +192,3 @@ *

* react('greet', () => {
* console.log(`Hello, ${firstName.value} ${lastName.value}!`)
* print(`Hello, ${firstName.value} ${lastName.value}!`)
* })

@@ -195,0 +195,0 @@ *

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

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

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet