Skip to content

Commit

Permalink
return source
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelie-Taylor committed Oct 11, 2022
0 parents commit 0439be5
Show file tree
Hide file tree
Showing 195 changed files with 29,398 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI
on: [push]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['14.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1

- name: Build
run: yarn build
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.log
.DS_Store
node_modules
.cache
dist
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/deployment.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/scenify-sdk.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Scenify SDK

_Warning: this project is not production ready, API might change without notice._

Scenify SDK is available on npm as @scenify/sdk. This single package contains all components required to build a design editor.

```sh
# using yarn
yarn add @scenify/sdk

# using npm
npm install @scenify/sdk
```

**View full documentation and examples on [Scenify SDK Docs](https://docs.scenify.dev)**

## Join us on Discord

<p>
<a href="https://discord.gg/HqyXEhkXNZ">
<img src="https://discordapp.com/api/guilds/898955692491309126/widget.png?style=banner2" alt="Discord Banner 2"/>
</a>
</p>
<!-- 177d8013c568c4d17f43a4909fdb32469a86f20b -->
7 changes: 7 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
.next
.DS_Store
yarn-error.log
dist
examples
packages
2 changes: 2 additions & 0 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
node_modules
21 changes: 21 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Shu Ding

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# [Scenify](https://github.com/scenify/scenify-sdk)

_Warning: this project is a work in progress, API might change without notice._


**Scenify** is a [fabric.js](https://nextjs.org) based SDK that will help you build canvas-like editors for several business use cases.

![](/public/preview.png)
2 changes: 2 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const withNextra = require('nextra')('nextra-theme-docs', './theme.config.js')
module.exports = withNextra()
27 changes: 27 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "nextra",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "next",
"start": "next start",
"build": "next build"
},
"author": "Shu Ding",
"license": "MIT",
"dependencies": {
"next": "^10.0.8-canary.9",
"nextra": "^0.4.1",
"nextra-theme-docs": "^1.1.2",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"prettier": "^2.0.5"
},
"prettier": {
"semi": false,
"singleQuote": true
}
}
5 changes: 5 additions & 0 deletions docs/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'nextra-theme-docs/style.css'

export default function Nextra({ Component, pageProps }) {
return <Component {...pageProps} />
}
55 changes: 55 additions & 0 deletions docs/pages/design.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import Image from 'next/image'
import Bleed from 'nextra-theme-docs/bleed'

# Design

### Installation

Scenify SDK is available on npm as @scenify/sdk. This single package contains all components required to build a design editor.

```sh
# using yarn
yarn add @scenify/sdk

# using npm
npm install @scenify/sdk
```

### Integration

In order to use Scenify SDK, you need to do a small setup and wrap the root of your application with EditorProvider:

```tsx
import { EditorProvider } from '@scenify/sdk'
import YourAPP from './App'

export default function App() {
return <EditorProvider>Other components</EditorProvider>
}
```

Then, you can use Editor component in any part of your application.

```tsx
import Editor from '@scenify/sdk'

const editorConfig = {
clipToFrame: true,
scrollLimit: 0,
}

export default function MyEditor() {
return (
<div style={{ display: 'flex', flex: 1 }}>
<Editor config={editorConfig} />
</div>
)
}
```

import Callout from 'nextra-theme-docs/callout'

<Callout emoji="👽️">
It is recommended to wrap the Editor component inside a flexible container. It
will allow the Editor component to detect resize changes.
</Callout>
55 changes: 55 additions & 0 deletions docs/pages/events.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import Image from 'next/image'
import Bleed from 'nextra-theme-docs/bleed'

# Events

### Installation

Scenify SDK is available on npm as @scenify/sdk. This single package contains all components required to build a design editor.

```sh
# using yarn
yarn add @scenify/sdk

# using npm
npm install @scenify/sdk
```

### Integration

In order to use Scenify SDK, you need to do a small setup and wrap the root of your application with EditorProvider:

```tsx
import { EditorProvider } from '@scenify/sdk'
import YourAPP from './App'

export default function App() {
return <EditorProvider>Other components</EditorProvider>
}
```

Then, you can use Editor component in any part of your application.

```tsx
import Editor from '@scenify/sdk'

const editorConfig = {
clipToFrame: true,
scrollLimit: 0,
}

export default function MyEditor() {
return (
<div style={{ display: 'flex', flex: 1 }}>
<Editor config={editorConfig} />
</div>
)
}
```

import Callout from 'nextra-theme-docs/callout'

<Callout emoji="👽️">
It is recommended to wrap the Editor component inside a flexible container. It
will allow the Editor component to detect resize changes.
</Callout>
55 changes: 55 additions & 0 deletions docs/pages/history.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import Image from 'next/image'
import Bleed from 'nextra-theme-docs/bleed'

# History

### Installation

Scenify SDK is available on npm as @scenify/sdk. This single package contains all components required to build a design editor.

```sh
# using yarn
yarn add @scenify/sdk

# using npm
npm install @scenify/sdk
```

### Integration

In order to use Scenify SDK, you need to do a small setup and wrap the root of your application with EditorProvider:

```tsx
import { EditorProvider } from '@scenify/sdk'
import YourAPP from './App'

export default function App() {
return <EditorProvider>Other components</EditorProvider>
}
```

Then, you can use Editor component in any part of your application.

```tsx
import Editor from '@scenify/sdk'

const editorConfig = {
clipToFrame: true,
scrollLimit: 0,
}

export default function MyEditor() {
return (
<div style={{ display: 'flex', flex: 1 }}>
<Editor config={editorConfig} />
</div>
)
}
```

import Callout from 'nextra-theme-docs/callout'

<Callout emoji="👽️">
It is recommended to wrap the Editor component inside a flexible container. It
will allow the Editor component to detect resize changes.
</Callout>
4 changes: 4 additions & 0 deletions docs/pages/hooks/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"useEditor": "useEditor",
"useActiveObject": "useActiveObject"
}
18 changes: 18 additions & 0 deletions docs/pages/hooks/useActiveObject.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# useActiveObject

Will receive the selecte object

### Usage

```tsx
import { useActiveObject } from '@scenify/sdk'

export default function App() {
const activeObject = useActiveObject()

useEffect(() => {
console.log(activeObject)
}, [activeObject])
return <>...</>
}
```
Loading

0 comments on commit 0439be5

Please sign in to comment.