@hyperfixi/core 2.9.4 → 2.11.0
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/dist/ast-utils/index.js +400 -89
- package/dist/ast-utils/index.mjs +400 -89
- package/dist/behaviors/index.js +2 -1
- package/dist/behaviors/index.mjs +2 -1
- package/dist/chunks/{bridge-DhmZ3Khh.js → bridge-De7lnU_9.js} +2 -2
- package/dist/chunks/browser-modular-DpHHlmJ0.js +2 -0
- package/dist/chunks/{index-DKrx4rv2.js → index-D6-8bcsy.js} +2 -2
- package/dist/commands/advanced/async.d.ts +0 -8
- package/dist/commands/advanced/js.d.ts +0 -8
- package/dist/commands/animation/measure.d.ts +0 -8
- package/dist/commands/animation/settle.d.ts +0 -8
- package/dist/commands/animation/start-view-transition.d.ts +0 -8
- package/dist/commands/animation/take.d.ts +0 -8
- package/dist/commands/animation/transition.d.ts +0 -8
- package/dist/commands/async/fetch.d.ts +0 -8
- package/dist/commands/async/wait.d.ts +0 -8
- package/dist/commands/behaviors/install.d.ts +0 -8
- package/dist/commands/content/append.d.ts +0 -8
- package/dist/commands/content/prepend.d.ts +0 -8
- package/dist/commands/control-flow/break.d.ts +0 -8
- package/dist/commands/control-flow/continue.d.ts +0 -8
- package/dist/commands/control-flow/exit.d.ts +0 -8
- package/dist/commands/control-flow/halt.d.ts +0 -8
- package/dist/commands/control-flow/if.d.ts +0 -8
- package/dist/commands/control-flow/repeat.d.ts +0 -8
- package/dist/commands/control-flow/return.d.ts +0 -8
- package/dist/commands/control-flow/throw.d.ts +0 -8
- package/dist/commands/data/clear.d.ts +0 -8
- package/dist/commands/data/default.d.ts +0 -8
- package/dist/commands/data/get.d.ts +0 -8
- package/dist/commands/data/increment.d.ts +0 -8
- package/dist/commands/data/set.d.ts +0 -8
- package/dist/commands/decorators/index.d.ts +2 -8
- package/dist/commands/dom/add.d.ts +0 -8
- package/dist/commands/dom/close.d.ts +0 -8
- package/dist/commands/dom/empty.d.ts +0 -8
- package/dist/commands/dom/hide.d.ts +0 -8
- package/dist/commands/dom/make.d.ts +0 -8
- package/dist/commands/dom/open.d.ts +0 -8
- package/dist/commands/dom/process-partials.d.ts +0 -8
- package/dist/commands/dom/put.d.ts +0 -8
- package/dist/commands/dom/remove.d.ts +0 -8
- package/dist/commands/dom/reset.d.ts +0 -8
- package/dist/commands/dom/select.d.ts +0 -8
- package/dist/commands/dom/show.d.ts +0 -8
- package/dist/commands/dom/swap.d.ts +2 -18
- package/dist/commands/dom/toggle.d.ts +0 -8
- package/dist/commands/events/trigger.d.ts +0 -8
- package/dist/commands/execution/blur.d.ts +0 -8
- package/dist/commands/execution/call.d.ts +0 -8
- package/dist/commands/execution/focus.d.ts +0 -8
- package/dist/commands/execution/pseudo-command.d.ts +0 -8
- package/dist/commands/helpers/dom-mutation.d.ts +3 -2
- package/dist/commands/helpers/index.d.ts +1 -1
- package/dist/commands/index.js +156 -31
- package/dist/commands/index.mjs +156 -31
- package/dist/commands/navigation/go.d.ts +0 -8
- package/dist/commands/navigation/push-url.d.ts +0 -8
- package/dist/commands/navigation/scroll-to.d.ts +0 -8
- package/dist/commands/templates/render.d.ts +0 -8
- package/dist/commands/utility/beep.d.ts +0 -8
- package/dist/commands/utility/breakpoint.d.ts +0 -8
- package/dist/commands/utility/copy.d.ts +0 -8
- package/dist/commands/utility/log.d.ts +0 -8
- package/dist/commands/utility/pick.d.ts +0 -8
- package/dist/commands/utility/tell.d.ts +0 -8
- package/dist/hyperfixi-browser-classic-i18n.js +1 -1
- package/dist/hyperfixi-browser-minimal.js +1 -1
- package/dist/hyperfixi-browser-standard.js +1 -1
- package/dist/hyperfixi-browser.js +1 -1
- package/dist/hyperfixi-classic-i18n.js +1 -1
- package/dist/hyperfixi-hx-v4.js +1 -1
- package/dist/hyperfixi-minimal.js +1 -1
- package/dist/hyperfixi-multilingual.js +1 -1
- package/dist/hyperfixi-standard.js +1 -1
- package/dist/hyperfixi.js +1 -1
- package/dist/hyperfixi.mjs +1 -1
- package/dist/index.js +660 -171
- package/dist/index.min.js +1 -1
- package/dist/index.mjs +660 -171
- package/dist/lokascript-browser-classic-i18n.js +1 -1
- package/dist/lokascript-browser-minimal.js +1 -1
- package/dist/lokascript-browser-standard.js +1 -1
- package/dist/lokascript-browser.js +1 -1
- package/dist/lokascript-multilingual.js +1 -1
- package/dist/lsp-metadata.js +2 -2
- package/dist/lsp-metadata.mjs +2 -2
- package/dist/metadata.d.ts +1 -1
- package/dist/metadata.js +13 -11
- package/dist/metadata.mjs +13 -11
- package/dist/parser/command-parsers/dom-commands.d.ts +1 -0
- package/dist/parser/full-parser.js +47 -1
- package/dist/parser/full-parser.mjs +47 -1
- package/dist/reference/index.js +13 -7
- package/dist/reference/index.mjs +13 -7
- package/dist/registry/index.js +56 -10
- package/dist/registry/index.mjs +56 -10
- package/dist/runtime/command-adapter.d.ts +8 -8
- package/dist/utils/element-check.d.ts +1 -0
- package/dist/version.d.ts +2 -0
- package/package.json +5 -5
- package/dist/chunks/browser-modular-BllAMlht.js +0 -2
package/dist/behaviors/index.js
CHANGED
|
@@ -583,8 +583,9 @@ const morphAdapter = {
|
|
|
583
583
|
function getStartViewTransition() {
|
|
584
584
|
if (typeof document === 'undefined')
|
|
585
585
|
return undefined;
|
|
586
|
-
|
|
586
|
+
const fn = document
|
|
587
587
|
.startViewTransition;
|
|
588
|
+
return typeof fn === 'function' ? fn.bind(document) : undefined;
|
|
588
589
|
}
|
|
589
590
|
function isViewTransitionsSupported() {
|
|
590
591
|
return typeof getStartViewTransition() === 'function';
|
package/dist/behaviors/index.mjs
CHANGED
|
@@ -581,8 +581,9 @@ const morphAdapter = {
|
|
|
581
581
|
function getStartViewTransition() {
|
|
582
582
|
if (typeof document === 'undefined')
|
|
583
583
|
return undefined;
|
|
584
|
-
|
|
584
|
+
const fn = document
|
|
585
585
|
.startViewTransition;
|
|
586
|
+
return typeof fn === 'function' ? fn.bind(document) : undefined;
|
|
586
587
|
}
|
|
587
588
|
function isViewTransitionsSupported() {
|
|
588
589
|
return typeof getStartViewTransition() === 'function';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as n,d as i}from"./browser-modular-
|
|
2
|
-
//# sourceMappingURL=bridge-
|
|
1
|
+
import{D as n,d as i}from"./browser-modular-DpHHlmJ0.js";import"./feature-sockets-CcTxD5sT.js";function e(n){const i=n.diagnostics;return i?.length?i.filter(n=>"unconsumed-input"===n.code).map(n=>n.message):[]}let t=null;async function a(){return t||(t=await import("./browser-modular-DpHHlmJ0.js").then(function(n){return n.n})),t}class c{constructor(i={}){this._initialized=!1,this.config={confidenceThreshold:i.confidenceThreshold??n,fallbackOnLowConfidence:i.fallbackOnLowConfidence??!0}}async initialize(){await a(),this._initialized=!0}isInitialized(){return this._initialized}async transform(n,i,e){if(this.isInitialized()||await this.initialize(),i===e)return{output:n,usedSemantic:!1,confidence:1,sourceLang:i,targetLang:e};const t=await a();try{const a=t.translate(n,i,e);if(a!==n)return{output:a,usedSemantic:!0,confidence:.9,sourceLang:i,targetLang:e}}catch{}return{output:n,usedSemantic:!1,confidence:0,sourceLang:i,targetLang:e}}async parse(n,i){this.isInitialized()||await this.initialize();return(await a()).parseSemantic(n,i).node??null}async render(n,i){return(await a()).render(n,i)}async parseToAST(n,i){this.isInitialized()||await this.initialize();const e=await a(),t=e.parseSemantic(n,i);if(t.confidence>=this.config.confidenceThreshold&&t.node)try{return e.buildAST(t.node).ast}catch(n){}return null}async parseToASTWithDetails(n,i){this.isInitialized()||await this.initialize();const t=await a(),c=t.parseSemantic(n,i);if(c.confidence>=this.config.confidenceThreshold&&c.node)try{const n=t.buildAST(c.node);return{ast:n.ast,usedDirectPath:!0,confidence:c.confidence,lang:i,fallbackText:null,warnings:[...n.warnings??[],...e(c.node)]}}catch{}if(c.node&&this.config.fallbackOnLowConfidence){const n=t.render(c.node,"en");return{ast:null,usedDirectPath:!1,confidence:c.confidence,lang:i,fallbackText:n}}return{ast:null,usedDirectPath:!1,confidence:c.confidence,lang:i,fallbackText:null}}async getAllTranslations(n,i){const e=(await a()).getSupportedLanguages(),t={};for(const a of e)t[a]=await this.transform(n,i,a);return t}}export{c as SemanticGrammarBridge};
|
|
2
|
+
//# sourceMappingURL=bridge-De7lnU_9.js.map
|