@stacksjs/stx-vscode 0.2.634 → 0.2.635
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.
|
@@ -93,6 +93,7 @@ declare module 'stx' {
|
|
|
93
93
|
export const useLocalStorage: typeof globalThis.useLocalStorage
|
|
94
94
|
export const useMediaQuery: typeof globalThis.useMediaQuery
|
|
95
95
|
export const useModel: typeof globalThis.useModel
|
|
96
|
+
export const useNativeDesktop: typeof globalThis.useNativeDesktop
|
|
96
97
|
export const useMutation: typeof globalThis.useMutation
|
|
97
98
|
export const useOptimistic: typeof globalThis.useOptimistic
|
|
98
99
|
export const usePreferredContrast: typeof globalThis.usePreferredContrast
|
|
@@ -1013,6 +1013,7 @@ interface StxRuntimeRegistry {
|
|
|
1013
1013
|
refDebounced: typeof refDebounced
|
|
1014
1014
|
useThrottle: typeof useThrottle
|
|
1015
1015
|
useThrottleFn: typeof useThrottleFn
|
|
1016
|
+
useNativeDesktop: typeof useNativeDesktop
|
|
1016
1017
|
useInterval: typeof useInterval
|
|
1017
1018
|
useTimeout: typeof useTimeout
|
|
1018
1019
|
useTimeoutFn: typeof useTimeoutFn
|
|
@@ -1078,3 +1079,9 @@ interface Window {
|
|
|
1078
1079
|
__stxRouter?: boolean
|
|
1079
1080
|
__stxRouterConfig?: Record<string, any>
|
|
1080
1081
|
}
|
|
1082
|
+
|
|
1083
|
+
/** Native bridge accessor with mount-aware, exactly-once readiness and teardown. */
|
|
1084
|
+
declare function useNativeDesktop(): {
|
|
1085
|
+
(): import('craft-native').CraftBridgeAPI | null
|
|
1086
|
+
onReady(callback: (bridge: import('craft-native').CraftBridgeAPI) => void): () => void
|
|
1087
|
+
}
|
|
@@ -7,7 +7,7 @@ var wt=Object.create;var{getPrototypeOf:vt,defineProperty:ve,getOwnPropertyNames
|
|
|
7
7
|
`?`
|
|
8
8
|
`:" ",t++}s+=" ",t++,n=K,i="";continue}if(r==="/"&&$e(n,i)){let a=Te(e,t);if(a!==-1){s+=`/${" ".repeat(a-t-2)}/`,t=a,n=K,i="";continue}}if(r==="`"){s+=" ",t++;while(t<e.length&&e[t]!=="`"){if(e[t]==="\\"){s+=" ",t+=2;continue}if(e[t]==="$"&&e[t+1]==="{"){let a=t+2,c=_e(e,a);if(s+=" ",s+=L(e.slice(a,c)),c<e.length)s+=" ";t=c+1;continue}s+=e[t]===`
|
|
9
9
|
`?`
|
|
10
|
-
`:" ",t++}s+=" ",t++,n=K,i="";continue}if(s+=r,t++,/[\w$]/.test(r))i=/[\w$]/.test(n)?i+r:r,n=r;else if(!/\s/.test(r))n=r,i=""}return s}function Q(e){let s=new Uint16Array(e.length),t=0,n=!0;for(let i=0;i<e.length;i++){let o=e[i];if(o===")"||o==="]"||o==="}")if(t===0)n=!1;else t--;if(s[i]=t,o==="("||o==="["||o==="{")t++}return{depths:s,balanced:n&&t===0}}function Ce(e){let s=e.indexOf(" as ");if(s!==-1){let o=e.slice(0,s).trim(),r=e.slice(s+4).trim();return o&&r?{arrayExpr:o,itemVar:r}:null}let t=/^\s*(.+?)\s+in\s+([\s\S]+)$/.exec(e);if(!t)return null;let n=t[1].trim().replace(/^\(([\s\S]*)\)$/,"$1").trim(),i=t[2].trim();return n&&i?{arrayExpr:i,itemVar:n}:null}var H=["batch","cachedQuery","clearServerData","computed","configureFetch","defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","defineStore","derived","effect","flushKeptState","forgetKeptState","goBack","goForward","inject","invalidateRoute","isDerived","isSignal","keptState","memo","navigate","nextTick","onBeforeMount","onBeforeUnmount","onDestroy","onMount","onMounted","onUnmounted","peek","provide","reactive","ref","refDebounced","refresh","registerStoresClient","setKeptScope","setRouteParams","sharedRequest","state","untrack","useAsync","useClickOutside","useColorMode","useCookie","useCounter","useDark","useDebounce","useDebounceFn","useDebouncedValue","useDocumentVisibility","useEventListener","useFetch","useFocus","useHead","useId","useInterval","useLocalStorage","useMediaQuery","useModel","useMutation","useOptimistic","usePreferredContrast","usePreferredDark","usePreferredLight","usePreferredReducedMotion","useQuery","useReactiveProp","useRef","useRoute","useRouteParam","useRouteParams","useScrollLock","useSearchParams","useSeoMeta","useSessionStorage","useSlots","useStore","useThrottle","useThrottleFn","useTimeout","useTimeoutFn","useToggle","useWebSocket","watch","watchEffect","watchMultiple","withDefaults"];var Rt=["defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","withDefaults"];var kn=H.filter((e)=>!Rt.includes(e));var Dt=["x-text","x-html","x-model","x-show","x-if","x-for","x-cloak","x-ref","x-data","x-bind","x-class","x-style","x-tooltip","x-tooltip-position"],Pt=["x-init","x-transition","x-effect","x-on"],An=[...Dt,...Pt];var J=G(require("node:fs"),1),z=G(require("node:path"),1);function ke(e,s,t,n){let i=0;for(let o=s;o<e.length;o++)if(e[o]===t)i++;else if(e[o]===n&&!(n===">"&&e[o-1]==="=")){if(--i===0)return o}return-1}function It(e){let s=L(e),t=0,n=0,i=[];for(let o=0;o<s.length;o++)if("([{".includes(s[o]))t++;else if(")]}".includes(s[o]))t--;else if(s[o]===","&&t===0)i.push(e.slice(n,o).trim()),n=o+1;return i.push(e.slice(n).trim()),i}function ce(e,s){let t=L(e),n=new RegExp(`\\b(?:${s.map((i)=>i.replace(/[$]/g,"\\$&")).join("|")})\\s*(?=[<(])`,"g");for(let i of t.matchAll(n)){let o=i.index+i[0].length,r="";if(t[o]==="<"){let c=ke(t,o,"<",">");if(c<0)continue;r=e.slice(o+1,c),o=c+1;while(/\s/.test(t[o]||"")&&o<t.length)o++}if(t[o]!=="(")continue;let a=ke(t,o,"(",")");if(a>=0)return{type:r,args:It(e.slice(o+1,a))}}return null}var Ae=`
|
|
10
|
+
`:" ",t++}s+=" ",t++,n=K,i="";continue}if(s+=r,t++,/[\w$]/.test(r))i=/[\w$]/.test(n)?i+r:r,n=r;else if(!/\s/.test(r))n=r,i=""}return s}function Q(e){let s=new Uint16Array(e.length),t=0,n=!0;for(let i=0;i<e.length;i++){let o=e[i];if(o===")"||o==="]"||o==="}")if(t===0)n=!1;else t--;if(s[i]=t,o==="("||o==="["||o==="{")t++}return{depths:s,balanced:n&&t===0}}function Ce(e){let s=e.indexOf(" as ");if(s!==-1){let o=e.slice(0,s).trim(),r=e.slice(s+4).trim();return o&&r?{arrayExpr:o,itemVar:r}:null}let t=/^\s*(.+?)\s+in\s+([\s\S]+)$/.exec(e);if(!t)return null;let n=t[1].trim().replace(/^\(([\s\S]*)\)$/,"$1").trim(),i=t[2].trim();return n&&i?{arrayExpr:i,itemVar:n}:null}var H=["batch","cachedQuery","clearServerData","computed","configureFetch","defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","defineStore","derived","effect","flushKeptState","forgetKeptState","goBack","goForward","inject","invalidateRoute","isDerived","isSignal","keptState","memo","navigate","nextTick","onBeforeMount","onBeforeUnmount","onDestroy","onMount","onMounted","onUnmounted","peek","provide","reactive","ref","refDebounced","refresh","registerStoresClient","setKeptScope","setRouteParams","sharedRequest","state","untrack","useAsync","useClickOutside","useColorMode","useCookie","useCounter","useDark","useDebounce","useDebounceFn","useDebouncedValue","useDocumentVisibility","useEventListener","useFetch","useFocus","useHead","useId","useInterval","useLocalStorage","useMediaQuery","useModel","useMutation","useNativeDesktop","useOptimistic","usePreferredContrast","usePreferredDark","usePreferredLight","usePreferredReducedMotion","useQuery","useReactiveProp","useRef","useRoute","useRouteParam","useRouteParams","useScrollLock","useSearchParams","useSeoMeta","useSessionStorage","useSlots","useStore","useThrottle","useThrottleFn","useTimeout","useTimeoutFn","useToggle","useWebSocket","watch","watchEffect","watchMultiple","withDefaults"];var Rt=["defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","withDefaults"];var kn=H.filter((e)=>!Rt.includes(e));var Dt=["x-text","x-html","x-model","x-show","x-if","x-for","x-cloak","x-ref","x-data","x-bind","x-class","x-style","x-tooltip","x-tooltip-position"],Pt=["x-init","x-transition","x-effect","x-on"],An=[...Dt,...Pt];var J=G(require("node:fs"),1),z=G(require("node:path"),1);function ke(e,s,t,n){let i=0;for(let o=s;o<e.length;o++)if(e[o]===t)i++;else if(e[o]===n&&!(n===">"&&e[o-1]==="=")){if(--i===0)return o}return-1}function It(e){let s=L(e),t=0,n=0,i=[];for(let o=0;o<s.length;o++)if("([{".includes(s[o]))t++;else if(")]}".includes(s[o]))t--;else if(s[o]===","&&t===0)i.push(e.slice(n,o).trim()),n=o+1;return i.push(e.slice(n).trim()),i}function ce(e,s){let t=L(e),n=new RegExp(`\\b(?:${s.map((i)=>i.replace(/[$]/g,"\\$&")).join("|")})\\s*(?=[<(])`,"g");for(let i of t.matchAll(n)){let o=i.index+i[0].length,r="";if(t[o]==="<"){let c=ke(t,o,"<",">");if(c<0)continue;r=e.slice(o+1,c),o=c+1;while(/\s/.test(t[o]||"")&&o<t.length)o++}if(t[o]!=="(")continue;let a=ke(t,o,"(",")");if(a>=0)return{type:r,args:It(e.slice(o+1,a))}}return null}var Ae=`
|
|
11
11
|
type __StxCtor<T> = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends ArrayConstructor ? unknown[] : T extends ObjectConstructor ? object : T extends readonly unknown[] ? __StxCtor<T[number]> : T extends abstract new (...args: any[]) => infer V ? V : unknown;
|
|
12
12
|
type __StxWiden<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T;
|
|
13
13
|
type __StxOption<T> = T extends { type: infer C } ? __StxCtor<C> : T extends { default: infer D } ? D extends (...args: any[]) => infer V ? V : __StxWiden<D> : __StxCtor<T>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx-vscode",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.635",
|
|
5
5
|
"description": "stx language support for VS Code extensions to embed: the hovers, completions, diagnostics, grammar, snippets, language configuration and TypeScript server plugin behind the stx extension.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|