@mdfriday/foundry 25.11.11 → 25.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -12
- package/dist/internal/application/incremental-build-coordinator.d.ts +3 -32
- package/dist/internal/application/incremental-ssg.d.ts +0 -5
- package/dist/internal/application/ssg.d.ts +7 -23
- package/dist/internal/domain/config/entity/config.d.ts +1 -36
- package/dist/internal/domain/config/entity/dir.d.ts +0 -1
- package/dist/internal/domain/config/entity/language.d.ts +0 -52
- package/dist/internal/domain/config/entity/module.d.ts +0 -37
- package/dist/internal/domain/config/entity/root.d.ts +0 -40
- package/dist/internal/domain/config/entity/service.d.ts +0 -37
- package/dist/internal/domain/config/entity/social.d.ts +0 -44
- package/dist/internal/domain/config/entity/taxonomy.d.ts +0 -40
- package/dist/internal/domain/config/factory/config.d.ts +1 -5
- package/dist/internal/domain/config/factory/loader.d.ts +0 -25
- package/dist/internal/domain/config/factory/provider.d.ts +0 -11
- package/dist/internal/domain/config/factory/sourcedescriptor.d.ts +1 -14
- package/dist/internal/domain/config/index.d.ts +0 -1
- package/dist/internal/domain/config/tests/mock-fs.d.ts +1 -2
- package/dist/internal/domain/config/type.d.ts +0 -49
- package/dist/internal/domain/config/vo/language.d.ts +0 -7
- package/dist/internal/domain/config/vo/module.d.ts +0 -10
- package/dist/internal/domain/config/vo/root.d.ts +0 -7
- package/dist/internal/domain/config/vo/service.d.ts +0 -7
- package/dist/internal/domain/config/vo/social.d.ts +0 -17
- package/dist/internal/domain/config/vo/taxonomy.d.ts +0 -13
- package/dist/internal/domain/content/entity/content.d.ts +1 -38
- package/dist/internal/domain/content/entity/converter.d.ts +2 -3
- package/dist/internal/domain/content/entity/index.d.ts +0 -1
- package/dist/internal/domain/content/entity/page.d.ts +8 -13
- package/dist/internal/domain/content/entity/pagebuilder.d.ts +0 -84
- package/dist/internal/domain/content/entity/pagecollector.d.ts +1 -5
- package/dist/internal/domain/content/entity/pagecontent.d.ts +1 -16
- package/dist/internal/domain/content/entity/pagelayout.d.ts +0 -1
- package/dist/internal/domain/content/entity/pagemap.d.ts +1 -71
- package/dist/internal/domain/content/entity/pagemeta.d.ts +1 -2
- package/dist/internal/domain/content/entity/pageoutput.d.ts +3 -4
- package/dist/internal/domain/content/entity/pagesource.d.ts +0 -38
- package/dist/internal/domain/content/entity/pagetrees.d.ts +1 -14
- package/dist/internal/domain/content/entity/paginator.d.ts +1 -21
- package/dist/internal/domain/content/entity/section.d.ts +1 -17
- package/dist/internal/domain/content/entity/shifter.d.ts +1 -2
- package/dist/internal/domain/content/entity/shifterpage.d.ts +1 -2
- package/dist/internal/domain/content/entity/shifterpagesource.d.ts +1 -2
- package/dist/internal/domain/content/entity/shortcode.d.ts +1 -41
- package/dist/internal/domain/content/entity/standalone.d.ts +1 -11
- package/dist/internal/domain/content/entity/taxonomy.d.ts +1 -17
- package/dist/internal/domain/content/entity/term.d.ts +1 -8
- package/dist/internal/domain/content/entity/translator.d.ts +0 -23
- package/dist/internal/domain/content/factory/hub.d.ts +0 -1
- package/dist/internal/domain/content/index.d.ts +0 -1
- package/dist/internal/domain/content/type.d.ts +4 -11
- package/dist/internal/domain/content/vo/classifier.d.ts +0 -25
- package/dist/internal/domain/content/vo/fileinfo.d.ts +2 -3
- package/dist/internal/domain/content/vo/frontmatter.d.ts +0 -66
- package/dist/internal/domain/content/vo/identity.d.ts +0 -1
- package/dist/internal/domain/content/vo/kind.d.ts +0 -11
- package/dist/internal/domain/content/vo/sort.d.ts +0 -13
- package/dist/internal/domain/fs/entity/basefs.d.ts +0 -24
- package/dist/internal/domain/fs/entity/fs.d.ts +1 -15
- package/dist/internal/domain/fs/entity/originfs.d.ts +0 -7
- package/dist/internal/domain/fs/entity/overlaydir.d.ts +0 -45
- package/dist/internal/domain/fs/entity/overlayfs.d.ts +1 -81
- package/dist/internal/domain/fs/entity/service.d.ts +0 -16
- package/dist/internal/domain/fs/factory/fs.d.ts +0 -5
- package/dist/internal/domain/fs/index.d.ts +0 -1
- package/dist/internal/domain/fs/type.d.ts +0 -96
- package/dist/internal/domain/fs/vo/dir.d.ts +0 -42
- package/dist/internal/domain/fs/vo/file.d.ts +0 -29
- package/dist/internal/domain/fs/vo/fileinfo.d.ts +0 -24
- package/dist/internal/domain/fs/vo/filemeta.d.ts +0 -46
- package/dist/internal/domain/fs/vo/filesystemscollector.d.ts +0 -18
- package/dist/internal/domain/fs/vo/filevitural.d.ts +1 -10
- package/dist/internal/domain/fs/vo/incremental-file-collector.d.ts +0 -1
- package/dist/internal/domain/fs/vo/osfs.d.ts +0 -13
- package/dist/internal/domain/fs/vo/overlay-factory.d.ts +1 -6
- package/dist/internal/domain/fs/vo/overlayfs-factory.d.ts +0 -43
- package/dist/internal/domain/fs/vo/overlayoptions.d.ts +0 -45
- package/dist/internal/domain/fs/vo/static-copier.d.ts +0 -23
- package/dist/internal/domain/fs/vo/walkway.d.ts +0 -23
- package/dist/internal/domain/markdown/entity/markdown.d.ts +0 -36
- package/dist/internal/domain/markdown/factory/markdown.d.ts +0 -1
- package/dist/internal/domain/markdown/index.d.ts +0 -1
- package/dist/internal/domain/markdown/type.d.ts +1 -161
- package/dist/internal/domain/markdown/vo/config.d.ts +0 -49
- package/dist/internal/domain/markdown/vo/content.d.ts +3 -96
- package/dist/internal/domain/markdown/vo/context.d.ts +0 -10
- package/dist/internal/domain/markdown/vo/highlight.d.ts +0 -16
- package/dist/internal/domain/markdown/vo/pageparser.d.ts +2 -12
- package/dist/internal/domain/markdown/vo/parseinfo.d.ts +2 -39
- package/dist/internal/domain/markdown/vo/parserresult.d.ts +0 -7
- package/dist/internal/domain/markdown/vo/shortcode.d.ts +3 -31
- package/dist/internal/domain/markdown/vo/tableofcontents.d.ts +0 -22
- package/dist/internal/domain/module/entity/lang.d.ts +0 -13
- package/dist/internal/domain/module/entity/module.d.ts +2 -70
- package/dist/internal/domain/module/factory/module.d.ts +0 -7
- package/dist/internal/domain/module/index.d.ts +0 -1
- package/dist/internal/domain/module/type.d.ts +0 -59
- package/dist/internal/domain/module/vo/cache.d.ts +0 -49
- package/dist/internal/domain/module/vo/httpclient.d.ts +0 -15
- package/dist/internal/domain/module/vo/module.d.ts +0 -77
- package/dist/internal/domain/module/vo/mount.d.ts +0 -40
- package/dist/internal/domain/module/vo/themes.d.ts +0 -39
- package/dist/internal/domain/module/vo/zipextractor.d.ts +1 -33
- package/dist/internal/domain/paths/entity/path.d.ts +0 -29
- package/dist/internal/domain/paths/factory/pathfactory.d.ts +0 -83
- package/dist/internal/domain/paths/index.d.ts +0 -1
- package/dist/internal/domain/paths/type.d.ts +0 -133
- package/dist/internal/domain/paths/vo/pathcomponents.d.ts +0 -95
- package/dist/internal/domain/paths/vo/pathparser.d.ts +0 -76
- package/dist/internal/domain/resources/entity/http.d.ts +0 -12
- package/dist/internal/domain/resources/entity/integrity.d.ts +0 -5
- package/dist/internal/domain/resources/entity/minifier.d.ts +0 -5
- package/dist/internal/domain/resources/entity/publisher.d.ts +0 -25
- package/dist/internal/domain/resources/entity/resource.d.ts +3 -8
- package/dist/internal/domain/resources/entity/resources.d.ts +0 -41
- package/dist/internal/domain/resources/entity/template.d.ts +0 -5
- package/dist/internal/domain/resources/factory/resource.d.ts +0 -5
- package/dist/internal/domain/resources/index.d.ts +0 -1
- package/dist/internal/domain/resources/type.d.ts +2 -3
- package/dist/internal/domain/resources/valueobject/resourcemetadata.d.ts +0 -1
- package/dist/internal/domain/resources/valueobject/resourcepaths.d.ts +0 -1
- package/dist/internal/domain/resources/valueobject/transformation.d.ts +0 -1
- package/dist/internal/domain/site/entity/language.d.ts +0 -56
- package/dist/internal/domain/site/entity/menu-builder.d.ts +1 -52
- package/dist/internal/domain/site/entity/navigation.d.ts +0 -9
- package/dist/internal/domain/site/entity/page.d.ts +9 -55
- package/dist/internal/domain/site/entity/pager.d.ts +2 -9
- package/dist/internal/domain/site/entity/publisher.d.ts +0 -27
- package/dist/internal/domain/site/entity/ref.d.ts +0 -28
- package/dist/internal/domain/site/entity/site.d.ts +2 -117
- package/dist/internal/domain/site/entity/taxonomies-builder.d.ts +1 -2
- package/dist/internal/domain/site/entity/url.d.ts +0 -1
- package/dist/internal/domain/site/factory/navigation-factory.d.ts +0 -7
- package/dist/internal/domain/site/factory/site.d.ts +0 -5
- package/dist/internal/domain/site/type.d.ts +0 -101
- package/dist/internal/domain/site/valueobject/author.d.ts +1 -18
- package/dist/internal/domain/site/valueobject/baseurl.d.ts +0 -40
- package/dist/internal/domain/site/valueobject/menu.d.ts +0 -50
- package/dist/internal/domain/site/valueobject/organization.d.ts +3 -41
- package/dist/internal/domain/site/valueobject/version.d.ts +0 -15
- package/dist/internal/domain/template/entity/executor.d.ts +0 -23
- package/dist/internal/domain/template/entity/lookup.d.ts +0 -56
- package/dist/internal/domain/template/entity/parser.d.ts +1 -42
- package/dist/internal/domain/template/entity/template.d.ts +0 -88
- package/dist/internal/domain/template/factory/template.d.ts +0 -62
- package/dist/internal/domain/template/index.d.ts +0 -1
- package/dist/internal/domain/template/type.d.ts +1 -111
- package/dist/internal/domain/template/vo/baseof.d.ts +0 -48
- package/dist/internal/domain/template/vo/info.d.ts +0 -29
- package/dist/internal/domain/template/vo/namespace.d.ts +0 -92
- package/dist/internal/domain/template/vo/registry.d.ts +0 -161
- package/dist/pkg/cahce/cache.d.ts +0 -57
- package/dist/pkg/cast/cast.d.ts +0 -1
- package/dist/pkg/cast/index.d.ts +0 -1
- package/dist/pkg/doctree/dimensions.d.ts +0 -1
- package/dist/pkg/doctree/index.d.ts +0 -1
- package/dist/pkg/doctree/nodeshifttree.d.ts +0 -1
- package/dist/pkg/doctree/simpletree.d.ts +0 -1
- package/dist/pkg/doctree/support.d.ts +0 -1
- package/dist/pkg/doctree/treeshifttree.d.ts +0 -1
- package/dist/pkg/lang/data.d.ts +0 -22
- package/dist/pkg/lang/index.d.ts +0 -47
- package/dist/pkg/lang/service.d.ts +0 -50
- package/dist/pkg/lang/types.d.ts +0 -30
- package/dist/pkg/log/http.d.ts +0 -17
- package/dist/pkg/log/index.d.ts +0 -1
- package/dist/pkg/log/logger.d.ts +0 -1
- package/dist/pkg/log/manager.d.ts +0 -58
- package/dist/pkg/log/types.d.ts +0 -1
- package/dist/pkg/maps/scratch.d.ts +0 -26
- package/dist/pkg/md/parser/item.d.ts +3 -4
- package/dist/pkg/md/parser/pagelexer.d.ts +0 -1
- package/dist/pkg/md/parser/pageparser.d.ts +0 -1
- package/dist/pkg/media/buildin.d.ts +0 -1
- package/dist/pkg/media/type.d.ts +0 -20
- package/dist/pkg/paths/index.d.ts +0 -10
- package/dist/pkg/radix/index.d.ts +0 -1
- package/dist/pkg/radix/radix.d.ts +0 -1
- package/dist/pkg/string/index.d.ts +0 -1
- package/dist/pkg/string/string.d.ts +0 -1
- package/dist/pkg/text/index.d.ts +0 -5
- package/dist/pkg/types/index.d.ts +0 -1
- package/dist/pkg/types/types.d.ts +0 -1
- package/dist/pkg/web/server/electron-livereload-server.d.ts +0 -1
- package/dist/pkg/web/server/index.d.ts +0 -1
- package/dist/pkg/web/server/livereload-server.d.ts +0 -8
- package/dist/pkg/web/server/types.d.ts +0 -1
- package/dist/pkg/web/watcher/content-file-watcher.d.ts +0 -1
- package/dist/pkg/web/watcher/types.d.ts +0 -1
- package/package.json +7 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/application/incremental-build-coordinator.d.ts.map +0 -1
- package/dist/internal/application/incremental-build-coordinator.js +0 -194
- package/dist/internal/application/incremental-build-coordinator.js.map +0 -1
- package/dist/internal/application/incremental-ssg.d.ts.map +0 -1
- package/dist/internal/application/incremental-ssg.js +0 -23
- package/dist/internal/application/incremental-ssg.js.map +0 -1
- package/dist/internal/application/ssg.d.ts.map +0 -1
- package/dist/internal/application/ssg.js +0 -611
- package/dist/internal/application/ssg.js.map +0 -1
- package/dist/internal/domain/config/entity/config.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/config.js +0 -110
- package/dist/internal/domain/config/entity/config.js.map +0 -1
- package/dist/internal/domain/config/entity/dir.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/dir.js +0 -37
- package/dist/internal/domain/config/entity/dir.js.map +0 -1
- package/dist/internal/domain/config/entity/language.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/language.js +0 -154
- package/dist/internal/domain/config/entity/language.js.map +0 -1
- package/dist/internal/domain/config/entity/module.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/module.js +0 -83
- package/dist/internal/domain/config/entity/module.js.map +0 -1
- package/dist/internal/domain/config/entity/root.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/root.js +0 -107
- package/dist/internal/domain/config/entity/root.js.map +0 -1
- package/dist/internal/domain/config/entity/service.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/service.js +0 -92
- package/dist/internal/domain/config/entity/service.js.map +0 -1
- package/dist/internal/domain/config/entity/social.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/social.js +0 -127
- package/dist/internal/domain/config/entity/social.js.map +0 -1
- package/dist/internal/domain/config/entity/taxonomy.d.ts.map +0 -1
- package/dist/internal/domain/config/entity/taxonomy.js +0 -104
- package/dist/internal/domain/config/entity/taxonomy.js.map +0 -1
- package/dist/internal/domain/config/factory/config.d.ts.map +0 -1
- package/dist/internal/domain/config/factory/config.js +0 -96
- package/dist/internal/domain/config/factory/config.js.map +0 -1
- package/dist/internal/domain/config/factory/loader.d.ts.map +0 -1
- package/dist/internal/domain/config/factory/loader.js +0 -207
- package/dist/internal/domain/config/factory/loader.js.map +0 -1
- package/dist/internal/domain/config/factory/provider.d.ts.map +0 -1
- package/dist/internal/domain/config/factory/provider.js +0 -208
- package/dist/internal/domain/config/factory/provider.js.map +0 -1
- package/dist/internal/domain/config/factory/sourcedescriptor.d.ts.map +0 -1
- package/dist/internal/domain/config/factory/sourcedescriptor.js +0 -27
- package/dist/internal/domain/config/factory/sourcedescriptor.js.map +0 -1
- package/dist/internal/domain/config/index.d.ts.map +0 -1
- package/dist/internal/domain/config/index.js +0 -52
- package/dist/internal/domain/config/index.js.map +0 -1
- package/dist/internal/domain/config/tests/entity-config.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/entity-config.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/entity-config.test.js +0 -201
- package/dist/internal/domain/config/tests/entity-config.test.js.map +0 -1
- package/dist/internal/domain/config/tests/entity-root.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/entity-root.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/entity-root.test.js +0 -235
- package/dist/internal/domain/config/tests/entity-root.test.js.map +0 -1
- package/dist/internal/domain/config/tests/factory-config.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/factory-config.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/factory-config.test.js +0 -84
- package/dist/internal/domain/config/tests/factory-config.test.js.map +0 -1
- package/dist/internal/domain/config/tests/index.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/index.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/index.test.js +0 -195
- package/dist/internal/domain/config/tests/index.test.js.map +0 -1
- package/dist/internal/domain/config/tests/mock-fs.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/mock-fs.js +0 -281
- package/dist/internal/domain/config/tests/mock-fs.js.map +0 -1
- package/dist/internal/domain/config/tests/social.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/social.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/social.test.js +0 -164
- package/dist/internal/domain/config/tests/social.test.js.map +0 -1
- package/dist/internal/domain/config/tests/type.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/type.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/type.test.js +0 -276
- package/dist/internal/domain/config/tests/type.test.js.map +0 -1
- package/dist/internal/domain/config/tests/vo-module.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/vo-module.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/vo-module.test.js +0 -267
- package/dist/internal/domain/config/tests/vo-module.test.js.map +0 -1
- package/dist/internal/domain/config/tests/vo-root.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/vo-root.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/vo-root.test.js +0 -165
- package/dist/internal/domain/config/tests/vo-root.test.js.map +0 -1
- package/dist/internal/domain/config/tests/vo-service.test.d.ts +0 -2
- package/dist/internal/domain/config/tests/vo-service.test.d.ts.map +0 -1
- package/dist/internal/domain/config/tests/vo-service.test.js +0 -216
- package/dist/internal/domain/config/tests/vo-service.test.js.map +0 -1
- package/dist/internal/domain/config/type.d.ts.map +0 -1
- package/dist/internal/domain/config/type.js +0 -24
- package/dist/internal/domain/config/type.js.map +0 -1
- package/dist/internal/domain/config/vo/language.d.ts.map +0 -1
- package/dist/internal/domain/config/vo/language.js +0 -53
- package/dist/internal/domain/config/vo/language.js.map +0 -1
- package/dist/internal/domain/config/vo/module.d.ts.map +0 -1
- package/dist/internal/domain/config/vo/module.js +0 -44
- package/dist/internal/domain/config/vo/module.js.map +0 -1
- package/dist/internal/domain/config/vo/root.d.ts.map +0 -1
- package/dist/internal/domain/config/vo/root.js +0 -72
- package/dist/internal/domain/config/vo/root.js.map +0 -1
- package/dist/internal/domain/config/vo/service.d.ts.map +0 -1
- package/dist/internal/domain/config/vo/service.js +0 -52
- package/dist/internal/domain/config/vo/service.js.map +0 -1
- package/dist/internal/domain/config/vo/social.d.ts.map +0 -1
- package/dist/internal/domain/config/vo/social.js +0 -212
- package/dist/internal/domain/config/vo/social.js.map +0 -1
- package/dist/internal/domain/config/vo/taxonomy.d.ts.map +0 -1
- package/dist/internal/domain/config/vo/taxonomy.js +0 -68
- package/dist/internal/domain/config/vo/taxonomy.js.map +0 -1
- package/dist/internal/domain/content/entity/content.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/content.js +0 -313
- package/dist/internal/domain/content/entity/content.js.map +0 -1
- package/dist/internal/domain/content/entity/converter.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/converter.js +0 -23
- package/dist/internal/domain/content/entity/converter.js.map +0 -1
- package/dist/internal/domain/content/entity/index.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/index.js +0 -21
- package/dist/internal/domain/content/entity/index.js.map +0 -1
- package/dist/internal/domain/content/entity/page.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/page.js +0 -433
- package/dist/internal/domain/content/entity/page.js.map +0 -1
- package/dist/internal/domain/content/entity/pagebuilder.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagebuilder.js +0 -557
- package/dist/internal/domain/content/entity/pagebuilder.js.map +0 -1
- package/dist/internal/domain/content/entity/pagecollector.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagecollector.js +0 -111
- package/dist/internal/domain/content/entity/pagecollector.js.map +0 -1
- package/dist/internal/domain/content/entity/pagecontent.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagecontent.js +0 -75
- package/dist/internal/domain/content/entity/pagecontent.js.map +0 -1
- package/dist/internal/domain/content/entity/pagelayout.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagelayout.js +0 -73
- package/dist/internal/domain/content/entity/pagelayout.js.map +0 -1
- package/dist/internal/domain/content/entity/pagemap.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagemap.js +0 -496
- package/dist/internal/domain/content/entity/pagemap.js.map +0 -1
- package/dist/internal/domain/content/entity/pagemeta.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagemeta.js +0 -74
- package/dist/internal/domain/content/entity/pagemeta.js.map +0 -1
- package/dist/internal/domain/content/entity/pageoutput.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pageoutput.js +0 -136
- package/dist/internal/domain/content/entity/pageoutput.js.map +0 -1
- package/dist/internal/domain/content/entity/pagesource.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagesource.js +0 -168
- package/dist/internal/domain/content/entity/pagesource.js.map +0 -1
- package/dist/internal/domain/content/entity/pagetrees.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/pagetrees.js +0 -265
- package/dist/internal/domain/content/entity/pagetrees.js.map +0 -1
- package/dist/internal/domain/content/entity/paginator.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/paginator.js +0 -270
- package/dist/internal/domain/content/entity/paginator.js.map +0 -1
- package/dist/internal/domain/content/entity/section.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/section.js +0 -120
- package/dist/internal/domain/content/entity/section.js.map +0 -1
- package/dist/internal/domain/content/entity/shifter.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/shifter.js +0 -36
- package/dist/internal/domain/content/entity/shifter.js.map +0 -1
- package/dist/internal/domain/content/entity/shifterpage.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/shifterpage.js +0 -20
- package/dist/internal/domain/content/entity/shifterpage.js.map +0 -1
- package/dist/internal/domain/content/entity/shifterpagesource.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/shifterpagesource.js +0 -21
- package/dist/internal/domain/content/entity/shifterpagesource.js.map +0 -1
- package/dist/internal/domain/content/entity/shortcode.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/shortcode.js +0 -165
- package/dist/internal/domain/content/entity/shortcode.js.map +0 -1
- package/dist/internal/domain/content/entity/standalone.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/standalone.js +0 -39
- package/dist/internal/domain/content/entity/standalone.js.map +0 -1
- package/dist/internal/domain/content/entity/taxonomy.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/taxonomy.js +0 -131
- package/dist/internal/domain/content/entity/taxonomy.js.map +0 -1
- package/dist/internal/domain/content/entity/term.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/term.js +0 -150
- package/dist/internal/domain/content/entity/term.js.map +0 -1
- package/dist/internal/domain/content/entity/translator.d.ts.map +0 -1
- package/dist/internal/domain/content/entity/translator.js +0 -191
- package/dist/internal/domain/content/entity/translator.js.map +0 -1
- package/dist/internal/domain/content/factory/hub.d.ts.map +0 -1
- package/dist/internal/domain/content/factory/hub.js +0 -46
- package/dist/internal/domain/content/factory/hub.js.map +0 -1
- package/dist/internal/domain/content/index.d.ts.map +0 -1
- package/dist/internal/domain/content/index.js +0 -38
- package/dist/internal/domain/content/index.js.map +0 -1
- package/dist/internal/domain/content/type.d.ts.map +0 -1
- package/dist/internal/domain/content/type.js +0 -16
- package/dist/internal/domain/content/type.js.map +0 -1
- package/dist/internal/domain/content/vo/classifier.d.ts.map +0 -1
- package/dist/internal/domain/content/vo/classifier.js +0 -110
- package/dist/internal/domain/content/vo/classifier.js.map +0 -1
- package/dist/internal/domain/content/vo/fileinfo.d.ts.map +0 -1
- package/dist/internal/domain/content/vo/fileinfo.js +0 -224
- package/dist/internal/domain/content/vo/fileinfo.js.map +0 -1
- package/dist/internal/domain/content/vo/frontmatter.d.ts.map +0 -1
- package/dist/internal/domain/content/vo/frontmatter.js +0 -484
- package/dist/internal/domain/content/vo/frontmatter.js.map +0 -1
- package/dist/internal/domain/content/vo/identity.d.ts.map +0 -1
- package/dist/internal/domain/content/vo/identity.js +0 -47
- package/dist/internal/domain/content/vo/identity.js.map +0 -1
- package/dist/internal/domain/content/vo/kind.d.ts.map +0 -1
- package/dist/internal/domain/content/vo/kind.js +0 -52
- package/dist/internal/domain/content/vo/kind.js.map +0 -1
- package/dist/internal/domain/content/vo/sort.d.ts.map +0 -1
- package/dist/internal/domain/content/vo/sort.js +0 -151
- package/dist/internal/domain/content/vo/sort.js.map +0 -1
- package/dist/internal/domain/fs/entity/basefs.d.ts.map +0 -1
- package/dist/internal/domain/fs/entity/basefs.js +0 -212
- package/dist/internal/domain/fs/entity/basefs.js.map +0 -1
- package/dist/internal/domain/fs/entity/fs.d.ts.map +0 -1
- package/dist/internal/domain/fs/entity/fs.js +0 -115
- package/dist/internal/domain/fs/entity/fs.js.map +0 -1
- package/dist/internal/domain/fs/entity/originfs.d.ts.map +0 -1
- package/dist/internal/domain/fs/entity/originfs.js +0 -30
- package/dist/internal/domain/fs/entity/originfs.js.map +0 -1
- package/dist/internal/domain/fs/entity/overlaydir.d.ts.map +0 -1
- package/dist/internal/domain/fs/entity/overlaydir.js +0 -256
- package/dist/internal/domain/fs/entity/overlaydir.js.map +0 -1
- package/dist/internal/domain/fs/entity/overlayfs.d.ts.map +0 -1
- package/dist/internal/domain/fs/entity/overlayfs.js +0 -310
- package/dist/internal/domain/fs/entity/overlayfs.js.map +0 -1
- package/dist/internal/domain/fs/entity/service.d.ts.map +0 -1
- package/dist/internal/domain/fs/entity/service.js +0 -35
- package/dist/internal/domain/fs/entity/service.js.map +0 -1
- package/dist/internal/domain/fs/factory/fs.d.ts.map +0 -1
- package/dist/internal/domain/fs/factory/fs.js +0 -21
- package/dist/internal/domain/fs/factory/fs.js.map +0 -1
- package/dist/internal/domain/fs/index.d.ts.map +0 -1
- package/dist/internal/domain/fs/index.js +0 -104
- package/dist/internal/domain/fs/index.js.map +0 -1
- package/dist/internal/domain/fs/tests/entity-basefs.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/entity-basefs.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/entity-basefs.test.js +0 -279
- package/dist/internal/domain/fs/tests/entity-basefs.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/entity-fs.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/entity-fs.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/entity-fs.test.js +0 -232
- package/dist/internal/domain/fs/tests/entity-fs.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/entity-originfs.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/entity-originfs.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/entity-originfs.test.js +0 -47
- package/dist/internal/domain/fs/tests/entity-originfs.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/entity-overlaydir.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/entity-overlaydir.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/entity-overlaydir.test.js +0 -293
- package/dist/internal/domain/fs/tests/entity-overlaydir.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/entity-overlayfs.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/entity-overlayfs.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/entity-overlayfs.test.js +0 -281
- package/dist/internal/domain/fs/tests/entity-overlayfs.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/entity-service.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/entity-service.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/entity-service.test.js +0 -43
- package/dist/internal/domain/fs/tests/entity-service.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/factory-fs.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/factory-fs.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/factory-fs.test.js +0 -105
- package/dist/internal/domain/fs/tests/factory-fs.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/type.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/type.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/type.test.js +0 -113
- package/dist/internal/domain/fs/tests/type.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-dir.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-dir.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-dir.test.js +0 -211
- package/dist/internal/domain/fs/tests/vo-dir.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-file.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-file.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-file.test.js +0 -256
- package/dist/internal/domain/fs/tests/vo-file.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-fileinfo.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-fileinfo.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-fileinfo.test.js +0 -165
- package/dist/internal/domain/fs/tests/vo-fileinfo.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-filemeta.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-filemeta.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-filemeta.test.js +0 -171
- package/dist/internal/domain/fs/tests/vo-filemeta.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-filesystemscollector.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-filesystemscollector.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-filesystemscollector.test.js +0 -305
- package/dist/internal/domain/fs/tests/vo-filesystemscollector.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-filevitural.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-filevitural.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-filevitural.test.js +0 -167
- package/dist/internal/domain/fs/tests/vo-filevitural.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-incremental-file-collector.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-incremental-file-collector.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-incremental-file-collector.test.js +0 -396
- package/dist/internal/domain/fs/tests/vo-incremental-file-collector.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-osfs.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-osfs.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-osfs.test.js +0 -363
- package/dist/internal/domain/fs/tests/vo-osfs.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-overlayfs-factory.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-overlayfs-factory.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-overlayfs-factory.test.js +0 -430
- package/dist/internal/domain/fs/tests/vo-overlayfs-factory.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-overlayoptions.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-overlayoptions.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-overlayoptions.test.js +0 -402
- package/dist/internal/domain/fs/tests/vo-overlayoptions.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-static-copier.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-static-copier.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-static-copier.test.js +0 -320
- package/dist/internal/domain/fs/tests/vo-static-copier.test.js.map +0 -1
- package/dist/internal/domain/fs/tests/vo-walkway.test.d.ts +0 -2
- package/dist/internal/domain/fs/tests/vo-walkway.test.d.ts.map +0 -1
- package/dist/internal/domain/fs/tests/vo-walkway.test.js +0 -295
- package/dist/internal/domain/fs/tests/vo-walkway.test.js.map +0 -1
- package/dist/internal/domain/fs/type.d.ts.map +0 -1
- package/dist/internal/domain/fs/type.js +0 -54
- package/dist/internal/domain/fs/type.js.map +0 -1
- package/dist/internal/domain/fs/vo/dir.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/dir.js +0 -101
- package/dist/internal/domain/fs/vo/dir.js.map +0 -1
- package/dist/internal/domain/fs/vo/file.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/file.js +0 -204
- package/dist/internal/domain/fs/vo/file.js.map +0 -1
- package/dist/internal/domain/fs/vo/fileinfo.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/fileinfo.js +0 -109
- package/dist/internal/domain/fs/vo/fileinfo.js.map +0 -1
- package/dist/internal/domain/fs/vo/filemeta.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/filemeta.js +0 -123
- package/dist/internal/domain/fs/vo/filemeta.js.map +0 -1
- package/dist/internal/domain/fs/vo/filesystemscollector.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/filesystemscollector.js +0 -195
- package/dist/internal/domain/fs/vo/filesystemscollector.js.map +0 -1
- package/dist/internal/domain/fs/vo/filevitural.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/filevitural.js +0 -142
- package/dist/internal/domain/fs/vo/filevitural.js.map +0 -1
- package/dist/internal/domain/fs/vo/incremental-file-collector.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/incremental-file-collector.js +0 -43
- package/dist/internal/domain/fs/vo/incremental-file-collector.js.map +0 -1
- package/dist/internal/domain/fs/vo/osfs.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/osfs.js +0 -300
- package/dist/internal/domain/fs/vo/osfs.js.map +0 -1
- package/dist/internal/domain/fs/vo/overlay-factory.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/overlay-factory.js +0 -23
- package/dist/internal/domain/fs/vo/overlay-factory.js.map +0 -1
- package/dist/internal/domain/fs/vo/overlayfs-factory.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/overlayfs-factory.js +0 -125
- package/dist/internal/domain/fs/vo/overlayfs-factory.js.map +0 -1
- package/dist/internal/domain/fs/vo/overlayoptions.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/overlayoptions.js +0 -141
- package/dist/internal/domain/fs/vo/overlayoptions.js.map +0 -1
- package/dist/internal/domain/fs/vo/static-copier.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/static-copier.js +0 -175
- package/dist/internal/domain/fs/vo/static-copier.js.map +0 -1
- package/dist/internal/domain/fs/vo/walkway.d.ts.map +0 -1
- package/dist/internal/domain/fs/vo/walkway.js +0 -220
- package/dist/internal/domain/fs/vo/walkway.js.map +0 -1
- package/dist/internal/domain/markdown/entity/markdown.d.ts.map +0 -1
- package/dist/internal/domain/markdown/entity/markdown.js +0 -350
- package/dist/internal/domain/markdown/entity/markdown.js.map +0 -1
- package/dist/internal/domain/markdown/factory/markdown.d.ts.map +0 -1
- package/dist/internal/domain/markdown/factory/markdown.js +0 -10
- package/dist/internal/domain/markdown/factory/markdown.js.map +0 -1
- package/dist/internal/domain/markdown/index.d.ts.map +0 -1
- package/dist/internal/domain/markdown/index.js +0 -35
- package/dist/internal/domain/markdown/index.js.map +0 -1
- package/dist/internal/domain/markdown/type.d.ts.map +0 -1
- package/dist/internal/domain/markdown/type.js +0 -19
- package/dist/internal/domain/markdown/type.js.map +0 -1
- package/dist/internal/domain/markdown/vo/config.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/config.js +0 -89
- package/dist/internal/domain/markdown/vo/config.js.map +0 -1
- package/dist/internal/domain/markdown/vo/content.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/content.js +0 -368
- package/dist/internal/domain/markdown/vo/content.js.map +0 -1
- package/dist/internal/domain/markdown/vo/context.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/context.js +0 -119
- package/dist/internal/domain/markdown/vo/context.js.map +0 -1
- package/dist/internal/domain/markdown/vo/highlight.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/highlight.js +0 -164
- package/dist/internal/domain/markdown/vo/highlight.js.map +0 -1
- package/dist/internal/domain/markdown/vo/pageparser.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/pageparser.js +0 -87
- package/dist/internal/domain/markdown/vo/pageparser.js.map +0 -1
- package/dist/internal/domain/markdown/vo/parseinfo.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/parseinfo.js +0 -134
- package/dist/internal/domain/markdown/vo/parseinfo.js.map +0 -1
- package/dist/internal/domain/markdown/vo/parserresult.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/parserresult.js +0 -44
- package/dist/internal/domain/markdown/vo/parserresult.js.map +0 -1
- package/dist/internal/domain/markdown/vo/shortcode.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/shortcode.js +0 -319
- package/dist/internal/domain/markdown/vo/shortcode.js.map +0 -1
- package/dist/internal/domain/markdown/vo/tableofcontents.d.ts.map +0 -1
- package/dist/internal/domain/markdown/vo/tableofcontents.js +0 -239
- package/dist/internal/domain/markdown/vo/tableofcontents.js.map +0 -1
- package/dist/internal/domain/module/entity/lang.d.ts.map +0 -1
- package/dist/internal/domain/module/entity/lang.js +0 -43
- package/dist/internal/domain/module/entity/lang.js.map +0 -1
- package/dist/internal/domain/module/entity/module.d.ts.map +0 -1
- package/dist/internal/domain/module/entity/module.js +0 -530
- package/dist/internal/domain/module/entity/module.js.map +0 -1
- package/dist/internal/domain/module/factory/module.d.ts.map +0 -1
- package/dist/internal/domain/module/factory/module.js +0 -51
- package/dist/internal/domain/module/factory/module.js.map +0 -1
- package/dist/internal/domain/module/index.d.ts.map +0 -1
- package/dist/internal/domain/module/index.js +0 -69
- package/dist/internal/domain/module/index.js.map +0 -1
- package/dist/internal/domain/module/type.d.ts.map +0 -1
- package/dist/internal/domain/module/type.js +0 -53
- package/dist/internal/domain/module/type.js.map +0 -1
- package/dist/internal/domain/module/vo/cache.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/cache.js +0 -266
- package/dist/internal/domain/module/vo/cache.js.map +0 -1
- package/dist/internal/domain/module/vo/httpclient.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/httpclient.js +0 -258
- package/dist/internal/domain/module/vo/httpclient.js.map +0 -1
- package/dist/internal/domain/module/vo/module.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/module.js +0 -305
- package/dist/internal/domain/module/vo/module.js.map +0 -1
- package/dist/internal/domain/module/vo/mount.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/mount.js +0 -143
- package/dist/internal/domain/module/vo/mount.js.map +0 -1
- package/dist/internal/domain/module/vo/themes.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/themes.js +0 -93
- package/dist/internal/domain/module/vo/themes.js.map +0 -1
- package/dist/internal/domain/module/vo/themes.test.d.ts +0 -2
- package/dist/internal/domain/module/vo/themes.test.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/themes.test.js +0 -113
- package/dist/internal/domain/module/vo/themes.test.js.map +0 -1
- package/dist/internal/domain/module/vo/zipextractor.d.ts.map +0 -1
- package/dist/internal/domain/module/vo/zipextractor.js +0 -251
- package/dist/internal/domain/module/vo/zipextractor.js.map +0 -1
- package/dist/internal/domain/paths/entity/path.d.ts.map +0 -1
- package/dist/internal/domain/paths/entity/path.js +0 -452
- package/dist/internal/domain/paths/entity/path.js.map +0 -1
- package/dist/internal/domain/paths/factory/pathfactory.d.ts.map +0 -1
- package/dist/internal/domain/paths/factory/pathfactory.js +0 -250
- package/dist/internal/domain/paths/factory/pathfactory.js.map +0 -1
- package/dist/internal/domain/paths/index.d.ts.map +0 -1
- package/dist/internal/domain/paths/index.js +0 -94
- package/dist/internal/domain/paths/index.js.map +0 -1
- package/dist/internal/domain/paths/test/factory.test.d.ts +0 -2
- package/dist/internal/domain/paths/test/factory.test.d.ts.map +0 -1
- package/dist/internal/domain/paths/test/factory.test.js +0 -352
- package/dist/internal/domain/paths/test/factory.test.js.map +0 -1
- package/dist/internal/domain/paths/test/integration.test.d.ts +0 -2
- package/dist/internal/domain/paths/test/integration.test.d.ts.map +0 -1
- package/dist/internal/domain/paths/test/integration.test.js +0 -328
- package/dist/internal/domain/paths/test/integration.test.js.map +0 -1
- package/dist/internal/domain/paths/test/pathoperations.test.d.ts +0 -2
- package/dist/internal/domain/paths/test/pathoperations.test.d.ts.map +0 -1
- package/dist/internal/domain/paths/test/pathoperations.test.js +0 -413
- package/dist/internal/domain/paths/test/pathoperations.test.js.map +0 -1
- package/dist/internal/domain/paths/test/pathparser.test.d.ts +0 -2
- package/dist/internal/domain/paths/test/pathparser.test.d.ts.map +0 -1
- package/dist/internal/domain/paths/test/pathparser.test.js +0 -403
- package/dist/internal/domain/paths/test/pathparser.test.js.map +0 -1
- package/dist/internal/domain/paths/type.d.ts.map +0 -1
- package/dist/internal/domain/paths/type.js +0 -85
- package/dist/internal/domain/paths/type.js.map +0 -1
- package/dist/internal/domain/paths/vo/pathcomponents.d.ts.map +0 -1
- package/dist/internal/domain/paths/vo/pathcomponents.js +0 -236
- package/dist/internal/domain/paths/vo/pathcomponents.js.map +0 -1
- package/dist/internal/domain/paths/vo/pathparser.d.ts.map +0 -1
- package/dist/internal/domain/paths/vo/pathparser.js +0 -360
- package/dist/internal/domain/paths/vo/pathparser.js.map +0 -1
- package/dist/internal/domain/resources/entity/http.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/http.js +0 -129
- package/dist/internal/domain/resources/entity/http.js.map +0 -1
- package/dist/internal/domain/resources/entity/integrity.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/integrity.js +0 -114
- package/dist/internal/domain/resources/entity/integrity.js.map +0 -1
- package/dist/internal/domain/resources/entity/minifier.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/minifier.js +0 -121
- package/dist/internal/domain/resources/entity/minifier.js.map +0 -1
- package/dist/internal/domain/resources/entity/publisher.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/publisher.js +0 -162
- package/dist/internal/domain/resources/entity/publisher.js.map +0 -1
- package/dist/internal/domain/resources/entity/resource.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/resource.js +0 -364
- package/dist/internal/domain/resources/entity/resource.js.map +0 -1
- package/dist/internal/domain/resources/entity/resources.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/resources.js +0 -390
- package/dist/internal/domain/resources/entity/resources.js.map +0 -1
- package/dist/internal/domain/resources/entity/template.d.ts.map +0 -1
- package/dist/internal/domain/resources/entity/template.js +0 -139
- package/dist/internal/domain/resources/entity/template.js.map +0 -1
- package/dist/internal/domain/resources/factory/resource.d.ts.map +0 -1
- package/dist/internal/domain/resources/factory/resource.js +0 -12
- package/dist/internal/domain/resources/factory/resource.js.map +0 -1
- package/dist/internal/domain/resources/index.d.ts.map +0 -1
- package/dist/internal/domain/resources/index.js +0 -42
- package/dist/internal/domain/resources/index.js.map +0 -1
- package/dist/internal/domain/resources/type.d.ts.map +0 -1
- package/dist/internal/domain/resources/type.js +0 -3
- package/dist/internal/domain/resources/type.js.map +0 -1
- package/dist/internal/domain/resources/valueobject/resourcemetadata.d.ts.map +0 -1
- package/dist/internal/domain/resources/valueobject/resourcemetadata.js +0 -26
- package/dist/internal/domain/resources/valueobject/resourcemetadata.js.map +0 -1
- package/dist/internal/domain/resources/valueobject/resourcepaths.d.ts.map +0 -1
- package/dist/internal/domain/resources/valueobject/resourcepaths.js +0 -146
- package/dist/internal/domain/resources/valueobject/resourcepaths.js.map +0 -1
- package/dist/internal/domain/resources/valueobject/resourcepaths.test.d.ts +0 -2
- package/dist/internal/domain/resources/valueobject/resourcepaths.test.d.ts.map +0 -1
- package/dist/internal/domain/resources/valueobject/resourcepaths.test.js +0 -53
- package/dist/internal/domain/resources/valueobject/resourcepaths.test.js.map +0 -1
- package/dist/internal/domain/resources/valueobject/transformation.d.ts.map +0 -1
- package/dist/internal/domain/resources/valueobject/transformation.js +0 -43
- package/dist/internal/domain/resources/valueobject/transformation.js.map +0 -1
- package/dist/internal/domain/site/entity/language.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/language.js +0 -177
- package/dist/internal/domain/site/entity/language.js.map +0 -1
- package/dist/internal/domain/site/entity/menu-builder.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/menu-builder.js +0 -351
- package/dist/internal/domain/site/entity/menu-builder.js.map +0 -1
- package/dist/internal/domain/site/entity/navigation.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/navigation.js +0 -90
- package/dist/internal/domain/site/entity/navigation.js.map +0 -1
- package/dist/internal/domain/site/entity/page.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/page.js +0 -637
- package/dist/internal/domain/site/entity/page.js.map +0 -1
- package/dist/internal/domain/site/entity/pager.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/pager.js +0 -117
- package/dist/internal/domain/site/entity/pager.js.map +0 -1
- package/dist/internal/domain/site/entity/publisher.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/publisher.js +0 -142
- package/dist/internal/domain/site/entity/publisher.js.map +0 -1
- package/dist/internal/domain/site/entity/ref.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/ref.js +0 -132
- package/dist/internal/domain/site/entity/ref.js.map +0 -1
- package/dist/internal/domain/site/entity/site.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/site.js +0 -536
- package/dist/internal/domain/site/entity/site.js.map +0 -1
- package/dist/internal/domain/site/entity/taxonomies-builder.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/taxonomies-builder.js +0 -243
- package/dist/internal/domain/site/entity/taxonomies-builder.js.map +0 -1
- package/dist/internal/domain/site/entity/url.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/url.js +0 -209
- package/dist/internal/domain/site/entity/url.js.map +0 -1
- package/dist/internal/domain/site/entity/url.test.d.ts +0 -2
- package/dist/internal/domain/site/entity/url.test.d.ts.map +0 -1
- package/dist/internal/domain/site/entity/url.test.js +0 -98
- package/dist/internal/domain/site/entity/url.test.js.map +0 -1
- package/dist/internal/domain/site/factory/navigation-factory.d.ts.map +0 -1
- package/dist/internal/domain/site/factory/navigation-factory.js +0 -48
- package/dist/internal/domain/site/factory/navigation-factory.js.map +0 -1
- package/dist/internal/domain/site/factory/site.d.ts.map +0 -1
- package/dist/internal/domain/site/factory/site.js +0 -56
- package/dist/internal/domain/site/factory/site.js.map +0 -1
- package/dist/internal/domain/site/type.d.ts.map +0 -1
- package/dist/internal/domain/site/type.js +0 -3
- package/dist/internal/domain/site/type.js.map +0 -1
- package/dist/internal/domain/site/valueobject/author.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/author.js +0 -69
- package/dist/internal/domain/site/valueobject/author.js.map +0 -1
- package/dist/internal/domain/site/valueobject/baseurl.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/baseurl.js +0 -207
- package/dist/internal/domain/site/valueobject/baseurl.js.map +0 -1
- package/dist/internal/domain/site/valueobject/baseurl.test.d.ts +0 -2
- package/dist/internal/domain/site/valueobject/baseurl.test.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/baseurl.test.js +0 -138
- package/dist/internal/domain/site/valueobject/baseurl.test.js.map +0 -1
- package/dist/internal/domain/site/valueobject/menu.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/menu.js +0 -178
- package/dist/internal/domain/site/valueobject/menu.js.map +0 -1
- package/dist/internal/domain/site/valueobject/organization.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/organization.js +0 -123
- package/dist/internal/domain/site/valueobject/organization.js.map +0 -1
- package/dist/internal/domain/site/valueobject/organization.test.d.ts +0 -2
- package/dist/internal/domain/site/valueobject/organization.test.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/organization.test.js +0 -78
- package/dist/internal/domain/site/valueobject/organization.test.js.map +0 -1
- package/dist/internal/domain/site/valueobject/version.d.ts.map +0 -1
- package/dist/internal/domain/site/valueobject/version.js +0 -35
- package/dist/internal/domain/site/valueobject/version.js.map +0 -1
- package/dist/internal/domain/template/entity/executor.d.ts.map +0 -1
- package/dist/internal/domain/template/entity/executor.js +0 -147
- package/dist/internal/domain/template/entity/executor.js.map +0 -1
- package/dist/internal/domain/template/entity/lookup.d.ts.map +0 -1
- package/dist/internal/domain/template/entity/lookup.js +0 -194
- package/dist/internal/domain/template/entity/lookup.js.map +0 -1
- package/dist/internal/domain/template/entity/parser.d.ts.map +0 -1
- package/dist/internal/domain/template/entity/parser.js +0 -336
- package/dist/internal/domain/template/entity/parser.js.map +0 -1
- package/dist/internal/domain/template/entity/template.d.ts.map +0 -1
- package/dist/internal/domain/template/entity/template.js +0 -369
- package/dist/internal/domain/template/entity/template.js.map +0 -1
- package/dist/internal/domain/template/factory/template.d.ts.map +0 -1
- package/dist/internal/domain/template/factory/template.js +0 -213
- package/dist/internal/domain/template/factory/template.js.map +0 -1
- package/dist/internal/domain/template/index.d.ts.map +0 -1
- package/dist/internal/domain/template/index.js +0 -74
- package/dist/internal/domain/template/index.js.map +0 -1
- package/dist/internal/domain/template/type.d.ts.map +0 -1
- package/dist/internal/domain/template/type.js +0 -35
- package/dist/internal/domain/template/type.js.map +0 -1
- package/dist/internal/domain/template/vo/baseof.d.ts.map +0 -1
- package/dist/internal/domain/template/vo/baseof.js +0 -182
- package/dist/internal/domain/template/vo/baseof.js.map +0 -1
- package/dist/internal/domain/template/vo/info.d.ts.map +0 -1
- package/dist/internal/domain/template/vo/info.js +0 -127
- package/dist/internal/domain/template/vo/info.js.map +0 -1
- package/dist/internal/domain/template/vo/namespace.d.ts.map +0 -1
- package/dist/internal/domain/template/vo/namespace.js +0 -262
- package/dist/internal/domain/template/vo/namespace.js.map +0 -1
- package/dist/internal/domain/template/vo/registry.d.ts.map +0 -1
- package/dist/internal/domain/template/vo/registry.js +0 -2835
- package/dist/internal/domain/template/vo/registry.js.map +0 -1
- package/dist/pkg/cahce/cache.d.ts.map +0 -1
- package/dist/pkg/cahce/cache.js +0 -175
- package/dist/pkg/cahce/cache.js.map +0 -1
- package/dist/pkg/cahce/cache.test.d.ts +0 -2
- package/dist/pkg/cahce/cache.test.d.ts.map +0 -1
- package/dist/pkg/cahce/cache.test.js +0 -356
- package/dist/pkg/cahce/cache.test.js.map +0 -1
- package/dist/pkg/cast/cast.d.ts.map +0 -1
- package/dist/pkg/cast/cast.js +0 -42
- package/dist/pkg/cast/cast.js.map +0 -1
- package/dist/pkg/cast/index.d.ts.map +0 -1
- package/dist/pkg/cast/index.js +0 -18
- package/dist/pkg/cast/index.js.map +0 -1
- package/dist/pkg/doctree/dimensions.d.ts.map +0 -1
- package/dist/pkg/doctree/dimensions.js +0 -50
- package/dist/pkg/doctree/dimensions.js.map +0 -1
- package/dist/pkg/doctree/doctree.test.d.ts +0 -2
- package/dist/pkg/doctree/doctree.test.d.ts.map +0 -1
- package/dist/pkg/doctree/doctree.test.js +0 -162
- package/dist/pkg/doctree/doctree.test.js.map +0 -1
- package/dist/pkg/doctree/index.d.ts.map +0 -1
- package/dist/pkg/doctree/index.js +0 -30
- package/dist/pkg/doctree/index.js.map +0 -1
- package/dist/pkg/doctree/nodeshifttree.d.ts.map +0 -1
- package/dist/pkg/doctree/nodeshifttree.js +0 -384
- package/dist/pkg/doctree/nodeshifttree.js.map +0 -1
- package/dist/pkg/doctree/simpletree.d.ts.map +0 -1
- package/dist/pkg/doctree/simpletree.js +0 -119
- package/dist/pkg/doctree/simpletree.js.map +0 -1
- package/dist/pkg/doctree/support.d.ts.map +0 -1
- package/dist/pkg/doctree/support.js +0 -198
- package/dist/pkg/doctree/support.js.map +0 -1
- package/dist/pkg/doctree/treeshifttree.d.ts.map +0 -1
- package/dist/pkg/doctree/treeshifttree.js +0 -87
- package/dist/pkg/doctree/treeshifttree.js.map +0 -1
- package/dist/pkg/lang/data.d.ts.map +0 -1
- package/dist/pkg/lang/data.js +0 -151
- package/dist/pkg/lang/data.js.map +0 -1
- package/dist/pkg/lang/index.d.ts.map +0 -1
- package/dist/pkg/lang/index.js +0 -79
- package/dist/pkg/lang/index.js.map +0 -1
- package/dist/pkg/lang/service.d.ts.map +0 -1
- package/dist/pkg/lang/service.js +0 -115
- package/dist/pkg/lang/service.js.map +0 -1
- package/dist/pkg/lang/types.d.ts.map +0 -1
- package/dist/pkg/lang/types.js +0 -7
- package/dist/pkg/lang/types.js.map +0 -1
- package/dist/pkg/log/http.d.ts.map +0 -1
- package/dist/pkg/log/http.js +0 -60
- package/dist/pkg/log/http.js.map +0 -1
- package/dist/pkg/log/index.d.ts.map +0 -1
- package/dist/pkg/log/index.js +0 -53
- package/dist/pkg/log/index.js.map +0 -1
- package/dist/pkg/log/logger.d.ts.map +0 -1
- package/dist/pkg/log/logger.js +0 -185
- package/dist/pkg/log/logger.js.map +0 -1
- package/dist/pkg/log/manager.d.ts.map +0 -1
- package/dist/pkg/log/manager.js +0 -155
- package/dist/pkg/log/manager.js.map +0 -1
- package/dist/pkg/log/types.d.ts.map +0 -1
- package/dist/pkg/log/types.js +0 -12
- package/dist/pkg/log/types.js.map +0 -1
- package/dist/pkg/maps/scratch.d.ts.map +0 -1
- package/dist/pkg/maps/scratch.js +0 -94
- package/dist/pkg/maps/scratch.js.map +0 -1
- package/dist/pkg/md/parser/item.d.ts.map +0 -1
- package/dist/pkg/md/parser/item.js +0 -195
- package/dist/pkg/md/parser/item.js.map +0 -1
- package/dist/pkg/md/parser/item.test.d.ts +0 -2
- package/dist/pkg/md/parser/item.test.d.ts.map +0 -1
- package/dist/pkg/md/parser/item.test.js +0 -81
- package/dist/pkg/md/parser/item.test.js.map +0 -1
- package/dist/pkg/md/parser/pagelexer.d.ts.map +0 -1
- package/dist/pkg/md/parser/pagelexer.js +0 -1321
- package/dist/pkg/md/parser/pagelexer.js.map +0 -1
- package/dist/pkg/md/parser/pageparser.d.ts.map +0 -1
- package/dist/pkg/md/parser/pageparser.js +0 -177
- package/dist/pkg/md/parser/pageparser.js.map +0 -1
- package/dist/pkg/md/parser/pageparser.shortcode.test.d.ts +0 -2
- package/dist/pkg/md/parser/pageparser.shortcode.test.d.ts.map +0 -1
- package/dist/pkg/md/parser/pageparser.shortcode.test.js +0 -182
- package/dist/pkg/md/parser/pageparser.shortcode.test.js.map +0 -1
- package/dist/pkg/md/parser/pageparser.test.d.ts +0 -2
- package/dist/pkg/md/parser/pageparser.test.d.ts.map +0 -1
- package/dist/pkg/md/parser/pageparser.test.js +0 -97
- package/dist/pkg/md/parser/pageparser.test.js.map +0 -1
- package/dist/pkg/md/parser/pageparser_intro.test.d.ts +0 -2
- package/dist/pkg/md/parser/pageparser_intro.test.d.ts.map +0 -1
- package/dist/pkg/md/parser/pageparser_intro.test.js +0 -156
- package/dist/pkg/md/parser/pageparser_intro.test.js.map +0 -1
- package/dist/pkg/media/buildin.d.ts.map +0 -1
- package/dist/pkg/media/buildin.js +0 -23
- package/dist/pkg/media/buildin.js.map +0 -1
- package/dist/pkg/media/type.d.ts.map +0 -1
- package/dist/pkg/media/type.js +0 -63
- package/dist/pkg/media/type.js.map +0 -1
- package/dist/pkg/paths/index.d.ts.map +0 -1
- package/dist/pkg/paths/index.js +0 -65
- package/dist/pkg/paths/index.js.map +0 -1
- package/dist/pkg/radix/index.d.ts.map +0 -1
- package/dist/pkg/radix/index.js +0 -8
- package/dist/pkg/radix/index.js.map +0 -1
- package/dist/pkg/radix/radix.d.ts.map +0 -1
- package/dist/pkg/radix/radix.js +0 -492
- package/dist/pkg/radix/radix.js.map +0 -1
- package/dist/pkg/radix/radix.test.d.ts +0 -2
- package/dist/pkg/radix/radix.test.d.ts.map +0 -1
- package/dist/pkg/radix/radix.test.js +0 -350
- package/dist/pkg/radix/radix.test.js.map +0 -1
- package/dist/pkg/string/index.d.ts.map +0 -1
- package/dist/pkg/string/index.js +0 -18
- package/dist/pkg/string/index.js.map +0 -1
- package/dist/pkg/string/string.d.ts.map +0 -1
- package/dist/pkg/string/string.js +0 -10
- package/dist/pkg/string/string.js.map +0 -1
- package/dist/pkg/text/index.d.ts.map +0 -1
- package/dist/pkg/text/index.js +0 -11
- package/dist/pkg/text/index.js.map +0 -1
- package/dist/pkg/types/index.d.ts.map +0 -1
- package/dist/pkg/types/index.js +0 -18
- package/dist/pkg/types/index.js.map +0 -1
- package/dist/pkg/types/types.d.ts.map +0 -1
- package/dist/pkg/types/types.js +0 -19
- package/dist/pkg/types/types.js.map +0 -1
- package/dist/pkg/web/server/electron-livereload-server.d.ts.map +0 -1
- package/dist/pkg/web/server/electron-livereload-server.js +0 -408
- package/dist/pkg/web/server/electron-livereload-server.js.map +0 -1
- package/dist/pkg/web/server/electron-livereload-server.test.d.ts +0 -2
- package/dist/pkg/web/server/electron-livereload-server.test.d.ts.map +0 -1
- package/dist/pkg/web/server/electron-livereload-server.test.js +0 -174
- package/dist/pkg/web/server/electron-livereload-server.test.js.map +0 -1
- package/dist/pkg/web/server/index.d.ts.map +0 -1
- package/dist/pkg/web/server/index.js +0 -61
- package/dist/pkg/web/server/index.js.map +0 -1
- package/dist/pkg/web/server/livereload-server.d.ts.map +0 -1
- package/dist/pkg/web/server/livereload-server.js +0 -400
- package/dist/pkg/web/server/livereload-server.js.map +0 -1
- package/dist/pkg/web/server/livereload-server.test.d.ts +0 -2
- package/dist/pkg/web/server/livereload-server.test.d.ts.map +0 -1
- package/dist/pkg/web/server/livereload-server.test.js +0 -188
- package/dist/pkg/web/server/livereload-server.test.js.map +0 -1
- package/dist/pkg/web/server/types.d.ts.map +0 -1
- package/dist/pkg/web/server/types.js +0 -3
- package/dist/pkg/web/server/types.js.map +0 -1
- package/dist/pkg/web/watcher/content-file-watcher.d.ts.map +0 -1
- package/dist/pkg/web/watcher/content-file-watcher.js +0 -169
- package/dist/pkg/web/watcher/content-file-watcher.js.map +0 -1
- package/dist/pkg/web/watcher/types.d.ts.map +0 -1
- package/dist/pkg/web/watcher/types.js +0 -3
- package/dist/pkg/web/watcher/types.js.map +0 -1
- package/dist/tests/setup.d.ts +0 -2
- package/dist/tests/setup.d.ts.map +0 -1
- package/dist/tests/setup.js +0 -3
- package/dist/tests/setup.js.map +0 -1
|
@@ -1,1321 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pageLexer = exports.Iterator = void 0;
|
|
4
|
-
exports.NewIterator = NewIterator;
|
|
5
|
-
exports.ParseBytes = ParseBytes;
|
|
6
|
-
exports.ParseBytesMain = ParseBytesMain;
|
|
7
|
-
exports.HasShortcode = HasShortcode;
|
|
8
|
-
exports.newPageLexer = newPageLexer;
|
|
9
|
-
exports.lexIntroSection = lexIntroSection;
|
|
10
|
-
exports.lexMainSection = lexMainSection;
|
|
11
|
-
const item_1 = require("./item");
|
|
12
|
-
const eof = -1;
|
|
13
|
-
var ParamState;
|
|
14
|
-
(function (ParamState) {
|
|
15
|
-
ParamState[ParamState["none"] = 0] = "none";
|
|
16
|
-
ParamState[ParamState["named"] = 1] = "named";
|
|
17
|
-
ParamState[ParamState["positional"] = 2] = "positional";
|
|
18
|
-
})(ParamState || (ParamState = {}));
|
|
19
|
-
// Page syntax
|
|
20
|
-
const byteOrderMark = 0xFEFF; // Unicode BOM character (U+FEFF)
|
|
21
|
-
const byteOrderMarkUTF8 = new Uint8Array([0xEF, 0xBB, 0xBF]); // UTF-8 BOM bytes
|
|
22
|
-
const summaryDivider = new TextEncoder().encode("<!--more-->");
|
|
23
|
-
const summaryDividerOrg = new TextEncoder().encode("# more");
|
|
24
|
-
const delimTOML = new TextEncoder().encode("+++");
|
|
25
|
-
const delimYAML = new TextEncoder().encode("---");
|
|
26
|
-
const delimOrg = new TextEncoder().encode("#+");
|
|
27
|
-
const leftDelimSc = new TextEncoder().encode("{{");
|
|
28
|
-
const leftDelimScNoMarkup = new TextEncoder().encode("{{<");
|
|
29
|
-
const rightDelimScNoMarkup = new TextEncoder().encode(">}}");
|
|
30
|
-
const leftDelimScWithMarkup = new TextEncoder().encode("{{%");
|
|
31
|
-
const rightDelimScWithMarkup = new TextEncoder().encode("%}}");
|
|
32
|
-
const leftComment = new TextEncoder().encode("/*"); // comments in this context us used to to mark shortcodes as "not really a shortcode"
|
|
33
|
-
const rightComment = new TextEncoder().encode("*/");
|
|
34
|
-
// Inline shortcodes has the form {{< myshortcode.inline >}}
|
|
35
|
-
const inlineIdentifier = new TextEncoder().encode("inline ");
|
|
36
|
-
class sectionHandlers {
|
|
37
|
-
l;
|
|
38
|
-
skipAll;
|
|
39
|
-
handlers;
|
|
40
|
-
skipIndexes;
|
|
41
|
-
constructor(l) {
|
|
42
|
-
this.l = l;
|
|
43
|
-
this.skipAll = false;
|
|
44
|
-
this.handlers = [];
|
|
45
|
-
this.skipIndexes = [];
|
|
46
|
-
}
|
|
47
|
-
skip() {
|
|
48
|
-
if (this.skipAll) {
|
|
49
|
-
return -1;
|
|
50
|
-
}
|
|
51
|
-
this.skipIndexes = [];
|
|
52
|
-
let shouldSkip = false;
|
|
53
|
-
for (const handler of this.handlers) {
|
|
54
|
-
if (handler.skipAll) {
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
const idx = handler.skip();
|
|
58
|
-
if (idx !== -1) {
|
|
59
|
-
shouldSkip = true;
|
|
60
|
-
this.skipIndexes.push(idx);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (!shouldSkip) {
|
|
64
|
-
this.skipAll = true;
|
|
65
|
-
return -1;
|
|
66
|
-
}
|
|
67
|
-
return minIndex(...this.skipIndexes);
|
|
68
|
-
}
|
|
69
|
-
lex(origin) {
|
|
70
|
-
if (this.skipAll) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
if (this.l.pos > this.l.start) {
|
|
74
|
-
this.l.emit(item_1.ItemType.tText);
|
|
75
|
-
}
|
|
76
|
-
for (const handler of this.handlers) {
|
|
77
|
-
if (handler.skipAll) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
const [next, handled] = handler.lexFunc(origin, handler.l);
|
|
81
|
-
if (next === null || handled) {
|
|
82
|
-
return next;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
this.l.pos++;
|
|
86
|
-
return origin;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
class sectionHandler {
|
|
90
|
-
l;
|
|
91
|
-
skipAll;
|
|
92
|
-
skipFunc;
|
|
93
|
-
lexFunc;
|
|
94
|
-
constructor(l, skipFunc, lexFunc) {
|
|
95
|
-
this.l = l;
|
|
96
|
-
this.skipAll = false;
|
|
97
|
-
this.skipFunc = skipFunc;
|
|
98
|
-
this.lexFunc = lexFunc;
|
|
99
|
-
}
|
|
100
|
-
skip() {
|
|
101
|
-
if (this.skipAll) {
|
|
102
|
-
return -1;
|
|
103
|
-
}
|
|
104
|
-
const idx = this.skipFunc(this.l);
|
|
105
|
-
if (idx === -1) {
|
|
106
|
-
this.skipAll = true;
|
|
107
|
-
}
|
|
108
|
-
return idx;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function createSectionHandlers(l) {
|
|
112
|
-
const handlers = new sectionHandlers(l);
|
|
113
|
-
const shortCodeHandler = new sectionHandler(l, (l) => l.index(leftDelimSc), (origin, l) => {
|
|
114
|
-
if (!l.isShortCodeStart()) {
|
|
115
|
-
return [origin, false];
|
|
116
|
-
}
|
|
117
|
-
if (l.lexerShortcodeState.isInline) {
|
|
118
|
-
// If we're inside an inline shortcode, the only valid shortcode markup is
|
|
119
|
-
// the markup which closes it.
|
|
120
|
-
const b = l.input.slice(l.pos + 3);
|
|
121
|
-
const end = indexNonWhiteSpace(b, 0x2F); // '/'
|
|
122
|
-
if (end !== l.input.length - 1) {
|
|
123
|
-
const bTrimmed = new TextDecoder().decode(b.slice(end + 1)).trim();
|
|
124
|
-
if (end === -1 || !bTrimmed.startsWith(l.lexerShortcodeState.currShortcodeName + " ")) {
|
|
125
|
-
return [l.errorf("inline shortcodes do not support nesting"), true];
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (l.hasPrefix(leftDelimScWithMarkup)) {
|
|
130
|
-
l.lexerShortcodeState.currLeftDelimItem = item_1.ItemType.tLeftDelimScWithMarkup;
|
|
131
|
-
l.lexerShortcodeState.currRightDelimItem = item_1.ItemType.tRightDelimScWithMarkup;
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
l.lexerShortcodeState.currLeftDelimItem = item_1.ItemType.tLeftDelimScNoMarkup;
|
|
135
|
-
l.lexerShortcodeState.currRightDelimItem = item_1.ItemType.tRightDelimScNoMarkup;
|
|
136
|
-
}
|
|
137
|
-
return [l.lexShortcodeLeftDelim, true];
|
|
138
|
-
});
|
|
139
|
-
const summaryDividerHandler = new sectionHandler(l, (l) => {
|
|
140
|
-
if (l.summaryDividerChecked || !l.summaryDivider) {
|
|
141
|
-
return -1;
|
|
142
|
-
}
|
|
143
|
-
return l.index(l.summaryDivider);
|
|
144
|
-
}, (origin, l) => {
|
|
145
|
-
if (!l.summaryDivider || !l.hasPrefix(l.summaryDivider)) {
|
|
146
|
-
return [origin, false];
|
|
147
|
-
}
|
|
148
|
-
l.summaryDividerChecked = true;
|
|
149
|
-
l.pos += l.summaryDivider.length;
|
|
150
|
-
// This makes it a little easier to reason about later.
|
|
151
|
-
l.consumeSpace();
|
|
152
|
-
l.emit(item_1.ItemType.TypeLeadSummaryDivider);
|
|
153
|
-
return [origin, true];
|
|
154
|
-
});
|
|
155
|
-
handlers.handlers = [shortCodeHandler, summaryDividerHandler];
|
|
156
|
-
handlers.skipIndexes = new Array(handlers.handlers.length);
|
|
157
|
-
return handlers;
|
|
158
|
-
}
|
|
159
|
-
function isSpace(r) {
|
|
160
|
-
return r === 0x20 || r === 0x09; // ' ' or '\t'
|
|
161
|
-
}
|
|
162
|
-
function isAlphaNumericOrHyphen(r) {
|
|
163
|
-
return isAlphaNumeric(r) || r === 0x2D; // '-'
|
|
164
|
-
}
|
|
165
|
-
function isEndOfLine(r) {
|
|
166
|
-
return r === 0x0D || r === 0x0A; // '\r' or '\n'
|
|
167
|
-
}
|
|
168
|
-
function isAlphaNumeric(r) {
|
|
169
|
-
return r === 0x5F || // '_'
|
|
170
|
-
(r >= 0x41 && r <= 0x5A) || // A-Z
|
|
171
|
-
(r >= 0x61 && r <= 0x7A) || // a-z
|
|
172
|
-
(r >= 0x30 && r <= 0x39); // 0-9
|
|
173
|
-
}
|
|
174
|
-
function minIndex(...indices) {
|
|
175
|
-
let min = -1;
|
|
176
|
-
for (const j of indices) {
|
|
177
|
-
if (j < 0) {
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
if (min === -1) {
|
|
181
|
-
min = j;
|
|
182
|
-
}
|
|
183
|
-
else if (j < min) {
|
|
184
|
-
min = j;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return min;
|
|
188
|
-
}
|
|
189
|
-
function indexNonWhiteSpace(s, char) {
|
|
190
|
-
for (let i = 0; i < s.length; i++) {
|
|
191
|
-
if (!isSpace(s[i])) {
|
|
192
|
-
if (s[i] === char) {
|
|
193
|
-
return i;
|
|
194
|
-
}
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return -1;
|
|
199
|
-
}
|
|
200
|
-
class Iterator {
|
|
201
|
-
items;
|
|
202
|
-
lastPos; // position of the last item returned by nextItem
|
|
203
|
-
constructor(items) {
|
|
204
|
-
this.items = items;
|
|
205
|
-
this.lastPos = -1;
|
|
206
|
-
}
|
|
207
|
-
// consumes and returns the next item
|
|
208
|
-
Next() {
|
|
209
|
-
this.lastPos++;
|
|
210
|
-
return this.Current();
|
|
211
|
-
}
|
|
212
|
-
// Current will repeatably return the current item
|
|
213
|
-
Current() {
|
|
214
|
-
if (this.lastPos >= this.items.length) {
|
|
215
|
-
const errorItem = new item_1.Item();
|
|
216
|
-
errorItem.Type = item_1.ItemType.tError;
|
|
217
|
-
errorItem.Err = new Error("no more tokens");
|
|
218
|
-
return errorItem;
|
|
219
|
-
}
|
|
220
|
-
return this.items[this.lastPos];
|
|
221
|
-
}
|
|
222
|
-
// backs up one token
|
|
223
|
-
Backup() {
|
|
224
|
-
if (this.lastPos < 0) {
|
|
225
|
-
throw new Error("need to go forward before going back");
|
|
226
|
-
}
|
|
227
|
-
this.lastPos--;
|
|
228
|
-
}
|
|
229
|
-
// Pos returns the current position in the input
|
|
230
|
-
Pos() {
|
|
231
|
-
return this.lastPos;
|
|
232
|
-
}
|
|
233
|
-
// check for non-error and non-EOF types coming next
|
|
234
|
-
IsValueNext() {
|
|
235
|
-
const i = this.Peek();
|
|
236
|
-
return i.Type !== item_1.ItemType.tError && i.Type !== item_1.ItemType.tEOF;
|
|
237
|
-
}
|
|
238
|
-
// look at, but do not consume, the next item
|
|
239
|
-
// repeated, sequential calls will return the same item
|
|
240
|
-
Peek() {
|
|
241
|
-
return this.items[this.lastPos + 1];
|
|
242
|
-
}
|
|
243
|
-
// PeekWalk will feed the next items in the iterator to walkFn
|
|
244
|
-
// until it returns false
|
|
245
|
-
PeekWalk(walkFn) {
|
|
246
|
-
for (let i = this.lastPos + 1; i < this.items.length; i++) {
|
|
247
|
-
const item = this.items[i];
|
|
248
|
-
if (!walkFn(item)) {
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// Consume is a convenience method to consume the next n tokens,
|
|
254
|
-
// but back off Errors and EOF
|
|
255
|
-
Consume(cnt) {
|
|
256
|
-
for (let i = 0; i < cnt; i++) {
|
|
257
|
-
const token = this.Next();
|
|
258
|
-
if (token.Type === item_1.ItemType.tError || token.Type === item_1.ItemType.tEOF) {
|
|
259
|
-
this.Backup();
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
// LineNumber returns the current line number. Used for logging.
|
|
265
|
-
LineNumber(source) {
|
|
266
|
-
const lf = new Uint8Array([0x0A]); // '\n'
|
|
267
|
-
const slice = source.slice(0, this.Current().low);
|
|
268
|
-
let count = 0;
|
|
269
|
-
for (let i = 0; i < slice.length; i++) {
|
|
270
|
-
if (slice[i] === lf[0]) {
|
|
271
|
-
count++;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
return count + 1;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
exports.Iterator = Iterator;
|
|
278
|
-
// NewIterator creates a new Iterator
|
|
279
|
-
function NewIterator(items) {
|
|
280
|
-
return new Iterator(items);
|
|
281
|
-
}
|
|
282
|
-
class pageLexer {
|
|
283
|
-
input;
|
|
284
|
-
stateStart;
|
|
285
|
-
state;
|
|
286
|
-
pos; // input position
|
|
287
|
-
start; // item start position
|
|
288
|
-
width; // width of last element
|
|
289
|
-
// Contains lexers for shortcodes and other main section
|
|
290
|
-
// elements.
|
|
291
|
-
sectionHandlers;
|
|
292
|
-
cfg;
|
|
293
|
-
// The summary divider to look for.
|
|
294
|
-
summaryDivider;
|
|
295
|
-
// Set when we have parsed any summary divider
|
|
296
|
-
summaryDividerChecked;
|
|
297
|
-
lexerShortcodeState;
|
|
298
|
-
// items delivered to client
|
|
299
|
-
items;
|
|
300
|
-
// error delivered to the client
|
|
301
|
-
err;
|
|
302
|
-
inFrontMatter;
|
|
303
|
-
parenDepth;
|
|
304
|
-
constructor(input, stateStart, cfg) {
|
|
305
|
-
this.input = input;
|
|
306
|
-
this.stateStart = stateStart;
|
|
307
|
-
this.state = null;
|
|
308
|
-
this.pos = 0;
|
|
309
|
-
this.start = 0;
|
|
310
|
-
this.width = 0;
|
|
311
|
-
this.cfg = cfg;
|
|
312
|
-
this.summaryDivider = null;
|
|
313
|
-
this.summaryDividerChecked = false;
|
|
314
|
-
this.err = null;
|
|
315
|
-
this.items = [];
|
|
316
|
-
this.inFrontMatter = false;
|
|
317
|
-
this.parenDepth = 0;
|
|
318
|
-
this.lexerShortcodeState = {
|
|
319
|
-
currLeftDelimItem: item_1.ItemType.tLeftDelimScNoMarkup,
|
|
320
|
-
currRightDelimItem: item_1.ItemType.tRightDelimScNoMarkup,
|
|
321
|
-
isInline: false,
|
|
322
|
-
currShortcodeName: '',
|
|
323
|
-
closingState: 0,
|
|
324
|
-
elementStepNum: 0,
|
|
325
|
-
paramElements: 0,
|
|
326
|
-
paramState: ParamState.none,
|
|
327
|
-
openShortcodes: {}
|
|
328
|
-
};
|
|
329
|
-
// Bind methods that need 'this' context
|
|
330
|
-
this.lexSummaryDivider = this.lexSummaryDivider.bind(this);
|
|
331
|
-
this.lexMainSection = this.lexMainSection.bind(this);
|
|
332
|
-
this.lexIdentifierInShortcode = this.lexIdentifierInShortcode.bind(this);
|
|
333
|
-
this.lexEndOfShortcode = this.lexEndOfShortcode.bind(this);
|
|
334
|
-
this.lexShortcodeLeftDelim = this.lexShortcodeLeftDelim.bind(this);
|
|
335
|
-
this.lexShortcodeRightDelim = this.lexShortcodeRightDelim.bind(this);
|
|
336
|
-
this.lexShortcodeParam = this.lexShortcodeParam.bind(this);
|
|
337
|
-
this.lexShortcodeValue = this.lexShortcodeValue.bind(this);
|
|
338
|
-
this.lexShortcodeValueQuoted = this.lexShortcodeValueQuoted.bind(this);
|
|
339
|
-
this.lexShortcodeValueUnquoted = this.lexShortcodeValueUnquoted.bind(this);
|
|
340
|
-
this.lexInsideShortcode = this.lexInsideShortcode.bind(this);
|
|
341
|
-
this.lexDone = this.lexDone.bind(this);
|
|
342
|
-
this.sectionHandlers = createSectionHandlers(this);
|
|
343
|
-
}
|
|
344
|
-
// Implement the Result interface
|
|
345
|
-
Iterator() {
|
|
346
|
-
return NewIterator(this.items);
|
|
347
|
-
}
|
|
348
|
-
Input() {
|
|
349
|
-
return this.input;
|
|
350
|
-
}
|
|
351
|
-
// main loop
|
|
352
|
-
run() {
|
|
353
|
-
for (this.state = this.stateStart; this.state !== null;) {
|
|
354
|
-
this.state = this.state(this);
|
|
355
|
-
}
|
|
356
|
-
return this;
|
|
357
|
-
}
|
|
358
|
-
// next returns the next rune in the input.
|
|
359
|
-
next() {
|
|
360
|
-
if (this.pos >= this.input.length) {
|
|
361
|
-
this.width = 0;
|
|
362
|
-
return eof;
|
|
363
|
-
}
|
|
364
|
-
const r = this.input[this.pos];
|
|
365
|
-
this.width = 1;
|
|
366
|
-
this.pos += this.width;
|
|
367
|
-
return r;
|
|
368
|
-
}
|
|
369
|
-
// peek, but no consume
|
|
370
|
-
peek() {
|
|
371
|
-
const r = this.next();
|
|
372
|
-
this.backup();
|
|
373
|
-
return r;
|
|
374
|
-
}
|
|
375
|
-
// steps back one
|
|
376
|
-
backup() {
|
|
377
|
-
this.pos -= this.width;
|
|
378
|
-
}
|
|
379
|
-
append(item) {
|
|
380
|
-
if (item.Pos() < this.input.length) {
|
|
381
|
-
if (item.Type === item_1.ItemType.TypeIgnore && this.input[item.Pos()] === 0xEF) {
|
|
382
|
-
item.firstByte = 0xEF; // BOM mark's first byte
|
|
383
|
-
}
|
|
384
|
-
else {
|
|
385
|
-
item.firstByte = this.input[item.Pos()];
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
this.items.push(item);
|
|
389
|
-
}
|
|
390
|
-
// sends an item back to the client.
|
|
391
|
-
emit(t) {
|
|
392
|
-
// 使用 defer 模式来确保在函数结束时设置 start
|
|
393
|
-
const defer = () => {
|
|
394
|
-
this.start = this.pos;
|
|
395
|
-
};
|
|
396
|
-
if (t === item_1.ItemType.tText) {
|
|
397
|
-
// Identify any trailing whitespace/intendation.
|
|
398
|
-
// We currently only care about the last one.
|
|
399
|
-
for (let i = this.pos - 1; i >= this.start; i--) {
|
|
400
|
-
const b = this.input[i];
|
|
401
|
-
if (b !== 0x20 && b !== 0x09 && b !== 0x0D && b !== 0x0A) { // ' ', '\t', '\r', '\n'
|
|
402
|
-
break;
|
|
403
|
-
}
|
|
404
|
-
if (i === this.start && b !== 0x0A) { // '\n'
|
|
405
|
-
const item = new item_1.Item();
|
|
406
|
-
item.Type = item_1.ItemType.tIndentation;
|
|
407
|
-
item.low = this.start;
|
|
408
|
-
item.high = this.pos;
|
|
409
|
-
this.append(item);
|
|
410
|
-
defer();
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
else if (b === 0x0A && i < this.pos - 1) {
|
|
414
|
-
const textItem = new item_1.Item();
|
|
415
|
-
textItem.Type = t;
|
|
416
|
-
textItem.low = this.start;
|
|
417
|
-
textItem.high = i + 1;
|
|
418
|
-
this.append(textItem);
|
|
419
|
-
const indentItem = new item_1.Item();
|
|
420
|
-
indentItem.Type = item_1.ItemType.tIndentation;
|
|
421
|
-
indentItem.low = i + 1;
|
|
422
|
-
indentItem.high = this.pos;
|
|
423
|
-
this.append(indentItem);
|
|
424
|
-
defer();
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
else if (b === 0x0A && i === this.pos - 1) {
|
|
428
|
-
break;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
// 创建并添加 item
|
|
433
|
-
const item = new item_1.Item();
|
|
434
|
-
item.Type = t;
|
|
435
|
-
item.low = this.start;
|
|
436
|
-
item.high = this.pos;
|
|
437
|
-
// Set firstByte if we have content
|
|
438
|
-
if (item.low < this.input.length) {
|
|
439
|
-
if (t === item_1.ItemType.TypeIgnore && this.input[item.low] === 0xEF) {
|
|
440
|
-
item.firstByte = 0xEF; // BOM mark's first byte
|
|
441
|
-
}
|
|
442
|
-
else {
|
|
443
|
-
item.firstByte = this.input[item.low];
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
this.append(item);
|
|
447
|
-
defer();
|
|
448
|
-
}
|
|
449
|
-
// sends a string item back to the client.
|
|
450
|
-
emitString(t) {
|
|
451
|
-
const item = new item_1.Item();
|
|
452
|
-
item.Type = t;
|
|
453
|
-
item['low'] = this.start;
|
|
454
|
-
item['high'] = this.pos;
|
|
455
|
-
item['isString'] = true;
|
|
456
|
-
if (this.pos > this.start) {
|
|
457
|
-
item.firstByte = this.input[this.start];
|
|
458
|
-
}
|
|
459
|
-
this.items.push(item);
|
|
460
|
-
this.start = this.pos;
|
|
461
|
-
}
|
|
462
|
-
isEOF() {
|
|
463
|
-
return this.pos >= this.input.length;
|
|
464
|
-
}
|
|
465
|
-
// special case, do not send '\\' back to client
|
|
466
|
-
ignoreEscapesAndEmit(t, isString) {
|
|
467
|
-
let i = this.start;
|
|
468
|
-
let k = i;
|
|
469
|
-
const segments = [];
|
|
470
|
-
while (i < this.pos) {
|
|
471
|
-
const r = this.input[i];
|
|
472
|
-
const w = 1; // In TypeScript we handle one byte at a time
|
|
473
|
-
if (r === 0x5C) { // '\\'
|
|
474
|
-
if (i > k) {
|
|
475
|
-
segments.push({ Low: k, High: i });
|
|
476
|
-
}
|
|
477
|
-
k = i + w;
|
|
478
|
-
}
|
|
479
|
-
i += w;
|
|
480
|
-
}
|
|
481
|
-
if (k < this.pos) {
|
|
482
|
-
segments.push({ Low: k, High: this.pos });
|
|
483
|
-
}
|
|
484
|
-
if (segments.length > 0) {
|
|
485
|
-
const item = new item_1.Item();
|
|
486
|
-
item.Type = t;
|
|
487
|
-
item['segments'] = segments;
|
|
488
|
-
if (segments[0].High > segments[0].Low) {
|
|
489
|
-
item.firstByte = this.input[segments[0].Low];
|
|
490
|
-
}
|
|
491
|
-
this.items.push(item);
|
|
492
|
-
this.start = this.pos;
|
|
493
|
-
}
|
|
494
|
-
this.start = this.pos;
|
|
495
|
-
}
|
|
496
|
-
// gets the current value (for debugging and error handling)
|
|
497
|
-
current() {
|
|
498
|
-
return this.input.slice(this.start, this.pos);
|
|
499
|
-
}
|
|
500
|
-
// ignore current element
|
|
501
|
-
ignore() {
|
|
502
|
-
this.start = this.pos;
|
|
503
|
-
}
|
|
504
|
-
// nil terminates the parser
|
|
505
|
-
errorf(format, ...args) {
|
|
506
|
-
const err = new Error(format.replace(/%[a-z]/g, () => String(args.shift())));
|
|
507
|
-
const item = new item_1.Item();
|
|
508
|
-
item.Type = item_1.ItemType.tError;
|
|
509
|
-
item.Err = err;
|
|
510
|
-
item.low = this.start;
|
|
511
|
-
item.high = this.pos;
|
|
512
|
-
this.append(item);
|
|
513
|
-
return null;
|
|
514
|
-
}
|
|
515
|
-
consumeCRLF() {
|
|
516
|
-
let consumed = false;
|
|
517
|
-
const r = this.peek();
|
|
518
|
-
if (r === 0x0D) { // '\r'
|
|
519
|
-
this.next();
|
|
520
|
-
if (this.peek() === 0x0A) { // '\n'
|
|
521
|
-
this.next();
|
|
522
|
-
consumed = true;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
else if (r === 0x0A) { // '\n'
|
|
526
|
-
this.next();
|
|
527
|
-
consumed = true;
|
|
528
|
-
}
|
|
529
|
-
return consumed;
|
|
530
|
-
}
|
|
531
|
-
consumeToSpace() {
|
|
532
|
-
while (true) {
|
|
533
|
-
const r = this.next();
|
|
534
|
-
if (r === eof || isSpace(r)) {
|
|
535
|
-
this.backup();
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
consumeSpace() {
|
|
541
|
-
for (;;) {
|
|
542
|
-
const r = this.next();
|
|
543
|
-
if (r === eof || !this.isUnicodeSpace(r)) {
|
|
544
|
-
this.backup();
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
// Helper function to match Golang's unicode.IsSpace behavior
|
|
550
|
-
isUnicodeSpace(r) {
|
|
551
|
-
// This matches Golang's unicode.IsSpace implementation
|
|
552
|
-
return r === 0x20 || // Space
|
|
553
|
-
r === 0x09 || // Tab
|
|
554
|
-
r === 0x0A || // Line Feed
|
|
555
|
-
r === 0x0C || // Form Feed
|
|
556
|
-
r === 0x0D || // Carriage Return
|
|
557
|
-
r === 0x85 || // Next Line
|
|
558
|
-
r === 0xA0 || // No-Break Space
|
|
559
|
-
r === 0x2000 || // En Quad
|
|
560
|
-
r === 0x2001 || // Em Quad
|
|
561
|
-
r === 0x2002 || // En Space
|
|
562
|
-
r === 0x2003 || // Em Space
|
|
563
|
-
r === 0x2004 || // Three-Per-Em Space
|
|
564
|
-
r === 0x2005 || // Four-Per-Em Space
|
|
565
|
-
r === 0x2006 || // Six-Per-Em Space
|
|
566
|
-
r === 0x2007 || // Figure Space
|
|
567
|
-
r === 0x2008 || // Punctuation Space
|
|
568
|
-
r === 0x2009 || // Thin Space
|
|
569
|
-
r === 0x200A || // Hair Space
|
|
570
|
-
r === 0x2028 || // Line Separator
|
|
571
|
-
r === 0x2029 || // Paragraph Separator
|
|
572
|
-
r === 0x202F || // Narrow No-Break Space
|
|
573
|
-
r === 0x205F || // Medium Mathematical Space
|
|
574
|
-
r === 0x3000; // Ideographic Space
|
|
575
|
-
}
|
|
576
|
-
index(sep) {
|
|
577
|
-
const input = this.input.slice(this.pos);
|
|
578
|
-
const sepLen = sep.length;
|
|
579
|
-
const inputLen = input.length;
|
|
580
|
-
// If the separator is longer than the remaining input, it can't be found
|
|
581
|
-
if (sepLen > inputLen) {
|
|
582
|
-
return -1;
|
|
583
|
-
}
|
|
584
|
-
// Search for the separator
|
|
585
|
-
outer: for (let i = 0; i <= inputLen - sepLen; i++) {
|
|
586
|
-
for (let j = 0; j < sepLen; j++) {
|
|
587
|
-
if (input[i + j] !== sep[j]) {
|
|
588
|
-
continue outer;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
return i;
|
|
592
|
-
}
|
|
593
|
-
return -1;
|
|
594
|
-
}
|
|
595
|
-
hasPrefix(prefix) {
|
|
596
|
-
if (this.pos + prefix.length > this.input.length) {
|
|
597
|
-
return false;
|
|
598
|
-
}
|
|
599
|
-
for (let i = 0; i < prefix.length; i++) {
|
|
600
|
-
if (this.input[this.pos + i] !== prefix[i]) {
|
|
601
|
-
return false;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
return true;
|
|
605
|
-
}
|
|
606
|
-
isShortCodeStart() {
|
|
607
|
-
return this.hasPrefix(leftDelimScWithMarkup) || this.hasPrefix(leftDelimScNoMarkup);
|
|
608
|
-
}
|
|
609
|
-
// Handle YAML or TOML front matter.
|
|
610
|
-
lexFrontMatterSection(tp, delimr, name, delim) {
|
|
611
|
-
for (let i = 0; i < 2; i++) {
|
|
612
|
-
if (this.next() !== delimr) {
|
|
613
|
-
return this.errorf(`invalid ${name} delimiter`);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
// Let front matter start at line 1
|
|
617
|
-
let wasEndOfLine = this.consumeCRLF();
|
|
618
|
-
// We don't care about the delimiters.
|
|
619
|
-
this.ignore();
|
|
620
|
-
let r;
|
|
621
|
-
for (;;) {
|
|
622
|
-
if (!wasEndOfLine) {
|
|
623
|
-
r = this.next();
|
|
624
|
-
if (r === eof) {
|
|
625
|
-
return this.errorf(`EOF looking for end ${name} front matter delimiter`);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
if (wasEndOfLine || isEndOfLine(r)) {
|
|
629
|
-
if (this.hasPrefix(delim)) {
|
|
630
|
-
this.emit(tp);
|
|
631
|
-
this.pos += 3;
|
|
632
|
-
this.consumeCRLF();
|
|
633
|
-
this.ignore();
|
|
634
|
-
break;
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
wasEndOfLine = false;
|
|
638
|
-
}
|
|
639
|
-
return () => this.lexMainSection();
|
|
640
|
-
}
|
|
641
|
-
currentLeftShortcodeDelimItem() {
|
|
642
|
-
return this.lexerShortcodeState.currLeftDelimItem;
|
|
643
|
-
}
|
|
644
|
-
currentRightShortcodeDelimItem() {
|
|
645
|
-
return this.lexerShortcodeState.currRightDelimItem;
|
|
646
|
-
}
|
|
647
|
-
currentLeftShortcodeDelim() {
|
|
648
|
-
if (this.lexerShortcodeState.currLeftDelimItem === item_1.ItemType.tLeftDelimScWithMarkup) {
|
|
649
|
-
return leftDelimScWithMarkup;
|
|
650
|
-
}
|
|
651
|
-
return leftDelimScNoMarkup;
|
|
652
|
-
}
|
|
653
|
-
currentRightShortcodeDelim() {
|
|
654
|
-
if (this.lexerShortcodeState.currRightDelimItem === item_1.ItemType.tRightDelimScWithMarkup) {
|
|
655
|
-
return rightDelimScWithMarkup;
|
|
656
|
-
}
|
|
657
|
-
return rightDelimScNoMarkup;
|
|
658
|
-
}
|
|
659
|
-
// lexIdentifier scans an alphanumeric identifier.
|
|
660
|
-
lexIdentifier() {
|
|
661
|
-
for (;;) {
|
|
662
|
-
const r = this.next();
|
|
663
|
-
if (isAlphaNumericOrHyphen(r)) {
|
|
664
|
-
continue;
|
|
665
|
-
}
|
|
666
|
-
this.backup();
|
|
667
|
-
const word = new TextDecoder().decode(this.input.slice(this.start, this.pos));
|
|
668
|
-
if (word.length === 0) {
|
|
669
|
-
return null;
|
|
670
|
-
}
|
|
671
|
-
this.emit(item_1.ItemType.tScParam);
|
|
672
|
-
return null;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
// lexMainSection is the default state.
|
|
676
|
-
lexMainSection() {
|
|
677
|
-
if (this.isEOF()) {
|
|
678
|
-
return () => this.lexDone();
|
|
679
|
-
}
|
|
680
|
-
// Fast forward as far as possible.
|
|
681
|
-
const skip = this.sectionHandlers.skip();
|
|
682
|
-
if (skip === -1) {
|
|
683
|
-
this.pos = this.input.length;
|
|
684
|
-
return () => this.lexDone();
|
|
685
|
-
}
|
|
686
|
-
else if (skip > 0) {
|
|
687
|
-
this.pos += skip;
|
|
688
|
-
}
|
|
689
|
-
const next = this.sectionHandlers.lex(this.lexMainSection);
|
|
690
|
-
if (next !== null) {
|
|
691
|
-
return next;
|
|
692
|
-
}
|
|
693
|
-
this.pos = this.input.length;
|
|
694
|
-
return this.lexDone;
|
|
695
|
-
}
|
|
696
|
-
lexInlineShortcodeContent() {
|
|
697
|
-
for (;;) {
|
|
698
|
-
if (this.pos >= this.input.length) {
|
|
699
|
-
return this.errorf("unclosed inline shortcode");
|
|
700
|
-
}
|
|
701
|
-
if (this.hasPrefix(leftDelimScWithMarkup) || this.hasPrefix(leftDelimScNoMarkup)) {
|
|
702
|
-
return this.errorf("inline shortcodes do not support nesting");
|
|
703
|
-
}
|
|
704
|
-
if (this.hasPrefix(this.currentRightShortcodeDelim())) {
|
|
705
|
-
this.backup();
|
|
706
|
-
if (this.pos > this.start) {
|
|
707
|
-
this.emit(item_1.ItemType.tText);
|
|
708
|
-
}
|
|
709
|
-
return () => this.lexShortcodeRightDelim();
|
|
710
|
-
}
|
|
711
|
-
this.next();
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
// lexIdentifierInShortcode scans an alphanumeric inside shortcode
|
|
715
|
-
lexIdentifierInShortcode() {
|
|
716
|
-
let lookForEnd = false;
|
|
717
|
-
// 使用 for(;;) 来模拟 Go 的 Loop 标签
|
|
718
|
-
for (;;) {
|
|
719
|
-
const r = this.next();
|
|
720
|
-
switch (true) {
|
|
721
|
-
case isAlphaNumericOrHyphen(r):
|
|
722
|
-
// 与 Go 版本一样,这里什么都不做,继续循环
|
|
723
|
-
break;
|
|
724
|
-
case r === 0x2F: // '/'
|
|
725
|
-
// 与 Go 版本一样,允许命名空间中的斜杠
|
|
726
|
-
break;
|
|
727
|
-
case r === 0x2E: // '.'
|
|
728
|
-
this.lexerShortcodeState.isInline = this.hasPrefix(inlineIdentifier);
|
|
729
|
-
if (!this.lexerShortcodeState.isInline) {
|
|
730
|
-
return this.errorf("period in shortcode name only allowed for inline identifiers");
|
|
731
|
-
}
|
|
732
|
-
break;
|
|
733
|
-
default:
|
|
734
|
-
this.backup();
|
|
735
|
-
const word = new TextDecoder().decode(this.input.slice(this.start, this.pos));
|
|
736
|
-
// 完全按照 Go 版本的逻辑顺序处理
|
|
737
|
-
if (this.lexerShortcodeState.closingState > 0 && !this.lexerShortcodeState.openShortcodes[word]) {
|
|
738
|
-
return this.errorf(`closing tag for shortcode '${word}' does not match start tag`);
|
|
739
|
-
}
|
|
740
|
-
else if (this.lexerShortcodeState.closingState > 0) {
|
|
741
|
-
this.lexerShortcodeState.openShortcodes[word] = false;
|
|
742
|
-
lookForEnd = true;
|
|
743
|
-
}
|
|
744
|
-
// 重置和设置状态
|
|
745
|
-
this.lexerShortcodeState.closingState = 0;
|
|
746
|
-
this.lexerShortcodeState.currShortcodeName = word;
|
|
747
|
-
this.lexerShortcodeState.openShortcodes[word] = true;
|
|
748
|
-
this.lexerShortcodeState.elementStepNum++;
|
|
749
|
-
// 发出对应的 token
|
|
750
|
-
if (this.lexerShortcodeState.isInline) {
|
|
751
|
-
this.emit(item_1.ItemType.tScNameInline);
|
|
752
|
-
}
|
|
753
|
-
else {
|
|
754
|
-
this.emit(item_1.ItemType.tScName);
|
|
755
|
-
}
|
|
756
|
-
// 跳出循环
|
|
757
|
-
if (lookForEnd) {
|
|
758
|
-
return () => this.lexEndOfShortcode();
|
|
759
|
-
}
|
|
760
|
-
return this.lexInsideShortcode;
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
// lexEndOfShortcode scans until it finds the end of shortcode
|
|
765
|
-
lexEndOfShortcode() {
|
|
766
|
-
this.lexerShortcodeState.isInline = false;
|
|
767
|
-
if (this.hasPrefix(this.currentRightShortcodeDelim())) {
|
|
768
|
-
return () => this.lexShortcodeRightDelim();
|
|
769
|
-
}
|
|
770
|
-
const r = this.next();
|
|
771
|
-
switch (true) {
|
|
772
|
-
case isSpace(r):
|
|
773
|
-
this.ignore();
|
|
774
|
-
break;
|
|
775
|
-
default:
|
|
776
|
-
return this.errorf("unclosed shortcode");
|
|
777
|
-
}
|
|
778
|
-
return () => this.lexEndOfShortcode();
|
|
779
|
-
}
|
|
780
|
-
// lexShortcodeLeftDelim scans the left delimiter.
|
|
781
|
-
lexShortcodeLeftDelim() {
|
|
782
|
-
this.pos += this.currentLeftShortcodeDelim().length;
|
|
783
|
-
if (this.isComment()) {
|
|
784
|
-
return () => this.lexComment();
|
|
785
|
-
}
|
|
786
|
-
this.emit(this.lexerShortcodeState.currLeftDelimItem);
|
|
787
|
-
this.lexerShortcodeState.elementStepNum = 0;
|
|
788
|
-
this.lexerShortcodeState.paramElements = 0;
|
|
789
|
-
this.lexerShortcodeState.paramState = ParamState.none;
|
|
790
|
-
this.start = this.pos;
|
|
791
|
-
return this.lexInsideShortcode;
|
|
792
|
-
}
|
|
793
|
-
// peekString returns the next n bytes as a string without advancing the pos.
|
|
794
|
-
peekString(s) {
|
|
795
|
-
const n = s instanceof Uint8Array ? s.length : s.length;
|
|
796
|
-
if (this.pos + n > this.input.length) {
|
|
797
|
-
return null;
|
|
798
|
-
}
|
|
799
|
-
const peek = this.input.slice(this.pos, this.pos + n);
|
|
800
|
-
if (s instanceof Uint8Array) {
|
|
801
|
-
// Compare byte arrays
|
|
802
|
-
for (let i = 0; i < n; i++) {
|
|
803
|
-
if (peek[i] !== s[i]) {
|
|
804
|
-
return null;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
return new TextDecoder().decode(peek);
|
|
808
|
-
}
|
|
809
|
-
else {
|
|
810
|
-
// Compare with string
|
|
811
|
-
const str = new TextDecoder().decode(peek);
|
|
812
|
-
if (str === s) {
|
|
813
|
-
return str;
|
|
814
|
-
}
|
|
815
|
-
return null;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
// lexSummaryDivider scans the summary divider.
|
|
819
|
-
lexSummaryDivider() {
|
|
820
|
-
if (!this.hasPrefix(summaryDivider)) {
|
|
821
|
-
return null;
|
|
822
|
-
}
|
|
823
|
-
// If we have text before the divider on the same line, emit it first
|
|
824
|
-
if (this.start < this.pos) {
|
|
825
|
-
const item = new item_1.Item();
|
|
826
|
-
item.Type = item_1.ItemType.tText;
|
|
827
|
-
item.low = this.start;
|
|
828
|
-
item.high = this.pos;
|
|
829
|
-
if (item.low < this.input.length) {
|
|
830
|
-
item.firstByte = this.input[item.low];
|
|
831
|
-
}
|
|
832
|
-
this.append(item);
|
|
833
|
-
}
|
|
834
|
-
// Emit the divider
|
|
835
|
-
const divider = new item_1.Item();
|
|
836
|
-
divider.Type = item_1.ItemType.TypeLeadSummaryDivider;
|
|
837
|
-
divider.low = this.pos;
|
|
838
|
-
divider.high = this.pos + summaryDivider.length;
|
|
839
|
-
if (divider.low < this.input.length) {
|
|
840
|
-
divider.firstByte = this.input[divider.low];
|
|
841
|
-
}
|
|
842
|
-
this.append(divider);
|
|
843
|
-
this.pos += summaryDivider.length;
|
|
844
|
-
this.start = this.pos;
|
|
845
|
-
// Continue with the main section lexer
|
|
846
|
-
return () => this.lexMainSection();
|
|
847
|
-
}
|
|
848
|
-
// handleBOM checks for and handles a UTF-8 BOM sequence.
|
|
849
|
-
// Returns true if a BOM was found and handled, false otherwise.
|
|
850
|
-
handleBOM() {
|
|
851
|
-
// Check for UTF-8 BOM sequence (EF BB BF)
|
|
852
|
-
if (this.pos + 3 <= this.input.length) {
|
|
853
|
-
const possibleBOM = this.input.slice(this.pos, this.pos + 3);
|
|
854
|
-
if (possibleBOM[0] === 0xEF && possibleBOM[1] === 0xBB && possibleBOM[2] === 0xBF) {
|
|
855
|
-
// Emit the entire BOM sequence as a single token
|
|
856
|
-
const item = new item_1.Item();
|
|
857
|
-
item.Type = item_1.ItemType.TypeIgnore;
|
|
858
|
-
item.low = this.pos;
|
|
859
|
-
item.high = this.pos + 3;
|
|
860
|
-
item.firstByte = 0xEF;
|
|
861
|
-
this.append(item);
|
|
862
|
-
this.pos += 3;
|
|
863
|
-
this.start = this.pos;
|
|
864
|
-
return true;
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
return false;
|
|
868
|
-
}
|
|
869
|
-
// lexIntroSection scans until it finds a front matter or a non-space.
|
|
870
|
-
lexIntroSection() {
|
|
871
|
-
this.summaryDivider = summaryDivider;
|
|
872
|
-
// First check for BOM at the start of the file
|
|
873
|
-
if (this.pos === 0 && this.handleBOM()) {
|
|
874
|
-
// todo
|
|
875
|
-
}
|
|
876
|
-
LOOP: for (;;) {
|
|
877
|
-
const r = this.next();
|
|
878
|
-
if (r === eof) {
|
|
879
|
-
break;
|
|
880
|
-
}
|
|
881
|
-
switch (true) {
|
|
882
|
-
case r === 0x2B: // '+'
|
|
883
|
-
// Check for complete TOML delimiter '+++'
|
|
884
|
-
if (this.hasPrefix(delimTOML.slice(1))) {
|
|
885
|
-
return () => this.lexFrontMatterSection(item_1.ItemType.TypeFrontMatterTOML, r, "TOML", delimTOML);
|
|
886
|
-
}
|
|
887
|
-
else {
|
|
888
|
-
// Not a TOML delimiter, backup and continue as regular content
|
|
889
|
-
this.backup();
|
|
890
|
-
break LOOP;
|
|
891
|
-
}
|
|
892
|
-
case r === 0x2D: // '-'
|
|
893
|
-
// Check for complete YAML delimiter '---'
|
|
894
|
-
if (this.hasPrefix(delimYAML.slice(1))) {
|
|
895
|
-
return () => this.lexFrontMatterSection(item_1.ItemType.TypeFrontMatterYAML, r, "YAML", delimYAML);
|
|
896
|
-
}
|
|
897
|
-
else {
|
|
898
|
-
// Not a YAML delimiter, backup and continue as regular content
|
|
899
|
-
this.backup();
|
|
900
|
-
break LOOP;
|
|
901
|
-
}
|
|
902
|
-
case r === 0x7B: // '{'
|
|
903
|
-
return lexFrontMatterJSON;
|
|
904
|
-
case r === 0x23: // '#'
|
|
905
|
-
return lexFrontMatterOrgMode;
|
|
906
|
-
case r === byteOrderMark:
|
|
907
|
-
this.emit(item_1.ItemType.TypeIgnore);
|
|
908
|
-
break;
|
|
909
|
-
case !isSpace(r) && !isEndOfLine(r):
|
|
910
|
-
break LOOP;
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
// Now move on to the shortcodes.
|
|
914
|
-
return () => this.lexMainSection();
|
|
915
|
-
}
|
|
916
|
-
// lexInsideShortcode scans the content inside a shortcode
|
|
917
|
-
lexInsideShortcode() {
|
|
918
|
-
if (this.hasPrefix(this.currentRightShortcodeDelim())) {
|
|
919
|
-
return this.lexShortcodeRightDelim;
|
|
920
|
-
}
|
|
921
|
-
const r = this.next();
|
|
922
|
-
if (r === eof) {
|
|
923
|
-
// eol is allowed inside shortcodes; this may go to end of document before it fails
|
|
924
|
-
return this.errorf("unclosed shortcode action");
|
|
925
|
-
}
|
|
926
|
-
if (isSpace(r) || isEndOfLine(r)) {
|
|
927
|
-
this.ignore();
|
|
928
|
-
}
|
|
929
|
-
else if (r === 0x3D) { // '='
|
|
930
|
-
this.consumeSpace();
|
|
931
|
-
this.ignore();
|
|
932
|
-
const peek = this.peek();
|
|
933
|
-
if (peek === 0x22 || peek === 0x5C) { // '"' or '\\'
|
|
934
|
-
return this.lexShortcodeQuotedParamVal(peek !== 0x5C, item_1.ItemType.tScParamVal);
|
|
935
|
-
}
|
|
936
|
-
else if (peek === 0x60) { // '`'
|
|
937
|
-
return this.lexShortCodeParamRawStringVal(item_1.ItemType.tScParamVal);
|
|
938
|
-
}
|
|
939
|
-
return this.lexShortcodeParamVal;
|
|
940
|
-
}
|
|
941
|
-
else if (r === 0x2F) { // '/'
|
|
942
|
-
if (this.lexerShortcodeState.currShortcodeName === "") {
|
|
943
|
-
return this.errorf("got closing shortcode, but none is open");
|
|
944
|
-
}
|
|
945
|
-
this.lexerShortcodeState.closingState++;
|
|
946
|
-
this.lexerShortcodeState.isInline = false;
|
|
947
|
-
this.emit(item_1.ItemType.tScClose);
|
|
948
|
-
}
|
|
949
|
-
else if (r === 0x5C) { // '\\'
|
|
950
|
-
this.ignore();
|
|
951
|
-
if (this.peek() === 0x22 || this.peek() === 0x60) { // '"' or '`'
|
|
952
|
-
return this.lexShortcodeParam(true);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
else if (this.lexerShortcodeState.elementStepNum > 0 && (isAlphaNumericOrHyphen(r) || r === 0x22 || r === 0x60)) { // '"' or '`'
|
|
956
|
-
// positional params can have quotes
|
|
957
|
-
this.backup();
|
|
958
|
-
return this.lexShortcodeParam(false);
|
|
959
|
-
}
|
|
960
|
-
else if (isAlphaNumeric(r)) {
|
|
961
|
-
this.backup();
|
|
962
|
-
return this.lexIdentifierInShortcode;
|
|
963
|
-
}
|
|
964
|
-
else {
|
|
965
|
-
return this.errorf(`unrecognized character in shortcode action: U+${r.toString(16).toUpperCase()} '${String.fromCharCode(r)}'. Note: Parameters with non-alphanumeric args must be quoted`);
|
|
966
|
-
}
|
|
967
|
-
return this.lexInsideShortcode;
|
|
968
|
-
}
|
|
969
|
-
// lexShortcodeParam scans a shortcode parameter.
|
|
970
|
-
lexShortcodeParam(escapedQuoteStart) {
|
|
971
|
-
let first = true;
|
|
972
|
-
let nextEq = false;
|
|
973
|
-
let r;
|
|
974
|
-
for (;;) {
|
|
975
|
-
r = this.next();
|
|
976
|
-
if (first) {
|
|
977
|
-
if (r === 0x22 || (r === 0x60 && !escapedQuoteStart)) { // '"' or '`'
|
|
978
|
-
// a positional param with quotes
|
|
979
|
-
if (this.lexerShortcodeState.paramElements === 2) {
|
|
980
|
-
return this.errorf("got quoted positional parameter. Cannot mix named and positional parameters");
|
|
981
|
-
}
|
|
982
|
-
this.lexerShortcodeState.paramElements = 1;
|
|
983
|
-
this.backup();
|
|
984
|
-
if (r === 0x22) { // '"'
|
|
985
|
-
return () => this.lexShortcodeQuotedParamVal(!escapedQuoteStart, item_1.ItemType.tScParam);
|
|
986
|
-
}
|
|
987
|
-
return () => this.lexShortCodeParamRawStringVal(item_1.ItemType.tScParam);
|
|
988
|
-
}
|
|
989
|
-
else if (r === 0x60 && escapedQuoteStart) { // '`'
|
|
990
|
-
return this.errorf("unrecognized escape character");
|
|
991
|
-
}
|
|
992
|
-
first = false;
|
|
993
|
-
}
|
|
994
|
-
else if (r === 0x3D) { // '='
|
|
995
|
-
// a named param
|
|
996
|
-
this.backup();
|
|
997
|
-
nextEq = true;
|
|
998
|
-
break;
|
|
999
|
-
}
|
|
1000
|
-
if (!isAlphaNumericOrHyphen(r) && r !== 0x2E) { // '.' for floats
|
|
1001
|
-
this.backup();
|
|
1002
|
-
break;
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
if (this.lexerShortcodeState.paramElements === 0) {
|
|
1006
|
-
this.lexerShortcodeState.paramElements++;
|
|
1007
|
-
if (nextEq) {
|
|
1008
|
-
this.lexerShortcodeState.paramElements++;
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
else {
|
|
1012
|
-
if (nextEq && this.lexerShortcodeState.paramElements === 1) {
|
|
1013
|
-
return this.errorf(`got named parameter '${new TextDecoder().decode(this.current())}'. Cannot mix named and positional parameters`);
|
|
1014
|
-
}
|
|
1015
|
-
else if (!nextEq && this.lexerShortcodeState.paramElements === 2) {
|
|
1016
|
-
return this.errorf(`got positional parameter '${new TextDecoder().decode(this.current())}'. Cannot mix named and positional parameters`);
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
this.emit(item_1.ItemType.tScParam);
|
|
1020
|
-
return this.lexInsideShortcode;
|
|
1021
|
-
}
|
|
1022
|
-
// lexShortcodeParamVal scans a shortcode parameter value.
|
|
1023
|
-
lexShortcodeParamVal() {
|
|
1024
|
-
const r = this.next();
|
|
1025
|
-
if (isSpace(r)) {
|
|
1026
|
-
this.ignore();
|
|
1027
|
-
return () => this.lexShortcodeParamVal();
|
|
1028
|
-
}
|
|
1029
|
-
this.backup();
|
|
1030
|
-
switch (r) {
|
|
1031
|
-
case 0x22: // '"'
|
|
1032
|
-
this.next();
|
|
1033
|
-
this.ignore();
|
|
1034
|
-
return () => this.lexShortcodeQuotedParamVal(false, item_1.ItemType.tScParamVal);
|
|
1035
|
-
case 0x60: // '`'
|
|
1036
|
-
this.next();
|
|
1037
|
-
this.ignore();
|
|
1038
|
-
return () => this.lexShortCodeParamRawStringVal(item_1.ItemType.tScParamVal);
|
|
1039
|
-
default:
|
|
1040
|
-
return () => this.lexShortcodeValueUnquoted();
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
// lexShortcodeValueUnquoted scans an unquoted shortcode parameter value.
|
|
1044
|
-
lexShortcodeValueUnquoted() {
|
|
1045
|
-
for (;;) {
|
|
1046
|
-
const r = this.next();
|
|
1047
|
-
if (r === eof || isSpace(r) || this.isRightShortcodeDelim()) {
|
|
1048
|
-
this.backup();
|
|
1049
|
-
if (this.pos > this.start) {
|
|
1050
|
-
this.emit(item_1.ItemType.tScParamVal);
|
|
1051
|
-
}
|
|
1052
|
-
return this.lexInsideShortcode;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
// lexShortcodeQuotedParamVal scans a quoted shortcode parameter value.
|
|
1057
|
-
lexShortcodeQuotedParamVal(escapedQuotedValuesAllowed, typ) {
|
|
1058
|
-
let openQuoteFound = false;
|
|
1059
|
-
let escapedInnerQuoteFound = false;
|
|
1060
|
-
let escapedQuoteState = 0;
|
|
1061
|
-
LOOP: for (;;) {
|
|
1062
|
-
const r = this.next();
|
|
1063
|
-
switch (true) {
|
|
1064
|
-
case r === 0x5C: // '\'
|
|
1065
|
-
if (this.peek() === 0x22) { // '"'
|
|
1066
|
-
if (openQuoteFound && !escapedQuotedValuesAllowed) {
|
|
1067
|
-
this.backup();
|
|
1068
|
-
break LOOP;
|
|
1069
|
-
}
|
|
1070
|
-
else if (openQuoteFound) {
|
|
1071
|
-
// the coming quote is inside
|
|
1072
|
-
escapedInnerQuoteFound = true;
|
|
1073
|
-
escapedQuoteState = 1;
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
else if (this.peek() === 0x60) { // '`'
|
|
1077
|
-
return this.errorf("unrecognized escape character");
|
|
1078
|
-
}
|
|
1079
|
-
break;
|
|
1080
|
-
case r === eof:
|
|
1081
|
-
case r === 0x0A: // '\n'
|
|
1082
|
-
return this.errorf(`unterminated quoted string in shortcode parameter-argument: '${new TextDecoder().decode(this.current())}'`);
|
|
1083
|
-
case r === 0x22: // '"'
|
|
1084
|
-
if (escapedQuoteState === 0) {
|
|
1085
|
-
if (openQuoteFound) {
|
|
1086
|
-
this.backup();
|
|
1087
|
-
break LOOP;
|
|
1088
|
-
}
|
|
1089
|
-
else {
|
|
1090
|
-
openQuoteFound = true;
|
|
1091
|
-
this.ignore();
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
else {
|
|
1095
|
-
escapedQuoteState = 0;
|
|
1096
|
-
}
|
|
1097
|
-
break;
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
if (escapedInnerQuoteFound) {
|
|
1101
|
-
this.ignoreEscapesAndEmit(typ, true);
|
|
1102
|
-
}
|
|
1103
|
-
else {
|
|
1104
|
-
this.emitString(typ);
|
|
1105
|
-
}
|
|
1106
|
-
const r = this.next();
|
|
1107
|
-
if (r === 0x5C) { // '\'
|
|
1108
|
-
if (this.peek() === 0x22) { // '"'
|
|
1109
|
-
// ignore the escaped closing quote
|
|
1110
|
-
this.ignore();
|
|
1111
|
-
this.next();
|
|
1112
|
-
this.ignore();
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
else if (r === 0x22) { // '"'
|
|
1116
|
-
// ignore closing quote
|
|
1117
|
-
this.ignore();
|
|
1118
|
-
}
|
|
1119
|
-
else {
|
|
1120
|
-
// handled by next state
|
|
1121
|
-
this.backup();
|
|
1122
|
-
}
|
|
1123
|
-
return this.lexInsideShortcode;
|
|
1124
|
-
}
|
|
1125
|
-
// lexShortCodeParamRawStringVal scans a raw string shortcode parameter value.
|
|
1126
|
-
lexShortCodeParamRawStringVal(typ) {
|
|
1127
|
-
let openBacktickFound = false;
|
|
1128
|
-
LOOP: for (;;) {
|
|
1129
|
-
const r = this.next();
|
|
1130
|
-
switch (r) {
|
|
1131
|
-
case 0x60: // '`'
|
|
1132
|
-
if (openBacktickFound) {
|
|
1133
|
-
this.backup();
|
|
1134
|
-
break LOOP;
|
|
1135
|
-
}
|
|
1136
|
-
else {
|
|
1137
|
-
openBacktickFound = true;
|
|
1138
|
-
this.ignore();
|
|
1139
|
-
}
|
|
1140
|
-
break;
|
|
1141
|
-
case eof:
|
|
1142
|
-
return this.errorf(`unterminated raw string in shortcode parameter-argument: '${new TextDecoder().decode(this.input.slice(this.start, this.pos))}'`);
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
this.emitString(typ);
|
|
1146
|
-
this.next();
|
|
1147
|
-
this.ignore();
|
|
1148
|
-
return this.lexInsideShortcode;
|
|
1149
|
-
}
|
|
1150
|
-
lexDone() {
|
|
1151
|
-
// Done!
|
|
1152
|
-
if (this.pos > this.start) {
|
|
1153
|
-
this.emit(item_1.ItemType.tText);
|
|
1154
|
-
}
|
|
1155
|
-
this.emit(item_1.ItemType.tEOF);
|
|
1156
|
-
return null;
|
|
1157
|
-
}
|
|
1158
|
-
lexShortcodeRightDelim() {
|
|
1159
|
-
this.pos += this.currentRightShortcodeDelim().length;
|
|
1160
|
-
this.emit(this.lexerShortcodeState.currRightDelimItem);
|
|
1161
|
-
this.lexerShortcodeState.closingState = 0;
|
|
1162
|
-
return () => this.lexMainSection();
|
|
1163
|
-
}
|
|
1164
|
-
lexShortcodeValue() {
|
|
1165
|
-
const r = this.next();
|
|
1166
|
-
switch (r) {
|
|
1167
|
-
case eof:
|
|
1168
|
-
return this.errorf("unterminated quoted string in shortcode parameter");
|
|
1169
|
-
case 0x20: // ' '
|
|
1170
|
-
case 0x09: // '\t'
|
|
1171
|
-
this.ignore();
|
|
1172
|
-
return () => this.lexShortcodeValue();
|
|
1173
|
-
case 0x22: // '"'
|
|
1174
|
-
this.ignore();
|
|
1175
|
-
return () => this.lexShortcodeValueQuoted();
|
|
1176
|
-
default:
|
|
1177
|
-
this.backup();
|
|
1178
|
-
return () => this.lexShortcodeValueUnquoted();
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
lexShortcodeValueQuoted() {
|
|
1182
|
-
for (;;) {
|
|
1183
|
-
const r = this.next();
|
|
1184
|
-
switch (r) {
|
|
1185
|
-
case eof:
|
|
1186
|
-
return this.errorf("unterminated quoted string in shortcode parameter");
|
|
1187
|
-
case 0x5C: // '\'
|
|
1188
|
-
const peek = this.peek();
|
|
1189
|
-
if (peek === 0x22) { // '"'
|
|
1190
|
-
this.next();
|
|
1191
|
-
}
|
|
1192
|
-
break;
|
|
1193
|
-
case 0x22: // '"'
|
|
1194
|
-
this.backup();
|
|
1195
|
-
this.emitString(item_1.ItemType.tScParamVal);
|
|
1196
|
-
this.next();
|
|
1197
|
-
this.ignore();
|
|
1198
|
-
return this.lexInsideShortcode;
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
isRightShortcodeDelim() {
|
|
1203
|
-
return this.hasPrefix(this.currentRightShortcodeDelim());
|
|
1204
|
-
}
|
|
1205
|
-
// lexComment scans a shortcode comment.
|
|
1206
|
-
lexComment() {
|
|
1207
|
-
const posRightComment = this.index(new Uint8Array([...rightComment, ...this.currentRightShortcodeDelim()]));
|
|
1208
|
-
if (posRightComment <= 1) {
|
|
1209
|
-
return this.errorf("comment must be closed");
|
|
1210
|
-
}
|
|
1211
|
-
// we emit all as text, except the comment markers
|
|
1212
|
-
this.emit(item_1.ItemType.tText);
|
|
1213
|
-
this.pos += leftComment.length;
|
|
1214
|
-
this.ignore();
|
|
1215
|
-
this.pos += posRightComment - leftComment.length;
|
|
1216
|
-
this.emit(item_1.ItemType.tText);
|
|
1217
|
-
this.pos += rightComment.length;
|
|
1218
|
-
this.ignore();
|
|
1219
|
-
this.pos += this.currentRightShortcodeDelim().length;
|
|
1220
|
-
this.emit(item_1.ItemType.tText);
|
|
1221
|
-
return this.lexMainSection;
|
|
1222
|
-
}
|
|
1223
|
-
// isComment checks if we're at the start of a comment
|
|
1224
|
-
isComment() {
|
|
1225
|
-
if (this.pos + 2 > this.input.length) {
|
|
1226
|
-
return false;
|
|
1227
|
-
}
|
|
1228
|
-
return this.input[this.pos] === 0x2F && this.input[this.pos + 1] === 0x2A; // /*
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
exports.pageLexer = pageLexer;
|
|
1232
|
-
function lexFrontMatterJSON(l) {
|
|
1233
|
-
// Include the left delimiter
|
|
1234
|
-
l.backup();
|
|
1235
|
-
let inQuote = false;
|
|
1236
|
-
let level = 0;
|
|
1237
|
-
for (;;) {
|
|
1238
|
-
const r = l.next();
|
|
1239
|
-
switch (true) {
|
|
1240
|
-
case r === eof:
|
|
1241
|
-
return l.errorf("unexpected EOF parsing JSON front matter");
|
|
1242
|
-
case r === 0x7B: // '{'
|
|
1243
|
-
if (!inQuote) {
|
|
1244
|
-
level++;
|
|
1245
|
-
}
|
|
1246
|
-
break;
|
|
1247
|
-
case r === 0x7D: // '}'
|
|
1248
|
-
if (!inQuote) {
|
|
1249
|
-
level--;
|
|
1250
|
-
}
|
|
1251
|
-
break;
|
|
1252
|
-
case r === 0x22: // '"'
|
|
1253
|
-
inQuote = !inQuote;
|
|
1254
|
-
break;
|
|
1255
|
-
case r === 0x5C: // '\\'
|
|
1256
|
-
// This may be an escaped quote. Make sure it's not marked as a
|
|
1257
|
-
// real one.
|
|
1258
|
-
l.next();
|
|
1259
|
-
break;
|
|
1260
|
-
}
|
|
1261
|
-
if (level === 0) {
|
|
1262
|
-
break;
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
l.consumeCRLF();
|
|
1266
|
-
l.emit(item_1.ItemType.TypeFrontMatterJSON);
|
|
1267
|
-
return () => l.lexMainSection();
|
|
1268
|
-
}
|
|
1269
|
-
function lexFrontMatterOrgMode(l) {
|
|
1270
|
-
l.summaryDivider = summaryDividerOrg;
|
|
1271
|
-
l.backup();
|
|
1272
|
-
if (!l.hasPrefix(delimOrg)) {
|
|
1273
|
-
return () => l.lexMainSection();
|
|
1274
|
-
}
|
|
1275
|
-
// Read lines until we no longer see a #+ prefix
|
|
1276
|
-
LOOP: for (;;) {
|
|
1277
|
-
const r = l.next();
|
|
1278
|
-
switch (true) {
|
|
1279
|
-
case r === 0x0A: // '\n'
|
|
1280
|
-
if (!l.hasPrefix(delimOrg)) {
|
|
1281
|
-
break LOOP;
|
|
1282
|
-
}
|
|
1283
|
-
break;
|
|
1284
|
-
case r === eof:
|
|
1285
|
-
break LOOP;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
l.emit(item_1.ItemType.TypeFrontMatterORG);
|
|
1289
|
-
return () => l.lexMainSection();
|
|
1290
|
-
}
|
|
1291
|
-
// ParseBytes parses the page in b according to the given Config.
|
|
1292
|
-
function ParseBytes(b, cfg) {
|
|
1293
|
-
const l = parseBytes(b, cfg, lexIntroSection);
|
|
1294
|
-
return [l.items, l.err];
|
|
1295
|
-
}
|
|
1296
|
-
// ParseBytesMain parses b starting with the main section.
|
|
1297
|
-
function ParseBytesMain(b, cfg) {
|
|
1298
|
-
const l = parseBytes(b, cfg, lexMainSection);
|
|
1299
|
-
return [l.items, l.err];
|
|
1300
|
-
}
|
|
1301
|
-
function parseBytes(b, cfg, start) {
|
|
1302
|
-
const l = newPageLexer(b, start, cfg);
|
|
1303
|
-
return l.run();
|
|
1304
|
-
}
|
|
1305
|
-
// HasShortcode returns true if the given string contains a shortcode.
|
|
1306
|
-
function HasShortcode(s) {
|
|
1307
|
-
return s.includes("{{<") || s.includes("{{%");
|
|
1308
|
-
}
|
|
1309
|
-
// note: the input position here is normally 0 (start), but
|
|
1310
|
-
// can be set if position of first shortcode is known
|
|
1311
|
-
function newPageLexer(input, stateStart, cfg) {
|
|
1312
|
-
return new pageLexer(input, stateStart, cfg);
|
|
1313
|
-
}
|
|
1314
|
-
// Export the lexIntroSection function
|
|
1315
|
-
function lexIntroSection(l) {
|
|
1316
|
-
return l.lexIntroSection();
|
|
1317
|
-
}
|
|
1318
|
-
function lexMainSection(l) {
|
|
1319
|
-
return l.lexMainSection();
|
|
1320
|
-
}
|
|
1321
|
-
//# sourceMappingURL=pagelexer.js.map
|