Skip to content

Commit

Permalink
Initial commit of working version of SLv3 using a de-coupled pub/sub …
Browse files Browse the repository at this point in the history
…model using js-csp.

Many Sections of code commented out which have either been re-created or need yet to be re-made in the new methodology.
See this article for CSP/transducers - http://phuu.net/2014/08/31/csp-and-transducers.html
Some other links:
  https://github.com/ubolonton/js-csp/blob/master/doc/basic.md
  https://github.com/ubolonton/js-csp/blob/master/doc/advanced.md
  https://github.com/jlongster/transducers.js
  • Loading branch information
cpriest committed Sep 21, 2016
1 parent af6b380 commit f35dd0e
Show file tree
Hide file tree
Showing 23 changed files with 1,593 additions and 230 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
/.idea/workspace.xml
.idea/SnapLinks3.time
misc/

/vendor/
/composer.lock
/node_modules/
5 changes: 3 additions & 2 deletions .idea/inspectionProfiles/Project_Default.xml

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

149 changes: 77 additions & 72 deletions .idea/inspectionProfiles/SnapLinks.xml

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

45 changes: 23 additions & 22 deletions .idea/inspectionProfiles/profiles_settings.xml

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

11 changes: 11 additions & 0 deletions .idea/snaplinks.iml

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

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global=false
20 changes: 16 additions & 4 deletions DevNotes.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Bugs
- [Issue #91](https://github.com/cpriest/SnapLinksPlus/issues/91)-1 - Width of selection box independent of zoom factor... possibly doable with SVG since it has it's own coordinate system??
- Document size changes are not detected (on detection, need to clear DocElemRects)
- ***Document size changes are not detected (on detection, need to clear DocElemRects)**\*
- Mutation Observer (clear DocElemRects, re-index if during drag)
- ~~Blank HREF's should be ignored~~
- Since pub/sub
- document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.1ActionMgr.es6:40:3



# Plans
- ~~Add selection of and .click()ing of highlighted buttons~~
Expand All @@ -21,14 +25,22 @@
# Todo
- Resolve all inspection errors
- ~~JsDoc comments for everything~~
- Externalize CSS Styles
- Externalize CSS Styles
- Separate all classes into their own files
- Compiler/minimizer for production build?
- docElem is a sandboxed global, replace document.documentElement references with docElem
- Update phing (if js-csp/transducers.js work out)
- js-csp
- npm install
- copy csp.min.js to src/lib
- transducers.js
- download/install (npm?)
- copy transducers.js to src/lib

# Test
- Test using the new CSS3 all property to reset styles for our elements, such as setting all: initial on
- ~~Test using the new CSS3 all property to reset styles for our elements, such as setting all: initial on
our SVG / SelectionRect DIV elements (may need to be contained by an element with style="all: inherit"
This would replace the fix that was put in place for one website that had an overt transform selector set.
This would replace the fix that was put in place for one website that had an overt transform selector set.~~

# Deferred / Possibly Won't Implement
- Add Elements that have cursor: pointer (and have a click handler?)
Expand Down
66 changes: 66 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "cpriest/snaplinks3",
"type": "project",
"license": "GPL2",
"authors": [
{
"name": "Clint Priest",
"email": "composer@snaplinks.rxv.me"
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "jlongster/transducers-js",
"version": "master",
"type": "library",
"source": {
"url": "https://github.com/jlongster/transducers.js.git",
"type": "git",
"reference": "master"
}
}
},
{
"type": "package",
"package": {
"name": "ubolonton/js-csp",
"version": "master",
"type": "library",
"source": {
"url": "https://github.com/ubolonton/js-csp.git",
"type": "git",
"reference": "master"
}
}
}
],
"minimum-stability": "dev",
"require": {
"koala-framework/composer-extra-assets": "~1.1"
},
"extra": {
"require-npm": {
"js-csp": "*"
},
"comments": {
"require": {
"jlongster/transducers-js": "master",
"ubolonton/js-csp": "master"
},
"scripts": {
"post-update-cmd": [
"copy vendor\\jlongster\\transducers-js\\dist\\transducers.js src\\lib\\",
"cd vendor\\ubolonton\\js-csp && npm run build"
]
},



"": {
"blah": 0
}
}
}
}
11 changes: 8 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,19 @@
"<all_urls>"
],
"js": [
"src/globals.es6",
"src/lib/lodash-snaplinks.min.js",
"src/content-scripts/SelectionRect.es6",
"src/lib/csp.min.js",
"src/lib/transducers.js",
"src/globals.es6",
"src/CSP.es6",
"src/playground/csp-testing.es6",
"src/content-scripts/Utility.es6",
"src/content-scripts/SelectionRect.es6",
"src/content-scripts/SnapLinks.es6",
"src/content-scripts/ElementIndexer.es6",
"src/content-scripts/SvgOverlay.es6",
"src/content-scripts/CategorizedCollection.es6"
"src/content-scripts/CategorizedCollection.es6",
"src/content-scripts/ActionMgr.es6"
]
}
]
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "snaplinks-3",
"version": "3.0.1",
"description": "",
"license": "GPL2",
"repository": "https://github.com/cpriest/SnapLinksPlus",
"private": true,
"preferGlobal": false,
"devDependencies": {
"js-csp": "*"
}
}
Loading

0 comments on commit f35dd0e

Please sign in to comment.