@frontmcp/uipack 1.10.8 → 1.10.9-rc.2

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/types/index.js CHANGED
@@ -1,108 +1 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // libs/uipack/src/types/index.ts
21
- var types_exports = {};
22
- __export(types_exports, {
23
- DEFAULT_CSP_BY_TYPE: () => DEFAULT_CSP_BY_TYPE,
24
- DEFAULT_RENDERER_ASSETS: () => DEFAULT_RENDERER_ASSETS,
25
- isBundlingMode: () => isBundlingMode,
26
- isDisplayMode: () => isDisplayMode,
27
- isOutputMode: () => isOutputMode,
28
- isResourceMode: () => isResourceMode,
29
- isUIType: () => isUIType
30
- });
31
- module.exports = __toCommonJS(types_exports);
32
-
33
- // libs/uipack/src/types/ui-runtime.ts
34
- function isUIType(value) {
35
- return typeof value === "string" && ["html", "react", "mdx", "markdown", "auto"].includes(value);
36
- }
37
- function isBundlingMode(value) {
38
- return typeof value === "string" && ["static", "dynamic"].includes(value);
39
- }
40
- function isResourceMode(value) {
41
- return typeof value === "string" && ["cdn", "inline"].includes(value);
42
- }
43
- function isDisplayMode(value) {
44
- return typeof value === "string" && ["inline", "fullscreen", "pip"].includes(value);
45
- }
46
- function isOutputMode(value) {
47
- return typeof value === "string" && ["code-only", "full-ssr"].includes(value);
48
- }
49
- var DEFAULT_CSP_BY_TYPE = {
50
- html: {
51
- scriptSrc: ["'self'", "'unsafe-inline'"],
52
- styleSrc: ["'self'", "'unsafe-inline'"],
53
- connectSrc: []
54
- },
55
- react: {
56
- scriptSrc: ["'self'", "'unsafe-inline'", "https://unpkg.com"],
57
- styleSrc: ["'self'", "'unsafe-inline'"],
58
- connectSrc: []
59
- },
60
- mdx: {
61
- scriptSrc: ["'self'", "'unsafe-inline'", "https://unpkg.com"],
62
- styleSrc: ["'self'", "'unsafe-inline'"],
63
- connectSrc: []
64
- },
65
- markdown: {
66
- scriptSrc: ["'self'", "'unsafe-inline'"],
67
- styleSrc: ["'self'", "'unsafe-inline'"],
68
- connectSrc: []
69
- },
70
- auto: {
71
- scriptSrc: ["'self'", "'unsafe-inline'", "https://unpkg.com"],
72
- styleSrc: ["'self'", "'unsafe-inline'"],
73
- connectSrc: []
74
- }
75
- };
76
- var DEFAULT_RENDERER_ASSETS = {
77
- html: {
78
- handlebars: { url: "https://unpkg.com/handlebars@latest/dist/handlebars.runtime.min.js" }
79
- },
80
- react: {
81
- react: { url: "https://unpkg.com/react@18/umd/react.production.min.js" },
82
- reactDom: { url: "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" }
83
- },
84
- mdx: {
85
- react: { url: "https://unpkg.com/react@18/umd/react.production.min.js" },
86
- reactDom: { url: "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" },
87
- markdown: { url: "https://unpkg.com/marked@latest/marked.min.js" }
88
- },
89
- markdown: {
90
- markdown: { url: "https://unpkg.com/marked@latest/marked.min.js" }
91
- },
92
- auto: {
93
- react: { url: "https://unpkg.com/react@18/umd/react.production.min.js" },
94
- reactDom: { url: "https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" },
95
- markdown: { url: "https://unpkg.com/marked@latest/marked.min.js" },
96
- handlebars: { url: "https://unpkg.com/handlebars@latest/dist/handlebars.runtime.min.js" }
97
- }
98
- };
99
- // Annotate the CommonJS export names for ESM import in node:
100
- 0 && (module.exports = {
101
- DEFAULT_CSP_BY_TYPE,
102
- DEFAULT_RENDERER_ASSETS,
103
- isBundlingMode,
104
- isDisplayMode,
105
- isOutputMode,
106
- isResourceMode,
107
- isUIType
108
- });
1
+ "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from==="object"||typeof from==="function"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:true}),mod);var types_exports={};__export(types_exports,{DEFAULT_CSP_BY_TYPE:()=>DEFAULT_CSP_BY_TYPE,DEFAULT_RENDERER_ASSETS:()=>DEFAULT_RENDERER_ASSETS,isBundlingMode:()=>isBundlingMode,isDisplayMode:()=>isDisplayMode,isOutputMode:()=>isOutputMode,isResourceMode:()=>isResourceMode,isUIType:()=>isUIType});module.exports=__toCommonJS(types_exports);function isUIType(value){return typeof value==="string"&&["html","react","mdx","markdown","auto"].includes(value)}function isBundlingMode(value){return typeof value==="string"&&["static","dynamic"].includes(value)}function isResourceMode(value){return typeof value==="string"&&["cdn","inline"].includes(value)}function isDisplayMode(value){return typeof value==="string"&&["inline","fullscreen","pip"].includes(value)}function isOutputMode(value){return typeof value==="string"&&["code-only","full-ssr"].includes(value)}var DEFAULT_CSP_BY_TYPE={html:{scriptSrc:["'self'","'unsafe-inline'"],styleSrc:["'self'","'unsafe-inline'"],connectSrc:[]},react:{scriptSrc:["'self'","'unsafe-inline'","https://unpkg.com"],styleSrc:["'self'","'unsafe-inline'"],connectSrc:[]},mdx:{scriptSrc:["'self'","'unsafe-inline'","https://unpkg.com"],styleSrc:["'self'","'unsafe-inline'"],connectSrc:[]},markdown:{scriptSrc:["'self'","'unsafe-inline'"],styleSrc:["'self'","'unsafe-inline'"],connectSrc:[]},auto:{scriptSrc:["'self'","'unsafe-inline'","https://unpkg.com"],styleSrc:["'self'","'unsafe-inline'"],connectSrc:[]}};var DEFAULT_RENDERER_ASSETS={html:{handlebars:{url:"https://unpkg.com/handlebars@latest/dist/handlebars.runtime.min.js"}},react:{react:{url:"https://unpkg.com/react@18/umd/react.production.min.js"},reactDom:{url:"https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"}},mdx:{react:{url:"https://unpkg.com/react@18/umd/react.production.min.js"},reactDom:{url:"https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"},markdown:{url:"https://unpkg.com/marked@latest/marked.min.js"}},markdown:{markdown:{url:"https://unpkg.com/marked@latest/marked.min.js"}},auto:{react:{url:"https://unpkg.com/react@18/umd/react.production.min.js"},reactDom:{url:"https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"},markdown:{url:"https://unpkg.com/marked@latest/marked.min.js"},handlebars:{url:"https://unpkg.com/handlebars@latest/dist/handlebars.runtime.min.js"}}};0&&(module.exports={DEFAULT_CSP_BY_TYPE,DEFAULT_RENDERER_ASSETS,isBundlingMode,isDisplayMode,isOutputMode,isResourceMode,isUIType});