@makeswift/runtime 0.28.10-canary.16 → 0.28.10-canary.18

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.
@@ -27,7 +27,7 @@ class MakeswiftGraphQLApiClient {
27
27
  graphqlClient;
28
28
  constructor({ endpoint }) {
29
29
  this.graphqlClient = new import_client.GraphQLClient(endpoint, {
30
- "makeswift-runtime-version": "0.28.10-canary.16"
30
+ "makeswift-runtime-version": "0.28.10-canary.18"
31
31
  });
32
32
  }
33
33
  async getUnversionedResources({
@@ -198,7 +198,7 @@ class MakeswiftRestAPIClient {
198
198
  const requestHeaders = new Headers({
199
199
  "x-api-key": this.apiKey,
200
200
  "makeswift-site-api-key": this.apiKey,
201
- "makeswift-runtime-version": "0.28.10-canary.16"
201
+ "makeswift-runtime-version": "0.28.10-canary.18"
202
202
  });
203
203
  if (siteVersion?.token) {
204
204
  requestUrl.searchParams.set("version", siteVersion.version);
@@ -28,7 +28,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
28
28
  return import_request_response.ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
29
29
  }
30
30
  return import_request_response.ApiResponse.json({
31
- version: "0.28.10-canary.16",
31
+ version: "0.28.10-canary.18",
32
32
  interactionMode: true,
33
33
  clientSideNavigation: false,
34
34
  elementFromPoint: false,
@@ -72,7 +72,7 @@ function LinkPlugin() {
72
72
  return (0, import_plugin.Plugin)({
73
73
  control: {
74
74
  definition: (0, import_link.Link)({
75
- label: "On Click"
75
+ label: "On click"
76
76
  }),
77
77
  onChange: import_onChange.onChange,
78
78
  getValue: import_getValue.getValue,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/slate/LinkPlugin/index.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { type Editor, Element } from 'slate'\nimport { type RenderElementProps } from 'slate-react'\nimport { Slate } from '@makeswift/controls'\n\nimport { Link } from '../../controls/link'\nimport { useStyle } from '../../runtimes/react/use-style'\nimport { Link as LinkComponent } from '../../components/shared/Link'\nimport { type RenderElement, Plugin } from '../../controls/rich-text-v2/plugin'\n\nimport { onChange } from './onChange'\nimport { getValue } from './getValue'\n\nexport const withLink = (editor: Editor) => {\n const { isInline } = editor\n\n editor.isInline = entry => {\n return Slate.isInline(entry) && isInline(entry)\n }\n\n return editor\n}\n\nfunction InlinePluginComponent({\n element,\n attributes,\n children,\n renderElement,\n}: RenderElementProps & { renderElement: RenderElement }) {\n const linkStyle = useStyle({ textDecoration: 'none' })\n switch (element.type) {\n case Slate.InlineType.Link:\n return (\n <LinkComponent\n {...attributes}\n link={element.link ?? undefined}\n className={cx(linkStyle, element.className)}\n >\n {renderElement({\n element,\n attributes,\n children,\n })}\n </LinkComponent>\n )\n\n default:\n return (\n <>\n {renderElement({\n element,\n attributes,\n children,\n })}\n </>\n )\n }\n}\n\nexport function LinkPlugin() {\n return Plugin({\n control: {\n definition: Link({\n label: 'On Click',\n }),\n onChange,\n getValue,\n getElementValue: (element: Element) => {\n return Slate.isLink(element) ? element.link : undefined\n },\n },\n withPlugin: withLink,\n renderElement: renderElement => props => {\n return <InlinePluginComponent {...props} renderElement={renderElement} />\n },\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCQ;AAjCR,iBAAmB;AAGnB,sBAAsB;AAEtB,kBAAqB;AACrB,uBAAyB;AACzB,kBAAsC;AACtC,oBAA2C;AAE3C,sBAAyB;AACzB,sBAAyB;AAElB,MAAM,WAAW,CAAC,WAAmB;AAC1C,QAAM,EAAE,SAAS,IAAI;AAErB,SAAO,WAAW,WAAS;AACzB,WAAO,sBAAM,SAAS,KAAK,KAAK,SAAS,KAAK;AAAA,EAChD;AAEA,SAAO;AACT;AAEA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0D;AACxD,QAAM,gBAAY,2BAAS,EAAE,gBAAgB,OAAO,CAAC;AACrD,UAAQ,QAAQ,MAAM;AAAA,IACpB,KAAK,sBAAM,WAAW;AACpB,aACE;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,MAAM,QAAQ,QAAQ;AAAA,UACtB,eAAW,eAAG,WAAW,QAAQ,SAAS;AAAA,UAEzC,wBAAc;AAAA,YACb;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,IAGJ;AACE,aACE,2EACG,wBAAc;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GACH;AAAA,EAEN;AACF;AAEO,SAAS,aAAa;AAC3B,aAAO,sBAAO;AAAA,IACZ,SAAS;AAAA,MACP,gBAAY,kBAAK;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA,iBAAiB,CAAC,YAAqB;AACrC,eAAO,sBAAM,OAAO,OAAO,IAAI,QAAQ,OAAO;AAAA,MAChD;AAAA,IACF;AAAA,IACA,YAAY;AAAA,IACZ,eAAe,mBAAiB,WAAS;AACvC,aAAO,4CAAC,yBAAuB,GAAG,OAAO,eAA8B;AAAA,IACzE;AAAA,EACF,CAAC;AACH;","names":["LinkComponent"]}
1
+ {"version":3,"sources":["../../../../src/slate/LinkPlugin/index.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { type Editor, Element } from 'slate'\nimport { type RenderElementProps } from 'slate-react'\nimport { Slate } from '@makeswift/controls'\n\nimport { Link } from '../../controls/link'\nimport { useStyle } from '../../runtimes/react/use-style'\nimport { Link as LinkComponent } from '../../components/shared/Link'\nimport { type RenderElement, Plugin } from '../../controls/rich-text-v2/plugin'\n\nimport { onChange } from './onChange'\nimport { getValue } from './getValue'\n\nexport const withLink = (editor: Editor) => {\n const { isInline } = editor\n\n editor.isInline = entry => {\n return Slate.isInline(entry) && isInline(entry)\n }\n\n return editor\n}\n\nfunction InlinePluginComponent({\n element,\n attributes,\n children,\n renderElement,\n}: RenderElementProps & { renderElement: RenderElement }) {\n const linkStyle = useStyle({ textDecoration: 'none' })\n switch (element.type) {\n case Slate.InlineType.Link:\n return (\n <LinkComponent\n {...attributes}\n link={element.link ?? undefined}\n className={cx(linkStyle, element.className)}\n >\n {renderElement({\n element,\n attributes,\n children,\n })}\n </LinkComponent>\n )\n\n default:\n return (\n <>\n {renderElement({\n element,\n attributes,\n children,\n })}\n </>\n )\n }\n}\n\nexport function LinkPlugin() {\n return Plugin({\n control: {\n definition: Link({\n label: 'On click',\n }),\n onChange,\n getValue,\n getElementValue: (element: Element) => {\n return Slate.isLink(element) ? element.link : undefined\n },\n },\n withPlugin: withLink,\n renderElement: renderElement => props => {\n return <InlinePluginComponent {...props} renderElement={renderElement} />\n },\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCQ;AAjCR,iBAAmB;AAGnB,sBAAsB;AAEtB,kBAAqB;AACrB,uBAAyB;AACzB,kBAAsC;AACtC,oBAA2C;AAE3C,sBAAyB;AACzB,sBAAyB;AAElB,MAAM,WAAW,CAAC,WAAmB;AAC1C,QAAM,EAAE,SAAS,IAAI;AAErB,SAAO,WAAW,WAAS;AACzB,WAAO,sBAAM,SAAS,KAAK,KAAK,SAAS,KAAK;AAAA,EAChD;AAEA,SAAO;AACT;AAEA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0D;AACxD,QAAM,gBAAY,2BAAS,EAAE,gBAAgB,OAAO,CAAC;AACrD,UAAQ,QAAQ,MAAM;AAAA,IACpB,KAAK,sBAAM,WAAW;AACpB,aACE;AAAA,QAAC,YAAAA;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,MAAM,QAAQ,QAAQ;AAAA,UACtB,eAAW,eAAG,WAAW,QAAQ,SAAS;AAAA,UAEzC,wBAAc;AAAA,YACb;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,IAGJ;AACE,aACE,2EACG,wBAAc;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GACH;AAAA,EAEN;AACF;AAEO,SAAS,aAAa;AAC3B,aAAO,sBAAO;AAAA,IACZ,SAAS;AAAA,MACP,gBAAY,kBAAK;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA,iBAAiB,CAAC,YAAqB;AACrC,eAAO,sBAAM,OAAO,OAAO,IAAI,QAAQ,OAAO;AAAA,MAChD;AAAA,IACF;AAAA,IACA,YAAY;AAAA,IACZ,eAAe,mBAAiB,WAAS;AACvC,aAAO,4CAAC,yBAAuB,GAAG,OAAO,eAA8B;AAAA,IACzE;AAAA,EACF,CAAC;AACH;","names":["LinkComponent"]}
@@ -4,7 +4,7 @@ class MakeswiftGraphQLApiClient {
4
4
  graphqlClient;
5
5
  constructor({ endpoint }) {
6
6
  this.graphqlClient = new GraphQLClient(endpoint, {
7
- "makeswift-runtime-version": "0.28.10-canary.16"
7
+ "makeswift-runtime-version": "0.28.10-canary.18"
8
8
  });
9
9
  }
10
10
  async getUnversionedResources({
@@ -163,7 +163,7 @@ class MakeswiftRestAPIClient {
163
163
  const requestHeaders = new Headers({
164
164
  "x-api-key": this.apiKey,
165
165
  "makeswift-site-api-key": this.apiKey,
166
- "makeswift-runtime-version": "0.28.10-canary.16"
166
+ "makeswift-runtime-version": "0.28.10-canary.18"
167
167
  });
168
168
  if (siteVersion?.token) {
169
169
  requestUrl.searchParams.set("version", siteVersion.version);
@@ -8,7 +8,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
8
8
  return ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
9
9
  }
10
10
  return ApiResponse.json({
11
- version: "0.28.10-canary.16",
11
+ version: "0.28.10-canary.18",
12
12
  interactionMode: true,
13
13
  clientSideNavigation: false,
14
14
  elementFromPoint: false,
@@ -48,7 +48,7 @@ function LinkPlugin() {
48
48
  return Plugin({
49
49
  control: {
50
50
  definition: Link({
51
- label: "On Click"
51
+ label: "On click"
52
52
  }),
53
53
  onChange,
54
54
  getValue,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/slate/LinkPlugin/index.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { type Editor, Element } from 'slate'\nimport { type RenderElementProps } from 'slate-react'\nimport { Slate } from '@makeswift/controls'\n\nimport { Link } from '../../controls/link'\nimport { useStyle } from '../../runtimes/react/use-style'\nimport { Link as LinkComponent } from '../../components/shared/Link'\nimport { type RenderElement, Plugin } from '../../controls/rich-text-v2/plugin'\n\nimport { onChange } from './onChange'\nimport { getValue } from './getValue'\n\nexport const withLink = (editor: Editor) => {\n const { isInline } = editor\n\n editor.isInline = entry => {\n return Slate.isInline(entry) && isInline(entry)\n }\n\n return editor\n}\n\nfunction InlinePluginComponent({\n element,\n attributes,\n children,\n renderElement,\n}: RenderElementProps & { renderElement: RenderElement }) {\n const linkStyle = useStyle({ textDecoration: 'none' })\n switch (element.type) {\n case Slate.InlineType.Link:\n return (\n <LinkComponent\n {...attributes}\n link={element.link ?? undefined}\n className={cx(linkStyle, element.className)}\n >\n {renderElement({\n element,\n attributes,\n children,\n })}\n </LinkComponent>\n )\n\n default:\n return (\n <>\n {renderElement({\n element,\n attributes,\n children,\n })}\n </>\n )\n }\n}\n\nexport function LinkPlugin() {\n return Plugin({\n control: {\n definition: Link({\n label: 'On Click',\n }),\n onChange,\n getValue,\n getElementValue: (element: Element) => {\n return Slate.isLink(element) ? element.link : undefined\n },\n },\n withPlugin: withLink,\n renderElement: renderElement => props => {\n return <InlinePluginComponent {...props} renderElement={renderElement} />\n },\n })\n}\n"],"mappings":"AAiCQ,SAeA,UAfA;AAjCR,SAAS,UAAU;AAGnB,SAAS,aAAa;AAEtB,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,QAAQ,qBAAqB;AACtC,SAA6B,cAAc;AAE3C,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AAElB,MAAM,WAAW,CAAC,WAAmB;AAC1C,QAAM,EAAE,SAAS,IAAI;AAErB,SAAO,WAAW,WAAS;AACzB,WAAO,MAAM,SAAS,KAAK,KAAK,SAAS,KAAK;AAAA,EAChD;AAEA,SAAO;AACT;AAEA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0D;AACxD,QAAM,YAAY,SAAS,EAAE,gBAAgB,OAAO,CAAC;AACrD,UAAQ,QAAQ,MAAM;AAAA,IACpB,KAAK,MAAM,WAAW;AACpB,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ,MAAM,QAAQ,QAAQ;AAAA,UACtB,WAAW,GAAG,WAAW,QAAQ,SAAS;AAAA,UAEzC,wBAAc;AAAA,YACb;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,IAGJ;AACE,aACE,gCACG,wBAAc;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GACH;AAAA,EAEN;AACF;AAEO,SAAS,aAAa;AAC3B,SAAO,OAAO;AAAA,IACZ,SAAS;AAAA,MACP,YAAY,KAAK;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA,iBAAiB,CAAC,YAAqB;AACrC,eAAO,MAAM,OAAO,OAAO,IAAI,QAAQ,OAAO;AAAA,MAChD;AAAA,IACF;AAAA,IACA,YAAY;AAAA,IACZ,eAAe,mBAAiB,WAAS;AACvC,aAAO,oBAAC,yBAAuB,GAAG,OAAO,eAA8B;AAAA,IACzE;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../../../src/slate/LinkPlugin/index.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { type Editor, Element } from 'slate'\nimport { type RenderElementProps } from 'slate-react'\nimport { Slate } from '@makeswift/controls'\n\nimport { Link } from '../../controls/link'\nimport { useStyle } from '../../runtimes/react/use-style'\nimport { Link as LinkComponent } from '../../components/shared/Link'\nimport { type RenderElement, Plugin } from '../../controls/rich-text-v2/plugin'\n\nimport { onChange } from './onChange'\nimport { getValue } from './getValue'\n\nexport const withLink = (editor: Editor) => {\n const { isInline } = editor\n\n editor.isInline = entry => {\n return Slate.isInline(entry) && isInline(entry)\n }\n\n return editor\n}\n\nfunction InlinePluginComponent({\n element,\n attributes,\n children,\n renderElement,\n}: RenderElementProps & { renderElement: RenderElement }) {\n const linkStyle = useStyle({ textDecoration: 'none' })\n switch (element.type) {\n case Slate.InlineType.Link:\n return (\n <LinkComponent\n {...attributes}\n link={element.link ?? undefined}\n className={cx(linkStyle, element.className)}\n >\n {renderElement({\n element,\n attributes,\n children,\n })}\n </LinkComponent>\n )\n\n default:\n return (\n <>\n {renderElement({\n element,\n attributes,\n children,\n })}\n </>\n )\n }\n}\n\nexport function LinkPlugin() {\n return Plugin({\n control: {\n definition: Link({\n label: 'On click',\n }),\n onChange,\n getValue,\n getElementValue: (element: Element) => {\n return Slate.isLink(element) ? element.link : undefined\n },\n },\n withPlugin: withLink,\n renderElement: renderElement => props => {\n return <InlinePluginComponent {...props} renderElement={renderElement} />\n },\n })\n}\n"],"mappings":"AAiCQ,SAeA,UAfA;AAjCR,SAAS,UAAU;AAGnB,SAAS,aAAa;AAEtB,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,QAAQ,qBAAqB;AACtC,SAA6B,cAAc;AAE3C,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AAElB,MAAM,WAAW,CAAC,WAAmB;AAC1C,QAAM,EAAE,SAAS,IAAI;AAErB,SAAO,WAAW,WAAS;AACzB,WAAO,MAAM,SAAS,KAAK,KAAK,SAAS,KAAK;AAAA,EAChD;AAEA,SAAO;AACT;AAEA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0D;AACxD,QAAM,YAAY,SAAS,EAAE,gBAAgB,OAAO,CAAC;AACrD,UAAQ,QAAQ,MAAM;AAAA,IACpB,KAAK,MAAM,WAAW;AACpB,aACE;AAAA,QAAC;AAAA;AAAA,UACE,GAAG;AAAA,UACJ,MAAM,QAAQ,QAAQ;AAAA,UACtB,WAAW,GAAG,WAAW,QAAQ,SAAS;AAAA,UAEzC,wBAAc;AAAA,YACb;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAAA;AAAA,MACH;AAAA,IAGJ;AACE,aACE,gCACG,wBAAc;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GACH;AAAA,EAEN;AACF;AAEO,SAAS,aAAa;AAC3B,SAAO,OAAO;AAAA,IACZ,SAAS;AAAA,MACP,YAAY,KAAK;AAAA,QACf,OAAO;AAAA,MACT,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA,iBAAiB,CAAC,YAAqB;AACrC,eAAO,MAAM,OAAO,OAAO,IAAI,QAAQ,OAAO;AAAA,MAChD;AAAA,IACF;AAAA,IACA,YAAY;AAAA,IACZ,eAAe,mBAAiB,WAAS;AACvC,aAAO,oBAAC,yBAAuB,GAAG,OAAO,eAA8B;AAAA,IACzE;AAAA,EACF,CAAC;AACH;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makeswift/runtime",
3
- "version": "0.28.10-canary.16",
3
+ "version": "0.28.10-canary.18",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "url": "makeswift/makeswift",
@@ -244,9 +244,9 @@
244
244
  "use-sync-external-store": "^1.5.0",
245
245
  "uuid": "^9.0.0",
246
246
  "zod": "^3.21.4",
247
- "@makeswift/controls": "0.1.22-canary.4",
248
- "@makeswift/next-plugin": "0.6.1",
249
- "@makeswift/prop-controllers": "0.4.16-canary.4"
247
+ "@makeswift/controls": "0.1.22-canary.5",
248
+ "@makeswift/prop-controllers": "0.4.16-canary.5",
249
+ "@makeswift/next-plugin": "0.6.1"
250
250
  },
251
251
  "devDependencies": {
252
252
  "@emotion/jest": "^11.11.0",