summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-24 14:35:14 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-24 14:35:14 +0100
commitf5413db6783d197ed5e7967957e89833a7d3c173 (patch)
tree378e0b45426d450cb1a1d4a75d872450e50f1687 /src
parent858f19e9f8b9ba26eee8d3aeb8ba8b5b5058472b (diff)
downloadsvg.js-f5413db6783d197ed5e7967957e89833a7d3c173.tar.gz
svg.js-f5413db6783d197ed5e7967957e89833a7d3c173.zip
Moved utils, namespaces, regex... to a subobject of SVG. Renamed SVGArray and SVGNumber on export to Array and Number
Diffstat (limited to 'src')
-rw-r--r--src/main.js14
-rw-r--r--src/svg.js5
2 files changed, 8 insertions, 11 deletions
diff --git a/src/main.js b/src/main.js
index 696dfdd..1ce11f7 100644
--- a/src/main.js
+++ b/src/main.js
@@ -7,7 +7,7 @@ import './modules/optional/memory.js'
import './modules/optional/sugar.js'
import './modules/optional/transform.js'
-import { extend } from './utils/adopter.js'
+import { extend, makeInstance } from './utils/adopter.js'
import { getMethodNames, getMethodsFor } from './utils/methods.js'
import Box from './types/Box.js'
import Circle from './elements/Circle.js'
@@ -46,6 +46,9 @@ import Svg from './elements/Svg.js'
import Text from './elements/Text.js'
import Tspan from './elements/Tspan.js'
import * as defaults from './modules/core/defaults.js'
+import * as utils from './utils/utils.js'
+import * as namespaces from './modules/core/namespaces.js'
+import * as regex from './modules/core/regex.js'
export {
Morphable,
@@ -56,9 +59,8 @@ export {
NonMorphable
}
-export { defaults }
-export * from './utils/utils.js'
-export * from './modules/core/namespaces.js'
+export { defaults, utils, namespaces, regex }
+export const SVG = makeInstance
export { default as parser } from './modules/core/parser.js'
export { default as find } from './modules/core/selector.js'
export * from './modules/core/event.js'
@@ -73,12 +75,12 @@ export { default as Runner } from './animation/Runner.js'
export { default as Timeline } from './animation/Timeline.js'
/* Types */
-export { default as SVGArray } from './types/SVGArray.js'
+export { default as Array } from './types/SVGArray.js'
export { default as Box } from './types/Box.js'
export { default as Color } from './types/Color.js'
export { default as EventTarget } from './types/EventTarget.js'
export { default as Matrix } from './types/Matrix.js'
-export { default as SVGNumber } from './types/SVGNumber.js'
+export { default as Number } from './types/SVGNumber.js'
export { default as PathArray } from './types/PathArray.js'
export { default as Point } from './types/Point.js'
export { default as PointArray } from './types/PointArray.js'
diff --git a/src/svg.js b/src/svg.js
index 4026598..e88b825 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,5 +1,4 @@
import * as svgMembers from './main.js'
-import * as regex from './modules/core/regex.js'
import { makeInstance } from './utils/adopter'
// The main wrapping element
@@ -8,7 +7,3 @@ export default function SVG (element) {
}
Object.assign(SVG, svgMembers)
-
-SVG.utils = SVG
-SVG.regex = regex
-SVG.get = SVG