@supersoniks/concorde 4.9.7 → 4.9.91

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.
Files changed (72) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +265 -265
  3. package/concorde-core.es.js +4600 -4385
  4. package/dist/concorde-core.bundle.js +265 -265
  5. package/dist/concorde-core.es.js +4600 -4385
  6. package/dist/js/core/components/functional/queue/queue.js +25 -153
  7. package/dist/js/core/components/functional/queue/queue.js.map +1 -1
  8. package/dist/js/core/components/ui/_css/scroll.js +2 -0
  9. package/dist/js/core/components/ui/_css/scroll.js.map +1 -1
  10. package/dist/js/core/decorators/api.js +92 -2
  11. package/dist/js/core/decorators/api.js.map +1 -1
  12. package/dist/js/core/utils/SafariScrollGuard.js +384 -0
  13. package/dist/js/core/utils/SafariScrollGuard.js.map +1 -0
  14. package/dist/js/decorators.js +4 -0
  15. package/dist/js/decorators.js.map +1 -1
  16. package/dist/js/utils.js +3 -0
  17. package/dist/js/utils.js.map +1 -1
  18. package/dist/types/core/components/functional/queue/queue.d.ts +8 -24
  19. package/dist/types/core/components/functional/queue/queue.d.ts.map +1 -1
  20. package/dist/types/core/components/ui/_css/scroll.d.ts.map +1 -1
  21. package/dist/types/core/decorators/api.d.ts +82 -60
  22. package/dist/types/core/decorators/api.d.ts.map +1 -1
  23. package/dist/types/core/utils/SafariScrollGuard.d.ts +36 -0
  24. package/dist/types/core/utils/SafariScrollGuard.d.ts.map +1 -0
  25. package/dist/types/decorators.d.ts +3 -1
  26. package/dist/types/decorators.d.ts.map +1 -1
  27. package/dist/types/utils.d.ts +1 -0
  28. package/dist/types/utils.d.ts.map +1 -1
  29. package/docs/assets/index-BL6WVF7g.css +1 -0
  30. package/docs/assets/{index-hElUgV9_.js → index-DVn8AeyA.js} +572 -555
  31. package/docs/crawl/docs/_decorators/get.html +64 -81
  32. package/docs/crawl/docs/_decorators/patch.html +35 -23
  33. package/docs/crawl/docs/_decorators/post.html +72 -72
  34. package/docs/crawl/docs/_decorators/put.html +36 -21
  35. package/docs/crawl/docs/_getting-started/ai-agents.html +45 -6
  36. package/docs/crawl/hubs/decorators.html +141 -69
  37. package/docs/crawl/hubs/remote-data.html +141 -69
  38. package/docs/index.html +2 -2
  39. package/docs/llms-full.txt +203 -149
  40. package/docs/llms.txt +4 -4
  41. package/docs/src/core/components/functional/queue/queue.md +0 -0
  42. package/docs/src/core/components/ui/button/button.md +0 -0
  43. package/docs/src/docs/_decorators/get.md +55 -81
  44. package/docs/src/docs/_decorators/patch.md +36 -25
  45. package/docs/src/docs/_decorators/post.md +71 -62
  46. package/docs/src/docs/_decorators/put.md +37 -24
  47. package/docs/src/docs/_getting-started/ai-agents.md +24 -4
  48. package/docs/src/docs/search/docs-search.json +151 -1
  49. package/docs/src/tsconfig.json +3 -0
  50. package/package.json +6 -2
  51. package/src/core/components/functional/queue/queue.ts +33 -164
  52. package/src/core/components/ui/_css/scroll.ts +3 -0
  53. package/src/core/decorators/api.post.spec.ts +79 -1
  54. package/src/core/decorators/api.spec.ts +100 -1
  55. package/src/core/decorators/api.ts +252 -138
  56. package/src/core/utils/SafariScrollGuard.ts +429 -0
  57. package/src/decorators.ts +7 -0
  58. package/src/docs/_decorators/get.md +81 -80
  59. package/src/docs/_decorators/patch.md +36 -25
  60. package/src/docs/_decorators/post.md +99 -62
  61. package/src/docs/_decorators/put.md +37 -24
  62. package/src/docs/components/docs-demo-sources.ts +1 -6
  63. package/src/docs/example/decorators-demo-geo.ts +0 -21
  64. package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +41 -132
  65. package/src/docs/search/docs-search.json +156 -241
  66. package/src/docs/tailwind/css/tailwind.css +0 -0
  67. package/src/tsconfig.json +3 -0
  68. package/src/tsconfig.tsbuildinfo +1 -1
  69. package/src/utils.ts +13 -0
  70. package/vite.config.mts +4 -0
  71. package/vitest.setup.ts +22 -0
  72. package/docs/assets/index-Bnp7gVaA.css +0 -1
@@ -350,19 +350,14 @@
350
350
  "core/components/functional/queue/queue.md": {
351
351
  "title": "Queue",
352
352
  "hashes": {
353
- "lazy-load": {
353
+ "lazy-load--offset-and-limit": {
354
354
  "count": 1,
355
- "title": "Lazy load",
355
+ "title": "Lazy load — `$offset` and `$limit`",
356
356
  "type": "paragraph"
357
357
  },
358
- "manual-next-signal--supplement": {
358
+ "simple-batch-no-lazy-scroll": {
359
359
  "count": 1,
360
- "title": "Manual next (signal) — supplement",
361
- "type": "paragraph"
362
- },
363
- "simple-batch-no-pagination": {
364
- "count": 1,
365
- "title": "Simple batch (no pagination)",
360
+ "title": "Simple batch (no lazy scroll)",
366
361
  "type": "paragraph"
367
362
  }
368
363
  }
@@ -825,14 +820,14 @@
825
820
  }
826
821
  },
827
822
  {
828
- "search": "In Lit apps, use defineQueue + .config on <sonic-queue> — typed Endpoint, DataProviderKey, enums. See src/docs/example/docs-queue-demos.ts.\n",
823
+ "search": "When the expression contains $offset and $limit, the queue:\n",
829
824
  "files": {
830
825
  "core/components/functional/queue/queue.md": {
831
826
  "title": "Queue",
832
827
  "hashes": {
833
- "queue": {
828
+ "lazy-load--offset-and-limit": {
834
829
  "count": 1,
835
- "title": "",
830
+ "title": "Lazy load — `$offset` and `$limit`",
836
831
  "type": "paragraph"
837
832
  }
838
833
  }
@@ -840,14 +835,14 @@
840
835
  }
841
836
  },
842
837
  {
843
- "search": "Required: endpoint + items. Add rowsAt when rows live in a nested property. Everything else has sensible defaults (strategy: Lazy, pageSize: 10, offset/limit query names).\n",
838
+ "search": "The doc mock implements this on GET /docs-mock-api/api/users?offset=…&per_page=… (paginateUsers in src/docs/mock-api/router.ts).\n",
844
839
  "files": {
845
840
  "core/components/functional/queue/queue.md": {
846
841
  "title": "Queue",
847
842
  "hashes": {
848
- "queue": {
843
+ "lazy-load--offset-and-limit": {
849
844
  "count": 1,
850
- "title": "",
845
+ "title": "Lazy load — `$offset` and `$limit`",
851
846
  "type": "paragraph"
852
847
  }
853
848
  }
@@ -855,14 +850,14 @@
855
850
  }
856
851
  },
857
852
  {
858
- "search": "Layout (class, id, …) stays on <sonic-queue> — not inside .config.\n",
853
+ "search": "Wrap the queue in a fixed height with overflow-y-auto so lazy load triggers when scrolling inside the box (same layout as the TS starter demo-queue-templates).\n",
859
854
  "files": {
860
855
  "core/components/functional/queue/queue.md": {
861
856
  "title": "Queue",
862
857
  "hashes": {
863
- "queue": {
858
+ "lazy-load--offset-and-limit": {
864
859
  "count": 1,
865
- "title": "",
860
+ "title": "Lazy load — `$offset` and `$limit`",
866
861
  "type": "paragraph"
867
862
  }
868
863
  }
@@ -870,14 +865,14 @@
870
865
  }
871
866
  },
872
867
  {
873
- "search": "When pagination is enabled (default QueueLoadStrategy.Lazy), the queue:\n",
868
+ "search": "Try scrolling after load — batches of 4 users. Search e.g. George, Bluth, or zzz for empty results.\n",
874
869
  "files": {
875
870
  "core/components/functional/queue/queue.md": {
876
871
  "title": "Queue",
877
872
  "hashes": {
878
- "lazy-load": {
873
+ "lazy-load--offset-and-limit": {
879
874
  "count": 1,
880
- "title": "Lazy load",
875
+ "title": "Lazy load — `$offset` and `$limit`",
881
876
  "type": "paragraph"
882
877
  }
883
878
  }
@@ -885,14 +880,14 @@
885
880
  }
886
881
  },
887
882
  {
888
- "search": "Mock: GET /docs-mock-api/api/users?offset=…&limit=… (paginateUsers in src/docs/mock-api/router.ts).\n",
883
+ "search": "Without $offset in the expression, the queue behaves like a single list (one batch), e.g. geo communes below.\n",
889
884
  "files": {
890
885
  "core/components/functional/queue/queue.md": {
891
886
  "title": "Queue",
892
887
  "hashes": {
893
- "lazy-load": {
888
+ "expression-example": {
894
889
  "count": 1,
895
- "title": "Lazy load",
890
+ "title": "Expression example",
896
891
  "type": "paragraph"
897
892
  }
898
893
  }
@@ -900,37 +895,7 @@
900
895
  }
901
896
  },
902
897
  {
903
- "search": "Wrap the queue in a fixed height with overflow-y-auto so lazy load triggers when scrolling inside the box.\n",
904
- "files": {
905
- "core/components/functional/queue/queue.md": {
906
- "title": "Queue",
907
- "hashes": {
908
- "lazy-load": {
909
- "count": 1,
910
- "title": "Lazy load",
911
- "type": "paragraph"
912
- }
913
- }
914
- }
915
- }
916
- },
917
- {
918
- "search": "Without pagination offset ( $offset not generated), the queue behaves as a single batch — see geo communes below.\n",
919
- "files": {
920
- "core/components/functional/queue/queue.md": {
921
- "title": "Queue",
922
- "hashes": {
923
- "lazy-load": {
924
- "count": 1,
925
- "title": "Lazy load",
926
- "type": "paragraph"
927
- }
928
- }
929
- }
930
- }
931
- },
932
- {
933
- "search": "Pass a filter DataProviderKey in defineQueue (same publisher as formDataProvider on the search form). On change, the queue:\n",
898
+ "search": "One search field (name="q") on formDataProvider="filter". The queue listens via dataFilterProvider="filter" and, on change:\n",
934
899
  "files": {
935
900
  "core/components/functional/queue/queue.md": {
936
901
  "title": "Queue",
@@ -945,7 +910,7 @@
945
910
  }
946
911
  },
947
912
  {
948
- "search": "Use filteredFields in the config only when the form has fields that must not be sent to the API.\n",
913
+ "search": "Use filteredFields only when the form has extra fields that must not be sent to the API (e.g. filteredFields="rememberMe internalId").\n",
949
914
  "files": {
950
915
  "core/components/functional/queue/queue.md": {
951
916
  "title": "Queue",
@@ -960,7 +925,7 @@
960
925
  }
961
926
  },
962
927
  {
963
- "search": "The users demo above wires docsQueueUsersFilterKey + sonic-input name="q". Mock filter: filterDocsUsers in src/docs/mock-api/fixtures.ts.\n",
928
+ "search": "The mock API filters before pagination — same haystack logic as the starter (filterDocsUsers in src/docs/mock-api/fixtures.ts, used by paginateUsers in router.ts / Service Worker):\n",
964
929
  "files": {
965
930
  "core/components/functional/queue/queue.md": {
966
931
  "title": "Queue",
@@ -975,29 +940,14 @@
975
940
  }
976
941
  },
977
942
  {
978
- "search": "Default lazy scroll loads the next batch automatically. For a button that triggers the next batch via publishers — without touching the queue instance — use QueueLoadStrategy.Signal and a void next key (invalidate(), same idea as triggerKey on @get).\n",
979
- "files": {
980
- "core/components/functional/queue/queue.md": {
981
- "title": "Queue",
982
- "hashes": {
983
- "manual-next-signal--supplement": {
984
- "count": 1,
985
- "title": "Manual next (signal) — supplement",
986
- "type": "paragraph"
987
- }
988
- }
989
- }
990
- }
991
- },
992
- {
993
- "search": "state exposes QueuePublisherState on the queue dataProvider: meta (e.g. total), loadedCount, hasMore. Wire sonic-button invalidate to the same next key.\n",
943
+ "search": "Geo communes: expression uses $limit only (no $offset) — one request, one batch.\n",
994
944
  "files": {
995
945
  "core/components/functional/queue/queue.md": {
996
946
  "title": "Queue",
997
947
  "hashes": {
998
- "manual-next-signal--supplement": {
948
+ "simple-batch-no-lazy-scroll": {
999
949
  "count": 1,
1000
- "title": "Manual next (signal) — supplement",
950
+ "title": "Simple batch (no lazy scroll)",
1001
951
  "type": "paragraph"
1002
952
  }
1003
953
  }
@@ -1005,29 +955,14 @@
1005
955
  }
1006
956
  },
1007
957
  {
1008
- "search": "Elsewhere: dp(usersNextKey).invalidate().\n",
958
+ "search": "Optional for hosts without Lit — see HTML integration.\n",
1009
959
  "files": {
1010
960
  "core/components/functional/queue/queue.md": {
1011
961
  "title": "Queue",
1012
962
  "hashes": {
1013
- "manual-next-signal--supplement": {
963
+ "html-template-children": {
1014
964
  "count": 1,
1015
- "title": "Manual next (signal) — supplement",
1016
- "type": "paragraph"
1017
- }
1018
- }
1019
- }
1020
- }
1021
- },
1022
- {
1023
- "search": "Geo communes: one request, one batch ($limit only).\n",
1024
- "files": {
1025
- "core/components/functional/queue/queue.md": {
1026
- "title": "Queue",
1027
- "hashes": {
1028
- "simple-batch-no-pagination": {
1029
- "count": 1,
1030
- "title": "Simple batch (no pagination)",
965
+ "title": "HTML `<template>` children",
1031
966
  "type": "paragraph"
1032
967
  }
1033
968
  }
@@ -2334,21 +2269,6 @@
2334
2269
  }
2335
2270
  }
2336
2271
  },
2337
- {
2338
- "search": "Emit a publisher signal on click (same idea as triggerKey on @get, or dataNextProvider on sonic-queue). Value is the publisher path.\n",
2339
- "files": {
2340
- "core/components/ui/button/button.md": {
2341
- "title": "Button",
2342
- "hashes": {
2343
- "invalidate": {
2344
- "count": 1,
2345
- "title": "Invalidate",
2346
- "type": "paragraph"
2347
- }
2348
- }
2349
- }
2350
- }
2351
- },
2352
2272
  {
2353
2273
  "search": "Captcha",
2354
2274
  "files": {
@@ -4780,7 +4700,7 @@
4780
4700
  }
4781
4701
  },
4782
4702
  {
4783
- "search": "Loads data through API.getDetailed. The decorated property is ApiResult&lt;T&gt; | null: request, response (or null for dataProvider(...) resolution without HTTP), and typed result.\n",
4703
+ "search": "@get loads data and stores the result in an ApiResult&lt;T&gt; | null property.\n",
4784
4704
  "files": {
4785
4705
  "docs/_decorators/get.md": {
4786
4706
  "title": "@get",
@@ -4795,14 +4715,14 @@
4795
4715
  }
4796
4716
  },
4797
4717
  {
4798
- "search": "Pass an Endpoint&lt;T&gt; as the first argument. Import get and ApiResult from @supersoniks/concorde/decorators, and Endpoint from @supersoniks/concorde/utils/endpoint.\n",
4718
+ "search": "The first argument is always an\nEndpoint&lt;T&gt;. API configuration is read\nfrom the HTML scope (serviceURL, token, etc.), so the component is usually\nplaced below an element that provides this configuration.\n",
4799
4719
  "files": {
4800
4720
  "docs/_decorators/get.md": {
4801
4721
  "title": "@get",
4802
4722
  "hashes": {
4803
- "get": {
4723
+ "minimal-usage": {
4804
4724
  "count": 1,
4805
- "title": "",
4725
+ "title": "Minimal usage",
4806
4726
  "type": "paragraph"
4807
4727
  }
4808
4728
  }
@@ -4810,14 +4730,14 @@
4810
4730
  }
4811
4731
  },
4812
4732
  {
4813
- "search": "${prop} on the endpoint or config key is resolved on the host. While a placeholder is null or undefined, no GET runs. Optional skipEmptyPlaceholder: true also blocks &quot;&quot; (empty string only). Details: Dynamic path placeholders.\n",
4733
+ "search": "Keep the decorator in a constant to access refetch(component). Refetch only\ntargets the instance passed as the argument, even before it has received a\nresult.\n",
4814
4734
  "files": {
4815
4735
  "docs/_decorators/get.md": {
4816
4736
  "title": "@get",
4817
4737
  "hashes": {
4818
- "dynamic-path": {
4738
+ "from-the-component": {
4819
4739
  "count": 1,
4820
- "title": "Dynamic path",
4740
+ "title": "From the component",
4821
4741
  "type": "paragraph"
4822
4742
  }
4823
4743
  }
@@ -4825,14 +4745,14 @@
4825
4745
  }
4826
4746
  },
4827
4747
  {
4828
- "search": "Pass as the second argument (scoped config) or third (with a configuration key). Same shape as send decorators where applicable:\n",
4748
+ "search": "The refetch can decorate a local method. The default is after; if the\nmethod returns a Promise, the GET waits for its resolution.\n",
4829
4749
  "files": {
4830
4750
  "docs/_decorators/get.md": {
4831
4751
  "title": "@get",
4832
4752
  "hashes": {
4833
- "options-getoptions": {
4753
+ "from-a-method-decorator": {
4834
4754
  "count": 1,
4835
- "title": "Options (`GetOptions`)",
4755
+ "title": "From a method decorator",
4836
4756
  "type": "paragraph"
4837
4757
  }
4838
4758
  }
@@ -4840,14 +4760,14 @@
4840
4760
  }
4841
4761
  },
4842
4762
  {
4843
- "search": "Same pattern as @post: a publisher acts as a signal, independent of the response payload.\n",
4763
+ "search": "Use { when: &quot;before&quot; } when the GET must be scheduled before the method:\n",
4844
4764
  "files": {
4845
4765
  "docs/_decorators/get.md": {
4846
4766
  "title": "@get",
4847
4767
  "hashes": {
4848
- "manual-refetch-triggerkey": {
4768
+ "from-a-method-decorator": {
4849
4769
  "count": 1,
4850
- "title": "Manual refetch (`triggerKey`)",
4770
+ "title": "From a method decorator",
4851
4771
  "type": "paragraph"
4852
4772
  }
4853
4773
  }
@@ -4855,14 +4775,14 @@
4855
4775
  }
4856
4776
  },
4857
4777
  {
4858
- "search": "Prefer triggerKey over mutating the API configuration publisher when you only want to reload the same URL — no need to touch serviceURL, tokens, etc.\n",
4778
+ "search": "The method decorator adds an explicit trigger; changes to dynamic endpoint\nproperties and configuration publishers keep their existing automatic behavior.\n",
4859
4779
  "files": {
4860
4780
  "docs/_decorators/get.md": {
4861
4781
  "title": "@get",
4862
4782
  "hashes": {
4863
- "manual-refetch-triggerkey": {
4783
+ "from-a-method-decorator": {
4864
4784
  "count": 1,
4865
- "title": "Manual refetch (`triggerKey`)",
4785
+ "title": "From a method decorator",
4866
4786
  "type": "paragraph"
4867
4787
  }
4868
4788
  }
@@ -4870,14 +4790,14 @@
4870
4790
  }
4871
4791
  },
4872
4792
  {
4873
- "search": "The docs mock adds an X-Fetched-At response header on /docs-mock-api/geo/communes so live demos can show when the last fetch happened (response.headers.get(&quot;X-Fetched-At&quot;)).\n",
4793
+ "search": "Options are the second argument, or the third argument when an API\nconfiguration key is provided.\n",
4874
4794
  "files": {
4875
4795
  "docs/_decorators/get.md": {
4876
4796
  "title": "@get",
4877
4797
  "hashes": {
4878
- "manual-refetch-triggerkey": {
4798
+ "options-getoptions": {
4879
4799
  "count": 1,
4880
- "title": "Manual refetch (`triggerKey`)",
4800
+ "title": "Options (`GetOptions`)",
4881
4801
  "type": "paragraph"
4882
4802
  }
4883
4803
  }
@@ -4885,14 +4805,14 @@
4885
4805
  }
4886
4806
  },
4887
4807
  {
4888
- "search": "Same demo service as sonic-queue (/docs-mock-api/geo/). Publisher setup lives in decorators-demo-geo.ts and decorators-demo-subscribe-publish-get-demos.ts.\n",
4808
+ "search": "With a configuration key, use:\n",
4889
4809
  "files": {
4890
4810
  "docs/_decorators/get.md": {
4891
4811
  "title": "@get",
4892
4812
  "hashes": {
4893
- "minimal-example": {
4813
+ "options-getoptions": {
4894
4814
  "count": 1,
4895
- "title": "Minimal example",
4815
+ "title": "Options (`GetOptions`)",
4896
4816
  "type": "paragraph"
4897
4817
  }
4898
4818
  }
@@ -4900,29 +4820,24 @@
4900
4820
  }
4901
4821
  },
4902
4822
  {
4903
- "search": "@get with triggerKey — refresh button + X-Fetched-At timestamp in the UI:\n",
4823
+ "search": "See Dynamic path placeholders for\ndynamic path details.\n",
4904
4824
  "files": {
4905
4825
  "docs/_decorators/get.md": {
4906
4826
  "title": "@get",
4907
4827
  "hashes": {
4908
- "live-demos": {
4828
+ "when-the-get-runs-again": {
4909
4829
  "count": 1,
4910
- "title": "Live demos",
4830
+ "title": "When the GET runs again",
4911
4831
  "type": "paragraph"
4912
4832
  }
4913
4833
  }
4914
- }
4915
- }
4916
- },
4917
- {
4918
- "search": "Dynamic config and endpoint path. Manual refetch is triggered from a separate component (same triggerKey publisher):\n",
4919
- "files": {
4920
- "docs/_decorators/get.md": {
4921
- "title": "@get",
4834
+ },
4835
+ "docs/_decorators/post.md": {
4836
+ "title": "@post",
4922
4837
  "hashes": {
4923
- "live-demos": {
4838
+ "options-postoptions": {
4924
4839
  "count": 1,
4925
- "title": "Live demos",
4840
+ "title": "Options (`PostOptions`)",
4926
4841
  "type": "paragraph"
4927
4842
  }
4928
4843
  }
@@ -4930,14 +4845,14 @@
4930
4845
  }
4931
4846
  },
4932
4847
  {
4933
- "search": "Scoped @get with @publish / @subscribe on the payload (see @publish and @subscribe) — wrap under an ancestor with serviceURL=&quot;/docs-mock-api/geo/&quot;:\n",
4848
+ "search": "See @post,\n@put, and\n@patch for write operations.\n",
4934
4849
  "files": {
4935
4850
  "docs/_decorators/get.md": {
4936
4851
  "title": "@get",
4937
4852
  "hashes": {
4938
- "live-demos": {
4853
+ "demos": {
4939
4854
  "count": 1,
4940
- "title": "Live demos",
4855
+ "title": "Demos",
4941
4856
  "type": "paragraph"
4942
4857
  }
4943
4858
  }
@@ -4945,14 +4860,14 @@
4945
4860
  }
4946
4861
  },
4947
4862
  {
4948
- "search": "Stale responses are ignored if the path or generation changed before the request finished.\n",
4863
+ "search": "External invalidation is currently available through triggerKey; it is kept\nout of the main usage examples.\n",
4949
4864
  "files": {
4950
4865
  "docs/_decorators/get.md": {
4951
4866
  "title": "@get",
4952
4867
  "hashes": {
4953
- "live-demos": {
4868
+ "advanced": {
4954
4869
  "count": 1,
4955
- "title": "Live demos",
4870
+ "title": "Advanced",
4956
4871
  "type": "paragraph"
4957
4872
  }
4958
4873
  }
@@ -4960,9 +4875,9 @@
4960
4875
  "docs/_decorators/post.md": {
4961
4876
  "title": "@post",
4962
4877
  "hashes": {
4963
- "live-demos": {
4878
+ "advanced": {
4964
4879
  "count": 1,
4965
- "title": "Live demos",
4880
+ "title": "Advanced",
4966
4881
  "type": "paragraph"
4967
4882
  }
4968
4883
  }
@@ -5870,7 +5785,7 @@
5870
5785
  }
5871
5786
  },
5872
5787
  {
5873
- "search": "Sends data through API.patchDetailed. Same model as @post: decorated property is ApiResult&lt;T&gt; | null (request, response, result).\n",
5788
+ "search": "@patch applies a partial update with the body from a publisher. It uses the\nsame model as @post:\nEndpoint&lt;T&gt;, DataProviderKey&lt;B&gt;, ApiResult&lt;T&gt;, options, and the\nsend(component) handle.\n",
5874
5789
  "files": {
5875
5790
  "docs/_decorators/patch.md": {
5876
5791
  "title": "@patch",
@@ -5885,14 +5800,39 @@
5885
5800
  }
5886
5801
  },
5887
5802
  {
5888
- "search": "Pass an Endpoint&lt;T&gt; and a DataProviderKey for the request body. Import patch and ApiResult from @supersoniks/concorde/decorators.\n",
5803
+ "search": "To run the operation again from the component:\n",
5889
5804
  "files": {
5890
5805
  "docs/_decorators/patch.md": {
5891
5806
  "title": "@patch",
5892
5807
  "hashes": {
5893
- "patch": {
5808
+ "minimal-usage": {
5894
5809
  "count": 1,
5895
- "title": "",
5810
+ "title": "Minimal usage",
5811
+ "type": "paragraph"
5812
+ }
5813
+ }
5814
+ },
5815
+ "docs/_decorators/put.md": {
5816
+ "title": "@put",
5817
+ "hashes": {
5818
+ "minimal-usage": {
5819
+ "count": 1,
5820
+ "title": "Minimal usage",
5821
+ "type": "paragraph"
5822
+ }
5823
+ }
5824
+ }
5825
+ }
5826
+ },
5827
+ {
5828
+ "search": "The PATCH is also sent automatically when the body mutates, unless\nautoPostOnBodyMutation: false is set. The available options are described in\n@post:\n",
5829
+ "files": {
5830
+ "docs/_decorators/patch.md": {
5831
+ "title": "@patch",
5832
+ "hashes": {
5833
+ "minimal-usage": {
5834
+ "count": 1,
5835
+ "title": "Minimal usage",
5896
5836
  "type": "paragraph"
5897
5837
  }
5898
5838
  }
@@ -5900,14 +5840,14 @@
5900
5840
  }
5901
5841
  },
5902
5842
  {
5903
- "search": "Same as @post / @get: scoped HTML.getApiConfiguration(host) or DataProviderKey&lt;APIConfiguration&gt; as third argument.\n",
5843
+ "search": "Pass explicit API configuration as the third argument:\n",
5904
5844
  "files": {
5905
5845
  "docs/_decorators/patch.md": {
5906
5846
  "title": "@patch",
5907
5847
  "hashes": {
5908
- "configuration": {
5848
+ "minimal-usage": {
5909
5849
  "count": 1,
5910
- "title": "Configuration",
5850
+ "title": "Minimal usage",
5911
5851
  "type": "paragraph"
5912
5852
  }
5913
5853
  }
@@ -5915,9 +5855,9 @@
5915
5855
  "docs/_decorators/put.md": {
5916
5856
  "title": "@put",
5917
5857
  "hashes": {
5918
- "configuration": {
5858
+ "minimal-usage": {
5919
5859
  "count": 1,
5920
- "title": "Configuration",
5860
+ "title": "Minimal usage",
5921
5861
  "type": "paragraph"
5922
5862
  }
5923
5863
  }
@@ -5925,24 +5865,29 @@
5925
5865
  }
5926
5866
  },
5927
5867
  {
5928
- "search": "Same shape as PostOptions on @post (ApiSendOptions): refetchEveryMs, skipIfBodyMissing, autoPostOnBodyMutation, triggerKey, skipEmptyPlaceholder. See Dynamic path placeholders for ${sessionId} and empty-string behaviour.\n",
5868
+ "search": "@post",
5929
5869
  "files": {
5930
- "docs/_decorators/patch.md": {
5931
- "title": "@patch",
5870
+ "docs/_decorators/post.md": {
5871
+ "title": "@post",
5932
5872
  "hashes": {
5933
- "options-patchoptions": {
5873
+ "post": {
5934
5874
  "count": 1,
5935
- "title": "Options (`PatchOptions`)",
5936
- "type": "paragraph"
5875
+ "title": "",
5876
+ "type": "page"
5937
5877
  }
5938
5878
  }
5939
- },
5940
- "docs/_decorators/put.md": {
5941
- "title": "@put",
5879
+ }
5880
+ }
5881
+ },
5882
+ {
5883
+ "search": "@post sends the contents of a publisher and stores the response in an\nApiResult&lt;T&gt; | null property.\n",
5884
+ "files": {
5885
+ "docs/_decorators/post.md": {
5886
+ "title": "@post",
5942
5887
  "hashes": {
5943
- "options-putoptions": {
5888
+ "post": {
5944
5889
  "count": 1,
5945
- "title": "Options (`PutOptions`)",
5890
+ "title": "",
5946
5891
  "type": "paragraph"
5947
5892
  }
5948
5893
  }
@@ -5950,14 +5895,14 @@
5950
5895
  }
5951
5896
  },
5952
5897
  {
5953
- "search": "@patch(\n new Endpoint&lt;Resource, { resourceId: string }&gt;(&quot;resources/${resourceId}&quot;),\n patchBodyKey,\n { skipEmptyPlaceholder: true },\n)\n@state()\npayload?: ApiResult&lt;Resource&gt; | null;\n \n\n",
5898
+ "search": "Pass an Endpoint&lt;T&gt; and a DataProviderKey&lt;B&gt; for the request body.\n",
5954
5899
  "files": {
5955
- "docs/_decorators/patch.md": {
5956
- "title": "@patch",
5900
+ "docs/_decorators/post.md": {
5901
+ "title": "@post",
5957
5902
  "hashes": {
5958
- "example": {
5903
+ "minimal-usage": {
5959
5904
  "count": 1,
5960
- "title": "Example",
5905
+ "title": "Minimal usage",
5961
5906
  "type": "paragraph"
5962
5907
  }
5963
5908
  }
@@ -5965,29 +5910,29 @@
5965
5910
  }
5966
5911
  },
5967
5912
  {
5968
- "search": "@post",
5913
+ "search": "The current body is read from userBodyKey. By default, the POST is sent when\nthe component connects and after each body mutation. Mutations in the same\nframe are coalesced into one request.\n",
5969
5914
  "files": {
5970
5915
  "docs/_decorators/post.md": {
5971
5916
  "title": "@post",
5972
5917
  "hashes": {
5973
- "post": {
5918
+ "minimal-usage": {
5974
5919
  "count": 1,
5975
- "title": "",
5976
- "type": "page"
5920
+ "title": "Minimal usage",
5921
+ "type": "paragraph"
5977
5922
  }
5978
5923
  }
5979
5924
  }
5980
5925
  }
5981
5926
  },
5982
5927
  {
5983
- "search": "Sends data through API.postDetailed. The decorated property is ApiResult&lt;T&gt; | null: request, response, and typed result.\n",
5928
+ "search": "API configuration is read from the HTML scope, as with\n@get.\n",
5984
5929
  "files": {
5985
5930
  "docs/_decorators/post.md": {
5986
5931
  "title": "@post",
5987
5932
  "hashes": {
5988
- "post": {
5933
+ "minimal-usage": {
5989
5934
  "count": 1,
5990
- "title": "",
5935
+ "title": "Minimal usage",
5991
5936
  "type": "paragraph"
5992
5937
  }
5993
5938
  }
@@ -5995,14 +5940,14 @@
5995
5940
  }
5996
5941
  },
5997
5942
  {
5998
- "search": "Pass an Endpoint&lt;T&gt; as the first argument and a DataProviderKey for the request body as the second. Import post and ApiResult from @supersoniks/concorde/decorators, and Endpoint from @supersoniks/concorde/utils/endpoint.\n",
5943
+ "search": "Keep the decorator to access send(component). The body is read again when the\noperation runs.\n",
5999
5944
  "files": {
6000
5945
  "docs/_decorators/post.md": {
6001
5946
  "title": "@post",
6002
5947
  "hashes": {
6003
- "post": {
5948
+ "from-the-component": {
6004
5949
  "count": 1,
6005
- "title": "",
5950
+ "title": "From the component",
6006
5951
  "type": "paragraph"
6007
5952
  }
6008
5953
  }
@@ -6010,14 +5955,14 @@
6010
5955
  }
6011
5956
  },
6012
5957
  {
6013
- "search": "Same as @get: scoped HTML.getApiConfiguration(host) by default, or DataProviderKey&lt;APIConfiguration&gt; as third argument. See API configuration for mock demos.\n",
5958
+ "search": "send() is useful for “Save” or “Retry” buttons. It can repeat an operation\nwith side effects.\n",
6014
5959
  "files": {
6015
5960
  "docs/_decorators/post.md": {
6016
5961
  "title": "@post",
6017
5962
  "hashes": {
6018
- "configuration": {
5963
+ "from-the-component": {
6019
5964
  "count": 1,
6020
- "title": "Configuration",
5965
+ "title": "From the component",
6021
5966
  "type": "paragraph"
6022
5967
  }
6023
5968
  }
@@ -6025,14 +5970,14 @@
6025
5970
  }
6026
5971
  },
6027
5972
  {
6028
- "search": "Mock service: POST /docs-mock-api/api/register (same route as sonic-submit demos). Publisher setup lives in decorators-demo-post.ts.\n",
5973
+ "search": "The send action can decorate a local method. It runs after the method by\ndefault and waits for an eventual Promise to resolve:\n",
6029
5974
  "files": {
6030
5975
  "docs/_decorators/post.md": {
6031
5976
  "title": "@post",
6032
5977
  "hashes": {
6033
- "minimal-example": {
5978
+ "from-a-method-decorator": {
6034
5979
  "count": 1,
6035
- "title": "Minimal example",
5980
+ "title": "From a method decorator",
6036
5981
  "type": "paragraph"
6037
5982
  }
6038
5983
  }
@@ -6040,14 +5985,14 @@
6040
5985
  }
6041
5986
  },
6042
5987
  {
6043
- "search": "@post(\n new Endpoint&lt;SyncResponse, { sessionId: string }&gt;(&quot;sessions/${sessionId}/sync&quot;),\n syncRequest,\n { triggerKey: syncTrigger },\n)\n@state()\npayload?: ApiResult&lt;SyncResponse&gt; | null;\n \n\n",
5988
+ "search": "Use { when: &quot;before&quot; } when the body must be sent before the method runs:\n",
6044
5989
  "files": {
6045
5990
  "docs/_decorators/post.md": {
6046
5991
  "title": "@post",
6047
5992
  "hashes": {
6048
- "minimal-example": {
5993
+ "from-a-method-decorator": {
6049
5994
  "count": 1,
6050
- "title": "Minimal example",
5995
+ "title": "From a method decorator",
6051
5996
  "type": "paragraph"
6052
5997
  }
6053
5998
  }
@@ -6055,14 +6000,14 @@
6055
6000
  }
6056
6001
  },
6057
6002
  {
6058
- "search": "Dynamic endpoint path — changing sessionId on the host re-runs the POST (POST /docs-mock-api/api/sessions/{id}/sync):\n",
6003
+ "search": "The method decorator adds an explicit send. If the method also mutates the body\npublisher, set autoPostOnBodyMutation: false when the decorated method must\nbe the only trigger.\n",
6059
6004
  "files": {
6060
6005
  "docs/_decorators/post.md": {
6061
6006
  "title": "@post",
6062
6007
  "hashes": {
6063
- "live-demos": {
6008
+ "from-a-method-decorator": {
6064
6009
  "count": 1,
6065
- "title": "Live demos",
6010
+ "title": "From a method decorator",
6066
6011
  "type": "paragraph"
6067
6012
  }
6068
6013
  }
@@ -6070,14 +6015,14 @@
6070
6015
  }
6071
6016
  },
6072
6017
  {
6073
- "search": "@post + @publish on the same property (see @publish):\n",
6018
+ "search": "Options are the third argument, or the fourth argument when a configuration key\nis provided.\n",
6074
6019
  "files": {
6075
6020
  "docs/_decorators/post.md": {
6076
6021
  "title": "@post",
6077
6022
  "hashes": {
6078
- "live-demos": {
6023
+ "options-postoptions": {
6079
6024
  "count": 1,
6080
- "title": "Live demos",
6025
+ "title": "Options (`PostOptions`)",
6081
6026
  "type": "paragraph"
6082
6027
  }
6083
6028
  }
@@ -6085,14 +6030,14 @@
6085
6030
  }
6086
6031
  },
6087
6032
  {
6088
- "search": "Note: plusieurs composants @post sur la même page qui partagent le même bodyKey enverront chacun une requête à chaque mutation du body — utiliser une clé par composant (voir les deux démos live ci-dessus).\n",
6033
+ "search": "With a configuration key:\n",
6089
6034
  "files": {
6090
6035
  "docs/_decorators/post.md": {
6091
6036
  "title": "@post",
6092
6037
  "hashes": {
6093
- "live-demos": {
6038
+ "options-postoptions": {
6094
6039
  "count": 1,
6095
- "title": "Live demos",
6040
+ "title": "Options (`PostOptions`)",
6096
6041
  "type": "paragraph"
6097
6042
  }
6098
6043
  }
@@ -6100,14 +6045,14 @@
6100
6045
  }
6101
6046
  },
6102
6047
  {
6103
- "search": "Path placeholders (${sessionId}, …): Dynamic path placeholders.\n",
6048
+ "search": "See @put and\n@patch: they use the same model with a\ndifferent HTTP method.\n",
6104
6049
  "files": {
6105
6050
  "docs/_decorators/post.md": {
6106
6051
  "title": "@post",
6107
6052
  "hashes": {
6108
- "live-demos": {
6053
+ "demos": {
6109
6054
  "count": 1,
6110
- "title": "Live demos",
6055
+ "title": "Demos",
6111
6056
  "type": "paragraph"
6112
6057
  }
6113
6058
  }
@@ -6190,22 +6135,7 @@
6190
6135
  }
6191
6136
  },
6192
6137
  {
6193
- "search": "Sends data through API.putDetailed. Same model as @post: decorated property is ApiResult&lt;T&gt; | null (request, response, result).\n",
6194
- "files": {
6195
- "docs/_decorators/put.md": {
6196
- "title": "@put",
6197
- "hashes": {
6198
- "put": {
6199
- "count": 1,
6200
- "title": "",
6201
- "type": "paragraph"
6202
- }
6203
- }
6204
- }
6205
- }
6206
- },
6207
- {
6208
- "search": "Pass an Endpoint&lt;T&gt; and a DataProviderKey for the request body. Import put and ApiResult from @supersoniks/concorde/decorators.\n",
6138
+ "search": "@put replaces a resource with the body from a publisher. It uses exactly the\nsame model as @post:\nEndpoint&lt;T&gt;, DataProviderKey&lt;B&gt;, ApiResult&lt;T&gt;, options, and the\nsend(component) handle.\n",
6209
6139
  "files": {
6210
6140
  "docs/_decorators/put.md": {
6211
6141
  "title": "@put",
@@ -6220,29 +6150,14 @@
6220
6150
  }
6221
6151
  },
6222
6152
  {
6223
- "search": "@put(new Endpoint&lt;Resource, { resourceId: string }&gt;(&quot;resources/${resourceId}&quot;), bodyKey)\n@state()\npayload?: ApiResult&lt;Resource&gt; | null;\n \n\n",
6224
- "files": {
6225
- "docs/_decorators/put.md": {
6226
- "title": "@put",
6227
- "hashes": {
6228
- "example": {
6229
- "count": 1,
6230
- "title": "Example",
6231
- "type": "paragraph"
6232
- }
6233
- }
6234
- }
6235
- }
6236
- },
6237
- {
6238
- "search": "Changing resourceId on the host re-runs the PUT when the path becomes ready — see Dynamic path placeholders.\n",
6153
+ "search": "The PUT is also sent automatically when the body mutates, unless\nautoPostOnBodyMutation: false is set. See\n@post for the option details:\n",
6239
6154
  "files": {
6240
6155
  "docs/_decorators/put.md": {
6241
6156
  "title": "@put",
6242
6157
  "hashes": {
6243
- "example": {
6158
+ "minimal-usage": {
6244
6159
  "count": 1,
6245
- "title": "Example",
6160
+ "title": "Minimal usage",
6246
6161
  "type": "paragraph"
6247
6162
  }
6248
6163
  }