- escape colon ":" in i18n token to prevent from been treated incorrectly as key separatoor
- support
ctx
option inblock.manager.get
andblock.class
constructor to share caller context with classes.
- support
syncInit
option inpkg
which enable synchronousinit
call in extend chain.
- remove
index.html
from bundle key and proxy hash key to prevent potential key duplication - when bundling, check if the given path is a directory and add
index.html
to try again if it is. - support debundling of multiple bundles parallelly.
- fix bug: incorrect result from internal i18n translator with empty string
- fix bug: bundler incorrect ignores
http
protocol
- fix bug: default i18n translator may access fields null objects accidentally
- support debundling from packed block with bundle packages.
- support
autoTransform
ininstance.attach
. expected to be defaulti18n
in future upgrade. - add event handling mechanism in
block.i18n.module
with an expected eventlanguageChanged
.
- update
@plotdb/rescope
dependency version to5.0.6
- upgrade peerDependencies and dependencies
- fix bug:
block.i18n
should keep the original textt
to return if translation is not found.
- fix bug: fallback i18n transformer doesn't support keySeparator
- init parent field of internal context object right at initialization.
- fix bug: i18n api should also accept the interpolation object.
- fix bug: will try using
fs
once defined even in browser.
- fix bug:
_ref
pollutes the input bid. - upgrade peer dependencies rescope and csscope
- upgrade peer dependencies rescope and csscope
- fix bug:
id()
should generate path depending on the type in bid. - fix bug:
document
should bedoc
in debundler - support bundling of
block
type files. registry
should not return Promise now, and should considerurl
parameter now.registry.fetch
accepts and should considerurl
fromregistry.url
now.- remove undocumented
fetch
option. - fix bug: 2 Promise.rejects are wrapped when fetch fails, and thus one of them is always uncaught
- add
rel="block"
in the bundled template
- fix bug:
bundle
should not modify input list - breaking change of dev feature: return block dependencies and code in
bundle
- fix bug: remove
code
from dummy depcss-cache to eliminate redundant bundling
- fix bug: debundle nothing injects text
undefined
in document. - by default don't display the debundle container
- upgrade package to fix vulnerability in dependency
- fix bug: paths in block css are not transformed correctly when debundling
- fix bug: debundle of nothing should not fail
- properly scope script
- fix bug: css path transformation should not work on data url
- replace unnecessary
parse-name-string
withid2obj
- fix bug: ns omitted in block id inheritance
- use error generator function to generate errors
- restructure code for node / browser and bundler
- upgrade dependencies
- fix bug: incorrect loop index when getting interface from instance
- support interface retrieval recursively
- provide
parent
directly in internal js context object - provide
_instance
object only if the corresponding class matches. - remove
update
function since it's in TBD state
- fix bug: inferred block feature should not work on identifier with only
url
field.
- rewrite buggy circular extend detection code
- throw exception when circular extend detected
- remove useless code
- make
bundle.js
a clone ofindex.js
withbundle
function
- upgrade modules
- separate bundle method into standalone file
- support inferred block name / version
- also consider
ns
in block.id
- audit fix for vulnerabilities fixing
- bug fix: fix typo from
console.log warn
toconsole.warn
- pass
path
into instance. - support
defer
inattach
- support
language
inblock.i18n
- support
getLanguage
in i18n object passed to block js
- bug fix:
id-to-obj
should beid2obj
in debundle function.
- bug fix: transformation cross block boundary leads unexpected i18n result.
- bug fix: i18n transformation doesn't propagate correctly through base blocks.
- fix bug:
from
failed due to incorrect code parsing.
- add
manager.from
support, shorthand for block instance generation - extend
block.create
function with additional root option for directly attaching
- downgrade
node-fetch
back tov2.6.7
to make it work in nodejs - add
id2obj
function - bug fix:
id2obj
parsing may be wrong due tons
- add
id2obj
test
- provide a method for generating id based on input object.
- add
ns
( namespace ) support in block definition.ns
defaults to ``
- bug fix: remove accidentally added log
- support path translation in HTML with
path
andpath-*
attribute. - support path translation in JS with
path
function. - support path translation in style.
- bug fix: translation of non-string value may fail.
- convert value for translation to string to error in prevent i18n module
- support dom interpolation from container content
- fix bug: i18n doesn't work due to colon in id. use an alternative
_id_t
without colon for i18n scope.
- default empty in version when building id
- support semantic versioning with ranges.
- support custom registry that return content + version directly.
- use minimized dist file as main / browser default file
- remove livescript header in generated js
- upgrade modules
- patch test code to make it work with upgraded modules
- remove assets files from git
- release with compact directory structure
- upgrade
@plotdb/csscope
and@plotdb/rescope
dependencies - add
manager
in payload for block script to use for recursive block loading
- a
module
object is provided to block js, which can be used to export block defition. - dedup blocks in bundler
- fix typo in id generation
- properly wrap js code in bundler to prevent from syntax error
- still provide cache information in csscope so it won't still fetch CSS from registry
- upgrade rescope and csscope
- add a dummy
transform
function for (re)transform DOM - support re-translate for i18n transformation
- expose
changeLanguage
in block.i18n for interface abstraction
- fix bug: script in inline bundle doesn't run, because the passed object may be function.
- fix by running it if it's a function.
- support rescope.dual-context for multi-phase lib loading bug fixing
- rename
block.js
toindex.js
- removeblock.js
andblock.min.js
- upgrade proxise for nodejs support
- fix typo "console.log warn" to "console.warn"
- minimize js file further with
-c -m
option - trim block code in case of unwanted text children
- support constructing block.class based on DOM Node
- support DOM Node as constructor parameter
- use base64-ed id as scope name
- only scope CSS if
@style
is available - support nodejs context
- remove ldquery dependency
main
as default version since latest / main(version in use) are different concept- support rescope v3 and v4
- remove ldquery dependency
- dont use
t-attr
for attribute i18n since it only works for single attribute. use t-xxx instead. - use
textContent
for i18n if attribute value fort
is not available. - support recursive i18n transformation
- while giving warning, still try to make multi-root DOM works.
- give warning when block DOM root is a non-element.
- remove
dompurify
dependency. - adopt new csscope spec
- fix bug:
block
overwritten by local variable inregistry
- fix bug: passing function to block.manager's
registry
doesn't work.
- defer block.class initialization until create since we may not use an added block eventually.
- add
before
parameter inattach
for insertBefore style attachment. - remove useless
index.css
since users can design their own style - fix bug: peer dependencies version incorrect
- fix bug: setting registry uses incorrect parameter for updating
_reg
- warn when block.class is constructed without
manager
.
- simplify config by replacing
registry
withregistry.block
andmoduleRegistry
withregistry.lib
.- if only
registry.lib
is provided, it will be used also forregistry.block
.
- if only
- support
type
in registry by passing type asblock
when requesting block modules. - accept additional param
type
in registry function for distinguishingjs
,css
,block
and others. - rename
setRegistry
toregistry
. - rename internal variable
reg
to_reg
. - rename
set-fallback
tochain
- rename internal variable
fallback
to_chain
.
- fix bug: skip
undefined
when translating
- fix bug: csscope in block.manager should be
csscope.manager
- fix dependency loading: detect resource type automatically before resource loading.
- fix csscope upgrade mistake in package.json
- support module style(
{name,version,path}
) style url - support customizing
registry
in rescope and csscope - rename
block.class
'scsscope
tocsscopes
to better distinguish it fromblock.manager
scsscope
.
- fix rescope upgrade mistake in package.json
- upgrade rescope to
2.0.1
- add
i18n.addResourceBundles
in block.instance for dynamically adding i18n resources.
- show block name/version/path when init fail
- bug fix: add missing
e
in exception handler in manager get function - bug fix: in manager, ensure object exist before storing cache data in it
- add concept of
path
in block definition - add concept of
fallback
andfetch
in block.mananger - use name and version from constructing instead of from module pkg metadata, so the name/version/path data is consistnent and we don't have to define
- fix bug: rid.hash is not defined before using.
- fix bug: global CSS rules from base class are not applied
- fix bug: should by-pass scope which style is not extended
- remove useless
extend
option inblock.class
constructor. - add
style
inextend
similar todom
but applied on style. - fix bug: block.class.init should also wait for extended class initialization (recursively)
- add
id
for block.class in replace of manual composition of name and version. - tweak code flow and remove unnecessary check.
- add
overwrite
value in {pkg: {extend: {dom}}} for replacing currentfalse
behavior. - add DOM transformer for i18n. transformer design is tentative and will probably be changed in the future.
- fix bug: block should be scoped in base block's scope too.
- add i18n support
- fix bug: incorrect
parent
parameter ininit
function.
- upgrade rescope version to solve scoped / global conflict issue.
- add
block.init
for initialization ( such as rescope.init ) when needed, and init block in block.class since block.class can be used independently to block.manager.
- support headless block.
- support dom overwrite mode ( don't extend dom ) in block extension.
- fix bug: interface default
{}
if not provided. - add simple headless block and test case.
- support global css library
- upgrade modules
- proxisify block.class
get
to prevent multiple get and multiple scope id for the same block.
- support css library
- fix bug: create block class with data will fail.
- get context based on
_ctx
instead of lib urls so base class context can propagate.
- make child block alters and inherits base block's dependencies.
- use
lderror
instead ofldError
- upgrade modules
- access optional data in instance create and attach method. data is also passed to factory methods.
- interface is now get from descendant instead of ancestor, to prevent confusion.
- upgrade proxise and template for bug fixing and vulnerabilites resolving
- return promise in pubsub
fire
function. - return promise in block.instance
run
function. - separate
init
from the constructor offactory
.
- support function defined block script.
- support both function and object as the interface member of block script.
- make
extend
work when defined inpkg
field.
- update peerDependency version of proxise
- remove postinstall since it's for development.